/* ============================================
   OpenStick Website - The UZ801 Saga
   ============================================ */

:root {
    --bg-dark: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #1a2234;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-green: #22c55e;
    --accent-blue: #3b82f6;
    --accent-purple: #a855f7;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-yellow: #eab308;
    --accent-cyan: #06b6d4;
    --border: #1e293b;
    --code-bg: #0f172a;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

/* ---- STICKY NAV ---- */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transform: translateY(-100%);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.sticky-nav.visible {
    transform: translateY(0);
}

.sticky-nav.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

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

.nav-brand {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-cursor {
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.85rem 0.7rem;
    position: relative;
    transition: color 0.25s ease;
    white-space: nowrap;
}

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.7rem;
    right: 0.7rem;
    height: 2px;
    background: var(--accent-cyan);
    border-radius: 1px;
}

.nav-hex {
    color: var(--accent-purple);
    margin-right: 3px;
    font-size: 0.6rem;
    opacity: 0.7;
}

.nav-link.active .nav-hex {
    opacity: 1;
    color: var(--accent-cyan);
}

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

.nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 900px) {
    .nav-links {
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 14, 23, 0.95);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .nav-links.open {
        max-height: 400px;
    }

    .nav-link {
        padding: 0.7rem 1.5rem;
        width: 100%;
    }

    .nav-link.active::after {
        left: 1.5rem;
        right: auto;
        width: 3px;
        height: calc(100% - 0.7rem);
        top: 0.35rem;
        bottom: auto;
    }

    .nav-hamburger {
        display: flex;
    }
}

/* Back-to-top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, border-color 0.2s;
    z-index: 999;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

/* ---- HERO ---- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
        var(--bg-dark);
}

.terminal-frame {
    width: min(700px, 90vw);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.terminal-bar {
    background: #1a1a2e;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-left: 8px;
}

.terminal-body {
    background: var(--code-bg);
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-green);
    min-height: 200px;
    line-height: 1.5;
}

.terminal-body pre {
    white-space: pre-wrap;
}

h1.glitch {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
}

.arrow-down {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    margin-top: 4px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ---- CHAPTERS ---- */
.chapter {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.chapter-header {
    margin-bottom: 2rem;
}

.chapter-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-purple);
    display: block;
    margin-bottom: 0.3rem;
}

.chapter-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.section-intro code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-cyan);
}

/* ---- DEVICE CARD ---- */
.device-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 2rem;
}

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

.device-ascii pre {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    line-height: 1.3;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.spec-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    transition: border-color 0.3s, transform 0.2s;
}

.spec-item:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.spec-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.spec-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spec-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.2rem 0;
}

.spec-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ---- QUOTES ---- */
.fun-quote {
    border-left: 3px solid var(--accent-purple);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(168, 85, 247, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.fun-quote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---- TIMELINE ---- */
.timeline-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        var(--accent-blue),
        var(--accent-purple),
        var(--accent-red),
        var(--accent-green),
        var(--accent-cyan)
    );
}

@media (max-width: 768px) {
    .timeline::before { left: 20px; }
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 1rem 3rem;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
}

@media (max-width: 768px) {
    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: 100%;
        left: 0;
        text-align: left;
        padding-left: 50px;
    }
}

.timeline-badge {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    z-index: 2;
    top: 1.5rem;
}

.timeline-item.left .timeline-badge { right: -25px; }
.timeline-item.right .timeline-badge { left: -25px; }

@media (max-width: 768px) {
    .timeline-item .timeline-badge,
    .timeline-item.left .timeline-badge,
    .timeline-item.right .timeline-badge {
        left: -5px;
        right: auto;
    }
}

.timeline-badge.v1 { background: var(--accent-blue); }
.timeline-badge.v2 { background: var(--accent-purple); }
.timeline-badge.v3 { background: var(--accent-orange); }
.timeline-badge.v4 { background: var(--accent-red); }
.timeline-badge.v5 { background: var(--accent-green); }
.timeline-badge.v6 { background: var(--accent-cyan); }
.timeline-badge.v7 { background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple)); }

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: left;
}

.timeline-content:hover {
    border-color: var(--accent-blue);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-bottom: 0.3rem;
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.mood {
    font-size: 1.2rem;
}

.version-subtitle {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

.timeline-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.timeline-content em {
    color: var(--text-primary);
}

/* ---- CODE SNIPPETS ---- */
.code-snippet {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    margin: 1rem 0;
    overflow-x: auto;
}

.code-snippet pre {
    white-space: pre-wrap;
    word-break: break-all;
}

.code-snippet code {
    display: block;
    line-height: 1.6;
}

.blink {
    animation: blink 1s step-end infinite;
}

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

/* ---- ACHIEVEMENTS ---- */
.achievement-list {
    margin: 1rem 0;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.achievement.unlocked {
    color: var(--accent-green);
}

/* ---- DISTRO PARADE ---- */
.distro-parade {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.distro-card {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.distro-name {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.distro-verdict {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- DISCOVERY BOX ---- */
.discovery-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.discovery-box h4 {
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.aside {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- DISASTER ---- */
.disaster .timeline-content {
    border-color: rgba(239, 68, 68, 0.3);
}

.disaster-box {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.disaster-header {
    font-weight: 700;
    color: var(--accent-red);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.warning-icon {
    font-size: 1.3rem;
}

.disaster-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.disaster-step {
    display: flex;
    gap: 1rem;
    padding: 0.4rem 0;
    border-left: 2px solid var(--border);
    padding-left: 1rem;
}

.disaster-step.bad { border-left-color: var(--accent-orange); }
.disaster-step.worse { border-left-color: var(--accent-red); }
.disaster-step.worst { border-left-color: #dc2626; }

.step-time {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 50px;
}

.step-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---- IRQ BOX ---- */
.irq-box {
    background: rgba(234, 179, 8, 0.05);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.irq-box h4 {
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

/* ---- TRIUMPH ---- */
.triumph .timeline-content {
    border-color: rgba(34, 197, 94, 0.3);
}

.triumph.final .timeline-content {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.05);
}

/* ---- LTE STATUS ---- */
.lte-status {
    background: var(--code-bg);
    border: 1px solid var(--accent-green);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.status-header {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
}

.status-item {
    padding: 0.5rem;
}

.status-item.online .status-value {
    color: var(--accent-green);
}

.status-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.status-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}

.signal-bar {
    display: inline-block;
    width: 4px;
    background: var(--border);
    border-radius: 1px;
}
.signal-bar:nth-child(1) { height: 6px; }
.signal-bar:nth-child(2) { height: 10px; }
.signal-bar:nth-child(3) { height: 14px; }
.signal-bar:nth-child(4) { height: 18px; }
.signal-bar:nth-child(5) { height: 22px; }
.signal-bar.active { background: var(--accent-green); }

/* ---- SURGERY DIAGRAM ---- */
.surgery-diagram {
    margin: 1.5rem 0;
}

.surgery-diagram h4 {
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.surgery-before, .surgery-after {
    background: var(--code-bg);
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    margin: 0.5rem 0;
}

.surgery-label {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.surgery-before .surgery-label { color: var(--accent-red); }
.surgery-after .surgery-label { color: var(--accent-green); }

.dt-node {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    flex: 1;
    min-width: 180px;
}

.dt-node.node-active {
    border-color: var(--accent-green);
    background: rgba(34, 197, 94, 0.05);
}

.dt-node.node-disabled {
    border-color: var(--border);
    opacity: 0.5;
}

.dt-prop {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.dt-prop.irq-conflict { color: var(--accent-red); }
.dt-prop.irq-ok { color: var(--accent-green); }

.dt-arrow {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: var(--accent-red);
}

.surgery-arrow {
    text-align: center;
    padding: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

/* ---- RESULT BOX ---- */
.result-box {
    margin: 1rem 0;
}

.result-note {
    font-size: 0.9rem;
    color: var(--accent-green);
    font-style: italic;
}

/* ---- BONUS FIX ---- */
.bonus-fix {
    background: rgba(249, 115, 22, 0.05);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1.5rem 0;
}

.bonus-fix h4 {
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

.punchline {
    font-style: italic;
    color: var(--text-muted);
}

/* ---- STATS GRID ---- */
.graveyard-section {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(239, 68, 68, 0.03) 0%, transparent 70%),
        transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-purple);
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.3rem 0;
}

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ---- ARCHITECTURE ---- */
.arch-diagram {
    overflow-x: auto;
}

.arch-ascii {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    background: var(--code-bg);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    line-height: 1.4;
    white-space: pre;
}

/* ---- BOOT SEQUENCE ---- */
.boot-section {
    background:
        radial-gradient(ellipse at 30% 50%, rgba(34, 197, 94, 0.03) 0%, transparent 50%),
        transparent;
}

.boot-sequence {
    position: relative;
    padding-left: 2rem;
}

.boot-sequence::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-blue), var(--accent-green));
}

.boot-step {
    position: relative;
    padding: 1rem 0 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.boot-step::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 1.4rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 2px solid var(--bg-dark);
    margin-left: -3px;
}

.boot-step.danger::before { background: var(--accent-red); }
.boot-step.success::before { background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }

.boot-time {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-blue);
    margin-bottom: 0.2rem;
}

.boot-step.danger .boot-time { color: var(--accent-red); }
.boot-step.success .boot-time { color: var(--accent-green); }

.boot-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.boot-desc strong {
    color: var(--text-primary);
}

/* ---- EDL SECTION ---- */
.edl-section {
    background:
        radial-gradient(ellipse at 50% 30%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
        transparent;
}

.edl-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.edl-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-align: center;
}

.edl-step.edl-final {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
}

.edl-mode {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.edl-cmd {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-green);
}

.edl-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.edl-commands {
    max-width: 600px;
    margin: 2rem auto;
}

/* ---- STATUS SECTION ---- */
.status-section {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        transparent;
}

.final-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.status-category h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.status-list {
    list-style: none;
}

.status-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

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

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

/* ---- PARTITION MAP ---- */
.partition-section {
    background:
        radial-gradient(ellipse at 40% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(6, 182, 212, 0.03) 0%, transparent 50%),
        transparent;
}

.emmc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.emmc-chip {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    display: block;
}

.emmc-note {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.2rem;
}

.emmc-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-boot { background: var(--accent-blue); }
.legend-modem { background: var(--accent-orange); }
.legend-os { background: var(--accent-green); }
.legend-data { background: var(--accent-purple); }
.legend-security { background: var(--accent-red); }
.legend-misc { background: var(--text-muted); }

.partition-map {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 2rem;
}

.partition-row {
    display: flex;
    gap: 3px;
    min-height: 38px;
}

.partition-row-large {
    min-height: 60px;
}

.part {
    border-radius: 4px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
    min-width: 24px;
}

.part:hover {
    transform: scaleY(1.1);
    z-index: 5;
    filter: brightness(1.25);
}

.part:active {
    transform: scaleY(1.05);
}

.part-boot {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.part-modem {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.35), rgba(249, 115, 22, 0.2));
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.part-os {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.2));
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.part-data {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(168, 85, 247, 0.2));
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.part-security {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.part-misc {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.3), rgba(100, 116, 139, 0.15));
    border: 1px solid rgba(100, 116, 139, 0.35);
}

.part-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
    line-height: 1.2;
}

.part-size {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1.2;
}

.part-detail {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-muted);
    opacity: 0.7;
    white-space: nowrap;
    line-height: 1.2;
}

.partition-tooltip {
    position: fixed;
    background: rgba(17, 24, 39, 0.97);
    border: 1px solid var(--accent-cyan);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.15s, transform 0.15s;
    z-index: 100;
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.1);
}

.partition-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-name {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.tooltip-size {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-blue);
    margin-bottom: 0.3rem;
}

.tooltip-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Partition usage bars */
.partition-stats {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.part-stat {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 0.8rem;
}

@media (max-width: 600px) {
    .part-stat {
        grid-template-columns: 1fr auto;
    }
    .part-stat-label {
        grid-column: 1 / -1;
    }
}

.part-stat-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.part-stat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-os { background: var(--accent-green); }
.fill-data { background: var(--accent-purple); }
.fill-modem { background: var(--accent-orange); }
.fill-boot { background: var(--accent-blue); }

.part-stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.part-stat-pct {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: right;
}

.partition-cmd {
    margin-bottom: 2rem;
}

/* ---- FOOTER ---- */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--code-bg);
}

.footer-ascii pre {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent-cyan);
    line-height: 1.2;
    margin-bottom: 1rem;
    display: inline-block;
    text-align: left;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

footer code {
    color: var(--accent-green);
    font-family: var(--font-mono);
}

.footer-note {
    font-size: 0.8rem;
}

footer a {
    color: var(--accent-blue);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ---- SCROLL ANIMATIONS ---- */
.timeline-item,
.stat-card,
.boot-step,
.spec-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible,
.stat-card.visible,
.boot-step.visible,
.spec-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- CURSOR BLINK (JS-injected after boot) ---- */
.cursor-blink {
    animation: blink 1s step-end infinite;
}

/* ---- V7.0 DISPLAY / VNC BOXES ---- */
.v7-glow .timeline-content {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.05);
}

.display-ui-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.display-ui-box h4 {
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.display-mockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1rem 0;
}

.display-frame {
    background: #000;
    border: 2px solid #333;
    border-radius: 6px;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 8px rgba(0, 0, 0, 0.8);
}

.display-screen {
    background: #141428;
    padding: 6px 8px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    line-height: 1.5;
    color: var(--text-primary);
    min-width: 200px;
    border: 1px solid #222;
}

.display-line.title-line {
    color: var(--accent-cyan);
    font-weight: 700;
}

.display-line.wifi-line {
    color: var(--accent-green);
}

.display-line.client-line {
    color: #8c8ca0;
    padding-left: 0.5rem;
    font-size: 0.55rem;
}

.display-caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.module-tree {
    margin: 1rem 0;
}

.module-tree .code-snippet {
    font-size: 0.7rem;
}

.vnc-box {
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.vnc-box h4 {
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.hotspot-fix-box {
    background: rgba(234, 179, 8, 0.05);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 1rem 0;
}

.hotspot-fix-box h4 {
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}

/* ---- DEVICES & RESOURCES SECTION ---- */
.devices-section .section-intro {
    max-width: 800px;
}

.price-tag {
    display: inline-block;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.6rem 1.4rem;
    border-radius: 2rem;
    margin: 1.5rem 0 2rem;
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.device-compat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.2rem 1.4rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.device-compat-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.device-compat-name {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent-cyan);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.device-compat-note {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.resources-heading {
    color: var(--accent-blue);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.resource-link:hover {
    border-color: var(--accent-blue);
    background: var(--bg-card);
}

.resource-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.resource-text {
    font-weight: 500;
}

/* ---- GLITCH HOVER ANIMATION ---- */
@keyframes glitchAnim {
    0%   { transform: translate(0); }
    20%  { transform: translate(-3px, 2px); }
    40%  { transform: translate(3px, -2px); }
    60%  { transform: translate(-2px, -1px); }
    80%  { transform: translate(2px, 1px); }
    100% { transform: translate(0); }
}
