/* Main styles for Oposiciones Study Platform */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Question type colors */
    --question-generated-color: #0d6efd; /* Blue */
    --question-extracted-color: #fd7e14; /* Orange */
}

/* Base */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation */
.navbar {
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Cards */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

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

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background-color: rgba(0, 0, 0, 0.02);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px; /* Touch target minimum for mobile */
}

.btn:active {
    transform: scale(0.98);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    min-height: 48px;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    min-height: 36px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.625rem 0.75rem;
    min-height: 44px; /* Touch target minimum for mobile */
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
}

/* Status badges */
.badge {
    padding: 0.4em 0.7em;
    font-weight: 500;
    border-radius: 4px;
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* List groups */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem;
    transition: background-color 0.15s ease;
}

.list-group-item-action {
    cursor: pointer;
    min-height: 44px; /* Touch target for list items */
    display: flex;
    align-items: center;
}

.list-group-item-action:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.loading-inline {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 350px;
}

.toast {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.75rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.toast-body {
    padding: 0.75rem 1rem;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

/* Error States */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-card {
    text-align: center;
    padding: 3rem 2rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-description {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #997404;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #055160;
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.empty-state-description {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.no-decoration {
    text-decoration: none;
}

.no-decoration:hover {
    text-decoration: none;
}

/* === RESPONSIVE DESIGN === */

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }

    .card {
        margin-bottom: 1.5rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }
}

/* Desktop (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .container {
        max-width: 1140px;
    }
}

/* Tablet (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .toast-container {
        max-width: 300px;
    }
}

/* Mobile (<768px) */
@media (max-width: 767.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Stack columns on mobile */
    .row > .col-md-4,
    .row > .col-md-6,
    .row > .col-md-8 {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Cards on mobile */
    .card {
        margin-bottom: 1rem;
        border-radius: 6px;
    }

    .card-body {
        padding: 1rem;
    }

    /* Typography on mobile */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.125rem;
    }

    h5 {
        font-size: 1rem;
    }

    /* Buttons on mobile - full width for primary actions */
    .btn-block-mobile {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Forms on mobile */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent auto-zoom on iOS */
    }

    /* Navbar on mobile */
    .navbar-collapse {
        background: var(--primary-color);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
    }

    .navbar-collapse .nav-link {
        color: white !important;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        margin-bottom: 0.25rem;
    }

    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-link:active {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.25rem;
    }

    .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }

    /* Stats cards stack on mobile */
    .stats-row .col-md-4 {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    /* List groups on mobile */
    .list-group-item {
        padding: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .list-group-item .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Toast notifications on mobile */
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    /* Practice test interface on mobile */
    .progress-bar-container {
        position: sticky;
        top: 0;
        z-index: 100;
        background: white;
        padding: 0.75rem;
        box-shadow: var(--shadow-sm);
    }

    /* Question options on mobile - ensure large touch targets */
    .list-group-item-action {
        padding: 1rem;
        min-height: 48px;
    }

    .form-check-input {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Extra Small Mobile (<375px) */
@media (max-width: 374.98px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .card-body {
        padding: 0.75rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for touch devices */
    .btn,
    .list-group-item-action,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }

    .card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .toast-container {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
        page-break-inside: avoid;
    }

    body {
        background: white;
    }
}

/* Dark mode support (for future use) */
@media (prefers-color-scheme: dark) {
    /* This is a placeholder for future dark mode implementation */
    /* Currently not active as data-bs-theme="light" is set in base.html */
}

/* Delete button in dropdown menu */
.delete-form {
    margin: 0;
}

.delete-form button {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
}

.dropdown-item.text-danger:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Three-dot menu button styling */
.btn-link.text-muted {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-link.text-muted:hover {
    opacity: 1;
}

/* === QUESTION BANK STYLES === */

/* Question type colors added to main :root block above */

/* Question card type differentiation */
.question-card-generated {
    border-left: 4px solid var(--question-generated-color) !important;
}

.question-card-extracted {
    border-left: 4px solid var(--question-extracted-color) !important;
}

/* Question type badges */
.badge-question-generated {
    background-color: var(--question-generated-color);
    color: white;
}

.badge-question-extracted {
    background-color: var(--question-extracted-color);
    color: white;
}

/* Multi-select mode */
.question-card-checkbox {
    display: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.question-card-checkbox input[type="checkbox"] {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

/* Multi-select mode active */
.select-mode .question-card-checkbox {
    display: block;
}

.select-mode .question-card-generated .card-body {
    padding-left: 3.5rem; /* Make room for checkbox */
}

/* Lock icon for protected questions */
.question-card-lock {
    display: none;
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--secondary-color);
    opacity: 0.7;
    z-index: 10;
}

.select-mode .question-card-lock {
    display: block;
}

.select-mode .question-card-extracted .card-body {
    padding-left: 3.5rem; /* Make room for lock icon */
}

/* Floating action bar */
.floating-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.floating-action-bar.show {
    transform: translateY(0);
}

.floating-action-bar .action-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.floating-action-bar .selected-count {
    font-weight: 600;
    color: var(--dark-color);
    flex: 1;
    min-width: 150px;
}

.floating-action-bar .action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.floating-action-bar .btn {
    min-width: 120px;
}

/* Question bank mobile styles */
@media (max-width: 767.98px) {
    /* Stats cards - 2x2 grid on mobile */
    .question-bank-stats .col-6 {
        margin-bottom: 0.75rem;
    }

    .question-bank-stats .card-body {
        padding: 0.75rem;
    }

    .question-bank-stats h3 {
        font-size: 1.5rem;
    }

    .question-bank-stats .card-text {
        font-size: 0.875rem;
    }

    /* Filter form - collapsible on mobile */
    .filter-toggle-btn {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Question cards - full width on mobile */
    .question-card {
        margin-bottom: 1rem;
    }

    .question-card .card-body {
        padding: 0.875rem;
    }

    .question-card .card-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .question-card .btn {
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Pagination - larger touch targets */
    .pagination .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pagination .page-item {
        margin: 0 2px;
    }

    /* Multi-select on mobile */
    .question-card-checkbox {
        width: 1.75rem;
        height: 1.75rem;
    }

    .question-card-checkbox input[type="checkbox"] {
        width: 1.75rem;
        height: 1.75rem;
    }

    /* Floating action bar on mobile */
    .floating-action-bar {
        padding: 0.75rem;
    }

    .floating-action-bar .action-bar-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .floating-action-bar .selected-count {
        text-align: center;
        min-width: 100%;
    }

    .floating-action-bar .action-buttons {
        width: 100%;
        flex-direction: column;
    }

    .floating-action-bar .btn {
        width: 100%;
        min-width: 100%;
    }
}

/* === REVIEW PAGE STYLES === */

/* Score Ring */
.review-score-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.review-score-ring {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.review-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.review-score-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.review-score-percent {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.7;
}

.review-score-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.review-score-circle-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 8;
}

.review-score-circle-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292; /* 2 * PI * 54 */
    stroke-dashoffset: calc(339.292 * (1 - var(--score) / 100));
    transition: stroke-dashoffset 1s ease-in-out;
}

/* Score colors */
.review-score-excellent .review-score-number {
    color: #198754;
}

.review-score-excellent .review-score-circle-progress {
    stroke: #198754;
}

.review-score-good .review-score-number {
    color: #0d6efd;
}

.review-score-good .review-score-circle-progress {
    stroke: #0d6efd;
}

.review-score-fair .review-score-number {
    color: #ffc107;
}

.review-score-fair .review-score-circle-progress {
    stroke: #ffc107;
}

.review-score-poor .review-score-number {
    color: #dc3545;
}

.review-score-poor .review-score-circle-progress {
    stroke: #dc3545;
}

/* Stat Cards */
.review-stat-card {
    border: none;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-stat-card .card-body {
    padding: 1.25rem;
}

.review-stat-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-stat-success .review-stat-icon {
    color: #198754;
}

.review-stat-danger .review-stat-icon {
    color: #dc3545;
}

.review-stat-info .review-stat-icon {
    color: #0d6efd;
}

.review-stat-warning .review-stat-icon {
    color: #ffc107;
}

.review-stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.review-stat-card .small {
    font-size: 0.875rem;
}

/* Answer List */
.review-answer-item {
    padding: 1rem 1.25rem;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.review-answer-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-left-color: #0d6efd;
}

.review-answer-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.review-answer-correct {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.review-answer-incorrect {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Progress Badge */
.review-progress-badge {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

/* Question Card */
.review-question-card {
    border: 2px solid rgba(0, 0, 0, 0.08);
}

.review-question-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
}

.review-question-text {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #212529;
}

/* Options */
.review-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-option {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.review-option-correct {
    border-color: #198754;
    background-color: rgba(25, 135, 84, 0.05);
}

.review-option-incorrect {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.review-option-letter {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 1rem;
    flex-shrink: 0;
    background-color: #e9ecef;
    color: #495057;
}

.review-option-correct .review-option-letter {
    background-color: #198754;
    color: white;
}

.review-option-incorrect .review-option-letter {
    background-color: #dc3545;
    color: white;
}

.review-option-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.review-option-indicator {
    margin-left: 1rem;
    font-size: 1.5rem;
}

/* Explanation Section */
.review-explanation-card {
    border-left: 4px solid #0d6efd;
}

.review-explanation-section,
.review-reference-section {
    margin: 0;
}

.review-explanation-title,
.review-reference-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #212529;
}

.review-explanation-text,
.review-reference-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 0;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    .review-score-ring {
        width: 140px;
        height: 140px;
    }

    .review-score-number {
        font-size: 2.5rem;
    }

    .review-score-percent {
        font-size: 1.25rem;
    }

    .review-stat-card h3 {
        font-size: 1.5rem;
    }

    .review-stat-icon {
        font-size: 2rem;
        margin-right: 0.75rem;
    }

    .review-answer-item {
        padding: 0.875rem 1rem;
    }

    .review-answer-number {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .review-progress-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.875rem;
    }

    .review-question-text {
        font-size: 1rem;
    }

    .review-option {
        padding: 0.875rem 1rem;
    }

    .review-option-letter {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
        margin-right: 0.75rem;
    }

    .review-option-text {
        font-size: 0.9375rem;
    }

    .review-option-indicator {
        font-size: 1.25rem;
        margin-left: 0.5rem;
    }
}

/* === REVIEW ALL PAGE STYLES === */

/* Sticky Header */
.review-all-header {
    background: white;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    z-index: 100;
}

.review-all-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-all-score-label {
    font-size: 0.875rem;
    color: #6c757d;
}

.review-all-score-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Filters */
.review-all-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.review-filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-filter-btn:hover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.review-filter-btn.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Quick Jump Grid */
.review-quick-jump {
    margin-top: 1rem;
}

.review-quick-jump-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.review-quick-jump-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-quick-jump-pill {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.review-quick-jump-pill.correct {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 2px solid rgba(25, 135, 84, 0.3);
}

.review-quick-jump-pill.incorrect {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 2px solid rgba(220, 53, 69, 0.3);
}

.review-quick-jump-pill:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Question Cards */
.review-all-question-card {
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.review-all-question-card.question-correct {
    border-left: 4px solid #198754;
}

.review-all-question-card.question-incorrect {
    border-left: 4px solid #dc3545;
}

.review-all-question-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    cursor: pointer;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.review-all-question-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.review-all-question-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.review-collapse-icon {
    transition: transform 0.3s ease;
    font-size: 1.25rem;
}

.review-all-question-text {
    font-size: 1.0625rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #212529;
}

/* Options */
.review-all-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.review-all-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
}

.review-all-option-correct {
    border-color: #198754;
    background-color: rgba(25, 135, 84, 0.05);
}

.review-all-option-incorrect {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.review-all-option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 700;
    font-size: 0.875rem;
    margin-right: 0.875rem;
    flex-shrink: 0;
}

.review-all-option-correct .review-all-option-letter {
    background-color: #198754;
    color: white;
}

.review-all-option-incorrect .review-all-option-letter {
    background-color: #dc3545;
    color: white;
}

.review-all-option-text {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Meta Section */
.review-all-meta {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.review-all-explanation,
.review-all-reference {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.review-all-explanation h6,
.review-all-reference h6 {
    margin-bottom: 0.5rem;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    .review-all-header {
        padding: 0.75rem 0;
    }

    .review-all-score-label {
        font-size: 0.75rem;
    }

    .review-all-score-value {
        font-size: 1.25rem;
    }

    .review-filter-btn {
        padding: 0.375rem 0.875rem;
        font-size: 0.8125rem;
    }

    .review-quick-jump-pill {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .review-all-question-number {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }

    .review-all-question-header h6 {
        font-size: 0.9375rem;
    }

    .review-all-question-text {
        font-size: 1rem;
    }

    .review-all-option {
        padding: 0.625rem 0.875rem;
    }

    .review-all-option-letter {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        margin-right: 0.625rem;
    }

    .review-all-option-text {
        font-size: 0.875rem;
    }

    .review-all-explanation,
    .review-all-reference {
        font-size: 0.875rem;
    }
}

/* === FEEDBACK SUCCESS PAGE STYLES === */

.feedback-success-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-success-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.feedback-success-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
    animation: feedbackSuccessPulse 1.5s ease-in-out;
}

@keyframes feedbackSuccessPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.feedback-success-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
}

.feedback-success-text {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #6c757d;
}

.feedback-details-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    text-align: left;
    margin-bottom: 1rem;
}

.feedback-details-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 0.875rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.feedback-details-body {
    padding: 1.25rem;
}

.feedback-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.feedback-detail-row:last-child {
    border-bottom: none;
}

.feedback-detail-label {
    font-weight: 600;
    color: #495057;
    margin-right: 1rem;
    min-width: 140px;
}

.feedback-detail-value {
    flex: 1;
    color: #212529;
    text-align: right;
}

.feedback-info-note {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    .feedback-success-circle {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .feedback-success-title {
        font-size: 1.5rem;
    }

    .feedback-success-text {
        font-size: 1rem;
    }

    .feedback-details-header {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

    .feedback-details-body {
        padding: 1rem;
    }

    .feedback-detail-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.625rem 0;
    }

    .feedback-detail-label {
        margin-bottom: 0.25rem;
        min-width: auto;
    }

    .feedback-detail-value {
        text-align: left;
    }
}
