/* Common Quiz Styles */
.score-display {
    font-weight: 600;
}

.quiz-content {
    margin-top: 100px;
}
/* Custom Quiz Header Style */
.app-quizheader {
    background-color: white;
    color: var(--title-color);
    border: none;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
    position: relative;
    overflow: hidden;
    padding: 5px;
}

    .app-quizheader::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="quiz-grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="25" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="25" cy="75" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23quiz-grain)"/></svg>');
        pointer-events: none;
    }

    .app-quizheader .row,
    .app-quizheader .col,
    .app-quizheader .col-auto {
        position: relative;
        z-index: 2;
    }

    .app-quizheader h1 {
        font-weight: var(--font-semi-bold);
        margin: 0;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .app-quizheader .score-display .badge {
        background-color:white;
        color: var(--title-color);
        border: 1px solid rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        border-radius: 10px;
        padding: var(--spacing-sm) var(--spacing-lg);
        font-weight: var(--font-medium);
        transition: all var(--transition-normal);
    }
/*
        .app-quizheader .score-display .badge:hover {
            background: rgba(0, 0, 0, 0.15);
            transform: translateY(-1px);
        }*/

/* Mobile Quiz Header Styles - Updated for better visibility    */
.quiz-mobile-header {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 0.5rem 0;
}

    .quiz-mobile-header.show {
        opacity: 1;
    }

.quiz-progress-mobile small {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--title-color);
}

.score-display-mobile .badge {
    background: rgba(0, 0, 0, 0.1);
    color: var(--title-color);
    border: 1px solid rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-weight: var(--font-medium);
    font-size: 0.85rem;
}

/* Circular Timer Styles */
.circular-timer-container {
    position: relative;
    display: inline-block;
}

.circular-timer {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circular-timer-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circular-timer-track {
    opacity: 0.3;
}

.circular-timer-progress {
    transition: stroke-dashoffset 1s ease-in-out;
}

.circular-timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: var(--title-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.quiz-progress-text {
    color: #000 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}
/* Quiz Progress Info Styles */
.quiz-progress-info {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

    .quiz-progress-info.show {
        opacity: 1;
    }

    .quiz-progress-info small {
        color: #000 !important; /* Force black color instead of var(--title-color) */
        font-weight: 600 !important;
    }

    .quiz-progress-info .progress {
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 3px;
    }

    .quiz-progress-info .progress-bar {
        background: rgba(0, 0, 0, 0.3);
        transition: width 0.3s ease;
    }

#questionContainer {
    min-height: 300px;
}

.option-btn {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .option-btn:hover:not(.disabled) {
        border-color: var(--first-color);
        background-color: var(--first-color-lighten);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(135, 74, 195, 0.15);
    }

    .option-btn.selected-correct {
        background-color: #d4edda;
        border-color: #28a745;
        color: #155724;
    }

    .option-btn.selected-wrong {
        background-color: #f8d7da;
        border-color: #dc3545;
        color: #721c24;
    }

    .option-btn.correct-answer {
        background-color: #d4edda;
        border-color: #28a745;
        color: #155724;
        animation: correctPulse 0.6s ease-in-out;
    }

    .option-btn.disabled {
        pointer-events: none;
        opacity: 0.7;
    }

@keyframes correctPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    background: linear-gradient(135deg, var(--first-color) 0%, hsl(220, 68%, 64%) 100%);
}

.alert {
    border: none;
    border-radius: 8px;
}

.card {
    border-radius: 12px;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--first-color) 0%, hsl(220, 68%, 64%) 100%);
    border-color: var(--first-color);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--first-color-hover) 0%, hsl(220, 68%, 58%) 100%);
        border-color: var(--first-color-hover);
    }

.display-1 {
    font-size: 4rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .app-quizheader {
        padding: var(--spacing-lg);
        background-color: white;
        color: var(--title-color);
    }

        .app-quizheader .row > div {
            margin-bottom: 15px;
        }

            .app-quizheader .row > div:last-child {
                margin-bottom: 0;
            }

    .circular-timer {
        width: 50px;
        height: 50px;
    }

    .circular-timer-svg {
        width: 50px;
        height: 50px;
    }

    .circular-timer-text {
        font-size: 12px;
    }

    .option-btn {
        min-height: 50px;
        padding: 12px;
        font-size: 0.9rem;
    }

    .display-1 {
        font-size: 3rem;
    }

    .card-body {
        padding: 1rem;
    }

    .quiz-image-wrapper {
        max-width: 250px;
    }

    .quiz-image {
        max-height: 150px;
    }
}

@media (max-width: 576px) {
    .quiz-content {
        margin-top: 45px;
    }

    .option-btn {
        min-height: 45px;
        padding: 10px;
        font-size: 0.85rem;
    }

    #questionText {
        font-size: 1.25rem;
    }

    .quiz-image-wrapper {
        max-width: 200px;
        padding: 10px;
    }

    .quiz-image {
        max-height: 120px;
    }

    .circular-timer {
        width: 45px;
        height: 45px;
    }

    .circular-timer-svg {
        width: 45px;
        height: 45px;
    }

    .circular-timer-text {
        font-size: 11px;
    }

    /* Mobile header adjustments */
    .app-quizheader {
        padding: 1rem;
    }

    .quiz-mobile-header {
        padding: 0.3rem 0;
    }

    .quiz-progress-mobile small {
        font-size: 0.9rem;
        color: #000 !important; /* Force black color instead of var(--title-color) */
    }

    .score-display-mobile .badge {
        background-color: white;
        color: var(--title-color);
        border: 1px solid rgba(0, 0, 0, 0.2);
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Animation for screen transitions */
.screen-transition {
    animation: slideIn 0.4s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-image-wrapper {
    max-width: 300px;
    width: 100%;
    /*border: 3px solid #dee2e6;*/
    border-radius: 8px;
    padding: 15px;
    /*background: white;*/
    /*box-shadow: 0 2px 8px rgba(0,0,0,0.1);*/
}

.quiz-image-content {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.quiz-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quiz-image-wrapper {
        max-width: 250px;
    }

    .quiz-image {
        max-height: 150px;
    }
}

@media (max-width: 576px) {
    .quiz-image-wrapper {
        max-width: 200px;
        padding: 10px;
    }

    .quiz-image {
        max-height: 120px;
    }
}


/* Planets variant (no inline styles) */
.quiz-image-planets {
    width: 165%;
    height: auto;
    object-fit: contain;
}