/**
 * Interactive Question Types CSS
 * Styles for drag-and-drop question types
 * Location: /components/quiz/player/player-interactive.css
 */

/* ═══════════════════════════════════════════════════════════════
   MULTIPLE SELECT - Checkboxes
   ═══════════════════════════════════════════════════════════════ */

.multiple-select-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.multiple-select-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.multiple-select-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(4px);
}

.multiple-select-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.multiple-select-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════
   FILL BLANKS - Drag words into blanks
   ═══════════════════════════════════════════════════════════════ */

.fill-blanks-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%; /* Use full width */
    max-width: none; /* Override any max-width constraints */
}

/* Override grid layout for fill blanks */
.question-options:has(.fill-blanks-container) {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    max-width: none !important;
}

.sentence-with-blanks {
    font-size: clamp(15px, 2.8vw, 20px); /* Responsive: 15px to 20px */
    line-height: 1.6; /* Reduced from 2 for better inline layout */
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    white-space: normal; /* Allow normal wrapping */
}

.blank-space {
    display: inline-block !important; /* Force inline-block */
    min-width: 80px; /* Reduced from 120px */
    max-width: 150px; /* Added max-width */
    min-height: 30px; /* Reduced from 36px */
    padding: 4px 10px; /* Reduced padding */
    margin: 0 4px;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    background: white;
    vertical-align: middle;
    transition: all 0.2s;
    line-height: 1.4; /* Added explicit line-height */
}

.blank-space.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
    border-style: solid;
}

.blank-space.filled {
    border-color: #10b981;
    border-style: solid;
}

/* Draggable word when inside a blank space */
.blank-space .draggable-word {
    display: inline-block;
    margin: 0;
    padding: 4px 8px;
    min-width: auto;
    font-size: clamp(14px, 2.5vw, 18px); /* Responsive: 14px to 18px */
    line-height: 1.2;
}

.word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    margin-bottom: 24px; /* Space between word bank and sentence */
    justify-content: center; /* Center the words */
}

.draggable-word {
    padding: 8px 16px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: grab;
    font-size: clamp(14px, 2.5vw, 18px); /* Responsive: 14px to 18px */
    font-weight: 500;
    transition: all 0.2s;
    user-select: none;
}

.draggable-word:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.draggable-word.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* ═══════════════════════════════════════════════════════════════
   UNSCRAMBLE TEXT - Reorder letters/words
   ═══════════════════════════════════════════════════════════════ */

.unscramble-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%; /* Use full width */
    max-width: none; /* Override any max-width constraints */
}

/* Override grid layout for unscramble */
.question-options:has(.unscramble-container) {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    max-width: none !important;
}

/* Override grid layout for ordering, classification, sorting */
.question-options:has(.ordering-container),
.question-options:has(.classification-container),
.question-options:has(.sorting-container) {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    max-width: none !important;
}

/* Ensure containers use full width */
.ordering-container,
.classification-container,
.sorting-container {
    width: 100%;
    max-width: none;
}

.drop-zones-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    min-height: 80px;
}

.drop-zone {
    min-width: 50px;
    min-height: 50px;
    padding: 12px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.05);
}

.draggable-unit {
    padding: 12px 16px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: grab;
    font-weight: 600;
    font-size: clamp(15px, 3vw, 22px); /* Responsive: 15px to 22px */
    user-select: none;
    transition: all 0.2s;
}

.draggable-unit:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.draggable-unit.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* ═══════════════════════════════════════════════════════════════
   ORDERING - Arrange items in sequence
   ═══════════════════════════════════════════════════════════════ */

.ordering-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ordering-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: grab;
    font-size: clamp(14px, 2.5vw, 18px); /* Responsive: 14px to 18px */
    transition: all 0.2s;
    user-select: none;
}

.ordering-item::before {
    content: '⋮⋮';
    margin-right: 12px;
    color: #9ca3af;
    font-size: clamp(16px, 3vw, 24px); /* Responsive: 16px to 24px */
    line-height: 1;
}

.ordering-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(4px);
}

.ordering-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.ordering-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(28px, 5vw, 36px); /* Responsive width */
    height: clamp(28px, 5vw, 36px); /* Responsive height */
    margin-right: 12px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: clamp(12px, 2.2vw, 16px); /* Responsive: 12px to 16px */
}

/* ═══════════════════════════════════════════════════════════════
   CLASSIFICATION - Group items into categories
   ═══════════════════════════════════════════════════════════════ */

.classification-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;  /* Center everything */
    opacity: 1 !important;
    visibility: visible !important;
}

.classification-items-pool {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;  /* Center items */
    gap: 12px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    min-height: 80px;
    width: 100%;  /* Full width */
    max-width: 800px;  /* But not too wide */
    opacity: 1 !important;
    visibility: visible !important;
}

.classification-item {
    padding: 10px 16px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: grab;
    font-size: clamp(13px, 2.3vw, 17px); /* Responsive: 13px to 17px */
    font-weight: 500;
    transition: all 0.2s;
    user-select: none;
}

.classification-item:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.classification-item.dragging {
    opacity: 0.5;
}

/* ========================================
   INTERACTIVE QUESTIONS RANDOM COLORS
   ======================================== */

/* ═══════════════════════════════════════
   FILL BLANKS COLORS (.draggable-word)
   ═══════════════════════════════════════ */

.draggable-word.fb-color-a {
    background: #1E88E5 !important;
    border-color: #1E88E5 !important;
    color: white !important;
}

.draggable-word.fb-color-a:hover {
    background: #1976D2 !important;
    border-color: #1976D2 !important;
}

.draggable-word.fb-color-b {
    background: #FB8C00 !important;
    border-color: #FB8C00 !important;
    color: white !important;
}

.draggable-word.fb-color-b:hover {
    background: #F57C00 !important;
    border-color: #F57C00 !important;
}

.draggable-word.fb-color-c {
    background: #43A047 !important;
    border-color: #43A047 !important;
    color: white !important;
}

.draggable-word.fb-color-c:hover {
    background: #388E3C !important;
    border-color: #388E3C !important;
}

.draggable-word.fb-color-d {
    background: #8E24AA !important;
    border-color: #8E24AA !important;
    color: white !important;
}

.draggable-word.fb-color-d:hover {
    background: #7B1FA2 !important;
    border-color: #7B1FA2 !important;
}

.draggable-word.fb-color-e {
    background: #00ACC1 !important;
    border-color: #00ACC1 !important;
    color: white !important;
}

.draggable-word.fb-color-e:hover {
    background: #0097A7 !important;
    border-color: #0097A7 !important;
}

.draggable-word.fb-color-f {
    background: #D81B60 !important;
    border-color: #D81B60 !important;
    color: white !important;
}

.draggable-word.fb-color-f:hover {
    background: #C2185B !important;
    border-color: #C2185B !important;
}

/* ═══════════════════════════════════════
   UNSCRAMBLE COLORS (.draggable-unit)
   ═══════════════════════════════════════ */

.draggable-unit.us-color-a {
    background: #1E88E5 !important;
    border-color: #1E88E5 !important;
    color: white !important;
}

.draggable-unit.us-color-a:hover {
    background: #1976D2 !important;
    border-color: #1976D2 !important;
}

.draggable-unit.us-color-b {
    background: #FB8C00 !important;
    border-color: #FB8C00 !important;
    color: white !important;
}

.draggable-unit.us-color-b:hover {
    background: #F57C00 !important;
    border-color: #F57C00 !important;
}

.draggable-unit.us-color-c {
    background: #43A047 !important;
    border-color: #43A047 !important;
    color: white !important;
}

.draggable-unit.us-color-c:hover {
    background: #388E3C !important;
    border-color: #388E3C !important;
}

.draggable-unit.us-color-d {
    background: #8E24AA !important;
    border-color: #8E24AA !important;
    color: white !important;
}

.draggable-unit.us-color-d:hover {
    background: #7B1FA2 !important;
    border-color: #7B1FA2 !important;
}

.draggable-unit.us-color-e {
    background: #00ACC1 !important;
    border-color: #00ACC1 !important;
    color: white !important;
}

.draggable-unit.us-color-e:hover {
    background: #0097A7 !important;
    border-color: #0097A7 !important;
}

.draggable-unit.us-color-f {
    background: #D81B60 !important;
    border-color: #D81B60 !important;
    color: white !important;
}

.draggable-unit.us-color-f:hover {
    background: #C2185B !important;
    border-color: #C2185B !important;
}

/* ═══════════════════════════════════════
   ORDERING COLORS (.ordering-item)
   ═══════════════════════════════════════ */

/* Color Option A - Blue (Left Border) */
.ordering-item.or-color-a {
    border-left: 5px solid #1E88E5 !important;
    background: white !important;
}

.ordering-item.or-color-a:hover {
    border-left-color: #1976D2 !important;
    background: #f8f9ff !important;
}

/* Color Option B - Orange (Left Border) */
.ordering-item.or-color-b {
    border-left: 5px solid #FB8C00 !important;
    background: white !important;
}

.ordering-item.or-color-b:hover {
    border-left-color: #F57C00 !important;
    background: #fff8f0 !important;
}

/* Color Option C - Green (Left Border) */
.ordering-item.or-color-c {
    border-left: 5px solid #43A047 !important;
    background: white !important;
}

.ordering-item.or-color-c:hover {
    border-left-color: #388E3C !important;
    background: #f0f8f1 !important;
}

/* Color Option D - Purple (Left Border) */
.ordering-item.or-color-d {
    border-left: 5px solid #8E24AA !important;
    background: white !important;
}

.ordering-item.or-color-d:hover {
    border-left-color: #7B1FA2 !important;
    background: #f8f0fb !important;
}

/* Color Option E - Teal (Left Border) */
.ordering-item.or-color-e {
    border-left: 5px solid #00ACC1 !important;
    background: white !important;
}

.ordering-item.or-color-e:hover {
    border-left-color: #0097A7 !important;
    background: #f0f9fb !important;
}

/* Color Option F - Pink (Left Border) */
.ordering-item.or-color-f {
    border-left: 5px solid #D81B60 !important;
    background: white !important;
}

.ordering-item.or-color-f:hover {
    border-left-color: #C2185B !important;
    background: #fbf0f4 !important;
}

/* ═══════════════════════════════════════
   CLASSIFICATION COLORS (.classification-item)
   ═══════════════════════════════════════ */

.classification-item.cl-color-a {
    background: #1E88E5 !important;
    border-color: #1E88E5 !important;
    color: white !important;
}

.classification-item.cl-color-a:hover {
    background: #1976D2 !important;
    border-color: #1976D2 !important;
}

.classification-item.cl-color-b {
    background: #FB8C00 !important;
    border-color: #FB8C00 !important;
    color: white !important;
}

.classification-item.cl-color-b:hover {
    background: #F57C00 !important;
    border-color: #F57C00 !important;
}

.classification-item.cl-color-c {
    background: #43A047 !important;
    border-color: #43A047 !important;
    color: white !important;
}

.classification-item.cl-color-c:hover {
    background: #388E3C !important;
    border-color: #388E3C !important;
}

.classification-item.cl-color-d {
    background: #8E24AA !important;
    border-color: #8E24AA !important;
    color: white !important;
}

.classification-item.cl-color-d:hover {
    background: #7B1FA2 !important;
    border-color: #7B1FA2 !important;
}

.classification-item.cl-color-e {
    background: #00ACC1 !important;
    border-color: #00ACC1 !important;
    color: white !important;
}

.classification-item.cl-color-e:hover {
    background: #0097A7 !important;
    border-color: #0097A7 !important;
}

.classification-item.cl-color-f {
    background: #D81B60 !important;
    border-color: #D81B60 !important;
    color: white !important;
}

.classification-item.cl-color-f:hover {
    background: #C2185B !important;
    border-color: #C2185B !important;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 800px;
    opacity: 1 !important;  /* Force visible */
    visibility: visible !important;  /* Force visible */
}

.category-zone {
    display: flex;
    flex-direction: column;
    padding: 0;  /* Remove padding - let header and items handle it */
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    opacity: 1 !important;  /* Force visible */
    visibility: visible !important;  /* Force visible */
    overflow: hidden;
    align-items: stretch;  /* Stretch children to full width */
}

.category-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

.category-header {
    font-weight: 700;
    font-size: clamp(15px, 2.8vw, 20px); /* Responsive: 15px to 20px */
    color: white;  /* White text */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);  /* Purple gradient */
    padding: 12px 16px;  /* Padding inside header */
    margin: 0;  /* No margin */
    border-bottom: none;  /* No border - gradient provides separation */
    text-align: center;  /* Center text */
    flex-shrink: 0;  /* Don't shrink */
    order: -1;  /* Always first */
}

.category-items {
    display: flex;
    flex-direction: row;  /* Horizontal layout */
    flex-wrap: wrap;  /* Wrap to multiple rows */
    gap: 8px;
    min-height: 80px;  /* Minimum height for drop zone */
    padding: 16px;  /* Padding around items */
    background: #fafbfc;  /* Slight background */
    align-items: flex-start;  /* Align items to top */
    align-content: flex-start;  /* Align rows to top */
}

.category-items:empty::before {
    content: 'Drop items here';
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    display: block;
    padding: 20px;
    width: 100%;  /* Full width */
}

.category-items .classification-item {
    cursor: grab;
    margin: 0;  /* No margin between items */
    flex-shrink: 0;  /* Don't shrink items */
}

/* ═══════════════════════════════════════════════════════════════
   SORTING - Rank items in order
   ═══════════════════════════════════════════════════════════════ */

.sorting-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sorting-item {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
    margin-bottom: 6px;  /* Minimal spacing */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Position number - MUST be visible */
.position-number {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 60px;  /* Smaller width */
    background: #f3f4f6;
    color: #1f2937;
    font-size: 32px;  /* Smaller font */
    font-weight: 700;
    border-left: 4px solid #10b981;  /* Thinner border */
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Drag handle - hide completely */
.drag-handle {
    display: none !important;
}

/* Item text - compact */
.item-text {
    flex: 1;
    padding: 12px 20px;  /* Much smaller padding */
    display: flex;
    align-items: center;
    font-size: 16px;  /* Smaller text */
    color: #1f2937;
    border: 2px solid #e5e7eb;
    border-left: none;
    background: white;
}

.sorting-item::before {
    display: none !important;
}

.sorting-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(4px);
}

.sorting-item.dragging {
    opacity: 0.5;
}

.sorting-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .word-bank, 
    .classification-items-pool {
        gap: 8px;
        padding: 16px;
    }
    
    .draggable-word,
    .classification-item {
        /* font-size now handled by clamp() */
        padding: 8px 12px;
    }
    
    .ordering-item,
    .sorting-item {
        padding: 12px 16px;
    }
    
    .sentence-with-blanks {
        /* font-size now handled by clamp() */
    }
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════ */

.draggable:focus,
.draggable-word:focus,
.draggable-unit:focus,
.ordering-item:focus,
.classification-item:focus,
.sorting-item:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .draggable-word,
    .draggable-unit,
    .ordering-item,
    .classification-item,
    .sorting-item,
    .drop-zone {
        transition: none !important;
    }
}

/* CRITICAL FIX - Override animation CSS that hides sorting items */
.sorting-item,
.sorting-item .position-number,
.sorting-item .drag-handle,
.sorting-item .item-text {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================
   ORDERING QUESTIONS - Position Numbers
   ============================================ */

.ordering-container {
    display: flex;
    flex-direction: column;
    gap: 4px;  /* Minimal gap between items */
    padding: 0;  /* No padding around container */
    margin: 0;   /* No margin */
}

.ordering-item {
    display: flex !important;
    align-items: stretch;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    cursor: grab !important;  /* Force grab cursor */
    transition: all 0.2s;
    user-select: none;
    margin-bottom: 0;  /* No extra margin */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);  /* Subtle shadow */
}

/* Make entire item draggable */
.ordering-item * {
    cursor: grab !important;  /* Grab cursor on all children */
    pointer-events: none;  /* Children don't block drag events */
}

.ordering-item {
    pointer-events: auto;  /* Item itself is draggable */
}

/* Active dragging state */
.ordering-item.dragging {
    opacity: 0.4;
    cursor: grabbing !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #f0f4ff;
}

/* Hover state - make it obvious it's draggable */
.ordering-item:hover:not(.dragging) {
    border-color: #667eea;
    background: #fafbff;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.15);
}

/* Position number - compact */
.ordering-item .position-number {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 50px !important;  /* Smaller */
    background: #f3f4f6 !important;
    color: #1f2937 !important;
    font-size: 28px !important;  /* Smaller */
    font-weight: 700 !important;
    border-left: 4px solid #10b981 !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;  /* Don't block drag events */
}

/* Hide drag handle */
.ordering-item .drag-handle {
    display: none !important;
    visibility: hidden !important;
}

/* Item text - very compact */
.ordering-item .item-text {
    flex: 1 !important;
    padding: 10px 16px !important;  /* Tighter padding */
    display: flex !important;
    align-items: center !important;
    font-size: 15px !important;  /* Smaller text */
    color: #1f2937 !important;
    border: 2px solid #e5e7eb !important;
    border-left: none !important;
    background: white !important;
    pointer-events: none !important;  /* Don't block drag events */
}

/* Hide ::before pseudo-element */
.ordering-item::before {
    display: none !important;
    content: none !important;
}

/* Hover state */
.ordering-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(4px);
}

/* Dragging state */
.ordering-item.dragging {
    opacity: 0.5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ordering-item .position-number {
        min-width: 45px !important;
        font-size: 24px !important;
    }
    
    .ordering-item .item-text {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
}

/* ============================================
   REVIEW MODAL - More Compact
   ============================================ */

.review-modal-content {
    max-width: 700px !important;  /* Smaller width */
    max-height: 80vh !important;  /* Limit height */
}

.review-summary {
    padding: 16px 20px !important;  /* Tighter padding */
    gap: 16px !important;
}

.review-summary .summary-item {
    font-size: 14px !important;  /* Smaller text */
}

.review-summary .summary-value {
    font-size: 28px !important;  /* Smaller numbers */
}

.review-grid {
    padding: 20px !important;  /* Less padding */
    gap: 8px !important;  /* Tighter gaps */
}

.review-grid .question-box {
    width: 70px !important;  /* Smaller boxes */
    height: 70px !important;
    font-size: 20px !important;  /* Smaller numbers */
}

.modal-footer {
    padding: 16px 24px !important;  /* Tighter padding */
    gap: 12px !important;
}

/* ============================================
   SUBMIT CONFIRMATION PAGE
   ============================================ */

.submit-confirmation-card {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-confirmation-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
    padding: 40px 20px;
}

.submit-icon {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 24px;
}

.submit-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.submit-question {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 32px;
}

.submit-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
}

.submit-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.submit-stat i {
    font-size: 32px;
}

.submit-stat.answered i {
    color: #10b981;
}

.submit-stat.unanswered i {
    color: #f59e0b;
}

.submit-stat .stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
}

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

.submit-warning {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
    margin-bottom: 32px;
}

.submit-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.submit-actions .btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.submit-actions .btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.submit-actions .btn-cancel:hover {
    background: #e5e7eb;
}

.submit-actions .btn-submit {
    background: #10b981;
    color: white;
}

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

.submit-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .submit-title {
        font-size: 24px;
    }
    
    .submit-question {
        font-size: 16px;
    }
    
    .submit-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .submit-actions {
        flex-direction: column;
    }
    
    .submit-actions .btn {
        width: 100%;
    }
}

/* ============================================
   SCORE REVIEW PAGE
   ============================================ */

.score-review-card {
    min-height: 600px;
    padding: 40px 20px;
}

.score-review-content {
    max-width: 800px;
    margin: 0 auto;
}

.score-header {
    text-align: center;
    margin-bottom: 40px;
}

.score-icon {
    font-size: 56px;
    color: #667eea;
    margin-bottom: 16px;
}

.score-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.score-subtitle {
    font-size: 16px;
    color: #6b7280;
}

.score-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    padding: 32px;
    background: #f9fafb;
    border-radius: 16px;
}

.score-circle {
    position: relative;
    width: 160px;
    height: 160px;
}

.score-circle svg {
    transform: rotate(-90deg);
}

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

.percentage-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #10b981;
}

.percentage-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

.score-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-item .stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 20px;
}

.stat-item.answered .stat-icon {
    background: #d1fae5;
    color: #10b981;
}

.stat-item.unanswered .stat-icon {
    background: #fee2e2;
    color: #ef4444;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
}

.score-questions {
    margin-bottom: 32px;
}

.questions-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.questions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.score-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.score-question.answered {
    border-color: #10b981;
    background: #f0fdf4;
}

.score-question.answered .question-icon {
    color: #10b981;
}

.score-question.unanswered {
    border-color: #e5e7eb;
}

.score-question.unanswered .question-icon {
    color: #d1d5db;
}

.question-icon {
    font-size: 20px;
}

.question-label {
    flex: 1;
    font-weight: 500;
    color: #1f2937;
}

.question-status {
    font-size: 12px;
    color: #6b7280;
}

.score-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    margin-bottom: 32px;
}

.score-warning i {
    color: #f59e0b;
    font-size: 20px;
}

.score-warning p {
    margin: 0;
    color: #92400e;
    font-weight: 500;
}

.score-actions {
    display: flex;
    justify-content: center;
}

.score-actions .btn {
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #667eea;
    color: white;
}

.score-actions .btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .score-summary {
        flex-direction: column;
        gap: 30px;
    }
    
    .questions-list {
        grid-template-columns: 1fr;
    }
    
    .score-actions .btn {
        width: 100%;
    }
}

/* ============================================
   SCORE REVIEW - DETAILED RESPONSES
   ============================================ */

.questions-detail-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.score-question-detail {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s;
}

.score-question-detail.answered {
    border-color: #10b981;
    background: #f0fdf4;
}

.score-question-detail.unanswered {
    border-color: #e5e7eb;
    background: #fafafa;
}

.question-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.score-question-detail.answered .question-header {
    border-bottom-color: #bbf7d0;
}

.question-number {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.question-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-title {
    font-size: 14px;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

.user-answer {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.answer-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.answer-text {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.score-question-detail.answered .answer-text {
    background: white;
    border-color: #10b981;
    color: #059669;
}

.answer-text.not-answered {
    color: #9ca3af;
    font-style: italic;
    background: #f9fafb;
    border-color: #e5e7eb;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .score-question-detail {
        padding: 12px 16px;
    }
    
    .question-title {
        font-size: 13px;
    }
    
    .answer-text {
        font-size: 14px;
    }
}

/* ============================================
   SCORE PAGE - CORRECT/INCORRECT STYLING
   ============================================ */

.score-question-detail.correct {
    border-color: #10b981;
    background: #f0fdf4;
}

.score-question-detail.correct .question-icon {
    color: #10b981;
}

.score-question-detail.incorrect {
    border-color: #ef4444;
    background: #fef2f2;
}

.score-question-detail.incorrect .question-icon {
    color: #ef4444;
}

.question-status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

.question-status-badge.correct {
    background: #d1fae5;
    color: #065f46;
}

.question-status-badge.incorrect {
    background: #fee2e2;
    color: #991b1b;
}

.question-status-badge.unanswered {
    background: #f3f4f6;
    color: #6b7280;
}

.stat-item.correct .stat-icon {
    background: #d1fae5;
    color: #10b981;
}

.stat-item.incorrect .stat-icon {
    background: #fee2e2;
    color: #ef4444;
}

/* Update score-stats to fit 3 items */
.score-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 768px) {
    .score-summary {
        flex-direction: column;
        gap: 20px;
    }
}

/* ============================================
   SCORE PAGE - BUTTONS
   ============================================ */

.score-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.score-actions .btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.btn-primary {
    background: #10b981;
    color: white;
}

.btn-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Larger score circle */
.score-summary .score-circle {
    width: 200px;
    height: 200px;
}

.score-summary .score-circle svg {
    width: 200px;
    height: 200px;
}

@media (max-width: 768px) {
    .score-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .score-actions .btn {
        width: 100%;
    }
}

/* Hide the old Review Answers button in navigation (not the one in score page) */
#reviewBtn {
    display: none !important;
}

/* ============================================
   SCORE PAGE NAVIGATION BUTTONS
   ============================================ */

#scoreReviewBtn,
#scorePlayAgainBtn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#scoreReviewBtn {
    background: #6b7280;
    color: white;
}

#scoreReviewBtn:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

#scorePlayAgainBtn {
    background: #667eea;
    color: white;
}

#scorePlayAgainBtn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    #scoreReviewBtn,
    #scorePlayAgainBtn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ============================================
   SCORE PAGE - REDUCE BOTTOM SPACING
   ============================================ */

.score-review-card {
    min-height: auto !important;
    padding-bottom: 20px !important;
}

.score-review-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove extra spacing from score page */
.score-review-card .score-summary {
    margin-bottom: 20px;
}

.score-review-card .score-questions {
    margin-bottom: 0;
}

/* ============================================
   CORRECT ANSWER DISPLAY
   ============================================ */

.correct-answer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #fecaca;
}

.correct-answer-text {
    background: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
    font-weight: 600;
}

/* Add some spacing between answers */
.score-question-detail .user-answer {
    margin-bottom: 0;
}

/* Green color for correct answer label */
.correct-answer .answer-label {
    color: #059669;
    font-weight: 600;
}

/* ============================================
   NO CORRECT ANSWER DEFINED STATUS
   ============================================ */

.score-question-detail.no-answer-defined {
    border-color: #f59e0b;
    background: #fffbeb;
}

.score-question-detail.no-answer-defined .question-icon {
    color: #f59e0b;
}

.question-status-badge.no-answer-defined {
    background: #fef3c7;
    color: #92400e;
}
