/**
 * Single Quiz Template Styles
 * Beautiful interactive quiz experience
 */

/* Pre-Quiz Intro Section */
.quiz-intro-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: #f9f9f9;
}

.quiz-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.quiz-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.quiz-intro-content {
    position: relative;
    z-index: 1;
    padding: 60px 0;
}

.quiz-intro-card {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.quiz-title {
    font-family: 'Aleo', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #323710;
    margin: 20px 0;
}

.quiz-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin: 20px 0;
}

/* Difficulty Badge */
.difficulty-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-badge.difficulty-beginner {
    background: #E8F5E9;
    color: #2E7D32;
}

.difficulty-badge.difficulty-intermediate {
    background: #FFF3E0;
    color: #E65100;
}

.difficulty-badge.difficulty-advanced {
    background: #FFEBEE;
    color: #C62828;
}

/* Category Tags */
.quiz-categories {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tag {
    background: #f0f0f0;
    color: #333;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* Quiz Stats */
.quiz-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 10px;
}

.quiz-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-text {
    font-size: 0.95rem;
    color: #666;
}

/* Quiz Rules */
.quiz-rules {
    text-align: left;
    margin: 30px 0;
    padding: 25px;
    background: #fff9e6;
    border-radius: 10px;
    border-left: 4px solid #f6b402;
}

.quiz-rules h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #323710;
    margin: 0 0 15px 0;
}

.quiz-rules ul {
    margin: 0;
    padding-left: 25px;
}

.quiz-rules li {
    color: #666;
    margin: 8px 0;
    line-height: 1.5;
}

/* Start Button */
.btn-start-quiz {
    background: linear-gradient(135deg, #f6b402 0%, #e5a300 100%);
    color: #323710;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-start-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(246, 180, 2, 0.3);
}

/* Quiz Interface Section */
.quiz-interface-section {
    padding: 40px 0;
    min-height: 70vh;
    background: #f9f9f9;
}

/* Progress Bar */
.quiz-progress {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-text {
    font-size: 0.95rem;
    color: #666;
}

#current-question, #total-questions {
    font-weight: 600;
    color: #323710;
}

.progress-percentage {
    font-weight: 600;
    color: #007b98;
}

.progress-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007b98 0%, #00a0cc 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Question Container */
.quiz-question-container {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    margin-bottom: 30px;
    min-height: 400px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.question-display {
    animation: fadeIn 0.5s ease;
}

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

.question-text {
    font-size: 1.3rem;
    color: #323710;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Answer Options */
.answer-options {
    display: grid;
    gap: 15px;
}

.answer-option {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.answer-option:hover:not(.selected):not(.disabled) {
    border-color: #007b98;
    background: #f0f8ff;
    transform: translateX(5px);
}

.answer-option.selected {
    border-color: #007b98;
    background: #e8f4f8;
}

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

.answer-option.incorrect {
    border-color: #EF5350;
    background: #FFEBEE;
}

.answer-option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.answer-text {
    font-size: 1.05rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.answer-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}

.answer-option.selected .answer-indicator {
    border-color: #007b98;
    background: #007b98;
}

.answer-option.selected .answer-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
}

/* Feedback Box */
.answer-feedback {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

.feedback-correct {
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
}

.feedback-incorrect {
    background: #FFEBEE;
    border-left: 4px solid #EF5350;
}

.feedback-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-correct .feedback-title {
    color: #2E7D32;
}

.feedback-incorrect .feedback-title {
    color: #C62828;
}

.feedback-content {
    color: #666;
    line-height: 1.5;
}

/* Navigation Buttons */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-nav {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev {
    background: #fff;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-prev:hover {
    border-color: #007b98;
    color: #007b98;
}

.btn-next, .btn-finish {
    background: #007b98;
    color: #fff;
}

.btn-next:hover, .btn-finish:hover {
    background: #006580;
    transform: translateX(3px);
}

.btn-finish {
    background: linear-gradient(135deg, #f6b402 0%, #e5a300 100%);
    color: #323710;
}

/* Results Section */
.quiz-results-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f6b402 0%, #e5a300 100%);
    min-height: 70vh;
}

.results-card {
    background: #fff;
    border-radius: 15px;
    padding: 50px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-family: 'Aleo', serif;
    font-size: 2.5rem;
    color: #323710;
    margin-bottom: 30px;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007b98 0%, #00a0cc 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(0, 123, 152, 0.3);
}

.score-number {
    font-size: 3rem;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.score-total {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.score-percentage {
    font-size: 2rem;
    font-weight: 600;
    color: #323710;
    margin: 20px 0;
}

.score-message {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
}

/* Results Breakdown */
.results-breakdown {
    margin: 40px 0;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.results-breakdown h3 {
    font-size: 1.3rem;
    color: #323710;
    margin-bottom: 20px;
}

#answers-review {
    max-height: 400px;
    overflow-y: auto;
}

.answer-review-item {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    background: #f9f9f9;
    border-left: 4px solid #ddd;
}

.answer-review-item.correct {
    border-left-color: #4CAF50;
    background: #f1f8f4;
}

.answer-review-item.incorrect {
    border-left-color: #EF5350;
    background: #fef5f5;
}

.review-question {
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.review-answer {
    color: #666;
    font-size: 0.95rem;
}

.review-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.85rem;
    font-weight: 600;
}

.review-status.correct {
    color: #2E7D32;
}

.review-status.incorrect {
    color: #C62828;
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.btn-retake, .btn-browse {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-retake {
    background: #007b98;
    color: #fff;
    border: none;
    cursor: pointer;
}

.btn-retake:hover {
    background: #006580;
    transform: translateY(-2px);
}

.btn-browse {
    background: #fff;
    color: #007b98;
    border: 2px solid #007b98;
}

.btn-browse:hover {
    background: #007b98;
    color: #fff;
}

/* Social Sharing */
.results-share {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.results-share p {
    color: #666;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-facebook {
    background: #3b5998;
}

.share-twitter {
    background: #1da1f2;
}

.share-linkedin {
    background: #0077b5;
}

.share-email {
    background: #666;
}

/* Related Quizzes Section */
.related-quizzes-section {
    padding: 60px 0;
    background: #f9f9f9;
}

.related-quizzes-section h2 {
    font-family: 'Aleo', serif;
    font-size: 2rem;
    color: #323710;
    text-align: center;
    margin-bottom: 40px;
}

.related-quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-quiz-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.related-quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.related-quiz-image {
    height: 180px;
    overflow: hidden;
    background: #f0f0f0;
}

.related-quiz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-quiz-card:hover .related-quiz-image img {
    transform: scale(1.05);
}

.related-quiz-content {
    padding: 20px;
}

.related-quiz-content h3 {
    font-size: 1.2rem;
    margin: 10px 0;
}

.related-quiz-content h3 a {
    color: #323710;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-quiz-content h3 a:hover {
    color: #007b98;
}

.related-quiz-meta {
    display: flex;
    gap: 15px;
    color: #999;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-intro-card {
        padding: 30px 20px;
    }
    
    .quiz-title {
        font-size: 2rem;
    }
    
    .quiz-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-question-container {
        padding: 25px;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .results-card {
        padding: 30px 20px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .btn-retake, .btn-browse {
        width: 100%;
        text-align: center;
    }
    
    .related-quizzes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quiz-rules {
        padding: 20px 15px;
    }
    
    .progress-info {
        font-size: 0.85rem;
    }
    
    .answer-option {
        padding: 15px;
    }
    
    .answer-text {
        font-size: 0.95rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
}