@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=VT323&display=swap');

:root {
    --bg-color: #030403;
    --text-color: #33ff00;
    --glow-color: rgba(51, 255, 0, 0.4);
    --accent-color: #ff3c00;
    --glitch-color: #00f7ff;
    --monitor-border: #111;
    --terminal-font: 'VT323', monospace;
    --ui-font: 'Space Mono', monospace;
}

* {
    box-sizing: border-box;
    cursor: crosshair !important;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: var(--text-color);
    font-family: var(--terminal-font);
    font-size: 1.2rem;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- 3D PERSPECTIVE SCENE --- */

.unstable-scene {
    width: 100vw;
    height: 100vh;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #050805 0%, #000 100%);
}

.perspective-box {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 85vh;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    /* Smooth parallax tilt */
}

/* THE PHYSICAL MONITOR FRAME */
.monitor-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    border: 30px solid #1a1a1a;
    border-radius: 60px;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.9),
        inset 0 0 40px rgba(51, 255, 0, 0.05);
    padding: 4px;
    overflow: hidden;
}

/* THE CURVED SCREEN SURFACE */
.screen-surface {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--text-color) transparent;
}

/* Simulating Tube Curvature */
.screen-surface::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 100;
}

.screen-surface::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 101;
}

/* --- ATMOSPHERIC LAYERS --- */

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 16, 16, 0.1);
    background-size: 100% 3px;
    pointer-events: none;
    z-index: 99;
    opacity: 0.3;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 98;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.fog {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("https://www.transparenttextures.com/patterns/foggy-birds.png");
    opacity: 0.05;
    z-index: 5;
    pointer-events: none;
    animation: fogMove 120s linear infinite;
}

@keyframes fogMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* --- PAGE CONTENT CONTAINER --- */

.container {
    position: relative;
    padding: 3rem 2rem;
    z-index: 10;
}

/* Header Aesthetics */
h1 {
    font-size: 4rem;
    letter-spacing: 12px;
    text-shadow: 0 0 15px var(--glow-color);
    margin: 0;
}

.frequency {
    font-family: var(--ui-font);
    font-size: 0.7rem;
    letter-spacing: 5px;
    opacity: 0.5;
    text-transform: uppercase;
}

.hidden-freq {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-top: 1rem;
    font-weight: bold;
    opacity: 0.8;
}

/* Visualizer Improvement */
.visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
}

.bar {
    width: 6px;
    background: var(--text-color);
    box-shadow: 0 0 12px var(--glow-color);
}

/* --- CLI TERMINAL --- */

.narrative-cli {
    background: #000;
    border: 1px solid rgba(51, 255, 0, 0.2);
    margin: 2rem 0;
    padding: 1rem;
    text-align: left;
}

.cli-input-line {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cli-prefix {
    color: var(--accent-color);
    font-weight: bold;
}

.cli-input {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: var(--terminal-font);
    font-size: 1.1rem;
    outline: none;
    width: 100%;
}

/* --- BUTTONS --- */

.platform-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
}

.platform-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    transition: 0.3s;
}

.platform-btn:hover {
    background: var(--text-color);
    color: #000;
    box-shadow: 0 0 30px var(--glow-color);
    filter: url('#glitch-filter');
    /* TRIGGER SVG GLITCH ON HOVER */
}

/* --- FOOTER TICKER --- */

.terminal-footer {
    border-top: 1px dashed rgba(51, 255, 0, 0.2);
    margin-top: 4rem;
    padding-top: 2rem;
}

.system-log {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    font-size: 0.7rem;
    font-family: var(--ui-font);
    overflow: hidden;
}

.log-track {
    display: inline-block;
    white-space: nowrap;
    animation: scrollLog 40s linear infinite;
}

@keyframes scrollLog {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }
}

/* Transitions */
.screen-surface::-webkit-scrollbar {
    width: 4px;
}

.screen-surface::-webkit-scrollbar-thumb {
    background: var(--text-color);
    border-radius: 10px;
}

@media (max-width: 600px) {
    .monitor-frame {
        border: 15px solid #111;
        border-radius: 30px;
    }

    h1 {
        font-size: 2.5rem;
    }

    .unstable-scene {
        perspective: none;
    }

    /* Disable tilt for mobile */
}