:root {
    --color-background: #0a0a0a;
    --color-text: #ffffff;
    --font-primary: 'Roboto Mono', monospace;
    /* 3D Rotation Variables */
    --r-x: 0deg;
    --r-y: 0deg;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
    overflow: hidden;
    font-family: var(--font-primary);
    color: var(--color-text);
    /* Enable 3D Engine */
    perspective: 1000px;
}

.theme-crt { position: relative; }

/* The 3D Room */
.parallax-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    transform-style: preserve-3d;
    transform: scale(1.05) rotateX(var(--r-x)) rotateY(var(--r-y));
    transition: transform 0.15s ease-out;
    z-index: 60; /* Eleva a cena inteira acima do overlay CRT e Ruído */
}

.coming-soon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    transform-style: preserve-3d;
}

.coming-soon__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Push logo back into the monitor */
    transform: translateZ(-50px);
}

.coming-soon__logo-img {
    max-width: 90%;
    width: 600px;
    height: auto;
    object-fit: contain;
}

.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4.5px, 4.5px 100%;
}

.noise-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.12;
}

.glitch-effect { animation: signal-loss 4s infinite; }

@keyframes signal-loss {
    0%, 95%, 100% { transform: translate(0); }
    96% { transform: translate(-3px, 2px); }
    97% { transform: translate(3px, -2px); filter: opacity(0.8); }
    98% { transform: translate(-3px, -2px); }
    99% { transform: translate(3px, 2px); }
}

.system-footer {
    width: 100%;
    padding: 20px 0;
    position: absolute;
    bottom: 0;
    z-index: 100;
    text-align: center;
}

.footer-content {
    color: #FFFFFF;
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-transform: bold;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.8);
}

.hazard-tapes-container {
    position: absolute; /* Changed from fixed to flow with the 3D scene */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    /* Must preserve 3D for children. NO overflow:hidden allowed here. */
    transform-style: preserve-3d;
}

.hazard-tape {
    position: absolute;
    width: 200%;
    left: -50%;
    height: 90px;
    background-color: #fcd116;
    background-image:
    repeating-linear-gradient(-45deg, #1a1a1a 0, #1a1a1a 15px, transparent 15px, transparent 45px),
    repeating-linear-gradient(-45deg, #1a1a1a 0, #1a1a1a 15px, transparent 15px, transparent 45px);
    background-size: 100% 12px, 100% 12px;
    background-position: top, bottom;
    background-repeat: no-repeat;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); /* Enhanced shadow for 3D depth */
    opacity: 0.9;
    display: flex;
    align-items: center;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;

    /* 3D Magic: Pull forward in Z-space, then rotate. */
    transform: translateZ(var(--z-depth)) rotate(var(--base-rot));

    animation: tape-scroll-bg calc(3s * var(--scroll-speed, 1)) linear infinite;
    animation-direction: var(--scroll-dir-str, normal);
}

@keyframes tape-scroll-bg {
    0% { background-position: 0px top, 0px bottom; }
    100% { background-position: -127.28px top, -127.28px bottom; }
}

.tape-text {
    font-size: 33px;
    font-weight: 900;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 3px;
    line-height: 1;
    display: inline-block;

    animation: tape-scroll-text calc(var(--text-duration, 60s) * var(--scroll-speed, 1)) linear infinite;
    animation-direction: var(--scroll-dir-str, normal);
}

@keyframes tape-scroll-text {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .coming-soon__logo-img { max-width: 80%; }

    .hazard-tape {
        height: 55px;
        background-image:
        repeating-linear-gradient(-45deg, #1a1a1a 0, #1a1a1a 10px, transparent 10px, transparent 30px),
        repeating-linear-gradient(-45deg, #1a1a1a 0, #1a1a1a 10px, transparent 10px, transparent 30px);
        background-size: 100% 8px, 100% 8px;
    }

    .tape-text {
        font-size: 18px;
        letter-spacing: 1.5px;
    }

    .footer-content { font-size: 0.8rem; }
}
