/* css/theater.css */

@font-face {
    font-family: 'Arisawa-Kaisho';
    src: url('../fonts/Arisawa-Kaisho.TTF') format('truetype');
}

body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* ==========================================================================
   EFEITO CRT (ブラウン管)
   ========================================================================== */
.crt::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    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));
    z-index: 9999;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

@keyframes flicker {
    0% { opacity: 0.27861; }
    5% { opacity: 0.34769; }
    10% { opacity: 0.23604; }
    15% { opacity: 0.10626; }
    20% { opacity: 0.18128; }
    25% { opacity: 0.10626; }
    30% { opacity: 0.18128; }
    35% { opacity: 0.23604; }
}

.crt::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 9998;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

/* ==========================================================================
   LAYOUT DO CONTAINER (1844x934)
   ========================================================================== */
#viewport-container {
    position: relative;
    width: 1844px;
    height: 934px;
    background: url('../theater/operationtheaterbg.png') no-repeat center center;
    background-size: cover;
    flex-shrink: 0;
}

/* ==========================================================================
   TEXTO FLUTUANTE ESTILO FUMAÇA (OMNIOUS SMOKE)
   ========================================================================== */
@keyframes textSmokeFloating {
    0% {
        transform: translateY(0) scale(1);
        filter: blur(0px) drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
        opacity: 0.85;
    }
    50% {
        transform: translateY(-4px) scale(1.01);
        filter: blur(0.6px) drop-shadow(0 0 5px rgba(255, 0, 0, 0.4));
        opacity: 0.7;
    }
    100% {
        transform: translateY(0) scale(1);
        filter: blur(0px) drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
        opacity: 0.85;
    }
}

/* Substitua apenas esses blocos no seu css/theater.css */

.ominous-smoke-text {
    position: absolute;
    top: 200px;  /* Posicionado acima do refletor cirúrgico */
    left: 396px;
    width: 340px;
    font-family: 'Arisawa-Kaisho', sans-serif;
    text-align: center;
    color: #ffffff;
    user-select: none;
    pointer-events: none;
}

/* Esta classe aplica o comportamento necessário para as coordenadas dinâmicas do JS funcionarem */
.letter-wrap {
    position: relative;
    display: inline-block;
    will-change: transform, opacity; /* Otimiza a performance para evitar travamentos */
}

.japanese-title {
    font-size: 26px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.english-title {
    font-size: 12px;
    letter-spacing: 0.5px;
}


/* ==========================================================================
   CAIXA DE TEXTO COM SCROLLBAR TOTALMENTE INVISÍVEL
   ========================================================================== */
.theater-text-box {
    position: absolute;
    top: 300px;     /* Alinhado dentro da moldura decorativa direita */
    right: 195px;  
    width: 342px;  
    height: 325px; 
    font-family: 'Arisawa-Kaisho', sans-serif;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    padding-right: 5px;
}

.theater-text-box p {
    margin-top: 0;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

/* Esconde totalmente a barra de rolagem para Webkit (Chrome/Opera/Safari) */
.theater-text-box::-webkit-scrollbar {
    display: none;
}

/* Esconde para Firefox e IE */
.theater-text-box {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.highlight-red {
    color: #FF0000;
}

/* ==========================================================================
   SOBREPOSIÇÃO DAS ARTES INTERATIVAS (COORDENADAS)
   ========================================================================== */
.theater-interactive {
    position: absolute;
    z-index: 10;
    transition: filter 0.3s ease;
}

.theater-interactive:hover {
    filter: brightness(1.3) drop-shadow(0 0 8px rgba(255, 0, 0, 0.5));
}

#link-private {
    top: 30px;
    left: 190px;
}

#link-table {
    top: 300px;
    left: 305px;
}

#link-archive {
    top: 715px;
    left: 810px;
}

#link-ledger {
    top: 735px;
    left: 1300px;
}

/* BOTÃO DE SAÍDA INVISÍVEL (Em cima dos sapatos Zori/Geta no canto inferior direito) */
#link-exit-invisible {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 150px;
    height: 130px;
    cursor: pointer;
    background: transparent;
    z-index: 20;
}
#link-exit-invisible:hover {
}
