/* style.css - Com Menu Inicial */

body {
    margin: 0;
    padding: 0;
    background-color: #0b0c10;
    /* Fundo mais escuro */
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#game-wrapper {
    position: relative;
    /* Importante para o menu ficar dentro */
    display: flex;
    gap: 20px;
    background: #1f2833;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: 2px solid #45a29e;
    max-width: 1200px;
    width: 100%;
    overflow: hidden;
    /* Para o blur não sair */
}

/* --- TELA INICIAL (NOVO) --- */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 12, 16, 0.95);
    z-index: 10;
    /* Fica na frente de tudo */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    backdrop-filter: blur(5px);
}

.glitch-title {
    font-size: 3rem;
    color: #66fcf1;
    text-transform: uppercase;
    text-shadow: 2px 2px #e74c3c;
    margin-bottom: 0;
}

.btn-start {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

.btn-start:hover {
    background: #c0392b;
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Esconde a tela quando o jogo começa */
.hidden {
    display: none !important;
}

/* --- RESTANTE DO CSS (IGUAL AO ANTERIOR) --- */
canvas {
    background: #0b0c10;
    /* Mapa mais escuro */
    border-radius: 8px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
    cursor: default;
    /* Cursor padrão até começar */
    width: 100%;
    max-width: 800px;
    height: auto;
    object-fit: contain;
}

#ui-sidebar {
    width: 320px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (max-width: 900px) {
    #game-wrapper {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    #ui-sidebar {
        width: 100%;
        min-width: 0;
    }

    canvas {
        order: 1;
    }

    #ui-sidebar {
        order: 2;
    }
}

.card {
    background: #1f2833;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #45a29e;
}

h2,
h3 {
    margin: 0 0 10px 0;
    color: #66fcf1;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    color: #c5c6c7;
}

#quiz-container {
    background: linear-gradient(145deg, #1f2833, #0b0c10);
    border: 1px solid #45a29e;
    padding: 15px;
    border-radius: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #45a29e;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    min-height: 50px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-opt {
    background: #0b0c10;
    border: 1px solid #45a29e;
    color: #66fcf1;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    touch-action: manipulation;
}

.btn-opt:hover {
    background: #45a29e;
    color: #000;
}

.btn-opt:active {
    transform: scale(0.95);
}

.correct {
    animation: flashGreen 0.5s;
}

.wrong {
    animation: shakeRed 0.5s;
}

@keyframes flashGreen {
    0% {
        background: #2ecc71;
    }

    100% {
        background: #1f2833;
    }
}

@keyframes shakeRed {
    0% {
        transform: translateX(0);
        background: #e74c3c;
    }

    25% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        background: #1f2833;
    }
}