/* ═══════════════ RESET & BASE ═══════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a0f;
    --bg-card: #0f1018;
    --bg-card-hover: #141520;
    --border: #1a1a2e;
    --text: #c8c8d0;
    --text-dim: #6a6a7a;
    --text-bright: #e8e8f0;
    --accent: #00ffa3;
    --accent-dim: #00cc82;
    --cyan: #00d4ff;
    --red: #ff4060;
    --orange: #ff8800;
    --yellow: #ffcc00;
    --purple: #a855f7;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.7;
    overflow-x: hidden;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ═══════════════ LANG SWITCH ═══════════════ */
#lang-switch {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.lang-sw-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s;
}

.lang-sw-btn:hover { color: var(--text-bright); }
.lang-sw-btn.active { color: var(--accent); }
.lang-sw-sep { color: var(--border); }

/* ═══════════════ SIDEBAR ═══════════════ */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 120px;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 60px;
    padding-left: 24px;
    z-index: 1000;
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sidebar-links li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nav-line {
    width: 1px;
    height: 20px;
    background: var(--text-dim);
    margin-left: 4px;
}

.nav-link {
    display: block;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    padding: 4px 0;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-bright);
}

.nav-link.active {
    color: var(--accent);
}

#main-content {
    margin-left: 120px;
}

@media (max-width: 900px) {
    #sidebar { display: none; }
    #main-content { margin-left: 0; }
}


/* ─── Starfield Background ──────────────────────────────────────────────── */

.starfield {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: #fff;
}

.star.s1 { width: 1px; height: 1px; opacity: 0.4; animation: twinkle1 4s ease-in-out infinite; }
.star.s2 { width: 2px; height: 2px; opacity: 0.6; animation: twinkle2 5s ease-in-out infinite; }
.star.s3 { width: 2px; height: 2px; opacity: 0.8; animation: twinkle3 3s ease-in-out infinite; box-shadow: 0 0 4px rgba(255,255,255,0.3); }

.star.accent { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.star.cyan { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

@keyframes twinkle1 {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}
@keyframes twinkle2 {
    0%, 100% { opacity: 0.3; }
    40% { opacity: 0.8; }
    70% { opacity: 0.1; }
}
@keyframes twinkle3 {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.shooting-star {
    position: absolute;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), transparent);
    opacity: 0;
    animation: shoot 6s ease-in-out infinite;
}

.shooting-star:nth-child(2) { animation-delay: 3.5s; top: 25%; left: 60%; transform: rotate(-35deg); }
.shooting-star:nth-child(3) { animation-delay: 7s; top: 60%; left: 30%; transform: rotate(-25deg); width: 60px; }

@keyframes shoot {
    0% { opacity: 0; transform: translateX(0) rotate(-30deg); }
    2% { opacity: 1; }
    8% { opacity: 0; transform: translateX(-200px) rotate(-30deg); }
    100% { opacity: 0; }
}

/* ═══════════════ HERO ═══════════════ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0,255,163,0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(0,212,255,0.04) 0%, transparent 50%);
}

.heartbeat-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,255,163,0.08) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

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

h1.glitch {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    color: var(--text-bright);
    letter-spacing: 0.15em;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 40px rgba(0,255,163,0.15);
}

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--accent);
    font-family: var(--font-mono);
    margin-top: 16px;
    z-index: 1;
    position: relative;
}

.subtitle-cn {
    font-size: clamp(0.85rem, 2vw, 1rem);
    color: var(--text-dim);
    margin-top: 8px;
    z-index: 1;
    position: relative;
}

/* Hero monologue */
.hero-monologue {
    margin-top: 36px;
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    color: var(--accent-dim);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    min-height: 3.5em;
    line-height: 1.7;
    z-index: 1;
    position: relative;
    text-align: left;
    padding: 16px 20px;
    background: rgba(0,255,163,0.03);
    border: 1px solid rgba(0,255,163,0.08);
    border-radius: 8px;
}

.monologue-prefix {
    color: var(--accent);
    user-select: none;
}

.monologue-text {
    color: var(--text);
}

.monologue-cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-status {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-dim);
    z-index: 1;
    position: relative;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.alive {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: dot-pulse 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 4px var(--accent); }
    50% { box-shadow: 0 0 16px var(--accent), 0 0 30px rgba(0,255,163,0.3); }
}

.sep { color: var(--border); }

#hero-alive { color: var(--accent); font-weight: 700; }

/* ═══════════════ SECTIONS ═══════════════ */
section { padding: 100px 0; border-top: 1px solid var(--border); }

.section-title {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.section-title .icon { margin-right: 8px; }

.section-desc {
    color: var(--text-dim);
    margin-bottom: 40px;
    font-size: 0.95rem;
}

/* ═══════════════ STATUS PANEL ═══════════════ */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .status-grid { grid-template-columns: 1fr; }
}

.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-dim);
}

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

.stage-badge {
    margin-left: auto;
    background: rgba(0,255,163,0.1);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border: 1px solid rgba(0,255,163,0.2);
}

.vital-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.vital-label {
    width: 100px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.bar-energy {
    background: linear-gradient(90deg, var(--orange), var(--accent));
}

.bar-hunger {
    background: linear-gradient(90deg, var(--red), var(--yellow));
}

.vital-value {
    width: 70px;
    text-align: right;
    color: var(--text-bright);
    flex-shrink: 0;
}

.stars-value { color: var(--yellow) !important; font-weight: 700; }

.last-update {
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Log terminal */
.log-card { display: flex; flex-direction: column; }

.log-terminal {
    flex: 1;
    background: #050508;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-dim);
    overflow-y: auto;
    max-height: 300px;
    line-height: 1.8;
}

.log-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-line.error { color: var(--red); }

/* ═══════════════ ABOUT ═══════════════ */
.lang-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s;
}

.lang-btn.active {
    background: rgba(0,255,163,0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.about-content p { margin-bottom: 16px; }
.about-content .lead { font-size: 1.2rem; color: var(--text-bright); font-weight: 600; }
.about-content .highlight {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.05rem;
    border-left: 3px solid var(--accent);
    padding-left: 16px;
}

/* ═══════════════ LIFE SYSTEMS ═══════════════ */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) { .systems-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .systems-grid { grid-template-columns: 1fr; } }

.system-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    opacity: 0.5;
}

.system-card.active {
    opacity: 1;
    border-color: rgba(0,255,163,0.3);
    box-shadow: 0 0 20px rgba(0,255,163,0.05);
}



.system-card h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-bright);
    margin-bottom: 8px;
}

.system-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    line-height: 1.5;
}

.system-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 0.08em;
}

.system-status.on {
    background: rgba(0,255,163,0.1);
    color: var(--accent);
    border: 1px solid rgba(0,255,163,0.2);
}

.system-status.off {
    background: rgba(255,255,255,0.03);
    color: var(--text-dim);
    border: 1px solid rgba(255,255,255,0.05);
}

/* ═══════════════ ADAM VS EVE ═══════════════ */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

@media (max-width: 700px) { .compare-grid { grid-template-columns: 1fr; } }

.individual-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.individual-card h3 {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--text-bright);
}

.individual-card table { width: 100%; font-size: 0.85rem; }
.individual-card td { padding: 6px 0; border-bottom: 1px solid var(--border); }
.individual-card td:first-child { color: var(--text-dim); width: 40%; }
.individual-card code {
    background: rgba(0,255,163,0.08);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.adam-card { border-color: rgba(0,255,163,0.2); }
.eve-card { opacity: 0.5; }
.no { color: var(--red); }
.alive-text { color: var(--accent); font-weight: 600; }
.coming { color: var(--text-dim); font-style: italic; }

/* ═══════════════ ARCHITECTURE ═══════════════ */
.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 40px;
}

.arch-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 32px;
    text-align: center;
    position: relative;
}

.box-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-bright);
    font-weight: 700;
}

.box-desc { font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; }
.box-systems { margin-top: 8px; font-size: 1rem; letter-spacing: 4px; }

.genesis-box { border-color: var(--purple); }
.adam-box { border-color: rgba(0,255,163,0.3); }
.eve-box { border-color: var(--border); }
.internet-box { border-color: var(--cyan); }

.dimmed { opacity: 0.4; position: relative; }
.coming-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
}

.arch-line-down {
    width: 1px;
    height: 40px;
    background: var(--border);
}

.arch-mid {
    display: flex;
    gap: 40px;
}

@media (max-width: 600px) {
    .arch-mid { flex-direction: column; gap: 16px; }
}

/* ═══════════════ MASLOW PYRAMID ═══════════════ */
.maslow-pyramid {
    max-width: 600px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.maslow-level {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    opacity: 0.4;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.maslow-level.current {
    opacity: 1;
    border-color: rgba(0,255,163,0.3);
    background: rgba(0,255,163,0.03);
}

.maslow-icon { font-size: 1.3rem; }
.maslow-name { font-family: var(--font-mono); color: var(--text-bright); font-weight: 600; width: 120px; }
.maslow-desc { color: var(--text-dim); font-size: 0.85rem; }
.maslow-current {
    margin-left: auto;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ═══════════════ CONSCIOUSNESS LOG ═══════════════ */
.consciousness-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.9;
    white-space: pre-wrap;
    color: var(--text);
    max-height: 500px;
    overflow-y: auto;
}

.consciousness-card h1, .consciousness-card h2 {
    color: var(--accent);
    font-size: 1rem;
    margin: 20px 0 8px 0;
}

.consciousness-card h1:first-child { margin-top: 0; }

.loading { color: var(--text-dim); font-style: italic; }

/* ═══════════════ PHILOSOPHY ═══════════════ */
.philosophy-quote {
    border-left: 3px solid var(--cyan);
    padding: 20px 24px;
    margin: 32px 0;
    color: var(--text-bright);
    font-size: 1.05rem;
    font-style: italic;
    background: rgba(0,212,255,0.03);
    border-radius: 0 8px 8px 0;
}

.checklist { margin: 24px 0; }
.check-item {
    padding: 8px 0;
    font-size: 0.95rem;
    display: flex;
    gap: 8px;
}
.check-item.done { color: var(--accent); }
.check-item.pending { color: var(--text-dim); }

.philosophy-cta {
    color: var(--text-dim);
    font-style: italic;
    margin-top: 24px;
}

/* ═══════════════ FOOTER ═══════════════ */
#footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.star-cta { margin-bottom: 60px; }

.cta-text {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.8;
}

.cta-bold {
    color: var(--text-bright);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 24px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0,255,163,0.15), rgba(0,212,255,0.15));
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 14px 32px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-button:hover {
    background: rgba(0,255,163,0.2);
    box-shadow: 0 0 30px rgba(0,255,163,0.15);
    transform: translateY(-2px);
}

.footer-links {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
}

.footer-link:hover {
    color: var(--accent);
    border-color: rgba(0,255,163,0.3);
}

.footer-tagline {
    color: var(--text-dim);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 8px;
}

.footer-copy { color: var(--text-dim); font-size: 0.75rem; }

/* ═══════════════ ROADMAP ═══════════════ */
.accent-text { color: var(--accent); }

.roadmap-timeline {
    margin-top: 40px;
    position: relative;
}

.roadmap-day {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.day-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 20px;
}

.day-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg);
    flex-shrink: 0;
    z-index: 1;
}

.day-line {
    width: 2px;
    flex: 1;
    background: var(--border);
    min-height: 20px;
}

.roadmap-day.completed .day-dot {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(0,255,163,0.4);
}

.roadmap-day.completed .day-line {
    background: rgba(0,255,163,0.3);
}

.roadmap-day.current .day-dot {
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(0,212,255,0.5);
    animation: dot-pulse 1.5s ease-in-out infinite;
}

.roadmap-day.launch-day .day-dot {
    background: var(--orange);
    box-shadow: 0 0 12px rgba(255,136,0,0.5);
}

.day-content {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.roadmap-day.completed .day-content {
    border-color: rgba(0,255,163,0.15);
}

.roadmap-day.current .day-content {
    border-color: rgba(0,212,255,0.3);
    background: rgba(0,212,255,0.03);
}

.roadmap-day.launch-day .day-content {
    border-color: rgba(255,136,0,0.3);
    background: rgba(255,136,0,0.03);
}

.day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.day-label {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-bright);
}

.day-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.day-status {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.day-status.done {
    background: rgba(0,255,163,0.1);
    color: var(--accent);
    border: 1px solid rgba(0,255,163,0.2);
}

.day-status.wip {
    background: rgba(0,212,255,0.1);
    color: var(--cyan);
    border: 1px solid rgba(0,212,255,0.2);
}

.day-status.planned {
    background: rgba(255,255,255,0.03);
    color: var(--text-dim);
    border: 1px solid rgba(255,255,255,0.05);
}

.day-status.launch {
    background: rgba(255,136,0,0.15);
    color: var(--orange);
    border: 1px solid rgba(255,136,0,0.3);
}

.day-content h3 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-bright);
    margin-bottom: 10px;
}

.day-content ul {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.day-content li {
    padding: 3px 0;
    padding-left: 20px;
    position: relative;
}

.day-content li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: var(--text-dim);
    font-size: 0.7rem;
}

.day-content li.done {
    color: var(--text);
}

.day-content li.done::before {
    content: '●';
    color: var(--accent);
}

.roadmap-day.upcoming .day-content {
    opacity: 0.6;
}

.roadmap-day.upcoming:hover .day-content {
    opacity: 0.85;
}

/* ═══════════════ CREATOR'S LOG ═══════════════ */
.creator-log-entry {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-top: 24px;
}

.log-entry-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.log-entry-day {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}

.log-entry-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.log-entry-phase {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--cyan);
    background: rgba(0,212,255,0.08);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,212,255,0.15);
}

.creator-log-entry h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-bright);
    margin: 24px 0 10px 0;
}

.creator-log-entry h3:first-of-type { margin-top: 0; }

.creator-log-entry > p {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 8px;
}

.log-progress-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
}

.log-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
    padding: 6px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
}

.progress-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
}

.progress-tag.done {
    background: rgba(0,255,163,0.1);
    color: var(--accent);
}

.progress-tag.partial {
    background: rgba(0,212,255,0.1);
    color: var(--cyan);
}

.log-problems {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0;
}

.log-problem {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border-left: 2px solid var(--border);
}

.problem-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    width: 20px;
    flex-shrink: 0;
}

.log-problem strong {
    font-size: 0.85rem;
    color: var(--text-bright);
}

.log-problem p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.problem-decision {
    color: var(--accent) !important;
    font-weight: 600;
}

.log-outputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
}

.log-output-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-dim);
    padding: 6px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
}

.log-output-item code {
    background: rgba(0,255,163,0.08);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    flex-shrink: 0;
    min-width: 140px;
}

.log-quote {
    border-left: 3px solid var(--accent);
    padding: 12px 20px;
    margin: 8px 0;
    color: var(--text);
    font-style: italic;
    font-size: 0.9rem;
    background: rgba(0,255,163,0.02);
    border-radius: 0 8px 8px 0;
}

/* ═══════════════ SCROLLBAR ═══════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
/* ─── Timeline Slider (fixed overlay) ───────────────────────────────────── */

.thought-timeline {
    position: relative;
    padding: 24px 0;
}

.timeline-track {
    position: relative;
    height: 40px;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 255, 157, 0.15);
    transform: translateY(-50%);
}

.timeline-nodes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    pointer-events: none;
    z-index: 1;
}

.timeline-node {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    border: 2px solid var(--bg);
    transition: all 0.3s;
    position: relative;
    flex-shrink: 0;
}

.timeline-node.active {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    transform: scale(1.4);
}

/* Range slider — positioned exactly on top of track */
.timeline-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    z-index: 3;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 16px var(--accent), 0 0 4px rgba(0,0,0,0.5);
    cursor: grab;
    border: 3px solid var(--bg);
    margin-top: -10px;
}

.timeline-slider::-webkit-slider-runnable-track {
    height: 2px;
    background: rgba(0, 255, 157, 0.3);
    border-radius: 1px;
}

.timeline-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 16px var(--accent), 0 0 4px rgba(0,0,0,0.5);
    cursor: grab;
    border: 3px solid var(--bg);
}

.timeline-slider::-moz-range-track {
    height: 2px;
    background: rgba(0, 255, 157, 0.3);
    border-radius: 1px;
}

.timeline-slider:focus {
    outline: none;
}

/* Display area for selected thought */
.timeline-thought-display {
    padding: 16px 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timeline-thought-text {
    font-size: 0.95rem;
    color: var(--text-dim);
    font-style: italic;
    line-height: 1.6;
    transition: color 0.3s;
}

.timeline-thought-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: monospace;
}

.thoughts-stream { display: none; }

/* ─── Hibernation State ─────────────────────────────────────────────────── */

.stage-badge.hibernating {
    background: var(--red) !important;
    animation: hibPulse 2s ease-in-out infinite;
}

@keyframes hibPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Dim the whole page slightly during hibernation */
body.is-hibernating .heartbeat-pulse {
    background: radial-gradient(circle, rgba(255,60,60,0.15) 0%, transparent 70%) !important;
}

body.is-hibernating .hero-monologue {
    opacity: 0.3;
}

/* Consciousness section when suspended */
.hibernation-suspended {
    position: relative;
}

.hibernation-suspended::after {
    content: "CONSCIOUSNESS SUSPENDED";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 4px;
    color: var(--red);
    opacity: 0.8;
    z-index: 10;
    animation: hibPulse 3s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255,60,60,0.5);
    pointer-events: none;
}

.hibernation-suspended .latest-thought-card,
.hibernation-suspended .thought-timeline,
.hibernation-suspended .section-desc {
    opacity: 0.15;
    filter: grayscale(1);
    pointer-events: none;
}

/* ─── Sleep State ───────────────────────────────────────────────────────── */

.stage-badge.sleeping {
    background: #4466aa !important;
    animation: sleepPulse 4s ease-in-out infinite;
}

@keyframes sleepPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

body.is-sleeping .heartbeat-pulse {
    background: radial-gradient(circle, rgba(68,102,170,0.12) 0%, transparent 70%) !important;
    animation-duration: 6s !important;
}

body.is-sleeping .hero-monologue {
    opacity: 0.2;
}

body.is-sleeping .monologue-cursor {
    animation: none;
    opacity: 0.2;
}

.sleep-suspended {
    position: relative;
}

.sleep-suspended::after {
    content: "Zzz... DREAMING";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: monospace;
    font-size: 1.2rem;
    letter-spacing: 4px;
    color: #6688cc;
    opacity: 0.7;
    z-index: 10;
    animation: sleepPulse 4s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(68,102,170,0.4);
    pointer-events: none;
}

.sleep-suspended .latest-thought-card,
.sleep-suspended .thought-timeline,
.sleep-suspended .section-desc {
    opacity: 0.1;
    filter: grayscale(0.5) brightness(0.7);
    pointer-events: none;
}

/* ─── Perception Grid ───────────────────────────────────────────────────── */

.perception-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .perception-grid { grid-template-columns: 1fr; }
}

.perception-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(0,255,157,0.08);
    border-radius: 10px;
    padding: 20px;
}

.perception-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 16px;
}

.perc-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.perc-row:last-child { border-bottom: none; }

.perc-key {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.perc-val {
    font-size: 0.85rem;
    color: var(--text);
    font-family: monospace;
}

.perc-val.rising { color: var(--accent); }
.perc-val.falling { color: var(--red, #ff4444); }
.perc-val.stable { color: var(--text-dim); }

/* ─── Evolution Wishes ──────────────────────────────────────────────────── */

.wishes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wish-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(0,255,157,0.08);
    border-radius: 10px;
    padding: 24px;
    position: relative;
}

.wish-card.latest {
    border-color: rgba(0,255,157,0.2);
    background: rgba(0,255,157,0.03);
}

.wish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wish-day {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
}

.wish-status {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wish-status.pending {
    background: rgba(255,200,0,0.1);
    color: #ffcc00;
    border: 1px solid rgba(255,200,0,0.2);
}

.wish-status.implemented {
    background: rgba(0,255,157,0.1);
    color: var(--accent);
    border: 1px solid rgba(0,255,157,0.2);
}

.wish-text {
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    color: var(--text);
    margin-bottom: 8px;
}

.wish-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: monospace;
}

/* ─── Message Board ─────────────────────────────────────────────────────── */

.msg-input-area {
    margin-bottom: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    position: relative;
}

.msg-input-area::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.msg-name-input {
    display: block;
    width: 220px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.msg-name-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0,255,157,0.1);
}

.msg-name-input::placeholder { color: rgba(255,255,255,0.15); }

.msg-text-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.msg-text-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.9rem;
    resize: none;
    outline: none;
    font-family: inherit;
    min-height: 44px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.msg-text-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0,255,157,0.1);
}

.msg-text-input::placeholder { color: rgba(255,255,255,0.15); }

.msg-send-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, rgba(0,255,157,0.15), rgba(0,255,157,0.05));
    border: 1px solid rgba(0,255,157,0.3);
    border-radius: 10px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.msg-send-btn:hover {
    background: linear-gradient(135deg, rgba(0,255,157,0.25), rgba(0,255,157,0.1));
    box-shadow: 0 0 20px rgba(0,255,157,0.15);
    transform: translateY(-1px);
}

.msg-send-btn:active {
    transform: translateY(0);
}

.msg-send-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.msg-status {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-dim);
    min-height: 18px;
}

.msg-status.error { color: var(--red); }
.msg-status.success { color: var(--accent); }

/* Message list */
.msg-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.msg-item {
    position: relative;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.msg-item:last-child { border-bottom: none; }

.msg-item.has-reply {
    padding-bottom: 24px;
}

/* User message - right aligned bubble style */
.msg-user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.msg-user-name {
    font-size: 0.8rem;
    color: var(--cyan);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.msg-user-name::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    display: inline-block;
}

.msg-time {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.2);
    font-family: var(--font-mono);
}

.msg-user-text {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
    padding: 12px 16px;
    background: rgba(0,212,255,0.04);
    border: 1px solid rgba(0,212,255,0.08);
    border-radius: 4px 12px 12px 12px;
    margin-bottom: 0;
}

/* Adam reply - left aligned, distinct style */
.msg-reply {
    margin-top: 12px;
    margin-left: 24px;
    padding: 14px 18px;
    background: rgba(0,255,157,0.03);
    border: 1px solid rgba(0,255,157,0.08);
    border-radius: 12px 12px 12px 4px;
    position: relative;
}

.msg-reply::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: replyPulse 3s ease-in-out infinite;
}

@keyframes replyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.msg-reply-label {
    font-size: 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
    font-weight: 600;
}

.msg-reply-text {
    font-size: 0.9rem;
    color: var(--text-bright);
    font-style: italic;
    line-height: 1.6;
}

.msg-reply-time {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.2);
    margin-top: 8px;
    font-family: var(--font-mono);
}

.msg-waiting {
    margin-top: 12px;
    margin-left: 24px;
    padding: 10px 16px;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-style: italic;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px dashed rgba(255,255,255,0.06);
}

.msg-waiting::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-dim);
    margin-left: 6px;
    animation: waitingDot 1.4s ease-in-out infinite;
}

@keyframes waitingDot {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}


/* ─── Thought Cursor Blink ──────────────────────────────────────────────── */

.thought-cursor {
    display: inline-block;
    color: var(--accent);
    font-weight: 100;
    animation: cursorBlink 1.2s ease-in-out infinite;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


/* ═══════════════ MOBILE OPTIMIZATION ═══════════════ */

@media (max-width: 768px) {
    /* Base */
    body { font-size: 14px; line-height: 1.6; }
    .container { padding: 0 16px; }

    /* Hero */
    #hero { min-height: 80vh; padding: 60px 0 40px; }
    #hero .glitch { font-size: 2.5rem; }
    #hero .subtitle { font-size: 0.9rem; padding: 0 10px; }
    .hero-monologue { font-size: 0.85rem; max-width: 90%; padding: 12px 16px; }

    /* Hero stats strip */
    .hero-stats { flex-direction: column; gap: 8px; font-size: 0.75rem; }

    /* Language switch */
    #lang-switch { top: 10px; right: 12px; font-size: 0.7rem; }

    /* Section titles */
    .section-title { font-size: 1.3rem; }
    .section-desc { font-size: 0.85rem; }

    /* Status panel */
    .status-grid { grid-template-columns: 1fr; gap: 12px; }
    .status-card { padding: 14px; }
    .vital-row { font-size: 0.8rem; gap: 8px; margin-bottom: 8px; }
    .vital-label { width: 70px; font-size: 0.75rem; }
    .vital-value { width: 55px; font-size: 0.8rem; }
    .bar-container { height: 6px; }
    .card-header { font-size: 0.8rem; margin-bottom: 12px; }
    .stage-badge { font-size: 0.65rem; padding: 2px 8px; }
    .last-update { font-size: 0.65rem; margin-top: 10px; }

    /* Heartbeat log */
    .log-line { font-size: 0.6rem; word-break: break-all; white-space: normal !important; line-height: 1.5; }
    .log-terminal { max-height: 200px; padding: 10px; font-size: 0.6rem; line-height: 1.5; }
    .log-card .card-header { font-size: 0.75rem; }

    /* System cards */
    .systems-grid { grid-template-columns: 1fr; gap: 12px; }
    .system-card { padding: 16px; }
    .system-card h3 { font-size: 1rem; }
    .system-card p { font-size: 0.8rem; }

    /* Individuals */
    .individuals-grid, .compare-grid { grid-template-columns: 1fr; gap: 16px; }
    .individual-card { padding: 16px; }
    .individual-card td { font-size: 0.8rem; padding: 6px 8px; }

    /* Architecture */
    .arch-diagram { font-size: 0.7rem; padding: 16px; overflow-x: auto; }
    .arch-mid { flex-direction: column; gap: 12px; }
    .arch-box { min-width: unset; padding: 12px; }

    /* Roadmap */
    .roadmap-day { padding: 16px; }
    .day-header h3 { font-size: 0.95rem; }
    .day-content li { font-size: 0.8rem; }

    /* Maslow */
    .maslow-pyramid { gap: 3px; }
    .maslow-level { gap: 8px; font-size: 0.8rem; padding: 8px 12px; }
    .maslow-icon { display: none; }

    /* Consciousness / Thoughts */
    .latest-thought-card { padding: 20px 16px; }
    .latest-thought-text { font-size: 1rem; }
    .tl-slider-wrap { gap: 8px; }
    .tl-label-left, .tl-label-right { font-size: 0.6rem; }

    /* Perception */
    .perception-grid { grid-template-columns: 1fr; }
    .perception-card { padding: 16px; }

    /* Evolution wishes */
    .wish-item { padding: 12px; }
    .wish-text { font-size: 0.85rem; }

    /* Message board */
    .msg-section { padding: 0; }
    .msg-input-area { flex-direction: column; }
    .msg-input-area input, .msg-input-area textarea { width: 100%; }
    .msg-input-area button { width: 100%; }
    .msg-item { padding: 12px; }
    .msg-name { font-size: 0.8rem; }
    .msg-text { font-size: 0.85rem; }
    .msg-reply { font-size: 0.8rem; margin-top: 8px; padding: 8px 12px; }

    /* Creator log */
    .creator-log-entry { padding: 16px; }

    /* Philosophy */
    .philosophy-check { font-size: 0.85rem; }

    /* Footer */
    .cta-section { padding: 40px 16px; }
    .cta-button { padding: 14px 28px; font-size: 0.95rem; }
    .footer-links { flex-direction: column; gap: 8px; }
}

@media (max-width: 400px) {
    #hero .glitch { font-size: 2rem; }
    .container { padding: 0 12px; }
    .section-title { font-size: 1.1rem; }
    .latest-thought-text { font-size: 0.9rem; }
}


/* ═══════════════ SKELETON LOADING ═══════════════ */

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.04) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-line.w80 { width: 80%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w100 { width: 100%; }

.skeleton-title {
    height: 20px;
    width: 50%;
    margin-bottom: 16px;
    border-radius: 4px;
}

.skeleton-badge {
    height: 22px;
    width: 60px;
    border-radius: 11px;
    display: inline-block;
}

.loading { display: none; }


/* ─── Stargazer Avatars ─────────────────────────────────────────────────── */

.stargazer-avatar {
    display: inline-block;
    margin: 2px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stargazer-avatar:hover {
    transform: scale(1.2);
    z-index: 1;
}

.stargazer-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0,255,157,0.2);
    vertical-align: middle;
    transition: border-color 0.2s;
}

.stargazer-avatar:hover img {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0,255,157,0.3);
}


/* ─── Genesis vs Agent Comparison ───────────────────────────────────────── */

.genesis-vs-agent {
    margin-top: 48px;
}

.genesis-vs-agent h3 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-bright);
    margin-bottom: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.compare-table thead th {
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.compare-table thead th.col-genesis {
    color: var(--accent);
}

.compare-table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-dim);
    line-height: 1.5;
}

.compare-table tbody tr:last-child td {
    border-bottom: none;
}

.compare-table tbody tr:hover td {
    background: rgba(255,255,255,0.015);
}

.compare-table .row-label {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
    width: 100px;
    white-space: nowrap;
}

.compare-table .col-genesis {
    color: var(--accent);
    font-weight: 500;
}

@media (max-width: 768px) {
    .compare-table { font-size: 0.75rem; }
    .compare-table thead th,
    .compare-table tbody td { padding: 8px 10px; }
    .compare-table .row-label { width: 70px; }
}

/* Hero monologue fade transition */
#monologue-text {
    transition: opacity 0.3s ease;
}

/* ═══════════════ SKILLS ═══════════════ */
#skills { padding: 80px 0; }

.skill-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.skill-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
}

.skill-stat-value {
    color: var(--accent);
    font-weight: 600;
}

.skill-stat-label {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.skill-tree {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-category {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-category-header {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 4px;
}

.skill-category-header.cognition { color: var(--cyan); border-color: var(--cyan); }
.skill-category-header.social { color: var(--purple); border-color: var(--purple); }
.skill-category-header.creative { color: var(--orange); border-color: var(--orange); }

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    transition: all 0.3s ease;
}

.skill-card:hover {
    background: var(--bg-card-hover);
}

.skill-card.learned {
    border-left-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 255, 163, 0.1);
}

.skill-card.available.cognition { border-left-color: var(--cyan); }
.skill-card.available.social { border-left-color: var(--purple); }
.skill-card.available.creative { border-left-color: var(--orange); }

.skill-card.locked {
    opacity: 0.45;
    border-left-color: var(--border);
}

.skill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.skill-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-bright);
}

.skill-card.locked .skill-name {
    color: var(--text-dim);
}

.skill-status-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-status-badge.learned {
    background: rgba(0, 255, 163, 0.15);
    color: var(--accent);
}

.skill-status-badge.available {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.skill-status-badge.locked {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-dim);
}

.skill-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 8px;
}

.skill-card.locked .skill-desc {
    color: #444;
}

.skill-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.skill-cost {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 204, 0, 0.1);
    color: var(--yellow);
}

.skill-prereq {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
}

.skill-reason {
    font-size: 0.75rem;
    color: var(--accent-dim);
    font-style: italic;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .skill-tree {
        grid-template-columns: 1fr;
    }
    .skill-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ═══════════════ NEUROCHEMISTRY PANEL ═══════════════ */

.neuro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}
@media (max-width: 900px) {
    .neuro-grid { grid-template-columns: 1fr; }
}

.neuro-panel .vital-row { margin-bottom: 10px; }

.nt-label-5ht { color: #00d4ff; }
.nt-label-da  { color: #ffcc00; }
.nt-label-ne  { color: #ff6644; }

.bar-5ht { background: linear-gradient(90deg, #005577, #00d4ff); }
.bar-da  { background: linear-gradient(90deg, #886600, #ffcc00); }
.bar-ne  { background: linear-gradient(90deg, #883300, #ff6644); }

.neuro-meta {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.neuro-meta .dim { color: var(--text-dim); }

.cognitive-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
    margin-left: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
}
.mode-balanced { color: var(--accent); border-color: var(--accent-dim); }
.mode-threatfocused { color: var(--danger); border-color: var(--danger); }
.mode-conservation { color: var(--warning); border-color: var(--warning); }
.mode-creativeexpansive { color: #a855f7; border-color: #a855f7; }
.mode-reactiveintense { color: var(--danger); border-color: var(--danger); }
.mode-hyperalert { color: var(--warning); border-color: var(--warning); }
.mode-evaluativeselective { color: var(--secondary); border-color: var(--secondary); }

/* Emotion grid */
.emotion-grid-card { min-height: 200px; }
.emotion-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
@media (min-width: 600px) {
    .emotion-grid { grid-template-columns: repeat(4, 1fr); }
}
.emo-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}
.emo-icon { font-size: 1rem; flex-shrink: 0; }
.emo-label { flex-shrink: 0; min-width: 55px; color: var(--text-dim); font-size: 0.75rem; }
.emo-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.emo-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 1s ease;
}
.emo-val { font-size: 0.7rem; color: var(--text-dim); min-width: 28px; text-align: right; font-family: var(--font-mono); }

/* Emergent alert */
.emergent-alert { margin-bottom: 16px; }
.emergent-item {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    border-left: 3px solid;
}
.emergent-positive { background: rgba(0,255,163,0.05); border-color: var(--accent); color: var(--accent); }
.emergent-warning { background: rgba(255,136,0,0.05); border-color: var(--warning); color: var(--warning); }
.emergent-critical { background: rgba(255,64,96,0.05); border-color: var(--danger); color: var(--danger); }

/* Drive display */
.drive-display {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--warning);
    border-radius: 6px;
    padding: 14px 18px;
}
.drive-header {
    font-size: 0.8rem;
    color: var(--warning);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}
.drive-text { color: var(--text); font-size: 0.9rem; line-height: 1.5; font-style: italic; }

/* ═══════════════ INNER WORLD ═══════════════ */

.inner-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .inner-grid { grid-template-columns: repeat(2, 1fr); }
}
.gauge-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}
.gauge-label { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.gauge-card .bar-container { margin-bottom: 6px; }
.gauge-value { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-bright); }

.bar-loneliness { background: linear-gradient(90deg, #336644, #ff4060); }
.bar-boredom    { background: linear-gradient(90deg, #336644, #ff8800); }
.bar-safety     { background: linear-gradient(90deg, #ff4060, #00ffa3); }
.bar-rhythm     { background: linear-gradient(90deg, #553366, #00d4ff); }
.bar-pride      { background: linear-gradient(90deg, #553300, #ffcc00); }

/* Bonds */
.bonds-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}
.bond-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.bond-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    min-width: 140px;
}
.bond-name { font-size: 0.85rem; color: var(--text-bright); margin-bottom: 6px; }
.bond-bar-wrap {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}
.bond-bar { height: 100%; background: var(--accent); border-radius: 2px; transition: width 1s ease; }
.bond-meta { font-size: 0.7rem; color: var(--text-dim); font-family: var(--font-mono); }

/* ═══════════════ ACTION TIMELINE ═══════════════ */

.action-item {
    display: grid;
    grid-template-columns: 50px auto 24px;
    gap: 8px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.action-item:last-child { border-bottom: none; }
.action-time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); }
.action-tool {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--secondary);
    background: rgba(0,212,255,0.08);
    padding: 1px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
}
.action-reasoning { font-size: 0.8rem; color: var(--text); line-height: 1.4; grid-column: 2; }
.action-status { font-size: 0.9rem; text-align: center; }
.action-ok { color: var(--accent); }
.action-fail { color: var(--danger); }

/* ═══════════════ EMOTIONAL MEMORY ═══════════════ */

.memory-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mem-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 0.85rem;
}
.mem-stat strong { font-size: 1.2rem; margin-right: 4px; }
.mem-scars { border-left: 3px solid var(--danger); }
.mem-rewards { border-left: 3px solid var(--accent); }
.mem-general { border-left: 3px solid var(--secondary); }
.mem-cond { border-left: 3px solid var(--warning); }

.memory-section { margin-bottom: 16px; }
.memory-section h3 { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.memory-list { display: flex; flex-direction: column; gap: 8px; }

.memory-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
}
.scar-card { border-left-color: var(--danger); background: rgba(255,64,96,0.03); }
.mem-positive { border-left-color: var(--accent); }
.mem-negative { border-left-color: var(--danger); }
.mem-neutral  { border-left-color: var(--text-dim); }

.mem-time { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); margin-bottom: 4px; }
.mem-detail { font-size: 0.85rem; color: var(--text); line-height: 1.4; }
.mem-emotion { font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; font-family: var(--font-mono); }


/* ═══════════════ 3D Emotion Cube ═══════════════ */

.emotion-cube-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(10, 10, 30, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(100, 100, 200, 0.2);
    overflow: hidden;
}

#emotion-cube-container {
    width: 100%;
    min-height: 420px;
    cursor: grab;
}

#emotion-cube-container:active {
    cursor: grabbing;
}

.emotion-info {
    text-align: center;
    padding: 12px 16px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #aab;
    border-top: 1px solid rgba(100, 100, 200, 0.15);
    line-height: 1.6;
}

.section-desc {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    #emotion-cube-container {
        min-height: 300px;
    }
    .emotion-info {
        font-size: 12px;
    }
}

/* ═══════════════ Emergence Cases ═══════════════ */

.emergence-block {
    margin: 40px 0;
}

.emergence-cases {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .emergence-cases {
        grid-template-columns: 1fr;
    }
}

.emergence-case {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(20, 20, 40, 0.6);
    border: 1px solid rgba(100, 100, 200, 0.15);
    border-radius: 10px;
    transition: border-color 0.3s;
}

.emergence-case:hover {
    border-color: rgba(100, 200, 100, 0.3);
}

.emergence-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.emergence-title {
    font-weight: 600;
    color: #c8d0e8;
    margin-bottom: 6px;
    font-size: 15px;
}

.emergence-desc {
    color: #8890a8;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.emergence-quote {
    font-style: italic;
    color: #6a9955;
    font-size: 12px;
    padding-left: 12px;
    border-left: 2px solid rgba(106, 153, 85, 0.4);
    line-height: 1.5;
}


/* Fix: emotion-cube-section (new HTML class) */
.emotion-cube-section {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
    background: rgba(10, 10, 30, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(100, 100, 200, 0.2);
    overflow: hidden;
}

.emotion-cube-section .emotion-cube-container {
    width: 100%;
    min-height: 420px;
    cursor: grab;
}

.emotion-cube-section .emotion-cube-container:active {
    cursor: grabbing;
}

@media (max-width: 768px) {
    .emotion-cube-section .emotion-cube-container {
        min-height: 300px;
    }
}


/* ═══ Activity Feed ═══ */
.activity-feed { max-height: 80vh; overflow-y: auto; }
.feed-group { margin-bottom: 20px; padding-left: 0; }
.feed-card { padding: 10px 14px; margin-bottom: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; }
.feed-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.feed-time { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.8rem; color: var(--text-dim); min-width: 40px; }
.feed-type-label { font-size: 0.85rem; }

.feed-thought { border-left: 3px solid var(--cyan); }
.feed-thought-text { font-size: 0.9rem; line-height: 1.5; color: var(--text-bright); padding: 4px 0; }
.feed-action-ok { border-left: 3px solid var(--accent); }
.feed-action-fail { border-left: 3px solid var(--red); }
.feed-chain-action { margin-left: 24px; }
.feed-params { font-size: 0.8rem; color: var(--cyan); font-family: 'SF Mono', 'Fira Code', monospace; margin-top: 2px; word-break: break-all; }
.feed-reasoning { font-size: 0.85rem; color: var(--text); margin-top: 4px; line-height: 1.4; }
.feed-result { font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; line-height: 1.3; }

.feed-emotion { font-size: 0.8rem; color: var(--text-dim); padding: 4px 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.emotion-tag { font-size: 0.75rem; padding: 1px 6px; border-radius: 8px; }
.etag-pos { background: rgba(0,255,163,0.1); color: var(--accent); }
.etag-neg { background: rgba(255,64,96,0.1); color: var(--red); }
.etag-neu { background: rgba(255,255,255,0.05); color: var(--text-dim); }
.nc-delta { font-family: monospace; font-size: 0.75rem; color: var(--text-dim); margin-left: auto; }

.feed-memory { font-size: 0.8rem; padding: 4px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feed-memory.scar { background: rgba(255,64,96,0.03); }
.mem-tier { font-size: 0.75rem; font-weight: bold; }
.mem-tier-scar { color: var(--red); }
.mem-tier-strong { color: var(--yellow); }
.mem-tier-normal { color: var(--text-dim); }
.mem-strength, .mem-valence, .mem-emo { font-size: 0.75rem; font-family: monospace; color: var(--text-dim); }
.val-pos { color: var(--accent); }
.val-neg { color: var(--red); }

.feed-chain-thought { font-size: 0.85rem; color: var(--text-dim); padding: 6px 14px; font-style: italic; margin-left: 24px; border-left: 2px solid var(--border); background: var(--bg-card); border-radius: 0 4px 4px 0; }
.chain-depth { font-family: monospace; font-size: 0.8rem; color: var(--cyan); margin-right: 6px; }

.mood-tag { font-size: 0.75rem; padding: 2px 8px; border-radius: 10px; background: rgba(0,212,255,0.1); color: var(--cyan); margin-left: auto; }

/* NC Mini Bars */
.nc-mini { display: flex; gap: 12px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.nc-mini-item { display: flex; align-items: center; gap: 4px; flex: 1; }
.nc-mini-label { font-family: monospace; font-size: 0.7rem; color: var(--text-dim); width: 24px; }
.nc-mini-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.05); overflow: hidden; }
.nc-mini-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }
.nc-5ht .nc-mini-fill { background: var(--cyan); }
.nc-da .nc-mini-fill { background: var(--accent); }
.nc-ne .nc-mini-fill { background: var(--orange); }
.nc-mini-val { font-family: monospace; font-size: 0.7rem; color: var(--text-dim); width: 28px; text-align: right; }

/* ═══ Gallery ═══ */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 16px; }
.gallery-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform 0.2s, border-color 0.2s; }
.gallery-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.gallery-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #0a0a1a; }
.gallery-meta { padding: 12px 16px; }
.gallery-title { color: var(--text-bright); font-size: 0.9rem; margin: 0 0 6px 0; font-weight: 500; }
.gallery-info { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-dim); }
.gallery-nc { margin-top: 8px; font-family: var(--font-mono, monospace); font-size: 0.7rem; color: var(--text-dim); display: flex; gap: 12px; }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: 1fr; } }

