/* namu.land - Retrofuturist Reforestation Terminal */
/* Colors: #D4B896 Warm Terminal, #141816 CRT Background, #4ADE80 Green Screen, #E07A5F Amber Phosphor, #E8A835 Alert Gold, #0D0F0E Deep Black, #2A2F2A Panel Dark */

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

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

body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    color: #D4B896;
    background-color: #0D0F0E;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Scanlines ===== */
#scanlines {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
}

/* ===== Screen Sections ===== */
.screen {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

/* ===== Terminal Panel ===== */
.terminal-panel {
    background: rgba(20, 24, 22, 0.85);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(212, 184, 150, 0.4);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.terminal-panel:hover {
    border-color: rgba(212, 184, 150, 0.6);
}

.panel-titlebar {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.8rem;
}

.titlebar-amber {
    background: #E07A5F;
}

.titlebar-green {
    background: #4ADE80;
}

.titlebar-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0D0F0E;
}

.titlebar-controls {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: #0D0F0E;
    opacity: 0.6;
}

.panel-body {
    padding: 1.5rem;
}

/* ===== Boot Panel ===== */
.boot-panel {
    width: 70%;
    max-width: 700px;
    min-height: 400px;
}

.terminal-output {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
}

.boot-line {
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #4ADE80;
}

.boot-line.visible {
    opacity: 1;
}

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

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

/* ===== Dashboard Panels Grid ===== */
.panels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
    padding: 2rem;
}

/* ===== Status Panel ===== */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(212, 184, 150, 0.1);
}

.status-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: #D4B896;
    opacity: 0.7;
}

.status-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
}

.status-value.green { color: #4ADE80; }
.status-value.amber { color: #E07A5F; }
.status-value.alert { color: #E8A835; }

.status-bar {
    margin-top: 1rem;
}

.bar-track {
    width: 100%;
    height: 6px;
    background: #2A2F2A;
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ADE80, #E8A835);
    border-radius: 3px;
    transition: width 1.5s ease;
}

.bar-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: #D4B896;
    opacity: 0.5;
    margin-top: 0.3rem;
    display: block;
}

/* ===== Biome Monitor ===== */
.biome-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.biome-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.biome-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #D4B896;
    width: 120px;
    flex-shrink: 0;
}

.biome-bar {
    flex: 1;
    height: 4px;
    background: #2A2F2A;
    border-radius: 2px;
    overflow: hidden;
}

.biome-fill {
    height: 100%;
    background: #4ADE80;
    border-radius: 2px;
    transition: width 1s ease;
}

.biome-pct {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 0.75rem;
    color: #4ADE80;
    width: 35px;
    text-align: right;
}

/* ===== Log Panel ===== */
.log-entries {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    line-height: 1.9;
}

.log-entry {
    color: #D4B896;
    opacity: 0.8;
}

.log-time {
    color: #4ADE80;
    margin-right: 0.8rem;
}

/* ===== ASCII Tree ===== */
.ascii-tree {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #4ADE80;
    line-height: 1.3;
    text-align: center;
    margin-bottom: 1rem;
}

.specimen-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #E8A835;
    text-align: center;
    letter-spacing: 0.1em;
}

.specimen-data {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: #D4B896;
    text-align: center;
    opacity: 0.6;
    margin-top: 0.3rem;
}

/* ===== Deep Scan ===== */
.panel-deep {
    max-width: 600px;
    width: 100%;
}

.deep-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #4ADE80;
    margin-bottom: 0.5rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.deep-text.visible {
    opacity: 1;
}

.deep-quiet {
    color: #D4B896;
    font-style: italic;
    margin-top: 1rem;
    opacity: 0;
}

.deep-quiet.visible {
    opacity: 0.6;
}

.scan-visual {
    margin: 1.5rem 0;
}

.scan-visual svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ===== Sleep Mode ===== */
#sleep {
    background: #0D0F0E;
}

.panel-sleep {
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.sleep-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #D4B896;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

.sleep-domain {
    font-family: 'Silkscreen', cursive;
    font-weight: 700;
    font-size: 1.5rem;
    color: #E07A5F;
    opacity: 1;
    margin-top: 1rem;
}

.sleep-hangul {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #4ADE80;
    opacity: 0.5;
}

/* ===== Scroll Reveal ===== */
.terminal-panel {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.terminal-panel.revealed {
    opacity: 1;
}

#boot .boot-panel {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .panels-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .boot-panel {
        width: 90%;
    }

    .screen {
        padding: 3rem 1rem;
    }

    .biome-name {
        width: 80px;
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .panel-body {
        padding: 1rem;
    }

    .terminal-output {
        font-size: 0.7rem;
    }
}
