@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Poppins:wght@400;600&display=swap');

body {
    /* New vibrant gradient */
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(45deg, #fbc2eb 0%, #a6c1ee 100%);
    padding: 20px;
    box-sizing: border-box;
}

.game-container {
    width: 95%;
    max-width: 500px;
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 3px solid white;
}

.game-header {
    /* New header style */
    background: linear-gradient(to right, #6190e8, #a7bfe8);
    color: white;
    padding: 20px 25px;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.game-header h1 {
    margin: 0;
    font-family: 'Fredoka One', cursive; /* Playful font */
    font-size: 2.2em;
    letter-spacing: 2px;
}

.contact-info {
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 600;
}

.game-area {
    padding: 30px;
    text-align: center;
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

/* Big change: Styling individual letter tiles */
.jumbled-word {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap; /* Allows words to wrap if they are too long */
}

.jumbled-word .letter-tile {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    font-size: 2em;
    font-weight: bold;
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    cursor: default;
    background-color: #ff9a9e; /* Default color */
}

/* Different colors for tiles */
.jumbled-word .letter-tile:nth-child(5n+1) { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.jumbled-word .letter-tile:nth-child(5n+2) { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.jumbled-word .letter-tile:nth-child(5n+3) { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.jumbled-word .letter-tile:nth-child(5n+4) { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.jumbled-word .letter-tile:nth-child(5n)   { background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%); }


.message {
    height: 25px;
    font-size: 1.2em;
    font-weight: bold;
}

.input-area {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#user-input {
    flex-grow: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1em;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

#user-input:focus {
    outline: none;
    border-color: #a6c1ee;
    box-shadow: 0 0 10px rgba(166, 193, 238, 0.5);
}

/* New button styles */
button {
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#check-btn { background: linear-gradient(45deg, #2edc7d, #00a859); }
#skip-btn { background: linear-gradient(45deg, #ff7e5f, #feb47b); margin-top: 15px; }
#restart-btn { background: linear-gradient(45deg, #6190e8, #a7bfe8); }

#final-screen {
    padding: 40px;
    text-align: center;
}

#final-screen h2 {
    font-size: 2.5em;
    font-family: 'Fredoka One', cursive;
    color: #333;
}

.game-footer {
    background-color: #34495e;
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.1em;
}

.hidden {
    display: none;
}