.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ff6b35;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input[type="range"] {
    padding: 0;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
}

/* Specific styling for difficulty slider with gradient */
#difficultySelect {
    background: linear-gradient(to right,
            #28a745 0%,
            #28a745 10%,
            #ffc107 20%,
            #ffc107 40%,
            #fd7e14 50%,
            #fd7e14 70%,
            #dc3545 80%,
            #dc3545 90%,
            #6f42c1 100%) !important;
    height: 8px !important;
    border-radius: 4px !important;
}

/* WebKit browsers (Chrome, Safari, Edge) */
#difficultySelect::-webkit-slider-track {
    background: linear-gradient(to right,
            #28a745 0%,
            #28a745 10%,
            #ffc107 20%,
            #ffc107 40%,
            #fd7e14 50%,
            #fd7e14 70%,
            #dc3545 80%,
            #dc3545 90%,
            #6f42c1 100%);
    height: 8px;
    border-radius: 4px;
    border: none;
}

/* Firefox specific styling */
#difficultySelect::-moz-range-track {
    background: linear-gradient(to right,
            #28a745 0%,
            #28a745 10%,
            #ffc107 20%,
            #ffc107 40%,
            #fd7e14 50%,
            #fd7e14 70%,
            #dc3545 80%,
            #dc3545 90%,
            #6f42c1 100%);
    height: 8px;
    border-radius: 4px;
    border: none;
}

/* Firefox progress bar styling */
#difficultySelect::-moz-range-progress {
    background: transparent;
    height: 8px;
    border-radius: 4px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e55a2b, #e67a32);
    transform: translateY(-2px);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.question-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.question-text {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ff6b35;
}

.answer-option {
    margin-bottom: 12px;
}

.option-btn {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

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

.quiz-results {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.score-display {
    font-size: 48px;
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #ff6b35;
}

#errorDiv {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #dc3545;
}

/* Custom topic group initially hidden */
#customTopicGroup {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}