/* Quiz Page Styles */
.quiz-selection {
    padding: 6rem 0 4rem;
}

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

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

.quiz-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.quiz-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.quiz-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quiz-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.start-quiz {
    width: 100%;
}

/* Quiz Interface */
.quiz-interface {
    min-height: 100vh;
    padding: 6rem 0 2rem;
    background: #f8fafc;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.quiz-header-bar {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-progress {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 6.67%; /* 1/15 questions */
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.quiz-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.question-container {
    padding: 3rem 2rem;
}

.question-number {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

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

.code-block {
    background: var(--dark-card);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.options-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
}

.option {
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.option.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.option.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.option.incorrect {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.option-marker {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.option.selected .option-marker {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.option-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

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

/* Quiz Results */
.quiz-results {
    min-height: 100vh;
    padding: 6rem 0 2rem;
    background: #f8fafc;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 3rem 2rem;
    text-align: center;
}

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

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    position: relative;
}

.score-percentage {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.results-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.results-summary {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.results-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.result-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-icon.correct {
    background: var(--success-color);
}

.stat-icon.incorrect {
    background: var(--error-color);
}

.stat-icon.time {
    background: var(--accent-color);
}

.stat-info {
    text-align: left;
}

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

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.performance-breakdown {
    text-align: left;
    margin-bottom: 3rem;
}

.performance-breakdown h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.category-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-result {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1rem;
    align-items: center;
}

.category-name {
    font-weight: 500;
    color: var(--text-primary);
}

.category-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.category-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

.category-score {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

/* Timer Animation */
.timer-warning {
    animation: pulse 1s infinite;
    color: var(--warning-color) !important;
}

.timer-danger {
    animation: pulse 0.5s infinite;
    color: var(--error-color) !important;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-categories {
        grid-template-columns: 1fr;
    }
    
    .quiz-header-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .quiz-progress {
        width: 100%;
    }
    
    .question-container {
        padding: 2rem 1rem;
    }
    
    .question-text {
        font-size: 1.25rem;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .results-details {
        grid-template-columns: 1fr;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .category-result {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .quiz-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-percentage {
        font-size: 2rem;
    }
}