/* Quiz-specific styles */

.quiz-main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.quiz-header {
    text-align: center;
    margin-bottom: 3rem;
}

.quiz-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.quiz-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Quiz Setup */
.quiz-setup {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.setup-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border-radius: 24px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    padding: 3rem;
    border: 1px solid rgba(46, 139, 87, 0.1);
    position: relative;
    overflow: hidden;
}

.setup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #27AE60, #2ECC71);
    border-radius: 24px 24px 0 0;
}

.setup-card h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #27AE60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-options {
    margin-bottom: 3rem;
}

.option-group {
    margin-bottom: 2.5rem;
    background: rgba(46, 139, 87, 0.02);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(46, 139, 87, 0.08);
}

.option-group h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



.radio-group {
    display: grid;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 1.2rem 1.5rem;
    border: 2px solid rgba(46, 139, 87, 0.1);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-weight: 500;
}

.radio-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(46, 139, 87, 0.05), rgba(39, 174, 96, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.radio-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 139, 87, 0.15);
}

.radio-option:hover::before {
    opacity: 1;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 24px;
    height: 24px;
    border: 3px solid #E0E0E0;
    border-radius: 50%;
    margin-right: 1.2rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow:
        0 0 0 4px rgba(46, 139, 87, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: radioCheck 0.3s ease;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(46, 139, 87, 0.08);
    box-shadow: 0 4px 16px rgba(46, 139, 87, 0.15);
    transform: translateY(-1px);
}

.radio-option:has(input[type="radio"]:checked) .radio-option-text {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes radioCheck {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.region-select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    background: white;
    color: var(--text-dark);
    font-size: 1rem;
    transition: var(--transition);
}

.region-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-large {
    width: 100%;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), #27AE60);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 24px rgba(46, 139, 87, 0.3),
        0 4px 12px rgba(46, 139, 87, 0.2);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 32px rgba(46, 139, 87, 0.4),
        0 6px 16px rgba(46, 139, 87, 0.3);
    background: linear-gradient(135deg, #27AE60, #2ECC71);
}

.btn-large:hover::before {
    left: 100%;
}

.btn-large:active {
    transform: translateY(-1px);
    box-shadow:
        0 6px 20px rgba(46, 139, 87, 0.3),
        0 3px 8px rgba(46, 139, 87, 0.2);
}

/* Quiz Game */
.quiz-game {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-progress {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    flex-wrap: wrap;
    gap: 1rem;
}

.question-counter {
    color: var(--text-dark);
}

.timer-display {
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-weight: 700;
    background: rgba(255, 107, 53, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.score-display {
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* Question Card */
.question-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.question-header {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.question-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.question-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.question-difficulty {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: rgba(46, 139, 87, 0.1);
    color: var(--primary-color);
    width: fit-content;
}

/* Theme Colors */
.question-card.theme-countries .question-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.question-card.theme-countries .question-icon {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
}

.question-card.theme-countries .question-difficulty {
    background: rgba(33, 150, 243, 0.1);
    color: #1976d2;
}

.question-card.theme-landmarks .question-header {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
}

.question-card.theme-landmarks .question-icon {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: white;
}

.question-card.theme-landmarks .question-difficulty {
    background: rgba(233, 30, 99, 0.1);
    color: #c2185b;
}

.question-card.theme-geography .question-header {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.question-card.theme-geography .question-icon {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.question-card.theme-geography .question-difficulty {
    background: rgba(76, 175, 80, 0.1);
    color: #388e3c;
}

.question-card.theme-mixed .question-header {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 100%);
}

.question-card.theme-mixed .question-icon {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.question-card.theme-mixed .question-difficulty {
    background: rgba(255, 152, 0, 0.1);
    color: #f57c00;
}

.question-content {
    padding: 2rem;
}

.question-text {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    line-height: 1.4;
    font-weight: 500;
}

.answer-options {
    margin-bottom: 2rem;
    display: grid;
    gap: 1rem;
}

.answer-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid #E0E0E0;
    border-radius: 16px;
    background: white;
    color: var(--text-dark);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.answer-option::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 50%;
    margin-right: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.answer-option:hover {
    border-color: var(--primary-color);
    background: rgba(46, 139, 87, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(46, 139, 87, 0.15);
}

.answer-option:hover::before {
    border-color: var(--primary-color);
}

.answer-option.selected {
    border-color: var(--primary-color);
    background: rgba(46, 139, 87, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(46, 139, 87, 0.2);
}

.answer-option.selected::before {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: inset 0 0 0 4px white;
}

.answer-option.correct {
    border-color: #27AE60;
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
    animation: correctAnswer 0.5s ease;
}

.answer-option.correct::before {
    border-color: #27AE60;
    background: #27AE60;
    box-shadow: inset 0 0 0 4px white;
}

.answer-option.incorrect {
    border-color: #E74C3C;
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
    animation: incorrectAnswer 0.5s ease;
}

.answer-option.incorrect::before {
    border-color: #E74C3C;
    background: #E74C3C;
    box-shadow: inset 0 0 0 4px white;
}

@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectAnswer {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.question-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Question Feedback */
.question-feedback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.feedback-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    max-width: 500px;
    margin: 0 20px;
}

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.feedback-icon.correct {
    color: #27AE60;
}

.feedback-icon.incorrect {
    color: #E74C3C;
}

.feedback-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feedback-explanation {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Quiz Results */
.quiz-results {
    max-width: 600px;
    margin: 0 auto;
}

.results-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
}

.results-header {
    margin-bottom: 2rem;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.results-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.final-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.score-total {
    font-size: 1.5rem;
    color: var(--text-light);
}

.score-percentage {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.results-details {
    margin-bottom: 2rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-message {
    background: var(--background-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    color: var(--text-dark);
    font-style: italic;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Answer Review */
.answer-review {
    max-width: 800px;
    margin: 0 auto;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.review-header h2 {
    color: var(--text-dark);
}

.review-item {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.review-question {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.review-answers {
    margin-bottom: 1rem;
}

.review-answer {
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.review-answer.user-answer {
    background: rgba(70, 130, 180, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.review-answer.correct-answer {
    background: rgba(39, 174, 96, 0.1);
    border-left: 4px solid #27AE60;
}

.review-answer.incorrect-answer {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #E74C3C;
}

.review-explanation {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-main {
        padding: 1rem 0;
    }
    
    .quiz-header h1 {
        font-size: 2rem;
    }
    
    .quiz-setup {
        padding: 1rem;
    }

    .setup-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .setup-card h2 {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    .option-group {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .option-group h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .question-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .question-icon {
        font-size: 2rem;
        width: 50px;
        height: 50px;
        margin-right: 0;
    }

    .question-meta {
        align-items: center;
    }

    .question-type {
        font-size: 1rem;
    }

    .question-content {
        padding: 1.5rem;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .feedback-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .radio-group {
        gap: 0.5rem;
    }
    
    .radio-option {
        padding: 0.6rem;
    }
    
    .answer-option {
        padding: 1rem;
        font-size: 1rem;
    }

    .answer-option::before {
        width: 16px;
        height: 16px;
        margin-right: 0.8rem;
    }
    
    .final-score {
        flex-direction: column;
        gap: 0;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
}
