/* Advanced Playwright Quiz Styles */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.question-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

.question-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.question-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    line-height: 1.6;
}

.category-tag {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(79, 172, 254, 0.3);
}

.difficulty-badge {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b4513;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    display: inline-block;
}

.options-container {
    display: grid;
    gap: 15px;
}

.option {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transition: width 0.3s ease;
}

.option:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateX(5px);
}

.option:hover::before {
    width: 4px;
}

.option.selected {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-color: #4facfe;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.option.selected::before {
    width: 6px;
    background: white;
}

.option.correct {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-color: #48bb78;
    animation: correctPulse 0.6s ease;
}

.option.incorrect {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border-color: #f56565;
    animation: incorrectShake 0.6s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

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

.option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #4facfe;
}

.option-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
}

.code-snippet {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    border-left: 4px solid #4facfe;
}

.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: none;
    animation: slideIn 0.3s ease;
}

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

.feedback.correct {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    border: 1px solid #68d391;
}

.feedback.incorrect {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    border: 1px solid #fc8181;
}

.explanation {
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    color: #2c5282;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #3182ce;
    display: none;
    animation: slideIn 0.3s ease 0.1s both;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 35px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    margin: 0 25px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.score-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.timer {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(245, 101, 101, 0.3);
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: #4a5568;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    transform: translateY(-1px);
}

.results-container {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    text-align: center;
    display: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.results-score {
    font-size: 56px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 25px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.results-message {
    font-size: 22px;
    color: #4a5568;
    margin-bottom: 25px;
    font-weight: 500;
}

.performance-breakdown {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
}

.performance-breakdown h3 {
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

.performance-breakdown p {
    margin: 10px 0;
    font-size: 16px;
}

.category-performance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.category-score {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-score h4 {
    margin: 0 0 8px 0;
    color: #4a5568;
    font-size: 14px;
}

.category-score .score {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.achievement-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #8b4513;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 5px;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.quiz-header h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: bold;
}

.quiz-header .subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.9;
}

.breadcrumb {
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-container {
        padding: 15px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .progress-bar {
        margin: 0;
        order: 2;
    }
    
    .timer, .score-display {
        order: 1;
    }
    
    .category-performance {
        grid-template-columns: 1fr;
    }
}
