:root {
    --bg: #020617;
    --fg: #f8fafc;
    --accent: #6366f1; /* Indigo */
    --accent-dim: rgba(99, 102, 241, 0.15);
    --accent-glow: rgba(99, 102, 241, 0.4);
    --secondary: #f43f5e; /* Rose */
    --muted: #64748b;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(15, 23, 42, 0.82);
    --card-bg: rgba(30, 41, 59, 0.4);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg);
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(244, 63, 94, 0.05) 0%, transparent 40%);
}

/* ── Typography ── */
h1, h2, h3, h4 {
    font-weight: 850;
    letter-spacing: -0.04em;
}

code {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    color: var(--accent);
}

/* ── Navigation ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 900;
    text-decoration: none;
    color: var(--fg);
    font-size: 1.4rem;
    letter-spacing: -1px;
}

.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--fg); }

.github-link {
    background: var(--fg);
    color: var(--bg) !important;
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
}

/* ── Game Stage ── */
.game-stage {
    padding-top: 100px;
    padding-bottom: 60px;
    display: flex;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08), transparent 70%);
}

#app {
    width: 90vw;
    max-width: 960px;
    aspect-ratio: 960 / 720;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #000;
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8), 0 0 40px var(--accent-dim);
    overflow: hidden;
}

/* 覆盖游戏脚本自带样式冲突 */
#app .shell {
    min-height: auto !important;
    height: 100%;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#app .stage {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ── Hero & Manifesto ── */
.hero {
    padding: 10rem 2rem;
    text-align: center;
    position: relative;
}

.glitch-title {
    font-size: 8rem;
    margin-bottom: 2rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px var(--accent-dim));
}

.hero-description.larger {
    font-size: 2.4rem;
    font-style: italic;
    color: var(--fg);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ── Section Layouts ── */
.content-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.section { padding: 8rem 0; }
.section-header { margin-bottom: 5rem; }
.badge {
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.section-header h2 { font-size: 3.5rem; margin-bottom: 1.5rem; }

/* ── Manifesto Grid ── */
.manifesto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.m-card {
    padding: 4rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 32px;
}

.m-card.highlight {
    background: linear-gradient(135deg, var(--accent-dim), transparent);
    border-color: var(--accent);
}

.m-card h4 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.m-card p { color: var(--muted); font-size: 1.1rem; }

/* ── Scenarios Matrix ── */
.scenarios-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.s-item {
    padding: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.s-visual { font-size: 3rem; margin-bottom: 1.5rem; }
.s-item h4 { font-size: 1.6rem; margin-bottom: 1rem; }
.s-item p { color: var(--muted); line-height: 1.8; }

/* ── Benchmark Section ── */
.benchmark-grid.split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.bench-list { list-style: none; margin-top: 2rem; }
.bench-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--muted);
}

.bench-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.benchmark-card.glass {
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--border);
}

/* ── Chart ── */
.bar-chart .bar-item { margin-bottom: 2.5rem; }
.bar-chart .label { display: block; margin-bottom: 1rem; color: var(--muted); font-weight: 600; }
.bar-container { height: 16px; background: rgba(255,255,255,0.03); border-radius: 100px; overflow: hidden; margin-bottom: 0.5rem; }
.bar { height: 100%; transition: width 2s cubic-bezier(0.16, 1, 0.3, 1); }
.dom-bar { background: var(--muted); }
.pretext-bar { background: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }

/* ── API & Code ── */
.api-preview { padding: 4rem 0; display: flex; justify-content: center; }
.code-box {
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    overflow: hidden;
}

.code-header { background: #111; padding: 0.6rem 1.2rem; color: var(--muted); font-size: 0.8rem; border-bottom: 1px solid var(--border); }
.code-box pre { padding: 2rem; }

/* ── Vision Section ── */
.vision-section {
    padding: 12rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.vision-content h3 { font-size: 3rem; margin-bottom: 3rem; font-weight: 300; }

.play-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 1.2rem 3.5rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 20px 40px -10px var(--accent);
    transition: transform 0.3s;
}

.play-btn:hover { transform: translateY(-5px); }

/* ── Footer ── */
.footer { padding: 6rem 0; border-top: 1px solid var(--border); }
.footer-content { text-align: center; }
.footer-logo { font-size: 1.5rem; font-weight: 900; color: var(--muted); margin-bottom: 1rem; }
.credit a { color: var(--accent); text-decoration: none; }

/* ── Animations ── */
.reveal { opacity: 0; transform: translateY(50px); transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ── Waves Background ── */
.background-beams {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03), transparent);
}

/* ── Responsive Overrides ── */
@media (max-width: 900px) {
    .hero { padding: 8rem 1.5rem; }
    .glitch-title { font-size: 5rem; }
    .hero-description.larger { font-size: 1.8rem; }
    
    .section { padding: 5rem 0; }
    .section-header { margin-bottom: 3rem; }
    .section-header h2 { font-size: 2.8rem; }
    
    .manifesto-grid, .scenarios-matrix, .benchmark-grid.split { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
    }
    
    .m-card { padding: 2.5rem; border-radius: 24px; }
    .m-card h4 { font-size: 1.6rem; }

    .benchmark-grid.split { text-align: center; }
    .bench-list { display: inline-block; text-align: left; margin: 2rem auto; }
    
    .vision-section { padding: 8rem 0; }
    .vision-content h3 { font-size: 2.2rem; }
}

@media (max-width: 600px) {
    .nav-content { padding: 0.8rem 1rem; flex-direction: column; gap: 0.5rem; }
    .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .nav-links a { font-size: 0.7rem; letter-spacing: 0.02em; }
    .logo { font-size: 1.1rem; }
    .github-link { padding: 0.3rem 0.8rem; }

    .game-stage { padding-top: 120px; padding-bottom: 40px; }
    #app { border-radius: 12px; }

    .glitch-title { font-size: 3.5rem; margin-bottom: 1.5rem; }
    .hero-description.larger { font-size: 1.4rem; }
    .hero-sub { font-size: 1rem; line-height: 1.5; }

    .section-header h2 { font-size: 2.2rem; }
    
    .manifesto-grid { gap: 1.5rem; }
    .m-card { padding: 2rem 1.5rem; }
    
    .s-item { padding: 1.5rem 0.5rem; }
    .s-visual { font-size: 2.5rem; }

    .benchmark-card.glass { padding: 1.5rem; border-radius: 16px; }
    .bar-chart .label { font-size: 0.85rem; }
    .bar-chart .value { font-size: 0.9rem; }

    .api-preview { padding: 2rem 1rem; }
    .code-box { width: 100%; border-radius: 8px; }
    .code-box pre { padding: 1.2rem; font-size: 0.85rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    
    .vision-content h3 { font-size: 1.8rem; padding: 0 1rem; }
    .play-btn { width: 100%; max-width: 280px; padding: 1rem 0; text-align: center; }

    .footer { padding: 4rem 0; }
}

/* ══════════════════════════════════════
   NEW SECTIONS: Author / Demos / Install / Quotes
══════════════════════════════════════ */

/* ── Author Story ── */
.author-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 6rem;
    align-items: center;
}

.author-quote-block {
    position: relative;
    padding: 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 32px;
}

.big-quote {
    font-size: 8rem;
    line-height: 0.5;
    color: var(--accent);
    opacity: 0.3;
    font-family: Georgia, serif;
    margin-bottom: 1rem;
}

.author-quote {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--fg);
    font-style: italic;
    font-weight: 300;
    border: none;
    margin-bottom: 2rem;
}

.author-attribution {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.author-name { font-weight: 700; font-size: 1rem; }
.author-role { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

.author-story h2 { font-size: 3rem; margin: 1rem 0 1.5rem; }
.author-story > p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.story-fact {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-top: 1.5rem;
}

.fact-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1; }
.story-fact strong { display: block; font-size: 1rem; margin-bottom: 0.4rem; color: var(--fg); }
.story-fact p { color: var(--muted); font-size: 0.9rem; line-height: 1.7; margin: 0; }

/* ── Demos Grid ── */
.demos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.demo-card {
    display: block;
    text-decoration: none;
    color: var(--fg);
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.demo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-dim), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.demo-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(99,102,241,0.3);
}

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

.demo-card-all {
    background: linear-gradient(135deg, var(--accent-dim), transparent);
    border-color: rgba(99,102,241,0.4);
}

.demo-label {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.demo-card h4 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.demo-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin-bottom: 1rem; }

.demo-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
}

/* ── Install Section ── */
.install-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 5rem;
    align-items: start;
}

.install-info h2 { font-size: 3rem; margin: 1rem 0 1.5rem; line-height: 1.2; }
.install-info > p { color: var(--muted); font-size: 1.05rem; line-height: 1.8; }

.install-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.install-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.8rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
    background: var(--fg);
    color: var(--bg);
}

.install-link-btn.secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
}

.install-link-btn:hover { transform: translateY(-3px); opacity: 0.9; }
.install-link-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

.install-codes { display: flex; flex-direction: column; gap: 1.2rem; }
.install-codes .code-box { max-width: 100%; }

/* ── Community Quotes ── */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.quote-card {
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.3s, border-color 0.3s;
}

.quote-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.2);
}

.quote-card.highlight-quote {
    background: linear-gradient(135deg, var(--accent-dim), rgba(244,63,94,0.08));
    border-color: var(--accent);
    grid-column: span 1;
}

.quote-stars { color: #f59e0b; font-size: 0.8rem; margin-bottom: 1rem; letter-spacing: 2px; }

.quote-card > p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--fg);
    margin-bottom: 1.2rem;
    font-style: italic;
}

.quote-author {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

/* ── Vision Buttons ── */
.vision-btns {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.play-btn-outline {
    background: transparent;
    border: 2px solid var(--fg);
    box-shadow: none;
}

.play-btn-outline:hover {
    background: var(--fg);
    color: var(--bg);
    transform: translateY(-5px);
}

/* ── Responsive: New Sections ── */
@media (max-width: 900px) {
    .author-layout,
    .install-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .demos-grid { grid-template-columns: repeat(2, 1fr); }
    .quotes-grid { grid-template-columns: repeat(2, 1fr); }

    .author-story h2,
    .install-info h2 { font-size: 2.4rem; }

    .big-quote { font-size: 5rem; }
}

@media (max-width: 600px) {
    .demos-grid { grid-template-columns: 1fr; }
    .quotes-grid { grid-template-columns: 1fr; }

    .author-quote { font-size: 1.05rem; }
    .author-story h2,
    .install-info h2 { font-size: 2rem; }

    .install-links { flex-direction: column; }
    .install-link-btn { text-align: center; justify-content: center; }

    .vision-btns { flex-direction: column; align-items: center; }
    .play-btn-outline { width: 100%; max-width: 280px; text-align: center; }

    .demo-card { padding: 1.5rem; }
    .quote-card { padding: 1.5rem; }
}

