/* Importa a fonte retrô */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

@font-face {
    font-family: 'Pretendo';
    src: url('../fonts/Pretendo.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* CORREÇÃO APLICADA: Asterisco global para resetar margens */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', monospace;
}

body {
    background-color: #0d1117;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

#gameScreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    width: 100vw;
    text-align: center;
    margin: 0;
}

#gameCover {
    width: 100%;
    max-width: 322px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.9);
}

#title {
    font-size: 16px;
    line-height: 1.4;
    color: #ffffff;
    margin-bottom: 8px;
    text-transform: uppercase;
}

#subtitle {
    font-size: 12px;
    color: #c9c9c9;
    margin-bottom: 15px;
}

.info p {
    font-size: 10px;
    line-height: 1.8;
    color: #999999;
}

/* =========================================
   BOTÃO JOGAR (Usando a imagem jogar.png)
   ========================================= */
#btnJogar, #startButton {
    margin-top: 30px;
    background-color: transparent !important; 
    background-image: url('../img/jogar.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none !important; 
    outline: none !important; /* Remove bordas de clique nativas do navegador */
    -webkit-appearance: none; /* Remove o estilo padrão de botões em celulares */
    color: transparent !important; 
    text-shadow: none !important;
    
    width: 220px; 
    height: 100px; 
    
    padding: 0;
    cursor: pointer;
    
    /* A MÁGICA AQUI: O drop-shadow faz a sombra seguir o contorno EXATO da sua arte */
    filter: drop-shadow(0px 8px 15px rgba(0, 0, 0, 0.7)); 
    transition: all 0.2s ease;
}

/* Efeito tátil e visual ao clicar */
#btnJogar:active, #startButton:active {
    transform: scale(0.95); 
    /* Junta o flash de luz com uma sombra menor para dar a sensação de afundar */
    filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.9)) brightness(1.2); 
}

/* =========================================
   BOTÕES DA ESTANTE (Com a SUA imagem da fita)
   ========================================= */
#btnEstante, #btnEstanteErro {
    background-color: transparent; 
    color: #d1d1d1; /* Cinza prateado claro e elegante */
    border: 2px solid #666666; 
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: 'Press Start 2P', monospace;
    transition: all 0.3s ease;
    display: flex; 
    align-items: center;
    justify-content: center;
    gap: 12px; 
}

/* Botão da tela principal (Abaixo do JOGAR) */
#btnEstante {
    margin-top: 20px; 
    padding: 14px 30px; 
    font-size: 10px;
}

/* Botão da tela de erro (Flutuante e chamativo) */
#btnEstanteErro {
    position: absolute;
    bottom: 18%; 
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.85); 
    border: 3px solid #E60012; 
    padding: 18px 35px; 
    font-size: 12px; 
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.5); 
}

#btnEstante:active {
    background-color: #666666;
    color: #ffffff;
    transform: scale(0.95);
}

#btnEstanteErro:active {
    background-color: #E60012;
    color: #ffffff;
    transform: translateX(-50%) scale(0.95);
}

/* Puxa a sua imagem "fita.png" salva na pasta img */
#btnEstante::before, #btnEstanteErro::before {
    content: "";
    display: block;
    width: 22px; /* Tamanho da fita (pode aumentar ou diminuir aqui) */
    height: 18px;
    background-image: url('../img/fita.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* =========================================
   TELA DE BOOT
   ========================================= */
#bootScreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100dvh;
    padding: 20px;
    background-color: #050505;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#bootScreen::before {
    content: "";
    position: absolute;
    top: -15px; left: -15px; right: -15px; bottom: -15px; 
    background: url('../img/retronfc.png') center/100% no-repeat;
    opacity: 0.30; 
    filter: blur(4px);
    z-index: -1; 
    animation: fadeInBackground 2.5s ease-in-out forwards;
}

@keyframes fadeInBackground {
    from { opacity: 0; filter: blur(10px); }
    to { opacity: 0.30; filter: blur(4px); }
}

.header { text-align: center; margin-bottom: 30px; }

/* AJUSTE: Letras bem maiores e mais grossas (Negrito artificial com text-shadow) */
.bootLogo {
    font-family: 'Pretendo', sans-serif;
    font-size: 36px; 
    color: #E60012; 
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0px #E60012, -1px 0px 0px #E60012, 0px 1px 0px #E60012, 0px -1px 0px #E60012, 4px 4px 5px rgba(0,0,0,0.9);
}

.bootConsole {
    font-family: 'Pretendo', sans-serif;
    font-size: 18px; 
    color: #ffffff; 
    letter-spacing: 2px;
    text-shadow: 1px 1px 0px #ffffff, -1px 0px 0px #ffffff, 2px 2px 4px rgba(0,0,0,0.9);
}

/* AJUSTE: Redução do min-height de 220px para 130px para subir a barra de progresso */
.bootTerminal {
    width: 100%;
    text-align: center; 
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.bootLine { font-size: 12px; color: #5CFF8A; line-height: 1.4; }

/* NOVA BARRA DE CARREGAMENTO FLIPERAMA/8-BIT */
.progress-container {
    width: 240px;
    height: 24px;
    border: 3px solid #ffffff;
    background-color: transparent;
    margin-top: 10px;
    padding: 2px;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.8);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: #5CFF8A; 
    box-shadow: 0 0 15px rgba(92, 255, 138, 0.4); 
    transition: width 0.4s ease-out; 
}

/* =========================================
   TELAS DE ERRO E SPLASH
   ========================================= */
#invalidScreen {
    display: none;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100dvh !important;
    background: #000 url('../img/invalido.png') no-repeat center center !important;
    background-size: 100% 100% !important;
    z-index: 9999999 !important;
}

/* =========================================
   BOTÃO DA ESTANTE (TELA DE ERRO)
   ========================================= */
#btnEstanteErro {
    position: absolute;
    bottom: 18%; 
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.85); 
    color: #ffffff; 
    border: 3px solid #E60012; /* Borda mais grossa */
    padding: 18px 35px; /* Botão mais "gordo" e fácil de clicar */
    border-radius: 50px;
    cursor: pointer;
    font-size: 12px; /* Letra maior */
    text-transform: uppercase;
    font-family: 'Press Start 2P', monospace;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.5); /* Brilho vermelho mais forte */
}

#btnEstanteErro:active {
    background-color: #E60012;
    color: #ffffff;
    transform: translateX(-50%) scale(0.95);
}

#splashScreen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100dvh;
    background-color: black;
    z-index: 9000;
    display: flex; justify-content: center; align-items: center;
}

#splashScreen img { 
    content: url('../img/retronfc.png');
    width: 100vw; height: 100dvh;
    object-fit: cover; opacity: 0; 
    animation: fadeLogo 15s ease-in-out forwards; 
}

@media (max-width: 768px) {
    #splashScreen img { content: url('../img/retronfc_mobile.png'); object-fit: cover; }
    #bootScreen::before { background-image: url('../img/retronfc_mobile.png') !important; background-size: cover !important; }
}

@keyframes fadeLogo {
    0%   { opacity: 0; }
    25%  { opacity: 1; }
    75%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Efeito TV de Tubo de saída no botão JOGAR */
.crt-shutdown {
    animation: crtShutdown 0.4s ease-out forwards !important;
}

@keyframes crtShutdown {
    0% { transform: scale(1, 1); filter: brightness(1); opacity: 1; }
    50% { transform: scale(1, 0.005); filter: brightness(5); opacity: 1; }
    100% { transform: scale(0, 0); filter: brightness(10); opacity: 0; }
}
