/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

/* Quiz Container */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease-out;
}

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

/* Quiz Header */
.quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.quiz-header h1 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.quiz-subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Quiz Stats */
.quiz-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

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

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    display: inline-block;
    color: #667eea;
    font-size: 2rem;
    font-weight: bold;
}

.stat-total {
    color: #999;
    font-size: 1.2rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Start Screen */
.start-screen {
    text-align: center;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 12px 25px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
}

.mode-btn:hover,
.mode-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.start-content h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 20px;
}

.start-content p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.start-content ul {
    list-style: none;
    margin: 20px 0;
}

.start-content ul li {
    color: #555;
    padding: 10px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 500;
}

.start-content ul li::before {
    content: "✓ ";
    color: #667eea;
    font-weight: bold;
    margin-right: 10px;
}

.start-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.info-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Question Card */
.question-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.question-number {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.question-text {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Options Container */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.option {
    background: white;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.option:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.option.selected {
    border-color: #667eea;
    background: #e3f2fd;
}

.option.correct {
    border-color: #28a745;
    background: #d4edda;
}

.option.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
}

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

.option-label {
    width: 35px;
    height: 35px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.option.selected .option-label {
    background: #764ba2;
}

.option.correct .option-label {
    background: #28a745;
}

.option.incorrect .option-label {
    background: #dc3545;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.2rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Quiz Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

/* Results Screen */
.results-screen {
    text-align: center;
}

.results-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 1s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.results-content h2 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.score-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.final-score {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.percentage {
    font-size: 2rem;
    opacity: 0.9;
}

.results-message {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.result-stat {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

.result-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.result-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
}

.result-value.correct {
    color: #28a745;
}

.result-value.wrong {
    color: #dc3545;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Review Screen */
.review-screen {
    max-height: 70vh;
    overflow-y: auto;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.review-header h2 {
    color: #667eea;
    font-size: 2rem;
}

.review-question {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
}

.review-question.correct {
    border-left-color: #28a745;
}

.review-question.incorrect {
    border-left-color: #dc3545;
}

.review-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-question-number {
    font-weight: bold;
    color: #667eea;
}

.review-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.review-status.correct {
    background: #d4edda;
    color: #28a745;
}

.review-status.incorrect {
    background: #f8d7da;
    color: #dc3545;
}

.review-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.review-answer {
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
}

.review-answer.user {
    background: #e3f2fd;
    color: #333;
}

.review-answer.correct-answer {
    background: #d4edda;
    color: #333;
}

.review-answer strong {
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        padding: 20px;
    }

    .quiz-header h1 {
        font-size: 1.8rem;
    }

    .quiz-stats {
        flex-direction: column;
        gap: 15px;
    }

    .start-info {
        flex-direction: column;
    }

    .info-card {
        width: 100%;
        justify-content: center;
    }

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

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

    .btn-large {
        width: 100%;
    }

    .quiz-navigation {
        flex-direction: column;
    }

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

/* Scrollbar Styling */
.review-screen::-webkit-scrollbar {
    width: 10px;
}

.review-screen::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.review-screen::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.review-screen::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.question-card {
    animation: slideInRight 0.4s ease;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.2rem;
}
.back-btn {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.back-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}