:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --primary-color: #1e88e5;
    --correct-color: #4caf50;
    --incorrect-color: #f44336;
    --disabled-color: #555555;
    --font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

#quiz-container {
    width: 90%;
    max-width: 600px;
    padding: 20px;
    box-sizing: border-box;
}

button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 20px;
}

button:hover {
    background-color: #1976d2;
}

button:active {
    transform: scale(0.98);
}

.hidden {
    display: none !important;
}

#start-screen h1, #result-screen h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

#progress-container {
    width: 100%;
    height: 10px;
    background-color: #333;
    border-radius: 5px;
    margin-bottom: 20px;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 0.3s;
}

#timer {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

#question-container {
    margin-bottom: 30px;
}

#japanese-word {
    font-size: 1.5rem;
    color: #aaa;
    margin: 0;
}

#english-word {
    font-size: 2.5rem;
    margin: 10px 0;
}

#options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.option-button {
    background-color: #333;
    padding: 20px;
    font-size: 1.2rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.option-button:hover {
    background-color: #444;
}

.option-button.correct {
    background-color: var(--correct-color);
}
.option-button.incorrect {
    background-color: var(--incorrect-color);
}
.option-button.timesup {
    color: var(--incorrect-color);
    border: 2px solid var(--incorrect-color);
}
.option-button:disabled {
    cursor: not-allowed;
    background-color: var(--disabled-color);
}

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

#feedback-text {
    font-size: 5rem;
    font-weight: bold;
    animation: feedback-anim 0.5s ease-out;
}

@keyframes feedback-anim {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#score-text {
    font-size: 5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 40px 0;
}

#feedback-text.small {
    font-size: 2rem;
}

@media (max-width: 600px) {
    #start-screen h1, #result-screen h1 {
        font-size: 2rem;
    }
    #english-word {
        font-size: 1.8rem;
    }
    .option-button {
        font-size: 1rem;
        padding: 15px;
    }
    #feedback-text {
        font-size: 6rem;
    }
    #score-text {
        font-size: 4rem;
    }
}
