/* Practice Quiz Styles */
:root {
    --primary-color: #1e73be;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-radius: 12px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Quiz Header */
.quiz-header {
    background: linear-gradient(135deg, var(--primary-color), #155a9e);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

/* Timer */
.timer-container {
    text-align: center;
}

.timer-display {
    font-size: 2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Progress Bar */
.progress-section .progress {
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-section .progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.3s ease;
}

/* Question Cards */
.question-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    overflow: hidden;
}

.question-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.question-card .card-header {
    background: var(--light-bg);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.question-card .card-body {
    padding: 2rem 1.5rem;
}

/* Question Text */
.question-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.question-text p {
    margin-bottom: 0.5rem;
}

/* Options Styling */
.options {
    margin-top: 1.5rem;
}

.option-item {
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.option-label {
    display: block;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.option-label:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
    transform: translateX(5px);
}

.option-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.option-label:hover::before {
    transform: scaleY(1);
}

/* Selected Option */
.option-item.selected .option-label {
    border-color: var(--success-color);
    background: #f0fff4;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.option-item.selected .option-label::before {
    background: var(--success-color);
    transform: scaleY(1);
}

.option-item.selected .option-indicator {
    background: var(--success-color) !important;
    color: white !important;
}

/* Option Indicator */
.option-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6c757d;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.option-letter {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Option Content */
.option-content {
    flex: 1;
    min-width: 0;
}

.option-content > div {
    word-wrap: break-word;
}

/* Images */
.question-images img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    max-height: 300px;
    width: 100%;
    object-fit: cover;
}

.question-images img:hover {
    transform: scale(1.02);
    cursor: pointer;
}

/* Status Icons */
.fas.fa-circle {
    font-size: 1.2rem;
}

.fas.fa-check-circle {
    font-size: 1.2rem;
    animation: checkPulse 0.5s ease;
}

@keyframes checkPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Submit Section */
.text-center.py-4 {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    border: none;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
}

/* Modal Styling */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

#modalImage {
    border-radius: var(--border-radius);
    max-height: 70vh;
    width: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-header {
        padding: 1.5rem;
        text-align: center;
    }
    
    .timer-display {
        font-size: 1.5rem;
    }
    
    .question-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .option-label {
        padding: 1rem;
    }
    
    .option-label:hover {
        transform: none;
    }
    
    .question-images img {
        max-height: 200px;
    }
}

@media (max-width: 576px) {
    .quiz-header {
        padding: 1rem;
    }
    
    .timer-display {
        font-size: 1.25rem;
    }
    
    .question-card .card-body {
        padding: 1rem;
    }
    
    .option-label {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Safari Compatibility */
@supports (-webkit-appearance: none) {
    .option-label {
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Hide radio buttons but keep them functional */
.form-check-input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

/* Ensure labels are clickable */
.option-label {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Focus States for Accessibility */
.option-label:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

input[type="radio"]:focus + .option-label {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.question-card:nth-child(1) { animation-delay: 0.1s; }
.question-card:nth-child(2) { animation-delay: 0.2s; }
.question-card:nth-child(3) { animation-delay: 0.3s; }