:root {
    --bg:      #0c0c0b;
    --text:    #e0dbd3;
    --muted:   #4e4e50;
    --accent:  #2596BE;
}

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

#bg {
    position: fixed;
    inset: 0;
    z-index: -1;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

@keyframes appear {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Terminal window ── */
.terminal {
    width: 100%;
    max-width: 640px;
    background: #111110;
    border: 1px solid #272523;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    animation: appear 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.titlebar {
    position: relative;
    background: #1a1918;
    border-bottom: 1px solid #272523;
    padding: 11px 16px;
    display: flex;
    align-items: center;
}

.dots {
    display: flex;
    gap: 7px;
    z-index: 1;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot-r { background: #f04040; }
.dot-y { background: #d4921a; }
.dot-g { background: #3ef07a; }

.wintitle {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    white-space: nowrap;
}

/* ── Terminal body ── */
.term-body {
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 220px;
    display: block;
    margin-bottom: 2rem;
}

/* ── ASCII box ── */
.ascii-box {
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--muted);
    padding: 1.1rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

h3 {
    font-family: 'Iosevka Web', monospace;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    line-height: 1.35;
    color: var(--text);
}

.status {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Noscript fallback ── */
.noscript-msg {
    width: 100%;
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 0.75rem;
}

.noscript-msg a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s;
}

.noscript-msg a:hover { border-bottom-color: var(--accent); }

/* ── Command history ── */
#cmd-history { width: 100%; margin-bottom: 0.5rem; }

.h-entry { margin-bottom: 0.75rem; }

.h-cmd { display: flex; gap: 0.75rem; }

.h-out {
    padding-left: 1.75rem;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

.h-err { color: #f04040; }

.out-link {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s;
}
.out-link:hover { border-bottom-color: var(--accent); }

/* ── Input prompt ── */
.prompt-line {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prompt {
    color: var(--accent);
    flex-shrink: 0;
    user-select: none;
}

#cmd-input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 1rem;
    flex: 1;
    caret-color: var(--accent);
    min-width: 0;
}

/* ── Kernel panic easter egg ── */
#kp-screen {
    position: fixed;
    inset: 0;
    background: #000;
    color: #ddd;
    font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 2rem;
    overflow: auto;
    cursor: text;
    z-index: 99999;
}

#kp-screen pre {
    margin: 0;
    white-space: pre-wrap;
}

#kp-input-line {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
}

#kp-input-line span {
    margin-right: 0.5rem;
}

#kp-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ddd;
    font-family: inherit;
    font-size: inherit;
    caret-color: #ddd;
    flex: 1;
}

footer {
    margin-top: 1.25rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
