/* Quiz Container Styles */
.quiz-container {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(102, 126, 234, 0.3);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.quiz-progress {
    flex: 1;
    margin-right: 2rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.1) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 20px 20px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    transition: width 0.5s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-text {
    font-size: 1rem;
    color: #b8c5d1;
    font-weight: 600;
}

.quiz-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.quiz-question {
    margin-bottom: 2.5rem;
}

.quiz-question h3 {
    color: #ffffff;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    line-height: 1.5;
    font-weight: 600;
}

.quiz-options {
    display: grid;
    gap: 1.2rem;
}

.quiz-option {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    padding: 1.2rem 1.8rem;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #b8c5d1;
    overflow: hidden;
}

.quiz-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.quiz-option:hover::before {
    left: 100%;
}

.quiz-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(8px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    color: #ffffff;
}

.quiz-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    color: #ffffff;
    transform: translateX(8px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.quiz-option.correct {
    border-color: #48bb78;
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.2), rgba(56, 161, 105, 0.2));
    color: #68d391;
    transform: translateX(8px);
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.4);
}

.quiz-option.incorrect {
    border-color: #f56565;
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.2), rgba(229, 62, 62, 0.2));
    color: #fc8181;
    transform: translateX(8px);
    box-shadow: 0 10px 25px rgba(245, 101, 101, 0.4);
}

.quiz-option::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #4a5568;
    border-radius: 50%;
    margin-right: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.quiz-option.selected::after {
    background: #667eea;
    border-color: #667eea;
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.quiz-option.correct::after {
    background: #48bb78;
    border-color: #48bb78;
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.quiz-option.incorrect::after {
    background: #f56565;
    border-color: #f56565;
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(102, 126, 234, 0.2);
}

.quiz-controls .btn {
    min-width: 140px;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.quiz-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quiz-controls .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Quiz Results */
.quiz-results {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 4rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(102, 126, 234, 0.3);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quiz-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.results-content h3 {
    color: #ffffff;
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.final-score {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.score-message {
    font-size: 1.3rem;
    color: #b8c5d1;
    margin-bottom: 3rem;
    font-weight: 500;
    line-height: 1.6;
}

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

/* Explanation Box */
.explanation {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    backdrop-filter: blur(10px);
    border-left: 6px solid #667eea;
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    display: none;
    position: relative;
    overflow: hidden;
}

.explanation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.explanation.show {
    display: block;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explanation h4 {
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.explanation p {
    color: #b8c5d1;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Page Quiz Styles */
.page-quiz {
    padding: 120px 0 100px;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
}

.page-quiz .container {
    max-width: 1100px;
}

.quiz-intro {
    text-align: center;
    margin-bottom: 4rem;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.quiz-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.quiz-intro h1 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 2.8rem;
    font-weight: 700;
}

.quiz-intro p {
    color: #b8c5d1;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.quiz-meta-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
    color: #b8c5d1;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.meta-item span:first-child {
    font-size: 1.2rem;
}

/* Responsive Quiz Styles */
@media (max-width: 768px) {
    .quiz-container {
        padding: 2.5rem;
        margin: 0 1rem;
        border-radius: 20px;
    }

    .quiz-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .quiz-progress {
        margin-right: 0;
    }

    .quiz-controls {
        flex-direction: column;
        gap: 1.5rem;
    }

    .quiz-controls .btn {
        width: 100%;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
    }

    .quiz-meta-info {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .quiz-intro {
        padding: 2.5rem;
        border-radius: 20px;
    }

    .quiz-intro h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 2rem;
        margin: 0 0.5rem;
        border-radius: 16px;
    }

    .quiz-results {
        padding: 3rem;
        margin: 0 0.5rem;
        border-radius: 16px;
    }

    .quiz-intro {
        padding: 2rem;
        margin: 0 0.5rem 3rem;
        border-radius: 16px;
    }

    .quiz-intro h1 {
        font-size: 2rem;
    }

    .final-score {
        font-size: 3rem;
    }

    .quiz-option {
        padding: 1rem 1.5rem;
    }

    .quiz-option::after {
        width: 20px;
        height: 20px;
        margin-right: 1rem;
    }

    .meta-item {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}