/* 分类页面样式 */

/* 分类英雄区域 - 现代化设计 */
.category-hero {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 24px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 50%, rgba(240, 147, 251, 0.95) 100%);
    backdrop-filter: blur(10px);
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 25% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: float 8s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.8;
    }
    33% { 
        transform: translateY(-8px) rotate(1deg); 
        opacity: 0.9;
    }
    66% { 
        transform: translateY(-15px) rotate(-1deg); 
        opacity: 1;
    }
}

.category-hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    backdrop-filter: blur(5px);
}

.category-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.category-icon-large {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: white;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    box-shadow: 
        0 8px 32px rgba(255, 255, 255, 0.1) inset,
        0 20px 40px rgba(0, 0, 0, 0.1);
}

.category-icon-large:hover {
    transform: scale(1.15) rotate(8deg) translateY(-5px);
    box-shadow: 
        0 8px 32px rgba(255, 255, 255, 0.2) inset,
        0 25px 50px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.35);
}

.icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    filter: blur(1px);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.6; 
        transform: translate(-50%, -50%) scale(1); 
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.2); 
    }
}

.category-info {
    flex: 1;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.category-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: #ffffff;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 255, 255, 0.3);
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.category-description {
    font-size: 18px;
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.95);
    opacity: 1;
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-weight: 500;
    max-width: 600px;
}

.category-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 180px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    border-color: rgba(255, 255, 255, 0.5);
}

.stat-card:hover::before {
    opacity: 1;
}

/* 第一个卡片 - 帖子数量 (蓝色主题) */
.stat-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(41, 128, 185, 0.15) 100%);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.stat-card:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(41, 128, 185, 0.25) 100%);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.3) 0%, rgba(41, 128, 185, 0.2) 100%);
    color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

/* 第二个卡片 - 活跃社区 (绿色主题) */
.stat-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.15) 100%);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.stat-card:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.25) 100%);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.2);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.2) 100%);
    color: #2ecc71;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
}

/* 第三个卡片 - 热门讨论 (橙色主题) */
.stat-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.2) 0%, rgba(211, 84, 0, 0.15) 100%);
    border: 1px solid rgba(230, 126, 34, 0.3);
}

.stat-card:nth-child(3):hover {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.3) 0%, rgba(211, 84, 0, 0.25) 100%);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.2);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.3) 0%, rgba(211, 84, 0, 0.2) 100%);
    color: #e67e22;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    color: white;
    text-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.2);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.95;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 第一个卡片文字颜色优化 - 帖子数量 */
.stat-card:nth-child(1) .stat-number {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(52, 152, 219, 0.4);
}

.stat-card:nth-child(1) .stat-label {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.3);
}

/* 第二个卡片文字颜色优化 - 活跃社区 */
.stat-card:nth-child(2) .stat-number {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(46, 204, 113, 0.4);
}

.stat-card:nth-child(2) .stat-label {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(46, 204, 113, 0.3);
}

/* 第三个卡片文字颜色优化 - 热门讨论 */
.stat-card:nth-child(3) .stat-number {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(230, 126, 34, 0.4);
}

.stat-card:nth-child(3) .stat-label {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(230, 126, 34, 0.3);
}

/* 论坛区域样式增强 - 现代化设计 */
.forum-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
}

.section-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 24px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.section-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 16px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.section-header h2 i {
    color: #667eea;
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.sort-options {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    border-radius: 16px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sort-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.sort-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sort-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.sort-btn:hover::before {
    opacity: 1;
}

.sort-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    transform: translateY(-1px);
}

.sort-btn i {
    font-size: 13px;
    position: relative;
    z-index: 2;
}

/* 空状态样式增强 - 现代化设计 */
.empty-state {
    text-align: center;
    padding: 100px 40px;
    color: #64748b;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    border-radius: 20px;
    margin: 20px;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 42px;
    color: #94a3b8;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.empty-state h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: #334155;
    letter-spacing: -0.5px;
}

.empty-state p {
    font-size: 18px;
    margin: 0 0 40px 0;
    line-height: 1.7;
    color: #64748b;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a855f7 100%);
}

/* 头像容器样式 */
.avatar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* 创建帖子按钮样式 - 现代化设计 */
.create-thread-button {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-hero {
        margin-bottom: 15px; /* 减少hero区域下方间距 */
    }
    
    .category-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px; /* 减少内边距 */
        gap: 15px;
    }
    
    .category-title {
        font-size: 22px; /* 稍微减小标题 */
    }
    
    .category-description {
        font-size: 14px;
        margin-bottom: 15px; /* 减少描述下方间距 */
    }
    
    .category-stats {
        justify-content: center;
        gap: 10px;
    }
    
    .stat-card {
        min-width: 90px; /* 稍微减小卡片宽度 */
        padding: 10px 14px; /* 减少内边距 */
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        padding: 15px; /* 减少内边距 */
        gap: 12px;
    }
    
    .section-header h2 {
        font-size: 18px; /* 减小标题字体 */
        text-align: center;
    }
    
    .sort-options {
        justify-content: center;
    }
    
    .sort-btn {
        padding: 6px 10px; /* 减小按钮尺寸 */
        font-size: 11px;
    }
    
    /* 优化帖子列表显示 */
    .thread-list {
        padding: 0 10px; /* 减少列表内边距 */
    }
    
    .thread-item {
        padding: 12px 15px; /* 减少帖子项内边距 */
        margin-bottom: 10px; /* 减少项目间距 */
        border-radius: 8px;
    }
    
    .thread-title {
        font-size: 15px; /* 适中的标题字体 */
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    .thread-meta {
        gap: 8px;
        font-size: 12px;
    }
    
    .avatar {
        width: 32px; /* 稍微减小头像 */
        height: 32px;
    }
}

@media (max-width: 480px) {
    .category-hero {
        margin-bottom: 12px; /* 进一步减少间距 */
        border-radius: 10px;
    }
    
    .category-hero-content {
        padding: 20px 12px; /* 更紧凑的内边距 */
        gap: 12px;
    }
    
    .category-icon-large {
        width: 50px; /* 更小的图标 */
        height: 50px;
        font-size: 24px;
    }
    
    .category-title {
        font-size: 18px; /* 手机端更小的标题 */
    }
    
    .category-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .category-stats {
        flex-direction: row; /* 保持水平布局，节省空间 */
        justify-content: space-around;
        gap: 6px;
    }
    
    .stat-card {
        min-width: 70px; /* 更小的卡片 */
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .stat-number {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .section-header {
        padding: 10px; /* 更紧凑的头部 */
        gap: 8px;
    }
    
    .section-header h2 {
        font-size: 16px;
    }
    
    .sort-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    /* 手机端帖子列表优化 */
    .thread-list {
        padding: 12px;
    }
    
    .thread-item {
        padding: 10px 12px; /* 更紧凑的内边距 */
        margin-bottom: 6px; /* 更小的间距，显示更多帖子 */
        border-radius: 6px;
    }
    
    .thread-main {
        gap: 10px;
    }
    
    .thread-title {
        font-size: 14px; /* 手机端标题字体 */
        line-height: 1.3;
        margin-bottom: 6px;
        /* 限制标题最多显示2行 */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        word-break: break-word;
    }
    
    .thread-meta {
        gap: 6px;
        font-size: 11px;
        flex-wrap: wrap;
    }
    
    .thread-meta span {
        padding: 2px 6px;
        border-radius: 10px;
        background: rgba(37, 117, 252, 0.1);
        color: var(--primary-color);
    }
    
    .avatar {
        width: 28px; /* 手机端更小的头像 */
        height: 28px;
        flex-shrink: 0;
    }
    
    .thread-status {
        position: absolute;
        top: 6px;
        right: 6px;
        gap: 4px;
    }
    
    .hot-badge, .new-badge {
        padding: 2px 6px;
        font-size: 9px;
        border-radius: 8px;
    }
    
    .empty-state {
        padding: 40px 15px; /* 减少空状态的内边距 */
    }
    
    .empty-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .create-thread-button {
        margin-top: 15px;
        padding: 15px;
    }
}