/* =========================================================
   PROJECT_05:59 — PUBLIC FACADE V2
========================================================= */

:root {
    --black: #04030a;

    --purple: #c66cff;
    --purple-dark: #7900d8;

    --cyan: #70eaff;
    --cyan-dark: #00a7c7;

    --magenta: #ff4fd8;
    --green: #45ffae;
    --yellow: #ffe36c;
    --red: #ff506f;

    --white: #f9f0ff;

    --panel-bg: rgba(8, 5, 18, 0.38);
    --panel-border: rgba(198, 108, 255, 0.34);
}

* {
    margin: 0;
    padding: 0;

    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;

    overflow: hidden;

    background: var(--black);

    font-family:
        "Segoe UI",
        "Trebuchet MS",
        Arial,
        sans-serif;
}

button {
    font: inherit;
}


/* =========================================================
   VIDEO
========================================================= */

#background {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    z-index: 0;

    filter:
        brightness(0.62)
        saturate(1.2)
        contrast(1.08);

    transform: scale(1.015);
}


/* =========================================================
   CAPAS AMBIENTALES
========================================================= */

#overlay {
    position: fixed;
    inset: 0;

    z-index: 1;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 75% 43%,
            rgba(255, 64, 203, 0.08),
            transparent 32%
        ),

        radial-gradient(
            circle at 55% 70%,
            rgba(39, 205, 255, 0.08),
            transparent 42%
        ),

        linear-gradient(
            90deg,
            rgba(3, 2, 9, 0.91) 0%,
            rgba(6, 3, 15, 0.62) 37%,
            rgba(11, 3, 22, 0.16) 72%,
            rgba(3, 2, 9, 0.32) 100%
        ),

        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.12),
            rgba(0, 0, 0, 0.49)
        );
}

#scanlines {
    position: fixed;
    inset: 0;

    z-index: 4;

    pointer-events: none;

    opacity: 0.14;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.04) 0,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent 4px
        );
}

#noise {
    position: fixed;
    inset: -20%;

    z-index: 5;

    pointer-events: none;

    opacity: 0.022;

    background-image:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.9) 0.5px,
            transparent 0.8px
        );

    background-size: 5px 5px;

    animation:
        noiseShift 0.18s steps(2) infinite;
}


/* =========================================================
   APP
========================================================= */

#app {
    position: relative;

    z-index: 10;

    width: 100%;
    height: 100%;
}


/* =========================================================
   BOOT SCREEN
========================================================= */

#boot-screen {
    position: fixed;
    inset: 0;

    z-index: 200;

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at center,
            rgba(114, 17, 169, 0.16),
            rgba(3, 2, 8, 0.96) 55%
        );

    transition:
        opacity 0.48s ease,
        filter 0.48s ease;
}

#boot-screen.boot-exit {
    opacity: 0;

    filter:
        blur(9px)
        brightness(1.7);
}

.boot-box {
    position: relative;

    width: min(430px, 84vw);

    padding: 36px;

    text-align: center;

    border:
        1px solid rgba(198, 108, 255, 0.48);

    background:
        linear-gradient(
            140deg,
            rgba(22, 7, 38, 0.72),
            rgba(4, 8, 18, 0.62)
        );

    box-shadow:
        0 0 45px rgba(161, 36, 255, 0.16),
        inset 0 0 35px rgba(161, 36, 255, 0.05);

    clip-path:
        polygon(
            0 0,
            92% 0,
            100% 14%,
            100% 100%,
            8% 100%,
            0 86%
        );
}

.boot-project {
    color: var(--purple);

    font-size:
        clamp(25px, 4vw, 40px);

    font-weight: 700;

    letter-spacing: 0.15em;

    text-shadow:
        0 0 15px
            rgba(198, 108, 255, 0.82),

        0 0 40px
            rgba(136, 20, 255, 0.45);
}

.boot-subtitle {
    margin-top: 9px;
    margin-bottom: 27px;

    color:
        rgba(112, 234, 255, 0.55);

    font-size: 9px;

    letter-spacing: 0.33em;
}

#start-system {
    padding: 14px 26px;

    color: var(--white);

    background:
        rgba(18, 5, 34, 0.8);

    border:
        1px solid
            rgba(198, 108, 255, 0.82);

    font-size: 12px;

    letter-spacing: 0.25em;

    cursor: pointer;

    box-shadow:
        0 0 17px
            rgba(198, 108, 255, 0.34),

        inset 0 0 18px
            rgba(198, 108, 255, 0.08);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#start-system:hover:not(:disabled) {
    transform: scale(1.05);

    border-color:
        rgba(112, 234, 255, 0.88);

    box-shadow:
        0 0 26px
            rgba(198, 108, 255, 0.7),

        0 0 42px
            rgba(112, 234, 255, 0.2),

        inset 0 0 22px
            rgba(198, 108, 255, 0.15);
}

#start-system:disabled {
    cursor: wait;

    opacity: 0.72;
}

#boot-status {
    min-height: 17px;

    margin-top: 21px;

    color:
        rgba(112, 234, 255, 0.62);

    font-size: 10px;

    letter-spacing: 0.23em;
}


/* =========================================================
   HUD
========================================================= */

#hud {
    position: absolute;
    inset: 0;
}

#hud.hud-hidden {
    visibility: hidden;
}


/* =========================================================
   TOP BAR
========================================================= */

#top-bar {
    position: absolute;

    top: 4.3vh;
    left: 4vw;
    right: 4vw;

    display: flex;

    justify-content: space-between;
    align-items: flex-start;
}

#signature {
    color:
        rgba(246, 229, 255, 0.94);

    font-size:
        clamp(19px, 2vw, 31px);

    font-weight: 600;

    letter-spacing: 0.09em;

    text-shadow:
        0 0 12px
            rgba(198, 108, 255, 0.65),

        0 0 24px
            rgba(255, 79, 216, 0.22);
}

#build-name {
    margin-top: 7px;

    color:
        rgba(112, 234, 255, 0.42);

    font-size: 9px;

    letter-spacing: 0.27em;
}

#top-status {
    display: flex;

    gap: 22px;

    padding-top: 6px;

    font-size: 9px;

    letter-spacing: 0.24em;
}

.top-label {
    color:
        rgba(255, 255, 255, 0.43);
}

.status-online {
    color: var(--green);

    text-shadow:
        0 0 8px
            rgba(69, 255, 174, 0.5);
}


/* =========================================================
   PANEL PRINCIPAL
========================================================= */

#system-panel {
    position: absolute;

    top: 15vh;
    left: 4.2vw;

    width: min(310px, 26vw);

    padding: 24px;

    border:
        1px solid var(--panel-border);

    background:
        linear-gradient(
            135deg,
            rgba(31, 8, 48, 0.44),
            rgba(3, 12, 23, 0.28)
        );

    backdrop-filter:
        blur(11px);

    box-shadow:
        inset 0 0 28px
            rgba(198, 108, 255, 0.045),

        0 0 30px
            rgba(121, 0, 216, 0.07);

    clip-path:
        polygon(
            0 0,
            92% 0,
            100% 12%,
            100% 100%,
            8% 100%,
            0 88%
        );
}

.panel-corner {
    position: absolute;

    height: 1px;

    box-shadow:
        0 0 11px currentColor;
}

.panel-corner-top {
    top: 0;
    right: 0;

    width: 43px;

    color: var(--cyan);

    background: var(--cyan);
}

.panel-corner-bottom {
    bottom: 0;
    left: 0;

    width: 35px;

    color: var(--magenta);

    background: var(--magenta);
}

.panel-heading {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 23px;

    color: var(--cyan);

    font-size: 12px;

    letter-spacing: 0.25em;

    text-shadow:
        0 0 10px
            rgba(112, 234, 255, 0.44);
}

.panel-heading-mark {
    color: var(--magenta);

    font-size: 9px;

    text-shadow:
        0 0 9px
            rgba(255, 79, 216, 0.75);
}

.panel-row {
    display: flex;

    justify-content: space-between;

    gap: 18px;

    margin-top: 14px;

    font-size: 12px;

    letter-spacing: 0.13em;
}

.panel-key {
    color:
        rgba(255, 255, 255, 0.48);
}

.panel-value {
    font-weight: 600;
}

.value-green {
    color: var(--green);

    text-shadow:
        0 0 7px
            rgba(69, 255, 174, 0.44);
}

.value-cyan {
    color: var(--cyan);

    text-shadow:
        0 0 7px
            rgba(112, 234, 255, 0.42);
}

.value-purple {
    color: var(--purple);

    text-shadow:
        0 0 7px
            rgba(198, 108, 255, 0.45);
}

.value-yellow {
    color: var(--yellow);

    text-shadow:
        0 0 7px
            rgba(255, 227, 108, 0.4);
}

.panel-separator {
    height: 1px;

    margin: 22px 0 18px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 79, 216, 0.68),
            rgba(112, 234, 255, 0.28),
            transparent
        );
}

#motto {
    color:
        rgba(197, 189, 255, 0.64);

    font-size: 10px;

    letter-spacing: 0.25em;
}


/* =========================================================
   SIDE DATA
========================================================= */

#side-data {
    position: absolute;

    right: 4.1vw;
    top: 17vh;

    width: 190px;

    padding-left: 14px;

    border-left:
        1px solid
            rgba(112, 234, 255, 0.22);
}

.side-data-line {
    display: flex;

    justify-content: space-between;

    margin-bottom: 13px;

    color:
        rgba(255, 255, 255, 0.42);

    font-size: 9px;

    letter-spacing: 0.2em;
}

.side-data-line b {
    font-weight: 500;
}


/* =========================================================
   RETÍCULA
========================================================= */

#reticle {
    position: absolute;

    left: 67%;
    top: 51%;

    width: 84px;
    height: 84px;

    transform:
        translate(-50%, -50%);

    opacity: 0.62;

    pointer-events: none;
}

.reticle-ring {
    position: absolute;

    border-radius: 50%;
}

.ring-one {
    inset: 0;

    border:
        1px solid
            rgba(112, 234, 255, 0.19);

    animation:
        rotateClockwise
        17s linear infinite;
}

.ring-two {
    inset: 12px;

    border:
        1px dashed
            rgba(255, 79, 216, 0.24);

    animation:
        rotateCounter
        11s linear infinite;
}

.reticle-horizontal,
.reticle-vertical {
    position: absolute;

    left: 50%;
    top: 50%;

    background:
        rgba(198, 108, 255, 0.34);

    box-shadow:
        0 0 8px
            rgba(198, 108, 255, 0.26);

    transform:
        translate(-50%, -50%);
}

.reticle-horizontal {
    width: 108px;
    height: 1px;
}

.reticle-vertical {
    width: 1px;
    height: 108px;
}

.reticle-core {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 7px;
    height: 7px;

    border:
        1px solid
            rgba(112, 234, 255, 0.66);

    border-radius: 50%;

    transform:
        translate(-50%, -50%);

    box-shadow:
        0 0 11px
            rgba(112, 234, 255, 0.55);
}


/* =========================================================
   HEXADECIMALES
========================================================= */

#hex-area {
    position: absolute;

    left: 4vw;
    bottom: 6.2vh;
}

#hex-label {
    margin-bottom: 9px;

    color:
        rgba(112, 234, 255, 0.36);

    font-size: 8px;

    letter-spacing: 0.29em;
}

#hex-grid {
    display: flex;

    gap: 17px;
}

.hex-node {
    padding: 3px 1px;

    border: 0;
    outline: 0;

    background: transparent;

    font-size:
        clamp(20px, 2vw, 35px);

    cursor: pointer;

    transition:
        transform 0.2s ease,
        color 0.2s ease,
        text-shadow 0.2s ease,
        filter 0.2s ease;
}

.hex-cyan {
    color: var(--cyan);

    text-shadow:
        0 0 9px
            rgba(112, 234, 255, 0.88),

        0 0 20px
            rgba(0, 167, 199, 0.45);
}

.hex-magenta {
    color: var(--magenta);

    text-shadow:
        0 0 9px
            rgba(255, 79, 216, 0.9),

        0 0 20px
            rgba(255, 0, 183, 0.42);
}

.hex-purple {
    color: var(--purple);

    text-shadow:
        0 0 9px
            rgba(198, 108, 255, 0.88),

        0 0 20px
            rgba(121, 0, 216, 0.44);
}

.hex-green {
    color: var(--green);

    text-shadow:
        0 0 9px
            rgba(69, 255, 174, 0.82),

        0 0 20px
            rgba(0, 198, 115, 0.38);
}

.hex-yellow {
    color: var(--yellow);

    text-shadow:
        0 0 9px
            rgba(255, 227, 108, 0.82),

        0 0 20px
            rgba(255, 177, 0, 0.36);
}

.hex-red {
    color: var(--red);

    text-shadow:
        0 0 9px
            rgba(255, 80, 111, 0.82),

        0 0 20px
            rgba(255, 0, 56, 0.34);
}

.hex-node:hover,
.hex-node.hex-active {
    color: var(--white);

    transform:
        translateY(-5px)
        scale(1.07);

    filter:
        brightness(1.25);

    text-shadow:
        0 0 13px
            rgba(255, 255, 255, 0.9),

        0 0 30px
            currentColor;
}

.hex-line {
    width: 29vw;
    height: 1px;

    margin-top: 9px;

    background:
        linear-gradient(
            90deg,
            var(--magenta),
            rgba(112, 234, 255, 0.5),
            transparent
        );

    box-shadow:
        0 0 10px
            rgba(198, 108, 255, 0.32);
}


/* =========================================================
   CONSOLA
========================================================= */

#console {
    position: absolute;

    left: 4vw;
    bottom: 2.7vh;

    display: flex;

    gap: 15px;

    align-items: center;

    font-size: 8px;

    letter-spacing: 0.22em;
}

#console-time {
    color:
        rgba(255, 255, 255, 0.34);
}

#console-message {
    color:
        rgba(112, 234, 255, 0.57);
}

#console-message[data-type="green"] {
    color:
        rgba(69, 255, 174, 0.72);
}

#console-message[data-type="purple"] {
    color:
        rgba(198, 108, 255, 0.72);
}

#console-message[data-type="magenta"] {
    color:
        rgba(255, 79, 216, 0.76);
}

#console-message[data-type="yellow"] {
    color:
        rgba(255, 227, 108, 0.75);
}

#console-message[data-type="red"] {
    color:
        rgba(255, 80, 111, 0.78);
}


/* =========================================================
   05:59
========================================================= */

#clock {
    position: absolute;

    right: 4vw;
    bottom: 3.5vh;

    padding: 10px 12px;

    border: 0;

    color:
        rgba(112, 234, 255, 0.34);

    background: transparent;

    font-size: 14px;

    letter-spacing: 0.28em;

    cursor: default;

    user-select: none;

    transition:
        color 0.25s ease,
        text-shadow 0.25s ease,
        opacity 0.25s ease;
}

#clock:hover {
    color:
        rgba(112, 234, 255, 0.55);

    text-shadow:
        0 0 8px
            rgba(112, 234, 255, 0.24);
}


/* =========================================================
   EFECTOS
========================================================= */

#flash-layer {
    position: fixed;
    inset: 0;

    z-index: 150;

    pointer-events: none;

    opacity: 0;

    background: white;
}

#glitch-band {
    position: fixed;

    left: -10%;

    width: 120%;

    z-index: 140;

    pointer-events: none;

    opacity: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 79, 216, 0.46),
            rgba(112, 234, 255, 0.35),
            transparent
        );

    mix-blend-mode: screen;
}

#rgb-layer {
    position: fixed;
    inset: 0;

    z-index: 139;

    pointer-events: none;

    opacity: 0;

    background:
        linear-gradient(
            90deg,
            rgba(255, 0, 94, 0.16),
            transparent 35%,
            transparent 65%,
            rgba(0, 220, 255, 0.16)
        );

    mix-blend-mode: screen;
}

#warning-layer {
    position: fixed;
    inset: 0;

    z-index: 138;

    pointer-events: none;

    opacity: 0;

    border:
        2px solid
            rgba(255, 227, 108, 0.72);

    box-shadow:
        inset 0 0 40px
            rgba(255, 227, 108, 0.18);
}


/* =========================================================
   ANIMACIONES
========================================================= */

@keyframes rotateClockwise {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateCounter {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes noiseShift {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(1%, -1%);
    }

    50% {
        transform: translate(-1%, 1%);
    }

    75% {
        transform: translate(1%, 1%);
    }

    100% {
        transform: translate(0, 0);
    }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {
    #system-panel {
        width: 275px;
    }

    #side-data {
        display: none;
    }

    #reticle {
        left: 76%;
    }
}

@media (max-width: 650px) {
    #top-status {
        display: none;
    }

    #system-panel {
        top: 14vh;

        width: 260px;
    }

    #reticle {
        display: none;
    }

    #hex-grid {
        gap: 11px;
    }

    .hex-node {
        font-size: 20px;
    }
}
#reticle {
    display: none;
}
/* Elimina físicamente la pantalla de inicio después de INITIALIZE */
#boot-screen[hidden] {
    display: none !important;
}
/* =========================================================
   BRILLO BY SEVENV1
========================================================= */

#signature {
    animation:
        signatureGlow 3.2s ease-in-out infinite,
        signatureFlicker 9s steps(1) infinite;
}

@keyframes signatureGlow {
    0%,
    100% {
        color: rgba(246, 229, 255, 0.82);

        text-shadow:
            0 0 7px rgba(198, 108, 255, 0.45),
            0 0 18px rgba(255, 79, 216, 0.16);

        filter: brightness(0.95);
    }

    50% {
        color: #ffffff;

        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.85),
            0 0 24px rgba(198, 108, 255, 0.78),
            0 0 48px rgba(255, 79, 216, 0.38),
            0 0 75px rgba(112, 234, 255, 0.18);

        filter: brightness(1.22);
    }
}

@keyframes signatureFlicker {
    0%,
    92%,
    94%,
    100% {
        opacity: 1;
        transform: translateX(0);
    }

    93% {
        opacity: 0.58;
        transform: translateX(-2px);
    }

    95% {
        opacity: 0.9;
        transform: translateX(1px);
    }
}


/* =========================================================
   CAMBIO AUTOMÁTICO DE COLOR DE HEXADECIMALES
========================================================= */

.hex-node {
    animation:
        hexColorFlow 8s linear infinite,
        hexBreath 2.8s ease-in-out infinite;
}

.hex-node:nth-child(1) {
    animation-delay: 0s;
}

.hex-node:nth-child(2) {
    animation-delay: -1.25s;
}

.hex-node:nth-child(3) {
    animation-delay: -2.5s;
}

.hex-node:nth-child(4) {
    animation-delay: -3.75s;
}

.hex-node:nth-child(5) {
    animation-delay: -5s;
}

.hex-node:nth-child(6) {
    animation-delay: -6.25s;
}

@keyframes hexColorFlow {
    0% {
        color: #70eaff;

        text-shadow:
            0 0 9px rgba(112, 234, 255, 0.9),
            0 0 21px rgba(0, 167, 199, 0.5);
    }

    20% {
        color: #c66cff;

        text-shadow:
            0 0 9px rgba(198, 108, 255, 0.9),
            0 0 21px rgba(121, 0, 216, 0.48);
    }

    40% {
        color: #ff4fd8;

        text-shadow:
            0 0 9px rgba(255, 79, 216, 0.92),
            0 0 21px rgba(255, 0, 183, 0.46);
    }

    60% {
        color: #45ffae;

        text-shadow:
            0 0 9px rgba(69, 255, 174, 0.86),
            0 0 21px rgba(0, 198, 115, 0.4);
    }

    80% {
        color: #ffe36c;

        text-shadow:
            0 0 9px rgba(255, 227, 108, 0.86),
            0 0 21px rgba(255, 177, 0, 0.4);
    }

    100% {
        color: #70eaff;

        text-shadow:
            0 0 9px rgba(112, 234, 255, 0.9),
            0 0 21px rgba(0, 167, 199, 0.5);
    }
}

@keyframes hexBreath {
    0%,
    100% {
        filter: brightness(0.88);
    }

    50% {
        filter: brightness(1.3);
    }
}