:root {
    --green: #00ff88;
    --green-dim: #00aa55;
    --green-bright: #66ffbb;
    --green-intense: #aaffdd;
    --green-glow: #00ffcc;
    --red: #ff0033;
    --bg: #000000;

    /* ancho base de referencia */
    --base-width: 900;
}

/* IMPORTANTE: tamaño fijo base */
html {
    font-size: 16px;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--green);
    font-family: "VT323", "Courier New", monospace;
    overflow-x: hidden;
}

/* WRAPPER QUE ESCALA TODO */
#scale-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* layout container like reference */
#container {
    width: 900px;
    max-width: 900px;

    margin: 0;
    padding: 60px 20px;
    position: relative;

    transform-origin: top center;

    /* SCALE DINAMICO */
    transform: scale(clamp(0.55, calc(100vw / var(--base-width)), 1));
}

/* title */
.title {
    font-size: 4rem;
    margin-bottom: 40px;
    margin-left: 2rem;
    margin-top: 1rem;
    letter-spacing: 6px;
    text-shadow: 0 0 12px var(--green-glow);
}

.subtitle {
    font-size: 1.4rem;
    margin-left: 2rem;
    margin-bottom: 60px;
    opacity: 0.7;
}

/* poem base */
.poem {
    font-size: 1.6rem;
    line-height: 2;
}

/* line appearance */
.line {
    margin: 18px 0;
    opacity: 0;
    animation: appear 0.8s forwards;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* indentation hierarchy — SIN CAMBIOS */
.indent1 {
    margin-left: 40px;
}
.indent2 {
    margin-left: 100px;
}
.indent3 {
    margin-left: 180px;
}

/* semantic word hierarchy — SIN CAMBIOS */
.word-xs {
    font-size: 1.2rem;
    opacity: 0.8;
}

.word-sm {
    font-size: 1.6rem;
}

.word-md {
    font-size: 2.2rem;
    color: var(--green-bright);
    text-shadow: 0 0 8px var(--green-glow);
}

.word-lg {
    font-size: 2.8rem;
    color: var(--green-bright);
    text-shadow: 0 0 12px var(--green-glow);
}

.word-xl {
    font-size: 3.8rem;
    color: var(--green-intense);
    text-shadow:
        0 0 10px var(--green-bright),
        0 0 20px var(--green);
}

.word-soul {
    font-size: 5.2rem;
    color: var(--green-intense);
    text-shadow:
        0 0 20px var(--green-intense),
        0 0 40px var(--green),
        0 0 80px var(--green);
}

/* special NO in red */
.no,
a[href="#no"] {
    color: var(--red);
    text-shadow:
        0 0 10px var(--red),
        0 0 20px var(--red),
        0 0 40px var(--red);
}

/* link styling */
.word-link {
    text-decoration: none;
    color: inherit;
    position: relative;
}

/* glitch hover */
.word-link:hover {
    animation: glitch 0.15s infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0, 0);
        text-shadow:
            2px 0 red,
            -2px 0 cyan;
    }
    50% {
        transform: translate(-2px, 1px);
        text-shadow:
            -2px 0 red,
            2px 0 cyan;
    }
    100% {
        transform: translate(0, 0);
        text-shadow:
            2px 0 red,
            -2px 0 cyan;
    }
}

/* cursor */
.cursor {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--green);
    margin-left: 10px;
    animation: blink 1s infinite;
    box-shadow: 0 0 10px var(--green-glow);
}

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

/* CRT scanlines */
#scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 255, 120, 0.25) 0px,
        rgba(0, 255, 120, 0.25) 1px,
        transparent 1px,
        transparent 3px
    );
    animation: scanmove 6s linear infinite;
    z-index: 999;
}

@keyframes scanmove {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 200px;
    }
}

/* CRT noise */
#noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAAK0lEQVR42u3BAQ0AAADCIPunNsc+YAAAAAAAAAAAAAAAAAAAAAAAAAAA4NcGMQABt3AdYQAAAABJRU5ErkJggg==");
    animation: noise 0.2s infinite;
    z-index: 998;
}

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

/* distortion */
.distort {
    animation: distort 0.2s;
}

@keyframes distort {
    0% {
        transform: skew(0deg);
    }
    25% {
        transform: skew(3deg);
    }
    50% {
        transform: skew(-3deg);
    }
    75% {
        transform: skew(2deg);
    }
    100% {
        transform: skew(0deg);
    }
}

.stanza-gap {
    height: 3.5rem;
}

.word-no {
    font-size: 4.8rem;
    color: #ff2b2b;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 3px;
}
