:root {
    color-scheme: dark;
    --bg: #07111f;
    --bg-elevated: rgba(12, 24, 44, 0.88);
    --panel: rgba(10, 19, 36, 0.84);
    --panel-strong: #0f1d35;
    --border: rgba(148, 163, 184, 0.16);
    --text: #e5eefb;
    --muted: #99aac7;
    --heading: #f8fbff;
    --primary: #4ade80;
    --primary-dark: #22c55e;
    --accent: #60a5fa;
    --shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: min(1160px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 30%),
        linear-gradient(180deg, #07111f 0%, #091426 48%, #060d18 100%);
    color: var(--text);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -40px;
    z-index: 100;
    padding: 10px 14px;
    background: #fff;
    color: #111827;
    border-radius: 999px;
}

.skip-link:focus {
    top: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    background: rgba(7, 14, 28, 0.82);
    border-bottom: 1px solid var(--border);
}

.site-nav,
.footer-inner,
.section,
.hero,
.page-hero,
.article-shell {
    width: var(--container);
    margin: 0 auto;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-badge {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.24), rgba(96, 165, 250, 0.24));
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 18px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--heading);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.button,
.button-secondary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button {
    color: #03110a;
    background: linear-gradient(135deg, var(--primary), #86efac);
    box-shadow: 0 16px 36px rgba(34, 197, 94, 0.28);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.32);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--heading);
}

.button-ghost {
    min-height: 40px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.button-secondary:hover,
.button-ghost:hover {
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--heading);
    transform: translateY(-1px);
}

.hero {
    padding: 52px 0 28px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
}

.hero-copy,
.page-copy {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(74, 222, 128, 0.18);
    background: rgba(74, 222, 128, 0.08);
    color: #bbf7d0;
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-copy h1,
.article-head h1 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero h1 span,
.page-copy h1 span,
.accent-text {
    background: linear-gradient(135deg, #8ef4b0 0%, #73b6ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    margin: 0;
    font-size: 1.08rem;
    color: var(--muted);
}

.hero-actions,
.metric-list,
.tag-list,
.mini-links,
.cta-strip,
.trust-grid,
.resource-grid,
.feature-grid,
.stats-grid,
.post-grid,
.article-grid,
.faq-grid,
.legal-grid {
    display: grid;
    gap: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
}

.tag-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tag {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.96rem;
}

.hero-visual,
.panel,
.glass-card,
.article-card,
.faq-card,
.legal-card,
.stat-card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(15, 29, 53, 0.92), rgba(8, 16, 31, 0.92));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-visual {
    overflow: hidden;
}

.visual-frame {
    position: relative;
    min-height: 100%;
}

.visual-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.visual-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(180deg, rgba(7, 14, 28, 0.14), rgba(7, 14, 28, 0.74));
}

.metric-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric strong,
.stat-card strong {
    display: block;
    color: var(--heading);
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.metric span,
.stat-card span {
    color: var(--muted);
    font-size: 0.95rem;
}

.section {
    padding: 34px 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-head h2,
.article-content h2,
.legal-card h2 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.section-head p,
.article-content p,
.legal-card p,
.article-content li,
.faq-card p,
.article-meta,
.breadcrumbs,
.section-note {
    margin: 0;
    color: var(--muted);
}

.feature-grid,
.trust-grid,
.stats-grid,
.resource-grid,
.topic-grid,
.sitemap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-grid,
.faq-grid,
.legal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card,
.resource-card,
.topic-card,
.sitemap-card,
.post-card,
.faq-card,
.legal-card,
.cta-banner,
.article-aside,
.article-content,
.index-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--panel);
}

.feature-card h3,
.resource-card h3,
.topic-card h3,
.sitemap-card h3,
.post-card h2,
.faq-card h3,
.legal-card h2,
.article-content h3,
.article-aside h3 {
    margin: 0 0 10px;
    color: var(--heading);
    font-size: 1.14rem;
}

.feature-card p,
.resource-card p,
.topic-card p,
.sitemap-card p,
.post-card p,
.article-content ul,
.article-content ol,
.article-content blockquote {
    margin: 0;
    color: var(--muted);
}

.feature-icon,
.pill,
.article-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
    border: 1px solid rgba(96, 165, 250, 0.16);
    font-size: 0.88rem;
    font-weight: 700;
}

.trust-grid .feature-icon {
    background: rgba(74, 222, 128, 0.12);
    color: #bbf7d0;
    border-color: rgba(74, 222, 128, 0.16);
}

.stats-grid .stat-card {
    padding: 24px;
}

.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(96, 165, 250, 0.1));
}

.topic-card,
.sitemap-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.92rem;
}

.text-link {
    color: #bbf7d0;
    font-weight: 700;
}

.text-link:hover {
    color: #dcfce7;
}

.cta-copy h2,
.cta-copy p {
    margin: 0;
}

.cta-copy h2 {
    color: var(--heading);
}

.page-hero {
    padding: 56px 0 22px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.95rem;
}

.breadcrumbs span {
    opacity: 0.5;
}

.post-grid {
    margin-top: 18px;
}

.post-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.post-card img {
    width: calc(100% + 48px);
    margin: -24px -24px 4px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: auto;
}

.article-shell {
    padding: 54px 0 28px;
}

.article-head {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 28px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    font-size: 0.95rem;
}

.article-grid {
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
    align-items: start;
}

.article-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.article-content ul,
.article-content ol {
    padding-left: 22px;
}

.article-content li + li {
    margin-top: 8px;
}

.article-content code {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.12);
    color: #d8f7e0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.95rem;
}

.article-content pre {
    margin: 0;
    padding: 18px;
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: rgba(3, 10, 20, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.article-content blockquote {
    padding: 18px 20px;
    border-left: 4px solid var(--primary);
    border-radius: 0 14px 14px 0;
    background: rgba(74, 222, 128, 0.08);
}

.article-aside {
    position: sticky;
    top: 98px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.article-aside ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-links a {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
}

.related-links a:hover {
    color: var(--heading);
    border-color: rgba(255, 255, 255, 0.18);
}

.faq-card summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: var(--heading);
}

.faq-card summary::-webkit-details-marker {
    display: none;
}

.faq-card p {
    margin-top: 12px;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--border);
    background: rgba(4, 9, 18, 0.88);
}

.footer-inner {
    padding: 26px 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a:hover {
    color: var(--heading);
}

.footer-note {
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--muted);
    font-size: 0.92rem;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--heading);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #03110a;
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.2);
}

.search-box {
    position: relative;
    width: min(340px, 100%);
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 48px;
    border-radius: 12px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    pointer-events: none;
}

.post-card[hidden] {
    display: none;
}

.empty-state {
    margin-top: 18px;
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.03);
}

.empty-state strong {
    display: block;
    color: var(--heading);
    margin-bottom: 8px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 980px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
}

.news-strip {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.news-item:hover {
    border-color: var(--primary);
    background: rgba(74, 222, 128, 0.05);
    transform: translateX(4px);
}

.news-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    white-space: nowrap;
    padding: 4px 10px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 6px;
}

.news-title {
    color: var(--heading);
    font-weight: 600;
}

@media (max-width: 720px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.article-content code {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.article-content code:hover {
    background: rgba(74, 222, 128, 0.15);
    border-color: var(--primary);
}

.copy-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--primary);
    color: #03110a;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.copy-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 70;
    box-shadow: var(--shadow);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.progress-circle {
    position: absolute;
    inset: -1px;
    transform: rotate(-90deg);
}

.progress-circle circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2px;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    transition: stroke-dashoffset 0.1s linear;
}

.article-nav {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.nav-next {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.05), rgba(96, 165, 250, 0.05));
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.nav-next:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(96, 165, 250, 0.1));
}

.nav-next span {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-next strong {
    font-size: 1.25rem;
    color: var(--heading);
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(1, 6, 12, 0.82);
    backdrop-filter: blur(10px);
}

.overlay.active {
    display: grid;
}

.overlay-panel {
    position: relative;
    width: min(1240px, 100%);
    height: min(86vh, 900px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #02060d;
    box-shadow: var(--shadow);
}

.overlay-panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.game-status {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 18px;
    z-index: 2;
    display: grid;
    gap: 12px;
    pointer-events: none;
}

.game-status-card {
    pointer-events: auto;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(7, 14, 28, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.game-status-card strong {
    display: block;
    color: var(--heading);
    margin-bottom: 6px;
}

.game-status-card p {
    margin: 0;
    color: var(--muted);
}

.game-status-card .hero-actions {
    margin-top: 14px;
}

.game-status-card[data-status="error"] {
    border-color: rgba(248, 113, 113, 0.32);
    background: rgba(40, 12, 18, 0.88);
}

.game-status-card[data-status="mobile"] {
    max-width: 520px;
}

.overlay-panel.is-ready .game-status-card[data-status="loading"],
.overlay-panel.is-ready .game-status-card[data-status="mobile"] {
    display: none;
}

.overlay-panel.has-error .game-status-card[data-status="loading"] {
    display: none;
}

.overlay-panel:not(.has-error) .game-status-card[data-status="error"] {
    display: none;
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.mobile-nav-button {
    display: none;
}

.mobile-menu {
    border-top: 1px solid var(--border);
    background: rgba(7, 14, 28, 0.96);
}

.mobile-menu-inner {
    min-height: auto;
    padding: 18px 0 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.error-shell {
    width: var(--container);
    min-height: calc(100vh - 160px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 40px 0;
}

.error-card {
    max-width: 760px;
    padding: 36px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(15, 29, 53, 0.92), rgba(8, 16, 31, 0.92));
    box-shadow: var(--shadow);
}

@media (max-width: 980px) {
    .hero,
    .article-grid,
    .feature-grid,
    .trust-grid,
    .resource-grid,
    .stats-grid,
    .post-grid,
    .faq-grid,
    .legal-grid,
    .tag-list {
        grid-template-columns: 1fr;
    }

    .cta-banner,
    .section-head,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-aside {
        position: static;
    }

    .nav-links {
        display: none;
    }

    .mobile-nav-button {
        display: inline-flex;
    }

    .mobile-menu .site-nav {
        width: var(--container);
    }
}

@media (max-width: 720px) {
    .site-nav {
        min-height: 68px;
    }

    .hero,
    .page-hero,
    .article-shell,
    .section {
        padding-top: 28px;
    }

    .hero-actions,
    .nav-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .button,
    .button-secondary,
    .button-ghost {
        width: 100%;
    }

    .overlay {
        padding: 12px;
    }

    .overlay-panel {
        height: min(82vh, 820px);
    }

    .game-status {
        left: 12px;
        right: 12px;
        top: 12px;
    }
}
