/*
 * 威兔MINI模版样式 - 1:1还原
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: #3b82f6;
}

/* 顶部导航栏 */
.header-wrapper {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* LOGO区域 */
.logo-area {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: 40px;
}

.nav-item {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    color: #3b82f6;
}

.nav-item.active {
    color: #dc2626;
}

/* 分类下拉菜单 */
.nav-item-wrapper {
    position: relative;
    display: inline-block;
}

.nav-arrow {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.nav-item-wrapper:hover .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 160px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border: 1px solid #e5e7eb;
}

.nav-item-wrapper:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-item {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}

.nav-dropdown-item:hover {
    background: #f3f4f6;
    color: #667eea;
}

/* 搜索框 */
.search-area {
    display: flex;
    align-items: center;
    margin: 0 20px;
}

.search-box {
    position: relative;
}

.search-input {
    width: 220px;
    height: 36px;
    padding: 0 44px 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #3b82f6;
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #3b82f6;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 右侧功能区 */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    color: #666;
    font-size: 18px;
    cursor: pointer;
}

.header-icon-message {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.header-icon-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

.header-avatar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.header-username {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.header-icon:hover {
    color: #3b82f6;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-register {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-register:hover {
    transform: translateY(-1px);
}

/* 主内容区域容器 */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

/* 左侧主内容区 */
.content-left {
    flex: 1;
    min-width: 0;
}

/* 右侧边栏 */
.sidebar-right {
    width: 300px;
    flex-shrink: 0;
}

/* 轮播图区域 */
.carousel-section {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.carousel-main {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 280px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.carousel-icon {
    font-size: 48px;
}

.carousel-text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
}

.carousel-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #ff6b6b;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.carousel-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.carousel-desc {
    font-size: 14px;
    opacity: 0.9;
}

.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}

.carousel-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

.carousel-thumbs {
    width: 160px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.carousel-thumb {
    height: 85px;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-thumb-placeholder {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-thumb-placeholder:nth-child(2) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.carousel-thumb-placeholder:nth-child(3) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.thumb-icon {
    font-size: 32px;
}

.thumb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
    color: #fff;
}

.thumb-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #4ecdc4;
    color: white;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 4px;
}

.thumb-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* 推荐内容区域 */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #f0f0f0;
}

.section-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.section-time {
    font-size: 13px;
    color: #999;
}

/* 文章列表卡片 */
.article-card {
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.article-card:hover {
    background: #fafafa;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title:hover {
    color: #3b82f6;
}

.article-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
}

.article-images {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.article-img {
    width: calc((100% - 24px) / 3);
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.article-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f5f5;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.article-img:hover img {
    transform: scale(1.1);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #999;
    font-size: 13px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.article-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 右侧边栏 - 个人信息卡片 */
.widget {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.profile-widget-header {
    background: linear-gradient(135deg, #3a4b7b 0%, #2d3a5c 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
}

.profile-info {
    color: #fff;
}

.profile-greeting {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-tagline {
    font-size: 13px;
    opacity: 0.9;
}

.profile-widget-footer {
    padding: 16px;
    display: flex;
    justify-content: space-around;
}

.profile-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #666;
    font-size: 13px;
}

.profile-action-icon {
    font-size: 22px;
    color: #999;
}

.profile-action:hover {
    color: #3b82f6;
}

.profile-action:hover .profile-action-icon {
    color: #3b82f6;
}

/* 分享引导卡片 */
.share-widget {
    padding: 20px;
}

.share-widget-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.share-widget-text {
    flex: 1;
}

.share-widget-text p {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 16px;
}

.btn-share {
    display: inline-block;
    padding: 8px 24px;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-share:hover {
    background: #eff6ff;
}

.share-widget-icons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-icon {
    font-size: 24px;
}

/* 推荐关注卡片 */
.follow-widget {
    padding: 20px;
}

.follow-widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.follow-item:last-child {
    border-bottom: none;
}

.follow-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.follow-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.follow-info {
    flex: 1;
}

.follow-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.follow-desc {
    font-size: 12px;
    color: #999;
}

.btn-follow {
    padding: 6px 16px;
    background: #fff;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-follow:hover {
    background: #3b82f6;
    color: #fff;
}

.follow-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 12px;
}

.follow-page-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.follow-page-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* 响应式布局 */
@media (max-width: 900px) {
    .sidebar-right {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 12px;
    }
    
    .search-input {
        width: 140px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .carousel-section {
        flex-direction: column;
    }
    
    .carousel-thumbs {
        flex-direction: row;
        width: 100%;
    }
    
    .carousel-thumb {
        flex: 1;
    }
    
    .article-images {
        gap: 8px;
    }

    .article-img {
        width: calc((100% - 16px) / 3);
        height: 90px;
    }
}

/* 分类页面移动端响应式 */
@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .article-image-wrapper {
        width: 100%;
        height: 180px;
    }
    
    .article-title {
        font-size: 17px;
    }
    
    .article-summary {
        font-size: 13px;
    }
    
    .article-meta-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-meta-left {
        gap: 12px;
    }
}

/* 页脚样式 */
.footer-wrapper {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    padding: 40px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-site-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.footer-copyright {
    font-size: 14px;
    color: #666;
}

.footer-record {
    font-size: 13px;
    color: #999;
}

.footer-record a {
    color: #999;
    text-decoration: none;
}

.footer-record a:hover {
    color: #3b82f6;
}

/* Modal弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-container.show {
    transform: scale(1);
}

.custom-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.custom-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.custom-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.modal-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.custom-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.custom-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
