/* General Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Migrate-o-meter Styles */
.migratometer-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.migratometer-container h2 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #2c3e50;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.progress {
    height: 100%;
    background-color: #3498db; /* Default color */
    width: 0; /* Will be updated by JavaScript */
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress.passing {
    background-color: #2ecc71; /* Green when passing (21+ correct) */
}

.threshold-marker {
    position: absolute;
    top: 0;
    left: 70%; /* 21/30 = 70% */
    height: 100%;
    width: 2px;
    background-color: #e74c3c; /* Red marker */
    z-index: 2;
}

.threshold-marker::after {
    content: "21";
    position: absolute;
    top: -20px;
    left: -5px;
    font-size: 12px;
    color: #e74c3c;
    font-weight: bold;
}

.score {
    text-align: center;
    font-weight: bold;
}

/* Question Container Styles */
.question-container {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.image-container {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

#question-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.question-content {
    flex: 1;
    padding: 30px;
}

#question-text {
    margin-bottom: 20px;
    color: #2c3e50;
}

#question-audio {
    width: 100%;
    margin-bottom: 20px;
}

/* Options Styles */
.options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.option-btn {
    flex: 1;
    padding: 15px;
    font-size: 1.1rem;
    background-color: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
@media (hover: hover) {
    .option-btn:hover {
        background-color: #e0e0e0;
    }
}

.option-btn.correct {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.option-btn.incorrect {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.option-btn.neutral {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.feedback {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.feedback.correct {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.feedback.incorrect {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

.feedback.neutral {
    background-color: #fff3cd;
    color: #856404;
    display: block;
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .question-container {
        flex-direction: column;
    }

    .image-container, .question-content {
        width: 100%;
    }

    .image-container {
        padding: 10px;
    }

    .question-content {
        padding: 15px;
    }

    #question-text {
        font-size: 1.2rem;
    }

    .options {
        flex-direction: column;
    }

    .option-btn {
        padding: 12px;
        font-size: 1rem;
    }

    #question-audio {
        margin-bottom: 15px;
        width: 100%;
        max-width: 100%;
    }
}

/* Additional responsive adjustments for very small screens */
@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    header h1 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .migratometer-container {
        padding: 10px;
    }

    .migratometer-container h2 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .progress-bar {
        height: 15px;
        margin-bottom: 5px;
    }

    .threshold-marker::after {
        top: -15px;
        font-size: 10px;
    }

    .score {
        font-size: 0.9rem;
    }

    .question-content {
        padding: 10px;
    }

    #question-text {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .option-btn {
        padding: 10px;
    }

    .feedback {
        padding: 5px;
        font-size: 0.9rem;
    }

    #question-image {
        max-height: 250px;
    }

    #question-audio {
        width: 100%;
        max-width: 100%;
        height: 30px;
    }
}
