/* VARIABLES */
:root {
    --bg: #020617;
    --bg2: #0f172a;
    --text: #e2e8f0;
    --subtext: #94a3b8;
    --accent: #38bdf8;
    --accent2: #22d3ee;
    --danger: #ff4d4d;
}

body.light {
    --bg: #f8fafc;
    --bg2: #e2e8f0;
    --text: #0f172a;
    --subtext: #475569;
    --accent: #0ea5e9;
    --accent2: #06b6d4;
    --danger: #ff3333;
}

/* GLOBAL */
body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.4s, color 0.4s;
}

/* STARFIELD CANVAS */
#starfield {
    position: fixed;
    inset: 0;
    z-index: -2;
}

/* BOOT OVERLAY */
#bootOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.boot-text {
    font-size: 32px;
    color: var(--accent);
    font-family: "Courier New", monospace;
    animation: blink 1s infinite;
}

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

/* PARALLAX BG */
.parallax-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1447433819943-74a20887a81e?auto=format&fit=crop&w=1600&q=80')
                center/cover no-repeat;
    z-index: -1;
    filter: brightness(0.6) saturate(1.4);
    opacity: 0.7;
}

/* HERO — SMALLER VERSION */
.hero {
    text-align: center;
    padding: 40px 8%;
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.subtitle {
    font-size: 16px;
    color: var(--subtext);
    max-width: 650px;
    margin: 10px auto 20px;
}

/* GLITCH TITLE — SMALLER */
.glitch {
    font-size: 42px;
    font-weight: 900;
    position: relative;
    color: var(--accent);
    animation: glitch 2s infinite;
    letter-spacing: 2px;
}

@keyframes glitch {
    0% { text-shadow: 2px 2px var(--accent2); }
    20% { text-shadow: -2px -2px var(--accent); }
    40% { text-shadow: 3px -3px var(--accent2); }
    60% { text-shadow: -3px 3px var(--accent); }
    80% { text-shadow: 2px -2px var(--accent2); }
    100% { text-shadow: -2px 2px var(--accent); }
}

/* BUTTON */
.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    padding: 10px 26px;
    border-radius: 10px;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: 0.25s;
    box-shadow: 0 0 15px var(--accent2);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 0 25px var(--accent2), 0 0 40px var(--accent);
}

/* INIT MESSAGE */
#initMsg {
    margin-top: 10px;
    color: var(--accent2);
    font-size: 16px;
}

/* CONSOLE */
.console {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    margin: 20px auto;
    width: 70%;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(6px);
}

.console-window {
    font-family: "Courier New", monospace;
    font-size: 16px;
    line-height: 1.4;
    height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: var(--accent2);
}

/* FEATURES — SMALLER */
.features {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 8%;
    flex-wrap: wrap;
}

.feature-box {
    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: 12px;
    width: 240px;
    text-align: center;
    border: 1px solid rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(6px);
    transition: 0.3s;
}

.feature-box:hover {
    transform: rotateY(14deg) rotateX(10deg) translateY(-10px);
    box-shadow: 0 20px 50px rgba(56, 189, 248, 0.3);
}

/* SELF DESTRUCT — SMALLER */
.self-destruct {
    text-align: center;
    padding: 20px;
}

#selfDestruct {
    background: var(--danger);
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 0 20px var(--danger);
    transition: 0.2s;
}

#selfDestruct:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px var(--danger);
}

#selfDestructMsg {
    margin-top: 10px;
    color: var(--subtext);
}

/* SCREEN SHAKE */
.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0% { transform: translate(0,0); }
    25% { transform: translate(5px, -5px); }
    50% { transform: translate(-5px, 5px); }
    75% { transform: translate(5px, 5px); }
    100% { transform: translate(0,0); }
}

/* RED FLASH */
.flash {
    animation: flash 0.3s ease-in-out;
}

@keyframes flash {
    0% { background: rgba(255,0,0,0.4); }
    100% { background: transparent; }
}

/* FOOTER */
footer {
    text-align: center;
    padding: 10px;
    color: var(--subtext);
}

/* MODE BUTTON */
#modeToggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    box-shadow: 0 0 10px var(--accent2);
    z-index: 10;
}