/* ============================================================
   yesang.xyz — Terminal Oracle Styles
   Colors: #0e0e18 #141420 #ff3399 #ffee00 #00eeff
           #e8e8f0 #8888aa #ff7766
   Fonts: Fira Code, Nunito Sans, Overpass Mono
   ============================================================ */

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

/* ── CRT Scanline Overlay ────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* ── Base ────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

body {
    background: #0e0e18;
    color: #e8e8f0;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── CRT Lens Flare Glows ────────────────────────────────── */
.crt-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
}

.crt-glow--tl {
    top: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 51, 153, 0.06) 0%, transparent 60%);
}

.crt-glow--tr {
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 238, 255, 0.05) 0%, transparent 60%);
}

.crt-glow--br {
    bottom: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 238, 0, 0.04) 0%, transparent 60%);
}

.crt-glow--bl {
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 119, 102, 0.05) 0%, transparent 60%);
}

.crt-glow--center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle at 50% 50%, rgba(255, 51, 153, 0.03) 0%, transparent 50%);
}

/* ── Blinking Cursor ─────────────────────────────────────── */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.blink-cursor {
    display: inline-block;
    color: #ff3399;
    animation: blink 1s step-end infinite;
    font-family: 'Fira Code', monospace;
}

.small-cursor {
    font-size: 0.85rem;
}

/* ── Utility Colors ──────────────────────────────────────── */
.cyan    { color: #00eeff; }
.yellow  { color: #ffee00; }
.pink    { color: #ff3399; }
.coral   { color: #ff7766; }
.muted   { color: #8888aa; }
.success { color: #00eeff; }
.warn    { color: #ffee00; }

/* ── Prompt Symbol ───────────────────────────────────────── */
.prompt-symbol {
    color: #ff3399;
    font-family: 'Fira Code', monospace;
    margin-right: 0.5em;
}

.keyword {
    color: #ffee00;
    font-family: 'Fira Code', monospace;
}

.comment {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

/* ── HERO / BOOT SEQUENCE ────────────────────────────────── */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0e0e18;
    padding: 2rem;
}

#boot-screen {
    width: 100%;
    max-width: 820px;
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    line-height: 1.8;
}

#boot-lines {
    white-space: pre-wrap;
    word-break: break-word;
}

#boot-lines .boot-line {
    display: block;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#boot-lines .boot-line.visible {
    opacity: 1;
    transform: translateY(0);
}

#boot-lines .boot-line.sys { color: #8888aa; }
#boot-lines .boot-line.ok  { color: #00eeff; }
#boot-lines .boot-line.warn-line { color: #ffee00; }
#boot-lines .boot-line.ascii {
    color: #ff3399;
    font-size: clamp(0.5rem, 1.5vw, 0.9rem);
    line-height: 1.2;
    letter-spacing: 0.05em;
}
#boot-lines .boot-line.welcome {
    color: #e8e8f0;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-top: 1rem;
}

#boot-cursor {
    margin-left: 2px;
}

/* ── WINDOWS SECTION ─────────────────────────────────────── */
#windows-section {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem 6rem;
    background: #0e0e18;
}

.windows-stack {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* ── Terminal Window ─────────────────────────────────────── */
.terminal-window {
    position: relative;
    background: #141420;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    margin-bottom: -20px;
    margin-left: 0;
    opacity: 0;
    transform: translateX(80px);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.terminal-window:nth-child(2) {
    margin-left: 20px;
    margin-top: 0;
    background: #161624;
}

.terminal-window:nth-child(3) {
    margin-left: 40px;
    background: #181828;
}

.terminal-window.slide-in {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Title bar */
.terminal-titlebar {
    display: flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    gap: 6px;
    user-select: none;
}

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

.dot-red    { background: #ff7766; }
.dot-yellow { background: #ffee00; }
.dot-green  { background: #00eeff; }

.titlebar-label {
    margin-left: 8px;
    font-family: 'Overpass Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(14, 14, 24, 0.85);
    letter-spacing: 0.05em;
}

/* Content area */
.terminal-content {
    padding: 1.25rem 1.5rem 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
}

.terminal-prompt {
    color: #e8e8f0;
    margin-bottom: 0.75rem;
}

.terminal-output {
    color: #e8e8f0;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Terminal list */
.terminal-list {
    list-style: none;
    padding: 0;
}

.terminal-list li {
    color: #e8e8f0;
    font-size: 0.875rem;
    line-height: 1.8;
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
}

.item-name {
    color: #00eeff;
    min-width: 140px;
}

/* Stat grid */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
    margin-top: 0.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    color: #8888aa;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ── SPLIT PANE SECTION ──────────────────────────────────── */
#split-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem 4rem;
    background: #0e0e18;
}

.split-header {
    max-width: 900px;
    margin: 0 auto 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: #e8e8f0;
}

.split-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #141420;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    min-height: 320px;
    user-select: none;
}

.split-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pane-header {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1rem;
    font-family: 'Overpass Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: #8888aa;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pane-badge {
    background: rgba(255, 51, 153, 0.2);
    color: #ff3399;
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    font-size: 0.65rem;
    text-transform: lowercase;
}

.pane-badge--result {
    background: rgba(0, 238, 255, 0.15);
    color: #00eeff;
}

.pane-content {
    padding: 1.25rem 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    flex: 1;
    user-select: text;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.input-line .prompt-symbol {
    color: #ffee00;
    white-space: nowrap;
}

.query-text {
    color: #e8e8f0;
    min-height: 1.2em;
}

.query-examples {
    margin-top: 1.25rem;
}

.query-examples .muted {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    font-family: 'Overpass Mono', monospace;
}

.query-btn {
    display: block;
    background: transparent;
    border: 1px solid rgba(255, 51, 153, 0.3);
    color: #ff3399;
    font-family: 'Fira Code', monospace;
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    width: 100%;
}

.query-btn:hover,
.query-btn.active {
    background: rgba(255, 51, 153, 0.12);
    border-color: #ff3399;
    color: #e8e8f0;
}

/* Split divider */
.split-divider {
    width: 3px;
    background: #ff3399;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
}

.divider-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 32px;
    background: #ff3399;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0e0e18;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: col-resize;
    letter-spacing: -2px;
    z-index: 1;
}

/* Output content */
#output-lines {
    margin-top: 0.75rem;
}

.output-line {
    display: block;
    color: #e8e8f0;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.output-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.output-line.result-prob {
    color: #00eeff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.output-line.result-label {
    color: #8888aa;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    font-family: 'Overpass Mono', monospace;
    margin-bottom: 0.25rem;
}

.output-line.result-detail {
    color: #e8e8f0;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.65;
    margin-top: 0.75rem;
}

/* ── FOOTER ──────────────────────────────────────────────── */
#footer {
    position: relative;
    z-index: 1;
    padding: 4rem 2rem 3rem;
    background: #0e0e18;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 2;
}

.footer-line {
    display: block;
    color: #e8e8f0;
}

.footer-copy {
    display: block;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.8rem;
    margin-top: 1.5rem;
    letter-spacing: 0.04em;
}

/* ── Scroll Fade Section ─────────────────────────────────── */
#windows-section,
#split-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#windows-section.section-visible,
#split-section.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .split-container {
        flex-direction: column;
    }

    .split-divider {
        width: 100%;
        height: 3px;
        flex-direction: row;
        cursor: row-resize;
    }

    .divider-handle {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 32px;
        height: 16px;
    }

    .windows-stack .terminal-window:nth-child(2),
    .windows-stack .terminal-window:nth-child(3) {
        margin-left: 0;
    }

    #hero {
        align-items: flex-start;
        padding-top: 3rem;
    }
}
