
.hidden {
    display: none !important;
}

#quiz-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
    padding: 0 10vw;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#quiz-card {
    background-color: #59A5A5; /* Teal background from image */
    width: 100%; /* Changed from 90% for better control with max-width */
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    animation: scaleUp 0.3s ease-out forwards;
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.card-content {
    padding: 32px;
}

#question-text {
    color: white;
    font-size: clamp(14px, 3.5vw, 30px);
    font-weight: 900;
    margin: 0 0 24px 0;
    line-height: 1.3;
}

.option {
    background-color: #F5F5DC; /* Cream color */
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
}

.option:hover {
    border-color: #3C375C;
}

.option .icon {
    width: 24px;
    height: 24px;
    border: 2px solid #b0b0b0;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.option .icon::before { /* Checkmark and Cross SVG icons */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy effect */
}


.option .text {
    font-size: clamp(16px, 1.3vw, 25px);
    font-weight: 500;
    color: #333;
}

/* --- Answer State Styles --- */
#options-container.answered .option {
    pointer-events: none; /* Disable clicking after an answer is chosen */
}

.option.correct {
    background-color: #e9f9e9;
    border-color: #4CAF50;
}

.option.correct .icon {
    border-color: #4CAF50;
    background-color: #4CAF50;
}

.option.correct .icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    transform: translate(-50%, -50%) scale(1);
}

.option.incorrect {
    background-color: #fde0e0;
    border-color: #F44336;
}

.option.incorrect .icon {
    border-color: #F44336;
    background-color: #F44336;
}

.option.incorrect .icon::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    transform: translate(-50%, -50%) scale(1);
}


/* Tip Text */
#tip-text {
    color: #e0e0e0;
    font-style: italic;
    margin-top: 20px;
    opacity: 0;
    line-height: 2cap;
    transition: opacity 0.4s ease-in-out;
}

#tip-text:not(.hidden) {
    opacity: 1;
}


/* Card Footer */
.card-footer {
    background-color: #251544; /* Dark purple/indigo from image */
    padding: 20px;
    text-align: center;
    height: fit-content;
    display: flex;
    justify-content: center;
}

#next-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 3px;
    cursor: pointer;
    width: 100%;
    transition: color 0.2s;
    margin: 0;
}

#next-btn:disabled {
    color: #88869b;
    cursor: not-allowed;
}

/* --- ✅ Responsive Styles for Mobile ✅ --- */
@media (max-width: 600px) {
    .card-content {
        padding: 24px;
    }

    #question-text {
        font-size: 1.5rem; /* Slightly smaller question text */
    }

    .option {
        padding: 12px; /* Less padding inside options */
        margin-bottom: 10px;
    }
    
    .option .icon {
        width: 20px; /* Smaller icon */
        height: 20px;
        margin-right: 12px;
    }

    .option .icon::before {
        width: 16px; /* Smaller check/cross */
        height: 16px;
    }

    .option .text {
        font-size: 0.9rem; /* Smaller option text */
    }

    #tip-text {
        font-size: 0.85rem;
    }

    .card-footer {
        padding: 16px;
    }

    #next-btn {
        font-size: 1rem;
    }
}