/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'JetBrains Mono', monospace;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* VARIABLES */
:root {
    --haz-yellow: #FFD700;
    --haz-black: #111;
    --term-green: #0f0;
    --term-bg: rgba(0, 20, 0, 0.9);
    --err-red: #ff3333;
}

/* UTILS */
.blink-red {
    color: var(--err-red);
    animation: blink-urgent 0.8s infinite;
}

@keyframes blink-urgent {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 10px red;
    }

    50% {
        opacity: 0.3;
        text-shadow: none;
    }
}

/* BACKGROUNDS */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.noise {
    position: fixed;
    inset: 0;
    background: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.05;
    pointer-events: none;
    z-index: 100;
}

/* HAZARD BARS */
.hazard-bar {
    height: 40px;
    background: repeating-linear-gradient(45deg,
            var(--haz-yellow),
            var(--haz-yellow) 20px,
            var(--haz-black) 20px,
            var(--haz-black) 40px);
    overflow: hidden;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000;
}

.hazard-bar.bottom {
    border-bottom: none;
    border-top: 2px solid #000;
}

.hazard-content {
    background: var(--haz-black);
    color: var(--haz-yellow);
    padding: 5px 20px;
    font-weight: bold;
    white-space: nowrap;
    animation: scroll-left 20s linear infinite;
    border: 2px solid var(--haz-yellow);
    transform: skewX(-20deg);
}

@keyframes scroll-left {
    from {
        transform: translateX(100vw) skewX(-20deg);
    }

    to {
        transform: translateX(-100%) skewX(-20deg);
    }
}

/* TOP UI */
.top-bar {
    position: absolute;
    top: 60px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.brand {
    font-weight: 800;
    letter-spacing: 2px;
}

/* MAIN CONTENT */
.main-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 0 50px;
    text-align: center;
}

.center-piece {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

.giant-glitch {
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 1;
    font-weight: 900;
    font-family: 'Oswald', sans-serif;
    position: relative;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 5px;
    white-space: nowrap;
}

.giant-glitch::before,
.giant-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
}

.giant-glitch::before {
    color: #0ff;
    z-index: -1;
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
    opacity: 1;
}

.giant-glitch::after {
    color: rgb(255, 0, 0);
    z-index: -2;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    opacity: 1;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
        transform: translate(-4px, 2px);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(4px, -2px);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
        transform: translate(-4px, 2px);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(4px, -2px);
    }

    80% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-4px, 2px);
    }

    100% {
        clip-path: inset(30% 0 30% 0);
        transform: translate(4px, -2px);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(4px, -2px);
    }

    20% {
        clip-path: inset(30% 0 20% 0);
        transform: translate(-4px, 2px);
    }

    40% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(4px, -2px);
    }

    60% {
        clip-path: inset(20% 0 50% 0);
        transform: translate(-4px, 2px);
    }

    80% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(4px, -2px);
    }

    100% {
        clip-path: inset(0% 0 80% 0);
        transform: translate(-4px, 2px);
    }
}

.label-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--haz-yellow);
    color: var(--haz-yellow);
    padding: 8px 16px;
    font-size: 14px;
    background: rgba(255, 215, 0, 0.05);
    margin-top: 10px;
    letter-spacing: 2px;
}

/* TERMINAL */
.terminal-window {
    width: 100%;
    max-width: 600px;
    height: 200px;
    background: var(--term-bg);
    border: 1px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: left;
}

.terminal-header {
    background: #1a1a1a;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.title {
    margin-left: 10px;
    font-size: 12px;
    color: #666;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-content {
    padding: 15px;
    color: var(--term-green);
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
    flex-grow: 1;
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.3);
}

.line {
    margin-bottom: 2px;
}

.prompt {
    color: #555;
    margin-right: 8px;
}

/* SIDE SPEC */
.tech-specs {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spec-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.spec-row .label {
    font-size: 10px;
    color: #444;
    letter-spacing: 1px;
}

.spec-row .value {
    font-size: 14px;
    font-weight: bold;
    color: #888;
}

@media (max-width: 900px) {
    .tech-specs {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-top: 30px;
        text-align: center;
        gap: 15px;
    }

    .giant-glitch {
        font-size: 15vw;
        white-space: normal;
    }

    .top-bar {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        padding: 20px;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 1px solid #222;
    }

    .status {
        font-size: 12px;
    }

    .main-container {
        padding: 0 20px;
    }
}

.status {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
}