@import url('https://fonts.googleapis.com/css2?family=Zen+Dots&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+15&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bungee+Spice&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik+Maps&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rubik+Spray+Paint&display=swap');

/* Estilos base (mobile first) */
.container {
    margin: 0 auto;
    padding: 15px;
    background-color: rgb(6, 43, 50);
    color: silver;
    font-size: 1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: "Bungee Spice", sans-serif;
    font-weight: 400;
    font-style: normal;
    min-height: 100vh;
    box-sizing: border-box;
}

h1 {
    text-align: center;
    font-size: 2em;
    font-family: "Rubik Maps", system-ui;
    font-weight: 400;
    font-style: normal;
    margin: 0.5em 0;
}

.namePlayer input {
    height: 2em;
    width: 80%;
    max-width: 300px;
    padding: 10px;
    font-size: 1em;
    font-family: "Jersey 15", sans-serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    margin: 10px 0;
    border-radius: 5px;
    border: none;
}

button {
    display: inline-block;
    border-radius: 15px;
    width: 7em;
    height: 2.8em;
    font-size: 1em;
    font-family: "Rubik Maps", system-ui;
    font-weight: 400;
    font-style: normal;
    margin: 10px 0;
    cursor: pointer;
}

button:hover {
    background-color: #5f6b5f;
    transform: scale(1.05);
    color: white;
}

.score, .timer {
    font-size: 0.9em;
    font-family: "Zen Dots", sans-serif;
    font-weight: 400;
    font-style: normal;
    margin: 5px 0;
}

.chosen-color {
    font-family: "Jersey 15", sans-serif;
    font-weight: 400;
    font-style: normal;
    margin: 10px 0;
}

.chosen-color h2 {
    transition: color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-size: 1em;
    margin: 0.5em 0;
}

.game-arena {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

.game-arena > div {
    aspect-ratio: 1;
    background-color: rgb(6, 53, 54);
    border: 6px solid rgb(5, 5, 5);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.selected {
    border: 8px solid white;
    transform: translate(-2px);
}

.certo {
    transform: scale(0.95);
    box-shadow: 0 0 15px green;
}

.errado {
    transform: scale(0.95);
    box-shadow: 0 0 15px red;
}

.game-arena > div:hover {
    border-color: darkgoldenrod;
    transform: translateX(-2px) scale(1.02);
}

#ranking {
    background: rgba(0,0,0,0.7);
    padding: 15px;
    border-radius: 10px;
    margin: 20px auto;
    width: 90%;
    max-width: 500px;
}

#ranking ol {
    text-align: left;
    font-family: 'Zen Dots', sans-serif;
    padding-left: 20px;
}

#ranking li:nth-child(1) {
    background: rgba(255, 215, 0, 0.2);
    font-size: 1.1em;
    padding: 5px;
}

#ranking li:nth-child(2) {
    background: rgba(192, 192, 192, 0.2);
    padding: 5px;
}

#ranking li:nth-child(3) {
    background: rgba(205, 127, 50, 0.2);
    padding: 5px;
}

h4 {
    font-family: "Rubik Spray Paint", system-ui;
    font-weight: 400;
    font-style: normal;
    color: gray;
    margin: 10px 0;
}

/* Media Queries para telas maiores */
@media (min-width: 600px) {
    .container {
        font-size: 1.2em;
        padding: 20px;
    }
    
    h1 {
        font-size: 2.5em;
    }
    
    .chosen-color h2 {
        font-size: 1.2em;
    }
    
    .game-arena > div {
        border-width: 8px;
    }
}

@media (min-width: 900px) {
    .container {
        font-size: 1.5em;
    }
    
    h1 {
        font-size: 3em;
    }
    
    .game-arena {
        grid-gap: 15px;
    }
    
    .game-arena > div {
        border-width: 10px;
    }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 400px) {
    .container {
        font-size: 0.9em;
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .game-arena {
        grid-gap: 5px;
    }
    
    .game-arena > div {
        border-width: 4px;
    }
}