/* ========== 全局重置与变量 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-bg: #0b1120;
    --card-bg: #ffffff;
    --accent-purple: #8b5cf6;
    --accent-blue: #60a5fa;
    --text-primary: #1a1f2e;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-subtle: #eef2ff;
    --glow-purple: rgba(139, 92, 246, 0.25);
    --radius-xl: 2rem;
    --radius-lg: 1.5rem;
    --radius-md: 1rem;
    --radius-sm: 0.6rem;
    --shadow-card: 0 20px 35px -12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 25px 40px -12px rgba(99, 102, 241, 0.2);
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fb;
    color: #1a1f2e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========== Header ========== */
header {
    background: #0b1120;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1rem 0;
    gap: 0.8rem;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c084fc, #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.logo-badge {
    background: rgba(96, 165, 250, 0.2);
    color: #94a3f8;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 1.6rem;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: #cbd5e6;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #a78bfa;
}

.nav-links a.active {
    color: #c084fc;
    border-bottom: 2px solid #c084fc;
    padding-bottom: 0.25rem;
}

/* ========== Hero ========== */
.hero {
    background: linear-gradient(145deg, #0a0f1c 0%, #101826 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #1e293b;
}

.hero::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle at 30% 40%, rgba(139, 92, 246, 0.15), transparent 60%);
    pointer-events: none;
}

.hero-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 5rem 0 4rem;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1.2;
    min-width: 280px;
}

.hero-text .tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
    letter-spacing: 0.02em;
}

.hero-text h2 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #a78bfa, #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.2rem;
    color: #94a3b8;
    margin: 1.2rem 0 2rem;
    max-width: 90%;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(95deg, #8b5cf6, #6366f1);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
    background: linear-gradient(95deg, #7c3aed, #4f46e5);
}

.btn-outline-light {
    border: 1px solid #475569;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    padding: 0.8rem 2rem;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-outline-light:hover {
    border-color: #a78bfa;
    background: rgba(139, 92, 246, 0.1);
    color: white;
}

.stats-card {
    flex: 0.9;
    min-width: 240px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 2rem;
    padding: 1.8rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.5);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 5px #8b5cf6);
    flex-shrink: 0;
}

.stat-info h4 {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-info p {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
}

/* ========== Feature Section ========== */
.feature-section {
    padding: 5rem 0;
    background: #f5f7fb;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1e1b4b, #3b0764);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.section-desc {
    text-align: center;
    color: #475569;
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========== Quick Nav Cards ========== */
.quick-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin: 2rem 0 3rem;
}

.quick-nav-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem 1.2rem;
    text-align: center;
    text-decoration: none;
    color: #1a1f2e;
    border: 1px solid #eef2ff;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.quick-nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 30px -10px rgba(139, 92, 246, 0.2);
    border-color: #c7d2fe;
    color: #7c3aed;
}

.quick-nav-card .nav-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.quick-nav-card span {
    font-weight: 600;
    font-size: 0.95rem;
}

.quick-nav-card small {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 400;
}

/* ========== CTA Banner ========== */
.cta-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #0b1120 100%);
    border-radius: 2.5rem;
    padding: 3.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.cta-banner::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%);
    top: -80px;
    right: -60px;
    pointer-events: none;
}

.cta-banner h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
}

.cta-banner p {
    color: #cbd5e6;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner .btn-primary {
    font-size: 1.1rem;
    padding: 1rem 2.8rem;
    position: relative;
    z-index: 1;
}

/* ========== Footer ========== */
footer {
    background: #0b1120;
    color: #9ca3af;
    padding: 2.5rem 0;
    margin-top: 3rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.footer-col h5 {
    color: #e2e8f0;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.4rem;
}

.footer-col ul li a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #c084fc;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid #1f2937;
    font-size: 0.8rem;
}

/* ========== 社区论坛特有样式 ========== */

/* 讨论板块网格 */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.board-card {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid #eef2ff;
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.board-card:hover {
    transform: translateY(-5px);
    border-color: #c7d2fe;
    box-shadow: 0 20px 35px -12px rgba(99, 102, 241, 0.2);
}

.board-icon {
    font-size: 3rem;
    line-height: 1;
}

.board-card h3 {
    font-size: 1.3rem;
    color: #1a1f2e;
}

.board-card p {
    color: #4b5563;
    font-size: 0.95rem;
    flex-grow: 1;
}

.board-stat {
    display: inline-block;
    background: #ede9fe;
    color: #5b21b6;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* 热门话题列表 */
.topic-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.topic-item {
    background: #ffffff;
    border-radius: 1.2rem;
    padding: 1.5rem;
    border: 1px solid #eef2ff;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.topic-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 12px 28px -10px rgba(99, 102, 241, 0.15);
}

.topic-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
    background: #f8fafc;
    border-radius: 0.8rem;
    padding: 0.8rem 0.5rem;
    text-align: center;
}

.vote-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7c3aed;
    line-height: 1;
}

.vote-label {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

.topic-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.topic-content h3 a {
    color: #1a1f2e;
    text-decoration: none;
    transition: color 0.2s;
}

.topic-content h3 a:hover {
    color: #7c3aed;
}

.topic-content p {
    color: #4b5563;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.topic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.topic-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

/* 用户贡献卡片 */
.contribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.contribution-card {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 1.8rem;
    border: 1px solid #eef2ff;
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.contribution-card:hover {
    transform: translateY(-4px);
    border-color: #c7d2fe;
    box-shadow: 0 18px 30px -10px rgba(139, 92, 246, 0.18);
}

.contrib-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contribution-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #1a1f2e;
}

.contribution-card p {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* 星级评分 */
.star-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.star {
    font-size: 1.5rem;
    color: #e5e7eb;
}

.star.filled {
    color: #f59e0b;
}

.star.half {
    position: relative;
    display: inline-block;
    color: #e5e7eb;
}

.star.half::before {
    content: "★";
    color: #f59e0b;
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
}

.rating-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

/* 榜单列表 */
.rank-list {
    list-style: none;
    padding: 0;
}

.rank-list li {
    padding: 0.4rem 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rank-list li span:first-child {
    font-size: 1.2rem;
}

/* 等级徽章 */
.level-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.level-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #4b5563;
}

.level-badge.lv1 { background: #d1fae5; color: #065f46; }
.level-badge.lv2 { background: #dbeafe; color: #1e40af; }
.level-badge.lv3 { background: #fef3c7; color: #92400e; }
.level-badge.lv4 { background: #ede9fe; color: #5b21b6; }

/* 社区价值网格 */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.value-item {
    background: #ffffff;
    border-radius: 1.2rem;
    padding: 1.5rem;
    border: 1px solid #eef2ff;
    box-shadow: 0 8px 20px -8px rgba(0,0,0,0.04);
    transition: transform 0.3s;
}

.value-item:hover {
    transform: translateY(-3px);
    border-color: #c7d2fe;
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.value-item h4 {
    font-size: 1.1rem;
    color: #1a1f2e;
    margin-bottom: 0.5rem;
}

.value-item p {
    color: #4b5563;
    font-size: 0.9rem;
}

/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
    .hero-text h2 {
        font-size: 2.2rem;
    }
    .nav-links {
        gap: 0.8rem;
        margin-top: 0.4rem;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-grid {
        padding: 3rem 0;
        gap: 2rem;
    }
    .stats-card {
        width: 100%;
    }
    .section-title {
        font-size: 1.7rem;
    }
    .cta-banner h3 {
        font-size: 1.5rem;
    }
    .cta-banner {
        padding: 2.5rem 1.5rem;
        border-radius: 2rem;
    }
    .topic-item {
        flex-direction: column;
        gap: 0.8rem;
    }
    .topic-votes {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
        min-width: auto;
        padding: 0.6rem 1rem;
    }
    .board-grid,
    .contribution-grid,
    .value-grid {
        grid-template-columns: 1fr;
    }
    .quick-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .quick-nav-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-text p {
        max-width: 100%;
    }
    .btn-group {
        flex-direction: column;
        align-items: flex-start;
    }
}