/* ================================================================
   RESULTS PAGE - WORLD-CLASS MODERN DESIGN
   A completely reimagined results experience with:
   - Cohesive visual hierarchy
   - Advanced data visualization
   - Smooth micro-interactions
   - Progressive disclosure
   - Delightful animations
   ================================================================ */

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
    --result-success: #10b981;
    --result-success-dark: #059669;
    --result-success-light: #d1fae5;
    --result-danger: #ef4444;
    --result-danger-dark: #dc2626;
    --result-danger-light: #fee2e2;
    --result-primary: #6366f1;
    --result-primary-dark: #4f46e5;
    --result-warning: #f59e0b;
    --result-warning-dark: #d97706;
}

/* ================================================================
   PAGE CONTAINER
   ================================================================ */
.results-page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ================================================================
   LOADING STATE
   ================================================================ */
.loading-state {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--result-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px;
}

.empty-icon-wrapper {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    color: white;
    margin-bottom: 32px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.empty-description {
    font-size: 18px;
    color: #6b7280;
    max-width: 500px;
    margin-bottom: 32px;
}

/* ================================================================
   MODERN HERO SECTION
   ================================================================ */
.results-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 48px;
}

.results-hero.hero-success {
    background: linear-gradient(135deg, var(--result-success) 0%, var(--result-success-dark) 100%);
}

.results-hero.hero-fail {
    background: linear-gradient(135deg, var(--result-danger) 0%, var(--result-danger-dark) 100%);
}

/* Animated Background Pattern */
.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.1) 35px, rgba(255,255,255,.1) 70px);
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(70px) translateY(70px);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 48px 24px;
    max-width: 800px;
    margin: 0 auto;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 32px;
    animation: badgeSlideDown 0.6s ease-out;
}

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

.status-badge.badge-success {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.status-badge.badge-fail {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

/* Score Circle */
.score-circle-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 32px;
    animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 12;
}

.circle-progress {
    fill: none;
    stroke: white;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 534.07; /* 2 * π * 85 */
    stroke-dashoffset: 534.07;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.3));
}

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

.score-value {
    font-size: 64px;
    font-weight: 700;
    color: white;
    line-height: 1;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.score-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 2px;
    margin-top: 4px;
}

/* Hero Text */
.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quick Stats Row */
.hero-quick-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.quick-stat i {
    font-size: 20px;
}

/* Confetti Canvas */
.confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ================================================================
   MAIN CONTENT GRID (Two Column Layout)
   ================================================================ */
.results-content-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 48px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
}

/* ================================================================
   LEFT COLUMN: Stats & Performance
   ================================================================ */
.content-column-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
}

.section-title i {
    font-size: 28px;
    color: var(--result-primary);
}

/* ================================================================
   STATISTICS CARDS GRID
   ================================================================ */
.stats-section {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    opacity: 0;
    transform: translateY(20px);
    animation: statSlideIn 0.5s ease-out forwards;
}

.stat-card[data-index="0"] { animation-delay: 0.1s; }
.stat-card[data-index="1"] { animation-delay: 0.2s; }
.stat-card[data-index="2"] { animation-delay: 0.3s; }
.stat-card[data-index="3"] { animation-delay: 0.4s; }

@keyframes statSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card-inner {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.stat-card-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--result-primary);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.stat-icon-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.stat-icon-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-icon-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-icon-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-value-success {
    color: var(--result-success);
}

.stat-value-danger {
    color: var(--result-danger);
}

.stat-value-warning {
    color: var(--result-warning);
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================================================
   PERFORMANCE SECTION
   ================================================================ */
.performance-section {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.performance-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.performance-item {
    opacity: 0;
    animation: fadeInLeft 0.6s ease-out forwards;
}

.performance-item:nth-child(1) { animation-delay: 0.2s; }
.performance-item:nth-child(2) { animation-delay: 0.3s; }
.performance-item:nth-child(3) { animation-delay: 0.4s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.performance-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.performance-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.performance-icon-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.performance-icon-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.performance-icon-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.performance-info {
    flex: 1;
}

.performance-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}

.performance-value {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

/* Progress Bar */
.progress-bar-modern {
    height: 10px;
    background: #f3f4f6;
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 50px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.progress-fill-success {
    background: linear-gradient(90deg, var(--result-success) 0%, var(--result-success-dark) 100%);
}

.progress-fill-danger {
    background: linear-gradient(90deg, var(--result-danger) 0%, var(--result-danger-dark) 100%);
}

.progress-fill-primary {
    background: linear-gradient(90deg, var(--result-primary) 0%, var(--result-primary-dark) 100%);
}

/* ================================================================
   ACTIONS CARD
   ================================================================ */
.actions-card {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 24px;
    padding: 32px;
    color: white;
}

.actions-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn i {
    font-size: 32px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* ================================================================
   RIGHT COLUMN: History Timeline
   ================================================================ */
.content-column-right {
    display: flex;
    flex-direction: column;
}

.history-section {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: fit-content;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.history-count {
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

/* Timeline */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 8px;
}

.history-timeline::-webkit-scrollbar {
    width: 6px;
}

.history-timeline::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.history-timeline::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.history-timeline::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.timeline-item {
    position: relative;
    padding-left: 32px;
    opacity: 0;
    animation: timelineSlideIn 0.5s ease-out forwards;
}

.timeline-item[data-index="0"] { animation-delay: 0.1s; }
.timeline-item[data-index="1"] { animation-delay: 0.15s; }
.timeline-item[data-index="2"] { animation-delay: 0.2s; }
.timeline-item[data-index="3"] { animation-delay: 0.25s; }
.timeline-item[data-index="4"] { animation-delay: 0.3s; }

@keyframes timelineSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Timeline connecting line */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 48px;
    bottom: -20px;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item:last-child::before {
    display: none;
}

/* Timeline Dot */
.timeline-dot {
    position: absolute;
    left: 0;
    top: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    z-index: 1;
}

.timeline-item.timeline-success .timeline-dot {
    background: linear-gradient(135deg, var(--result-success) 0%, var(--result-success-dark) 100%);
    box-shadow: 0 0 0 4px var(--result-success-light);
}

.timeline-item.timeline-danger .timeline-dot {
    background: linear-gradient(135deg, var(--result-danger) 0%, var(--result-danger-dark) 100%);
    box-shadow: 0 0 0 4px var(--result-danger-light);
}

/* Timeline Card */
.timeline-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.timeline-card:hover {
    background: white;
    border-color: var(--result-primary);
    transform: translateX(4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.timeline-score {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.score-success {
    background: linear-gradient(135deg, var(--result-success) 0%, var(--result-success-dark) 100%);
}

.score-danger {
    background: linear-gradient(135deg, var(--result-danger) 0%, var(--result-danger-dark) 100%);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.timeline-exam-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.timeline-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.timeline-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.timeline-view-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-view-btn:hover {
    border-color: var(--result-primary);
    color: var(--result-primary);
    background: #f9fafb;
}

/* ================================================================
   DETAIL VIEW (Single Attempt Review)
   ================================================================ */
.detail-view-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: #111827;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 32px;
}

.btn-back:hover {
    border-color: var(--result-primary);
    background: #f9fafb;
}

.detail-hero {
    text-align: center;
    padding: 64px 32px;
    border-radius: 24px;
    margin-bottom: 32px;
}

.detail-hero-success {
    background: linear-gradient(135deg, var(--result-success) 0%, var(--result-success-dark) 100%);
    color: white;
}

.detail-hero-fail {
    background: linear-gradient(135deg, var(--result-danger) 0%, var(--result-danger-dark) 100%);
    color: white;
}

.detail-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: scaleIn 0.6s ease-out;
}

.detail-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.detail-hero p {
    font-size: 24px;
    opacity: 0.9;
}

.detail-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.detail-stat {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.detail-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.detail-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
}

/* Questions Review */
.questions-review-section {
    margin-bottom: 32px;
}

.question-review-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #e5e7eb;
}

.question-review-card.question-correct {
    border-left-color: var(--result-success);
}

.question-review-card.question-incorrect {
    border-left-color: var(--result-danger);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.question-number {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
}

.question-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.question-correct .question-status {
    background: var(--result-success-light);
    color: var(--result-success-dark);
}

.question-incorrect .question-status {
    background: var(--result-danger-light);
    color: var(--result-danger-dark);
}

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

.answer-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-block {
    padding: 16px;
    border-radius: 12px;
    border: 2px solid;
}

.answer-incorrect-block {
    background: var(--result-danger-light);
    border-color: var(--result-danger);
}

.answer-correct-block {
    background: var(--result-success-light);
    border-color: var(--result-success);
}

.answer-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.answer-incorrect-block .answer-label {
    color: var(--result-danger-dark);
}

.answer-correct-block .answer-label {
    color: var(--result-success-dark);
}

.answer-text {
    font-size: 16px;
    color: #111827;
    font-weight: 500;
}

/* Detail Actions */
.detail-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ================================================================
   MODERN BUTTONS
   ================================================================ */
.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.4);
}

.btn-secondary-modern {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: white;
    color: #111827;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary-modern:hover {
    border-color: var(--result-primary);
    background: #f9fafb;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 1024px) {
    .results-content-grid {
        grid-template-columns: 1fr;
    }

    .content-column-right {
        order: -1;
    }

    .history-section {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .results-hero {
        min-height: 400px;
    }

    .hero-content {
        padding: 32px 16px;
    }

    .score-circle-wrapper {
        width: 180px;
        height: 180px;
    }

    .score-value {
        font-size: 52px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-quick-stats {
        flex-direction: column;
        gap: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero h1 {
        font-size: 32px;
    }

    .detail-hero p {
        font-size: 18px;
    }

    .detail-stats-row {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .results-content-grid {
        padding: 0 16px 32px;
    }

    .stats-section,
    .performance-section,
    .actions-card,
    .history-section {
        padding: 24px 20px;
    }

    .section-title {
        font-size: 20px;
    }

    .stat-value {
        font-size: 28px;
    }
}

/* ============================================================
   DETAILED ANSWER REVIEW SECTION
   ============================================================ */

.questions-review-section {
    margin-top: 32px;
}

.question-review-card-detailed {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border-left: 4px solid var(--result-success);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.question-review-card-detailed.card-incorrect {
    border-left-color: var(--result-danger);
}

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

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.review-number {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
}

.review-status.status-correct {
    background: #d1fae5;
    color: var(--result-success-dark);
}

.review-status.status-incorrect {
    background: #fee2e2;
    color: var(--result-danger-dark);
}

.review-question-text {
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.review-question-text strong {
    color: #475569;
    margin-right: 8px;
}

.review-figure {
    margin: 16px 0;
    text-align: center;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
}

.question-figure-img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-answer-section {
    margin: 16px 0;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
}

.review-answer-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.review-answer-label.correct-label {
    color: var(--result-success-dark);
}

.review-answer-content {
    font-size: 15px;
    line-height: 1.6;
    padding: 10px 14px;
    border-radius: 8px;
    background: white;
}

.review-answer-content.user-answer {
    border-left: 3px solid #3b82f6;
    color: #1e40af;
}

.review-answer-content.correct-answer {
    border-left: 3px solid var(--result-success);
    color: var(--result-success-dark);
    font-weight: 500;
}

.review-explanation {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}

.explanation-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.explanation-text {
    font-size: 14px;
    line-height: 1.7;
    color: #78350f;
}

/* Responsive Design for Review Cards */
@media (max-width: 768px) {
    .question-review-card-detailed {
        padding: 20px;
    }

    .review-question-text {
        font-size: 15px;
    }

    .question-figure-img {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .question-review-card-detailed {
        padding: 16px;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .review-status {
        width: 100%;
        justify-content: center;
    }
}
