/* ===== Quiz Pages Common Styles - Enhanced Design ===== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
    color: #1e293b;
    min-height: 100vh;
}

/* Page wrapper */
.page-wrapper {
    padding-top: 100px;
    padding-bottom: 60px;
}

/* Typography */
.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a4b84;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1a4b84 0%, #0f3054 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

/* Cards - Enhanced with gradient shadows */
.card {
    border: 1px solid rgba(26, 75, 132, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    background: #ffffff;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: #1a4b84;
    border-radius: 16px 16px 0 0;
}

.card-body {
    padding: 1.75rem;
}

/* Buttons - Enhanced gradients */
.btn {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: none;
}

.btn-rounded {
    border-radius: 999px;
}

.btn-primary {
    background: linear-gradient(135deg, #1a4b84 0%, #0f3054 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 75, 132, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 75, 132, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline-primary {
    border: 2px solid #1a4b84;
    color: #1a4b84;
    background: white;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #1a4b84 0%, #0f3054 100%);
    border-color: #1a4b84;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border: 2px solid #e2e8f0;
    color: #64748b;
    background: white;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

/* Badges */
.step-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    color: #1a4b84;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border: 1px solid #1a4b84;
}

.badge-pill {
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Form controls */
.form-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.form-control:focus,
.form-select:focus {
    border-color: #1a4b84;
    box-shadow: 0 0 0 3px rgba(26, 75, 132, 0.1);
    background: white;
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

/* Helper text */
.helper-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* Alert */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* Quiz-specific components */
.quiz-set-card {
    border: 1px solid rgba(26, 75, 132, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    background: white;
    overflow: hidden;
}

.quiz-set-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: #1a4b84;
}

.quiz-set-card .card-body {
    padding: 1.75rem;
}

.quiz-set-card .card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a4b84;
    margin-bottom: 0.75rem;
}

.quiz-set-badge {
    font-size: 0.75rem;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
}

.quiz-set-meta {
    font-size: 0.85rem;
    color: #64748b;
    padding: 0.75rem 0;
    border-top: 1px solid #e2e8f0;
}

.quiz-set-meta i {
    color: #1a4b84;
}

/* Question card */
.question-card {
    border-left: 4px solid #1a4b84;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.question-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.question-index-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a4b84 0%, #0f3054 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26, 75, 132, 0.2);
}

.question-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0;
    color: #1e293b;
    line-height: 1.6;
}

/* Option items */
.option-item {
    padding: 1rem 1.25rem;
    margin: 0.65rem 0;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.option-item:hover {
    border-color: #1a4b84;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    transform: translateX(4px);
}

.option-item.correct {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #22c55e;
}

.option-key-pill {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    background-color: #fff;
    flex-shrink: 0;
}

.option-item.correct .option-key-pill {
    border-color: #22c55e;
    color: white;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Search input */
.quiz-search-input {
    border-radius: 999px;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    border: 2px solid #e2e8f0;
    font-size: 0.95rem;
    background: white;
    transition: all 0.2s;
}

.quiz-search-input:focus {
    border-color: #1a4b84;
    box-shadow: 0 0 0 3px rgba(26, 75, 132, 0.1);
}

.quiz-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.1rem;
}

/* Empty state */
.quiz-empty-state {
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    padding: 4rem 2rem;
    background: white;
    text-align: center;
}

.quiz-empty-state h5 {
    color: #1a4b84;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.quiz-empty-state p {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Info sidebar */
.info-sidebar {
    border-radius: 16px;
    background: linear-gradient(135deg, #1a4b84 0%, #0f3054 100%);
    color: #e5f0ff;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(26, 75, 132, 0.3);
    position: relative;
    overflow: hidden;
}

.info-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.info-sidebar h5 {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.info-sidebar p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.info-sidebar ul {
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.info-sidebar li + li {
    margin-top: 0.5rem;
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.pagination .page-item .page-link {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    transition: all 0.2s;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #1a4b84 0%, #0f3054 100%);
    border-color: #1a4b84;
    color: white;
}

.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-color: #1a4b84;
    color: #1a4b84;
}

.pagination .page-item.disabled .page-link {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 991px) {
    .page-title {
        font-size: 1.75rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .info-sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .page-wrapper {
        padding-top: 90px;
        padding-bottom: 40px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .card {
        border-radius: 12px;
    }

    .card-body {
        padding: 1.25rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.65rem 1.25rem;
        min-height: 44px;
    }

    .option-item {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }

    .option-key-pill {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .quiz-empty-state {
        padding: 3rem 1.5rem;
    }
    
    .quiz-set-card .card-body {
        padding: 1.25rem;
    }
    
    .quiz-set-card .card-title {
        font-size: 1rem;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.65rem 0.875rem;
    }
    
    .quiz-search-input {
        padding: 0.75rem 1rem 0.75rem 2.75rem;
    }
    
    .quiz-search-icon {
        left: 1rem;
    }
}

@media (max-width: 575px) {
    .page-wrapper {
        padding-top: 80px;
        padding-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 1.35rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .card {
        border-radius: 10px;
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }
    
    /* Full width buttons on mobile */
    .btn-mobile-full {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .step-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.85rem;
    }
    
    .option-item {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
        gap: 0.75rem;
    }
    
    .option-key-pill {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .question-index-badge {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .question-title {
        font-size: 0.95rem;
    }
    
    .quiz-empty-state {
        padding: 2rem 1rem;
    }
    
    .quiz-empty-state h5 {
        font-size: 1.1rem;
    }
    
    .quiz-empty-state p {
        font-size: 0.9rem;
    }
    
    .info-sidebar {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .info-sidebar h5 {
        font-size: 1rem;
    }
    
    .info-sidebar p,
    .info-sidebar ul {
        font-size: 0.875rem;
    }
    
    .pagination .page-item .page-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .alert {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }
}
