/* General Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
}

/* Game Container */
.game-container {
    width: 90vw;
    max-width: 600px;
    background-color: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Timer */
#timer {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

/* Tile Container - Single Row */
.letters-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 500px;
    gap: 8px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    white-space: nowrap;
}

/* Square Tiles with Rainbow Colors */
.letter {
    width: 10vw;
    max-width: 60px;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: calc(4vw + 5px);
    font-weight: bold;
    border-radius: 10px;
    cursor: grab;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    user-select: none;
}

/* Rainbow Colors */
.letter:nth-child(1) { background-color: #FF3B30; } /* Red */
.letter:nth-child(2) { background-color: #34C759; } /* Green */
.letter:nth-child(3) { background-color: #007AFF; } /* Blue */
.letter:nth-child(4) { background-color: #AF52DE; } /* Purple */
.letter:nth-child(5) { background-color: #FF9500; } /* Orange */
.letter:nth-child(6) { background-color: #FF2D55; } /* Dark Pink */
.letter:nth-child(n+7) { background-color: #5856D6; } /* Extra tiles get blue */

/* iOS-style Hover Effect */
.letter:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Buttons in One Line */
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

/* Shuffle Button (iOS-style Red) */
#shuffleButton {
    background-color: #FF3B30;
}

/* iOS-style Hint Button */
button {
    padding: 12px 30px;
    background-color: #007AFF;
    color: white;
    font-size: 18px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

button:hover {
    opacity: 0.9;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Popup for Hint & "You Win!" */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}