:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF4081;
    --background-color: #fbfbfb;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 5px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    animation: fadeIn 1s ease-in;
}

.input-area {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 80%;
    width: 100%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
}

.input-area input {
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    width: 90%;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.input-area input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
    outline: none;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: 15px;
}

button:hover {
    background-color: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#letters{
    margin-top: 20px;
    padding: 0 2%;
}

.letter-button {
    background-color: white;
    color: var(--text-color);
    border: 2px solid #ddd;
    margin: 6px;
    padding: 15px 20px;
    font-size: 30px;
    font-weight: bold;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 50px;
}

.letter-button:hover:not(.disabled) {
    background-color: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

.letter-button.disabled {
    background-color: var(--primary-color);
    color: white;
    transform: scale(0.95);
    opacity: 0.8;
}

.timer {
    font-size: 48px;
    font-weight: bold;
    color: var(--accent-color);
    margin: 5px 0;
    animation: pulse 1s infinite;
    text-align: center;
}

#question {
    font-size: 24px;
    color: white;
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    /* background: white; */
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#turn {
    font-size: 20px;
    color: var(--primary-color);
    margin: 15px 0;
    font-weight: bold;
    text-align: center;
}

.hidden {
    display: none;
}

.letter-pulse {
    animation: letterPulse 0.5s ease;
}

.player-eliminated {
    animation: shake 0.5s ease;
}

.countdown-normal {
    animation: warningPulse 1s infinite;
    color: var(--primary-color);
}

.countdown-warning {
    animation: warningPulse 1s infinite;
    color: #ff4444;
}

.winner-effect {
    animation: winner 1.5s ease-in-out;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    pointer-events: none;
    animation: confettiFall 3s ease-in-out infinite;
}

.optionButtons{
    display: flex;
    margin: 0 2%;
    gap: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes letterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes warningPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes winner {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes confettiFall {
    0% { transform: translateY(-100vh) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}

@media (max-width: 768px) {
    .letter-button {
        padding: 10px 15px;
        font-size: 28px;
        margin: 4px;
    }

    h1 {
        font-size: 2em;
    }

    .timer {
        font-size: 36px;
    }

    #question {
        font-size: 20px;
    }
}