@charset "UTF-8";

@import url('https://fonts.googleapis.com/css2?family=Rubik+Glitch&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

/* --- Reset Básico e Estilos Globais --- */
body {
    margin: 0;
    font-family: 'Ubuntu', sans-serif;
    height: 100vh;
    background-color: #000;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- TELA INICIAL --- */
#tela-inicial {
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

#tela-inicial > h1 {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(1rem, 2vw, 1.7rem);
    color: #aaa;
    margin: 0;
    width: 90%;
}

#tela-cheia {
  display: grid; /* Define o container como um grid */
  place-items: center; /* Centraliza o conteúdo horizontal e verticalmente */
  height: 100vh; /* Ocupa a altura total da janela */
}

h1 {
  /* As propriedades de posicionamento não são necessárias */
  font-size: clamp(1rem, 2vw, 1.7rem);
  color: #aaa;
  text-align: center;
}

/* --- MENU PRINCIPAL --- */
#menu-principal {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.titulo-principal {
    position: relative;
    font-size: clamp(3em, 10vw, 6em);
    margin: 0 0 10px 0;
    color: #fff;
    font-family: 'Rubik Glitch', monospace;
    font-weight: normal;
}

.subtitulo {
    font-size: clamp(1em, 3vw, 1.5em);
    margin-bottom: 40px;
    font-weight: normal;
    color: #ccc;
    text-transform: uppercase;
}

.botoes-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 400px;
}

.botoes-menu button {
    background: none;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: clamp(1.2em, 2.5vw, 1.5em);
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    text-transform: uppercase;
    width: 100%;
}

.botoes-menu button:hover {
    color: #f00;
    transform: scale(1.05);
}

.botoes-menu button.bloqueado {
    background-color: #585858;
    color: #9e9e9e;
    cursor: not-allowed;
    border-color: #444;
}

.botoes-menu button.bloqueado:hover {
    transform: none;
    box-shadow: none;
    background-color: #585858;
}
.botoes-menu button:not(.bloqueado) .fa-lock {
    display: none;
}

#botao-config {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: clamp(1.5em, 4vw, 2em);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    z-index: 10;
    display: none; /* Inicialmente escondido, mostrado via JS apos o carregamento do menu */
}

#botao-config:hover {
    color: #f00;
    transform: rotate(45deg);
}

.versao {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: clamp(1em, 1.5vw, 1.3em);
    color: #aaa;
}

/* --- TELAS SECUNDÁRIAS (CRÉDITOS, RANKING, CONFIG) --- */
#tela-creditos, #tela-ranking, #tela-configuracoes {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    overflow: hidden; 
    align-items: center; 
    justify-content: center;
    flex-direction: column;
    box-sizing: border-box;
    padding: 20px;
}

#tela-creditos::before, #tela-creditos::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 15%;
    z-index: 2;
}
#tela-creditos::before { top: 0; background: linear-gradient(to bottom, #000 30%, transparent); }
#tela-creditos::after { bottom: 0; background: linear-gradient(to top, #000 30%, transparent); }

.creditos-animacao-container { position: absolute; }
.creditos-bloco { text-align: center; max-width: 600px; padding-bottom: 100px; }
.equipe { margin-bottom: 40px; }
.equipe h2 { position: relative; font-size: clamp(1.5em, 4vw, 2em); font-family: 'Rubik Glitch', monospace; font-weight: normal; text-transform: uppercase; margin-bottom: 25px; color: #fff; }
.equipe p { font-size: clamp(1.1em, 2.2vw, 1.4em); color: #ccc; margin: 5px 0; line-height: 1.5; }

.instrucao-voltar {
    position: absolute;
    bottom: 30px;
    font-size: clamp(1em, 2vw, 1.5em);
    color: #aaa;
    z-index: 5;
    width: 100%;
    text-align: center;
}

/* RANKING */
.ranking-container {
    width: 90%;
    max-width: 600px;
    font-size: clamp(1.2em, 2.5vw, 1.5em);
    color: #ccc;
}

.ranking-container ol {
    list-style-type: none;
    padding: 0;
}

.ranking-container li {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #444;
}

.ranking-container li:nth-child(1) { color: #ffd700; font-weight: bold; }
.ranking-container li:nth-child(2) { color: #c0c0c0; }
.ranking-container li:nth-child(3) { color: #cd7f32; }
.ranking-container .rank-nickname { text-align: left; }
.ranking-container .rank-score { text-align: right; font-weight: bold; }

/* CONFIGURAÇÕES */
.config-container {
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
}

.config-label, .seletor-linguagem #current-language {
    font-size: clamp(1.2em, 2.5vw, 1.5em);
}

.config-btn, .lang-arrow {
    font-size: clamp(1.5em, 3vw, 1.8em);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}

.config-btn:hover, .lang-arrow:hover {
    color: #f00;
    transform: scale(1.1);
}

.seletor-linguagem {
    display: flex;
    align-items: center;
    gap: 15px;
}

#current-language {
    width: 120px;
    text-align: center;
}

/* Efeito Glitch */
.titulo-principal::before, .titulo-principal::after, .equipe h2::before, .equipe h2::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.titulo-principal::before, .equipe h2::before {
    text-shadow: -2px 0 #f00;
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.titulo-principal::after, .equipe h2::after {
    text-shadow: 2px 0 #0ff;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(9% 0 92% 0); } 10% { clip-path: inset(48% 0 45% 0); } 20% { clip-path: inset(71% 0 16% 0); } 30% { clip-path: inset(1% 0 95% 0); } 40% { clip-path: inset(89% 0 10% 0); } 50% { clip-path: inset(45% 0 46% 0); } 60% { clip-path: inset(11% 0 88% 0); } 70% { clip-path: inset(93% 0 2% 0); } 80% { clip-path: inset(62% 0 32% 0); } 90% { clip-path: inset(77% 0 13% 0); } 100% { clip-path: inset(29% 0 63% 0); }
}
@keyframes glitch-anim-2 {
    0% { clip-path: inset(78% 0 17% 0); } 10% { clip-path: inset(21% 0 71% 0); } 20% { clip-path: inset(8% 0 86% 0); } 30% { clip-path: inset(86% 0 7% 0); } 40% { clip-path: inset(45% 0 48% 0); } 50% { clip-path: inset(9% 0 84% 0); } 60% { clip-path: inset(71% 0 23% 0); } 70% { clip-path: inset(48% 0 47% 0); } 80% { clip-path: inset(19% 0 77% 0); } 90% { clip-path: inset(88% 0 6% 0); } 100% { clip-path: inset(55% 0 39% 0); }
}

/* --- Media Queries para Telas Menores (smartphones) --- */
@media (max-width: 768px) {
    .titulo-principal {
        margin-bottom: 5px;
    }

    .subtitulo {
        margin-bottom: 25px;
    }

    .botoes-menu {
        gap: 12px;
    }

    #tela-inicial > h1, #tela-cheia h1 {
        position: static;
        transform: none;
        margin-bottom: 20px;
    }

    #tela-inicial {
        justify-content: flex-start;
        padding-top: 50vh;
        box-sizing: border-box;
    }

    .versao {
        bottom: 10px;
        left: 10px;
        font-size: 0.9em;
    }
}