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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5rem;
    color: #e74c3c;
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}

.game-header .subtitle {
    color: #ecf0f1;
    font-size: 1rem;
    margin-top: 5px;
    letter-spacing: 3px;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.info-box {
    text-align: center;
}

.info-label {
    display: block;
    color: #95a5a6;
    font-size: 0.8rem;
    font-weight: bold;
}

.info-value {
    display: block;
    color: #ecf0f1;
    font-size: 1.8rem;
    font-weight: bold;
}

.question-area {
    text-align: center;
    margin-bottom: 30px;
}

.instruction {
    color: #95a5a6;
    font-size: 1rem;
    margin-bottom: 20px;
}

.instruction strong {
    color: #f1c40f;
}

.color-word {
    font-size: 4rem;
    font-weight: bold;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.color-word.correct {
    animation: correct 0.3s ease;
}

.color-word.wrong {
    animation: wrong 0.3s ease;
}

@keyframes correct {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); background: rgba(39, 174, 96, 0.3); }
}

@keyframes wrong {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); background: rgba(231, 76, 60, 0.3); }
    75% { transform: translateX(10px); background: rgba(231, 76, 60, 0.3); }
}

.choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.choice-btn {
    padding: 20px;
    font-size: 1.3rem;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.choice-btn[data-color="red"] {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.choice-btn[data-color="blue"] {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.choice-btn[data-color="green"] {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.choice-btn[data-color="yellow"] {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #1a1a2e;
}

.choice-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.control-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.5);
}

.instructions {
    text-align: center;
    color: #95a5a6;
}

.instructions p {
    font-size: 0.95rem;
}

.instructions strong {
    color: #f1c40f;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.overlay-content h2 {
    color: #e74c3c;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.overlay-content p {
    color: #ecf0f1;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

#newRecord {
    color: #f1c40f;
    font-weight: bold;
    animation: pulse 0.5s ease infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.overlay-content button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.overlay-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.5);
}

@media (max-width: 500px) {
    .game-container {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .color-word {
        font-size: 3rem;
        padding: 20px;
    }

    .choice-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
}
