/* =============================================================================
   LEVANTE 13: A VIRADA — Folha de Estilos Principal (CSS Puro)
   Arquivo: css/style.css
   
   Proporção Vertical 9:16, Estética Space Opera Retrô, Efeito CRT e Responsividade.
   ============================================================================= */

@import url('https://fonts.cdnfonts.com/css/vcr-osd-mono');

@font-face {
    font-family: 'VCR OSD Mono';
    src: url('../assets/fonts/vcr_osd_mono.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --cor-fundo: #050813;
    --cor-gabinete: #0d1326;
    --cor-borda: #dc2626;
    --cor-dourado: #facc15;
    --cor-ciano: #38bdf8;
    --cor-verde: #22c55e;
    --cor-texto: #ffffff;
    --cor-texto-mutado: #94a3b8;

    /* Fonte Oficial Retrô de Campanha: VCR OSD Mono */
    --fonte-pixel: 'VCR OSD Mono', monospace;
    --fonte-titulo: 'VCR OSD Mono', monospace, sans-serif;
    --fonte-tech: 'VCR OSD Mono', monospace, sans-serif;
    --fonte-corpo: 'VCR OSD Mono', monospace, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    /* Aspecto Pixel Perfect: Desabilita qualquer arredondamento suave */
    border-radius: 0;
    font-family: inherit;
}

body {
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    font-family: var(--fonte-pixel);
    line-height: 1.5;
    letter-spacing: 0.3px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

input, button, select, textarea {
    font-family: var(--fonte-pixel);
}

/* Moldura do Fliperama Retrô (Gabinete Arcade no Desktop) */
.arcade-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 480px;
    max-height: 853px; /* Proporção clássica 9:16 */
    background: var(--cor-gabinete);
    border: 3px solid var(--cor-borda);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Painel Superior (Marquee do Arcade) */
.arcade-header {
    height: 38px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border-bottom: 2px solid var(--cor-borda);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--cor-dourado);
    letter-spacing: 1px;
    z-index: 20;
}

.marquee-titulo {
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}

.btn-icone {
    background: none;
    border: none;
    color: var(--cor-texto);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icone:hover {
    color: var(--cor-dourado);
}

/* =============================================================================
   ÍCONES PIXEL ART RETRÔ (SVG CRISP EDGES)
   ============================================================================= */
.px-icon {
    display: inline-block;
    vertical-align: -0.15em;
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    shape-rendering: crispEdges;
    image-rendering: pixelated;
}

.px-icon-heart {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
    margin-right: 3px;
    shape-rendering: crispEdges;
    image-rendering: pixelated;
}

.px-icon-shield {
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.15em;
    margin-right: 3px;
    shape-rendering: crispEdges;
    image-rendering: pixelated;
}

/* Área de Tela do Jogo */
.game-screen {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Painel HUD Sobreposto no Topo */
.hud-overlay {
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.hud-item {
    background: rgba(15, 23, 42, 0.65);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.hud-item span {
    color: var(--cor-dourado);
}

.hud-timer {
    font-family: var(--fonte-pixel);
    font-size: 0.85rem;
    font-weight: 900;
    color: #38bdf8 !important;
    letter-spacing: 1px;
}

.hud-timer.alerta-tempo {
    color: #ef4444 !important;
    animation: piscarAlertaTempo 0.5s infinite alternate ease-in-out;
}

@keyframes piscarAlertaTempo {
    from {
        opacity: 1;
        text-shadow: 0 0 8px #ef4444;
    }
    to {
        opacity: 0.35;
        text-shadow: none;
    }
}

/* Efeito de Scanlines CRT (Linhas de Varredura Retrô) */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%,
        rgba(0, 0, 0, 0.25)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 15;
}

/* Tela de Holotransmissão Sci-Fi (Diálogo dos Mentores) */
.holo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 24px);
    max-width: 440px;
    max-height: 82%;
    background: rgba(7, 12, 26, 0.97);
    border: 3px solid var(--cor-ciano);
    border-radius: 12px;
    padding: 16px 18px 14px 18px;
    display: none;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.85);
    z-index: 100;
    cursor: pointer;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.holo-cabecalho {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.35);
    padding-bottom: 10px;
    width: 100%;
    flex-shrink: 0;
}

.holo-avatar {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    border: 2px solid var(--cor-dourado);
    background: radial-gradient(circle, #1e293b 0%, #050813 100%);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.4), inset 0 0 8px rgba(0, 0, 0, 0.8);
    image-rendering: pixelated;
}

.holo-identidade {
    width: 100%;
    text-align: center;
}

.holo-identidade h3 {
    font-size: 1.05rem;
    color: var(--cor-dourado);
    font-weight: 800;
    letter-spacing: 1px;
    white-space: normal;
    word-break: break-word;
    margin: 0;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

.holo-identidade p {
    font-size: 0.72rem;
    color: var(--cor-ciano);
    text-transform: uppercase;
    line-height: 1.25;
    letter-spacing: 0.5px;
    margin: 4px 0 0 0;
}

.holo-texto {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #f8fafc;
    min-height: 70px;
    font-family: var(--fonte-pixel);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    width: 100%;
    text-align: left;
    margin: 4px 0 12px 0;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

.holo-instrucao {
    align-self: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cor-dourado);
    background: rgba(220, 38, 38, 0.25);
    border: 1px solid rgba(250, 204, 21, 0.5);
    border-radius: 4px;
    padding: 6px 14px;
    letter-spacing: 0.5px;
    animation: pulsar 1s infinite alternate;
    flex-shrink: 0;
}

/* Modais de Fim de Jogo e Placar */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 19, 0.92);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 50;
    text-align: center;
}

.modal-caixa {
    background: var(--cor-gabinete);
    border: 2px solid var(--cor-borda);
    border-radius: 10px;
    padding: 24px 18px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 0 25px rgba(220, 38, 38, 0.4);
}

.modal-titulo {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--cor-dourado);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.modal-pontos {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 16px;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.input-tag {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    background: #050813;
    border: 2px solid var(--cor-ciano);
    border-radius: 6px;
    color: var(--cor-dourado);
    margin-bottom: 10px;
    outline: none;
    letter-spacing: 2px;
}

.input-tag:focus {
    border-color: var(--cor-dourado);
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.4);
}

.aviso-lgpd {
    font-size: 0.65rem;
    color: var(--cor-texto-mutado);
    margin-bottom: 16px;
    line-height: 1.25;
}

.btn-acao {
    width: 100%;
    padding: 13px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    transition: transform 0.1s ease;
}

.btn-acao:active {
    transform: scale(0.98);
}

.btn-whatsapp {
    display: inline-flex;
    box-sizing: border-box;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.btn-instagram {
    display: inline-flex;
    box-sizing: border-box;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #ffffff;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
}

.btn-instagram:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 14px rgba(220, 39, 67, 0.6);
}

.btn-secundario {
    background: transparent;
    border: 1px solid var(--cor-texto-mutado);
    color: var(--cor-texto-mutado);
    font-size: 0.8rem;
    padding: 8px;
}

/* Lista do Placar de Recordes (Leaderboard Modal) */
.ranking-lista {
    max-height: 220px;
    overflow-y: auto;
    margin: 14px 0;
    text-align: left;
    font-size: 0.8rem;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-pos {
    color: var(--cor-dourado);
    font-weight: 800;
    width: 24px;
}

.ranking-nome {
    flex: 1;
    color: #ffffff;
    font-weight: 600;
}

.ranking-pontos {
    color: var(--cor-ciano);
    font-weight: 800;
}

@keyframes pulsar {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* =============================================================================
   TELA DE TRANSIÇÃO ENTRE FASES (MENSAGEM MOTIVACIONAL & RESISTÊNCIA)
   ============================================================================= */
#transicaoFaseModal {
    z-index: 60;
}

.modal-transicao {
    max-width: 380px;
    background: #090e1d;
    border: 3px solid var(--cor-dourado);
    box-shadow: 
        0 0 35px rgba(250, 204, 21, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.9);
    padding: 22px 18px;
    animation: zoomEntrada 0.28s ease-out;
}

@keyframes zoomEntrada {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.transicao-badge {
    display: inline-block;
    background: #dc2626;
    color: #fef08a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 4px 12px;
    border: 1px solid #facc15;
    margin-bottom: 8px;
    text-shadow: 1px 1px 0 #000;
}

.transicao-titulo {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

.transicao-sub {
    font-size: 0.78rem;
    color: var(--cor-ciano);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transicao-cartao-frase {
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid #27354a;
    border-left: 4px solid #ef4444;
    padding: 14px 12px;
    margin-bottom: 14px;
    text-align: left;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.transicao-cartao-frase .transicao-icone-estrela {
    position: absolute;
    top: 6px;
    right: 8px;
    color: #facc15;
    font-size: 0.9rem;
    opacity: 0.7;
}

.transicao-frase {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #f1f5f9;
    font-style: italic;
    margin-bottom: 8px;
}

.transicao-autor {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--cor-dourado);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
}

.transicao-bonus {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #050813;
    border: 1px dashed var(--cor-ciano);
    padding: 8px 12px;
    margin-bottom: 14px;
}

.transicao-bonus .bonus-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 800;
}

.transicao-bonus .bonus-valor {
    font-size: 0.95rem;
    color: #22c55e;
    font-weight: 900;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.btn-transicao {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 #14532d;
    cursor: pointer;
    transition: transform 0.08s ease, filter 0.1s ease;
}

.btn-transicao:hover {
    filter: brightness(1.15);
}

.btn-transicao:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #14532d;
}

.transicao-auto-timer {
    font-size: 0.68rem;
    color: var(--cor-texto-mutado);
    margin-top: 10px;
    animation: pulsar 1.2s infinite alternate;
}

/* =============================================================================
   MODAL DO MANUAL DE POWER-UPS (TUTORIAL DA VANGUARDA 13)
   ============================================================================= */
.modal-powerups {
    max-width: 340px;
    padding: 16px 14px;
    background: #090e1f;
    border: 2px solid var(--cor-ciano);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.powerups-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar fina para o grid no arcade */
.powerups-grid::-webkit-scrollbar {
    width: 4px;
}
.powerups-grid::-webkit-scrollbar-thumb {
    background: var(--cor-ciano);
}

.powerup-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 7px 8px;
    text-align: left;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.powerup-card:hover {
    border-color: var(--cor-dourado);
    transform: translateX(2px);
}

.powerup-icon-wrap {
    width: 32px;
    height: 32px;
    background: #050813;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.powerup-info {
    flex: 1;
    min-width: 0;
}

.powerup-nome {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.powerup-desc {
    font-size: 0.65rem;
    color: #cbd5e1;
    line-height: 1.25;
}

/* =============================================================================
   SISTEMA DE IDENTIFICAÇÃO E TECLADO DA URNA ELETRÔNICA
   ============================================================================= */

/* A identificação também abre por cima da tela de fim de jogo (registrar como convidado / trocar codinome) */
#modalCredencial {
    z-index: 70;
}

.modal-credencial {
    max-width: 340px;
    padding: 20px 16px;
    background: #090d16;
    border: 2px solid var(--cor-ciano);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
}

.credencial-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--cor-dourado);
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid var(--cor-dourado);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.credencial-sub {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-bottom: 12px;
    line-height: 1.35;
}

.credencial-status-msg {
    font-size: 0.75rem;
    min-height: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.escolha-icone {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.escolha-pergunta {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--cor-dourado);
    margin-bottom: 8px;
    line-height: 1.35;
}

.escolha-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 16px;
    line-height: 1.35;
}

.escolha-botoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.btn-sucesso {
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
    border-color: #4ade80;
    color: #ffffff;
}

.btn-sucesso:hover {
    background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
}

.btn-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 6px;
    margin-top: 6px;
}

.btn-link:hover {
    color: #ffffff;
}

/* --- MÓDULO DA URNA ELETRÔNICA --- */

.urna-cabecalho {
    margin-bottom: 12px;
    text-align: center;
}

.urna-subtitulo {
    font-size: 0.62rem;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.urna-instrucao {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--cor-dourado);
    letter-spacing: 0.5px;
}

/* Visor de 4 Slots da Urna */
.urna-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 12px 0 6px 0;
}

.urna-slot {
    width: 44px;
    height: 52px;
    background: #020617;
    border: 2px solid #334155;
    border-radius: 4px;
    color: #22c55e;
    font-size: 1.6rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.urna-slot.ativo {
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: piscarCursorUrna 0.8s infinite;
}

@keyframes piscarCursorUrna {
    0%, 100% { border-color: #22c55e; }
    50% { border-color: #38bdf8; }
}

.urna-erro-msg {
    font-size: 0.72rem;
    color: #ef4444;
    min-height: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

/* Teclado da Urna Eletrônica */
.urna-teclado {
    background: #18181b;
    border: 2px solid #27272a;
    border-radius: 8px;
    padding: 12px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.9), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.urna-teclado-numeros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.tecla-num {
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 4px;
    color: #f8fafc;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 800;
    padding: 10px 0;
    cursor: pointer;
    box-shadow: 0 3px 0 #09090b;
    transition: transform 0.05s ease, background 0.05s ease;
}

.tecla-num:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #09090b;
    background: #3f3f46;
}

.tecla-espaco {
    visibility: hidden;
}

.urna-teclado-acoes {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 8px;
}

.tecla-acao {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    padding: 12px 6px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
    transition: transform 0.05s ease;
    border: none;
}

.tecla-corrige {
    background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
    color: #ffffff;
}

.tecla-corrige:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.tecla-confirma {
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
    color: #ffffff;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
}

.tecla-confirma:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* Caixa de piloto confirmado no Game Over */
.identidade-confirmada-box {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--cor-ciano);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
}

.ident-label {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.ident-nome {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--cor-dourado);
    letter-spacing: 1px;
    margin-right: 6px;
}

.ident-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    font-weight: 800;
    vertical-align: middle;
}

/* Responsividade Mobile: tela cheia real e orientação vertical dinâmica */
@media (max-width: 480px) {
    .arcade-container {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: 100vw;
        max-height: 100vh;
        max-height: 100dvh;
        border: none;
        box-shadow: none;
    }

    .holo-overlay {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        right: auto;
        width: calc(100% - 20px);
        max-height: 84%;
        padding: 14px 14px 12px 14px;
    }

    .holo-avatar {
        width: 64px;
        height: 64px;
    }

    .holo-identidade h3 {
        font-size: 0.95rem;
    }

    .holo-identidade p {
        font-size: 0.65rem;
    }

    .holo-texto {
        font-size: 0.88rem;
        line-height: 1.4;
        min-height: 55px;
    }

    .holo-instrucao {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
}

/* Telas com altura muito reduzida (landscape ou aparelhos ultra-compactos) */
@media (max-height: 600px) {
    .arcade-header {
        height: 32px;
        padding: 0 8px;
        font-size: 0.72rem;
    }

    .holo-overlay {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        right: auto;
        max-height: 88%;
        padding: 8px 12px;
    }

    .holo-avatar {
        width: 48px;
        height: 48px;
    }

    .holo-texto {
        font-size: 0.8rem;
        line-height: 1.3;
        min-height: 40px;
    }
}

/* =============================================================================
   TELA DE PRÉ-CARREGAMENTO DE ASSETS (PRELOADER SCREEN)
   ============================================================================= */
.preloader-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0d152c 0%, #050813 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 18px;
    box-sizing: border-box;
    z-index: 250;
    text-align: center;
    transition: opacity 0.45s ease-out, visibility 0.45s ease-out;
}

.preloader-overlay.oculto {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-caixa {
    background: rgba(13, 19, 38, 0.94);
    border: 3px solid var(--cor-borda);
    box-shadow: 
        0 0 30px rgba(220, 38, 38, 0.45),
        inset 0 0 20px rgba(0, 0, 0, 0.85);
    padding: 22px 18px;
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.preloader-badge {
    display: inline-block;
    background: #dc2626;
    color: #fef08a;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border: 1px solid #facc15;
    margin-bottom: 6px;
    text-shadow: 1px 1px 0 #000;
}

.preloader-subtitulo {
    font-size: 0.72rem;
    color: var(--cor-ciano);
    letter-spacing: 1px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.preloader-frase-cartao {
    background: rgba(15, 23, 42, 0.96);
    border: 2px solid #27354a;
    border-left: 4px solid var(--cor-dourado);
    padding: 16px 14px;
    margin-bottom: 18px;
    width: 100%;
    text-align: left;
    position: relative;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.7);
}

.preloader-citacao-aspas {
    position: absolute;
    top: 2px;
    right: 8px;
    color: var(--cor-dourado);
    font-size: 2.2rem;
    line-height: 1;
    opacity: 0.35;
    font-family: Georgia, serif;
    pointer-events: none;
}

.preloader-frase {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #ffffff;
    font-style: italic;
    margin-bottom: 6px;
    transition: opacity 0.3s ease;
    word-break: break-word;
}

.preloader-autor {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--cor-dourado);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
    transition: opacity 0.3s ease;
}

.preloader-barra-moldura {
    width: 100%;
    height: 16px;
    background: #050813;
    border: 2px solid var(--cor-ciano);
    padding: 2px;
    margin-bottom: 8px;
    position: relative;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
}

.preloader-barra-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #f97316 40%, #facc15 80%, #22c55e 100%);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
    transition: width 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.preloader-status-linha {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    color: var(--cor-texto-mutado);
    letter-spacing: 0.5px;
}

.preloader-pct {
    color: var(--cor-dourado);
    font-weight: 800;
    font-size: 0.76rem;
}

/* Botão de entrada com som (fim do carregamento) */
.preloader-entrar {
    margin: 14px 0 0;
    padding: 14px;
    font-size: 1rem;
    animation: pulsarEntrada 0.9s infinite alternate ease-in-out;
}
.preloader-entrar[hidden] {
    display: none;
}
.preloader-entrar:focus-visible {
    outline: 3px solid var(--cor-dourado);
    outline-offset: 3px;
}
@keyframes pulsarEntrada {
    from { box-shadow: 0 0 0 rgba(250, 204, 21, 0); }
    to   { box-shadow: 0 0 20px rgba(250, 204, 21, 0.6); }
}
@media (prefers-reduced-motion: reduce) {
    .preloader-entrar { animation: none; }
}

/* =============================================================================
   HOLOTRANSMISSÃO EM TELA CHEIA
   O jogo fica pausado durante a fala dos mentores, então a transmissão ocupa a
   tela inteira: avatar grande, texto legível e aviso de homenagem no rodapé.
   Usa #holoOverlay para prevalecer sobre os ajustes antigos das media queries.
   ============================================================================= */

/* Correção de layout: a área de jogo tinha height: 100% do gabinete e, abaixo do
   letreiro, passava da borda inferior (cortava o rodapé do canvas e dos modais). */
.game-screen {
    height: auto;
    min-height: 0;
}
#holoOverlay.holo-overlay {
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* anula o cartão centralizado (translate -50%) das regras anteriores */
    transform: none;
    width: auto;
    max-width: none;
    max-height: none;
    align-items: stretch;
    border: none;
    border-radius: 0;
    padding: max(16px, env(safe-area-inset-top, 16px)) 18px max(14px, env(safe-area-inset-bottom, 14px));
    background:
        repeating-linear-gradient(0deg, rgba(56, 189, 248, 0.05) 0 1px, transparent 1px 4px),
        radial-gradient(ellipse at 50% 22%, rgba(56, 189, 248, 0.20), rgba(5, 8, 19, 0.97) 62%),
        #050813;
    box-shadow: inset 0 0 0 2px var(--cor-ciano), inset 0 0 40px rgba(56, 189, 248, 0.25);
    gap: 12px;
    overflow: hidden;
}

/* Cabeçalho vira um bloco central: avatar grande em cima, nome e cargo embaixo */
#holoOverlay .holo-cabecalho {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.35);
}

#holoOverlay .holo-avatar {
    align-self: center;
    /* cresce com a tela, mas sem empurrar o texto para fora em telas baixas */
    width: min(46%, 26vh, 220px);
    height: auto;
    aspect-ratio: 1 / 1;
    border: 3px solid var(--cor-dourado);
    border-radius: 10px;
    image-rendering: pixelated;
    box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.15), 0 0 28px rgba(56, 189, 248, 0.45);
}

#holoOverlay .holo-identidade {
    flex: none;
    width: 100%;
}

#holoOverlay .holo-identidade h3 {
    font-size: clamp(1.15rem, 3.2vh, 1.6rem);
    letter-spacing: 1px;
    white-space: normal;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(250, 204, 21, 0.45);
}

#holoOverlay .holo-identidade p {
    font-size: clamp(0.72rem, 1.9vh, 0.92rem);
    letter-spacing: 0.5px;
    line-height: 1.35;
    margin-top: 6px;
}

/* Fala do mentor: o foco da tela */
#holoOverlay .holo-texto {
    flex: 1;
    width: auto;
    margin: 0;
    font-size: clamp(1rem, 2.7vh, 1.3rem);
    line-height: 1.55;
    min-height: 0;
    padding: 4px 2px;
    text-align: left;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#holoOverlay .holo-instrucao {
    align-self: center;
    font-size: clamp(0.72rem, 1.8vh, 0.9rem);
    color: var(--cor-ciano);
    margin: 0;
    padding: 8px 14px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 6px;
}

#holoOverlay .holo-disclaimer {
    flex-shrink: 0;
    font-size: clamp(0.58rem, 1.45vh, 0.7rem);
    line-height: 1.35;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    padding-top: 8px;
}

/* Telas baixas (celular deitado, notebooks pequenos): avatar ao lado do nome */
@media (max-height: 560px) {
    #holoOverlay .holo-cabecalho {
        flex-direction: row;
        text-align: left;
    }

    #holoOverlay .holo-avatar {
        width: min(30vh, 120px);
    }

    #holoOverlay .holo-identidade {
        flex: 1;
        min-width: 0;
        width: auto;
    }
}
