* {
    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%);
    color: #eee;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.8rem;
    color: #e2e8f0;
}

.audio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #aaa;
}

.volume-control.hidden-ios {
    display: none;
}

.volume-control input[type="range"] {
    width: 150px;
    cursor: pointer;
}

.volume-control label {
    font-size: 0.9rem;
}

#volumeValue {
    font-size: 0.9rem;
    min-width: 35px;
}

.play-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.play-btn:hover {
    background: #5a6fd6;
}

.play-btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.timer {
    font-size: 1.1rem;
    color: #aaa;
}

.skip-section {
    text-align: center;
    margin-bottom: 1rem;
}

.mode-toggle {
    text-align: center;
    margin-bottom: 1.5rem;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #eee;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.text-input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.text-input-container.hidden {
    display: none;
}

#answerInput {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #eee;
    text-align: center;
}

#answerInput::placeholder {
    color: #888;
}

#answerInput:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

#answerInput:disabled {
    background: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

.submit-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.submit-btn:disabled {
    background: #444;
    cursor: not-allowed;
}

.skip-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    background: #718096;
    color: white;
}

.skip-btn:hover {
    background: #8190a6;
}

.skip-btn:disabled {
    background: #444;
    cursor: not-allowed;
}

.question-section {
    margin-bottom: 2rem;
}

.question-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #ccc;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.options-container.hidden {
    display: none;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #eee;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: all 0.2s;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.option-btn.correct {
    background: rgba(72, 187, 120, 0.3);
    border-color: #48bb78;
}

.option-btn.wrong {
    background: rgba(245, 101, 101, 0.3);
    border-color: #f56565;
}

.feedback {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.feedback.correct {
    background: rgba(72, 187, 120, 0.2);
    border: 2px solid #48bb78;
}

.feedback.wrong {
    background: rgba(245, 101, 101, 0.2);
    border: 2px solid #f56565;
}

.feedback.skipped {
    background: rgba(160, 174, 192, 0.2);
    border: 2px solid #a0aec0;
}

.feedback.hidden {
    display: none;
}

#feedbackText {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.next-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.next-btn:hover {
    background: #3182ce;
}

.next-btn.hidden {
    display: none;
}

footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 1.1rem;
}

.streak {
    color: #ffd700;
}

.correct {
    color: #48bb78;
}

.wrong {
    color: #f56565;
}
