* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;

    background: url("assets/background.jpeg") no-repeat center center fixed;
    background-size: cover;

    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CONTAINER */
.game-container {
    background: #181825;
    padding: 30px;
    border-radius: 20px;
    width: 340px;
    color: white;
    text-align: center;
    box-shadow: 0 0 25px rgba(108, 99, 255, 0.4);
    position: relative;
    z-index: 1;
}

/* TITULO */
h1 {
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    margin-bottom: 15px;
    color: #aaa;
}

/* INPUT */
input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    margin-bottom: 15px;
    font-size: 16px;
}

/* BOTÕES */
.buttons {
    display: flex;
    gap: 10px;
}

button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #6c63ff;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    transform: scale(1.05);
}

.reset {
    background: #ff4d4d;
}

/* MENSAGEM */
.mensagem {
    margin-top: 15px;
    font-weight: bold;
}

.acerto {
    color: #00ff95;
}

.erro {
    color: #ff4d4d;
}

.dica {
    color: #ffd166;
}

/* TENTATIVAS */
.tentativas {
    margin-top: 10px;
    font-size: 14px;
}

/* HISTÓRICO */
.historico {
    margin-top: 15px;
    text-align: left;
}

.historico ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.historico li {
    background: #2a2a40;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* BARRA DE PROGRESSO */
.progress {
    width: 100%;
    height: 10px;
    background: #2a2a40;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

#barra {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff95, #6c63ff);
    transition: width 0.3s;
}

/* SHAKE ANIMATION */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.3s;
}

/* RANKING */
.ranking {
    margin-top: 15px;
    text-align: left;
}

.ranking ul {
    list-style: none;
    padding: 0;
}

.ranking li {
    background: #2a2a40;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 13px;
}

.audio-controls {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-controls button {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.audio-controls input {
    width: 100%;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
}

@keyframes winEffect {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0px #00ffcc;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px #00ffcc;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0px #00ffcc;
    }
}

.win {
    animation: winEffect 1s ease;
}