/* WCA官方网站样式表 */
/* 主要变量定义 */
:root {
    --bg-deep: #080c12;
    --bg-surface: #0f161e;
    --bg-card: #141c26;
    --bg-elevated: #1a2330;
    --text-primary: #e8edf3;
    --text-secondary: #b0bec5;
    --text-muted: #6e7f8d;
    --accent-emerald: #2ecc71;
    --accent-emerald-dim: #1a7a43;
    --accent-gold: #d4a843;
    --accent-silver: #b0bcc8;
    --border-subtle: #1e2a36;
    --border-active: #2ecc7150;
    --glow-emerald: 0 0 20px rgba(46, 204, 113, 0.25);
    --glow-gold: 0 0 15px rgba(212, 168, 67, 0.2);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-display: 'Georgia', 'Times New Roman', 'Songti SC', 'Noto Serif SC', serif;
    --font-body: 'Inter', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', 'Courier New', monospace;
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 粒子画布 */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* 全局光效 */
.global-glow-top {
    position: fixed;
    top: -30vh;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 60vh;
    background: radial-gradient(ellipse at center, rgba(46, 204, 113, 0.04) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.global-glow-bottom {
    position: fixed;
    bottom: -20vh;
    left: 50%;
    transform: translateX(-50%);
    width: 70vw;
    height: 50vh;
    background: radial-gradient(ellipse at center, rgba(212, 168, 67, 0.03) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏样式 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 12, 18, 0.82);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.nav-logo-svg {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.nav-logo-svg .tree-trunk {
    fill: var(--accent-silver);
}

.nav-logo-svg .tree-canopy {
    fill: var(--accent-emerald);
    filter: drop-shadow(0 0 6px rgba(46, 204, 113, 0.5));
}

.nav-logo-svg .star-dot {
    fill: var(--accent-gold);
}

.nav-brand-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: var(--text-primary);
}

.nav-brand-sub {
    display: block;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links li a {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-links li a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links li a.nav-active {
    color: var(--accent-emerald);
    background: rgba(46, 204, 113, 0.08);
}

.nav-lang-switch {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    flex-shrink: 0;
}

.nav-lang-switch button {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.nav-lang-switch button.active-lang {
    color: var(--accent-emerald);
    border-color: var(--accent-emerald-dim);
    background: rgba(46, 204, 113, 0.08);
}

.nav-lang-switch button:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* 英雄区样式 */
.hero-section {
    position: relative;
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    color: var(--accent-emerald);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 16px;
}

.hero-title .emerald-accent {
    color: var(--accent-emerald);
    text-shadow: var(--glow-emerald);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-subtitle em {
    font-style: normal;
    color: var(--accent-gold);
    font-weight: 500;
}

.hero-cta-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    background: var(--accent-emerald);
    color: #080c12;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    background: #3ddb84;
    box-shadow: 0 6px 24px rgba(46, 204, 113, 0.45);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1.5px solid var(--accent-silver);
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.03em;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    background: rgba(46, 204, 113, 0.06);
    box-shadow: var(--glow-emerald);
}

/* 统计数据条 */
.stats-strip {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.stat-number .counter-glow {
    color: var(--accent-emerald);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* 内容网格布局 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    padding: 48px 0;
}

/* 公告样式 */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.announcement-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.announcement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.announcement-card:hover {
    border-color: var(--border-active);
    background: var(--bg-elevated);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.announcement-card .ann-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-emerald);
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.announcement-card .ann-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-left: 8px;
    vertical-align: middle;
}

.tag-new {
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent-emerald);
}

.tag-important {
    background: rgba(212, 168, 67, 0.15);
    color: var(--accent-gold);
}

.tag-document {
    background: rgba(176, 188, 200, 0.1);
    color: var(--accent-silver);
}

.announcement-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    margin: 6px 0 4px;
    line-height: 1.4;
}

.announcement-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.announcement-card .ann-dept {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.03em;
}

/* 侧边栏样式 */
.sidebar-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-panel h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.dept-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dept-chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-decoration: none;
    transition: var(--transition-fast);
    letter-spacing: 0.02em;
}

.dept-chip:hover {
    border-color: var(--accent-emerald-dim);
    color: var(--accent-emerald);
    background: rgba(46, 204, 113, 0.06);
    box-shadow: var(--glow-emerald);
}

.quick-link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-link-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.quick-link-list li a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-subtle);
}

.quick-link-list li a .link-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.live-clock {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 16px;
    letter-spacing: 0.04em;
}

.live-clock .utc-label {
    color: var(--accent-emerald);
}

/* 页脚样式 */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0;
    margin-top: 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-col h5 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding: 20px 24px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    border-top: 1px solid var(--border-subtle);
    margin-top: 32px;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.footer-bottom .wca-tagline {
    color: var(--accent-emerald);
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(8, 12, 18, 0.95);
        backdrop-filter: blur(18px);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero-section {
        padding: 48px 0 36px;
    }

    .stats-strip {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .navbar-inner {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-cta-row {
        flex-direction: column;
        align-items: center;
    }

    .nav-brand-text {
        font-size: 0.9rem;
    }
}

/* ========== 路由系统样式 ========== */
.route-content {
    display: none;
}

.route-content.active {
    display: revert;
    animation: routeFadeIn 0.3s ease;
}

@keyframes routeFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 公文列表页面样式 ========== */
.documents-header {
    margin-bottom: 28px;
}

.documents-header .back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--accent-emerald);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.documents-header .back-link:hover {
    color: var(--accent-gold);
}

.documents-header .section-title {
    margin-top: 0;
}

.document-card-link {
    cursor: pointer;
}

.document-card-link .doc-icon {
    font-size: 1.2rem;
}

/* ========== 公文详情页面样式 ========== */
.document-detail-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.document-detail-header .back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--accent-emerald);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.document-detail-header .back-link:hover {
    color: var(--accent-gold);
}

.document-detail-header .section-title {
    margin-top: 0;
    margin-bottom: 12px;
}

.document-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.document-meta-bar span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.document-meta-bar strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* 公文正文Markdown渲染 */
.document-body-md {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-primary);
}

.document-body-md p {
    margin-bottom: 0.8rem;
}

.document-body-md h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-emerald);
    margin: 1.6rem 0 0.8rem;
    letter-spacing: 0.02em;
}

.document-body-md h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin: 1.2rem 0 0.5rem;
}

.document-body-md strong {
    color: var(--accent-emerald);
    font-weight: 700;
}

.document-body-md .doc-headline {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.document-body-md hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 1.2rem 0;
    opacity: 0.5;
}

.document-body-md ul {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 0.8rem 1.2rem;
}

.document-body-md ul li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.document-body-md ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent-emerald);
    font-weight: 700;
    font-size: 1.1rem;
}

/* 旧pre样式保留兼容 */
.document-content-pre {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.85;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 公文操作按钮 */
.document-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .document-body {
        padding: 20px 16px;
    }

    .document-content-pre {
        font-size: 0.85rem;
    }

    .document-meta-bar {
        flex-direction: column;
        gap: 8px;
    }
}

/* ========== 领导层页面样式 ========== */
.leadership-meta {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 28px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.leadership-section {
    margin-bottom: 32px;
}

.leadership-section-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-emerald);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.leadership-table-wrap {
    overflow-x: auto;
    margin-bottom: 12px;
}

.leadership-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.leadership-table thead th {
    background: rgba(46, 204, 113, 0.08);
    color: var(--accent-emerald);
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--accent-emerald-dim);
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.leadership-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: top;
    line-height: 1.5;
}

.leadership-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.leadership-table tbody tr.leader-row-president {
    background: rgba(212, 168, 67, 0.06);
}

.leadership-table tbody tr.leader-row-premier {
    background: rgba(46, 204, 113, 0.04);
}

.leader-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--accent-gold);
    color: #080c12;
}

.leader-badge-premier {
    background: var(--accent-emerald);
    color: #080c12;
}

.rating-sss {
    color: var(--accent-gold);
    font-weight: 700;
}

.rating-8 {
    color: #ff6b6b;
    font-weight: 700;
}

.rating-a {
    color: var(--accent-emerald);
    font-weight: 700;
}

.rating-7 {
    color: #a29bfe;
    font-weight: 700;
}

.leadership-note {
    background: rgba(46, 204, 113, 0.04);
    border-left: 3px solid var(--accent-emerald-dim);
    padding: 12px 16px;
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.leadership-notes-list ol {
    padding-left: 1.5rem;
    margin: 0;
}

.leadership-notes-list ol li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .leadership-table {
        font-size: 0.78rem;
    }
    .leadership-table thead th,
    .leadership-table tbody td {
        padding: 8px 10px;
    }
}