:root {
    --bg-color: #050505;
    --main-cyan: #00ffcc;
    --dark-cyan: #008b8b;
    --alert-red: #ff0055;
    --text-gray: #a0a0a0;
}

/* --- RESET Y CURSOR --- */
html,
body,
button,
a {
    cursor: crosshair;
}

body {
    background-color: var(--bg-color);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.9)),
        url('https://i.pinimg.com/736x/b5/ad/ca/b5adcad30b9b18f7415b052df53f3d49.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--main-cyan);
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    overflow-x: hidden;
    min-height: 1400px;
    /* Espacio extra para el scroll y la terminal */
}

/* --- CAPAS DE ATMÓSFERA --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.15) 3px,
            rgba(0, 0, 0, 0.15) 4px);
    pointer-events: none;
    z-index: 10;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Nueva textura de ruido estática y fiable */
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    opacity: 0.05;
    /* Ajusta esto si quieres que se note más o menos */
    pointer-events: none;
    z-index: 11;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, black 150%);
    z-index: 12;
    pointer-events: none;
    opacity: 0.8;
}

/* --- CABECERA Y TEXTOS --- */
.main-title {
    padding: 60px 20px;
    text-align: center;
    position: relative;
    z-index: 20;
}

.glitch-text {
    font-size: 4.5rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    text-shadow: 3px 3px 0px var(--dark-cyan), -3px -3px 0px var(--alert-red);
    animation: textShudder 3s infinite linear;
}

@keyframes textShudder {

    0%,
    100% {
        transform: translate(0);
    }

    5% {
        transform: translate(2px, -2px);
    }

    10% {
        transform: translate(-2px, 2px);
    }

    15% {
        transform: translate(0);
    }
}

.subtitle {
    color: var(--text-gray);
    letter-spacing: 4px;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* --- CANVAS Y COLLAGE DE IMÁGENES --- */
.canvas {
    position: relative;
    width: 100%;
    min-height: 1000px;
}

.img-box {
    position: absolute;
    border: 1px solid var(--main-cyan);
    padding: 5px;
    background: #000;
    box-shadow: 10px 10px 0px rgba(0, 255, 204, 0.1);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.img-box img {
    width: 100%;
    filter: grayscale(0.6) contrast(1.2) brightness(0.8);
    display: block;
}

.img-box:hover {
    transform: scale(1.05) rotate(-3deg);
    border-color: var(--alert-red);
    filter: hue-rotate(45deg);
    z-index: 30;
}

.box-1 {
    top: 50px;
    left: 8%;
    width: 280px;
}

.box-2 {
    top: 350px;
    right: 12%;
    width: 220px;
}

/* PANEL DE INFO */
.info-panel {
    position: absolute;
    top: 180px;
    right: 38%;
    border: 1px solid var(--main-cyan);
    background: rgba(0, 0, 0, 0.85);
    padding: 25px;
    box-shadow: -12px 12px 0px var(--dark-cyan);
    z-index: 15;
    max-width: 350px;
}

.warning {
    color: var(--alert-red);
    font-weight: bold;
    animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* --- NAVEGACIÓN DE VERSIONES (SAIKORE NAV) --- */
.saikore-nav {
    position: absolute;
    top: 750px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 850px;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--main-cyan);
    padding: 30px;
    z-index: 25;
}

.nav-title {
    margin-bottom: 20px;
    color: var(--text-gray);
    letter-spacing: 2px;
}

.button-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.os-btn {
    background: #111;
    border: 1px solid var(--main-cyan);
    color: var(--main-cyan);
    padding: 12px 20px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
}

.os-btn:hover {
    background: var(--main-cyan);
    color: #000;
    box-shadow: 4px 4px 0px var(--alert-red);
    transform: translate(-3px, -3px);
}

.cursed-btn {
    border-color: var(--alert-red);
    color: var(--alert-red);
}

.cursed-btn:hover {
    background: var(--alert-red);
    animation: shake 0.1s infinite;
}

@keyframes shake {
    0% {
        transform: translate(1px);
    }

    100% {
        transform: translate(-1px);
    }
}

/* --- SAI-TERM (FIJA Y MINIMIZABLE) --- */
.terminal-window {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 340px;
    height: 260px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--main-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.terminal-window.minimized {
    height: 35px;
    width: 200px;
    opacity: 0.8;
}

.window-header {
    background: #111;
    padding: 8px 12px;
    border-bottom: 1px solid var(--main-cyan);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.terminal-body {
    flex-grow: 1;
    padding: 12px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.4;
}

.terminal-input-line {
    display: flex;
    padding: 10px;
    background: #000;
    border-top: 1px solid rgba(0, 255, 204, 0.2);
}

#terminal-input {
    background: transparent;
    border: none;
    color: var(--main-cyan);
    outline: none;
    flex-grow: 1;
    font-family: inherit;
}

/* --- SECUENCIAS DE ARRANQUE Y VENTANAS --- */
#boot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
}

#window-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 10001;
}

/* Ventanas Dinámicas */
.window-classic {
    width: 320px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    color: #000;
    padding: 2px;
}

.window-classic .header {
    background: #000080;
    color: #fff;
    padding: 3px 8px;
    font-weight: bold;
}

.window-modern {
    width: 380px;
    background: #0a0a0a;
    border: 1px solid var(--main-cyan);
    padding: 25px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.2);
}

.black-out {
    animation: crtShutdown 0.6s forwards;
}

@keyframes crtShutdown {
    0% {
        transform: scale(1, 1);
    }

    40% {
        transform: scale(1, 0.005);
        filter: brightness(4);
    }

    100% {
        transform: scale(0, 0);
    }
}

.glitch-footer {
    text-align: center;
    padding: 40px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* --- EFECTO DE DESTRUCCIÓN TOTAL (EASTER EGG) --- */
.system-destruction {
    animation: extremeGlitch 0.15s infinite;
    filter: invert(1) hue-rotate(180deg) contrast(2);
    pointer-events: none;
    /* Nadie puede salvarse una vez que empieza */
}

@keyframes extremeGlitch {
    0% {
        transform: translate(4px, -4px) skew(5deg);
    }

    25% {
        transform: translate(-4px, 4px) rotate(1deg);
    }

    50% {
        transform: translate(8px, 0px) scale(1.05);
    }

    75% {
        transform: translate(-8px, -2px) skew(-5deg);
    }

    100% {
        transform: translate(0);
    }
}