/* 
 * Child-Friendly Styling for Grade 1 Interactive Exam Web Portal
 */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #0d9488;
  --accent: #f59e0b;
  --accent-pink: #ec4899;
  --bg-gradient: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 50%, #fef3c7 100%);
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Comic Sans MS', sans-serif;
  user-select: none;
}

body {
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-main);
  padding-bottom: 80px;
}

/* ---------------- Top Floating Timer Bar ---------------- */
.timer-header-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  padding: 10px 24px;
}

.timer-inner-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.school-mini-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.school-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: white;
  padding: 2px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.school-brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: -0.5px;
}

.exam-badge {
  font-size: 0.8rem;
  font-weight: 700;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.timer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  padding: 6px 18px;
  border-radius: 30px;
}

.timer-icon {
  font-size: 1.4rem;
  animation: pulse 2s infinite;
}

.timer-clock {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.timer-progress-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  position: absolute;
  bottom: 0;
  left: 0;
}

.timer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  width: 100%;
  transition: width 1s linear;
}

.timer-progress-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* ---------------- Main Layout ---------------- */
.main-exam-container {
  max-width: 960px;
  margin: 30px auto;
  padding: 0 20px;
}

/* ---------------- Exam Hero Card ---------------- */
.exam-hero-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-sparkle {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.3;
}
.hero-sparkle-1 { top: 15px; left: 20px; }
.hero-sparkle-2 { bottom: 15px; right: 20px; }

.exam-hero-card h1 {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.exam-hero-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 16px;
}

.exam-meta-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-pill {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ---------------- Student Details Card ---------------- */
.student-details-card {
  background: var(--card-bg);
  padding: 24px 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 3px solid #bfdbfe;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.student-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e3a8a;
  min-width: 220px;
}

.student-input-group {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.student-name-input {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  border: 3px solid #93c5fd;
  border-radius: var(--radius-md);
  outline: none;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.student-name-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* ---------------- Question Card General ---------------- */
.question-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 2px solid #e2e8f0;
  margin-bottom: 35px;
  transition: transform 0.2s ease;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px dashed #e2e8f0;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.q-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e3a8a;
}

.q-badge-num {
  background: #2563eb;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.q-marks-tag {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

.q-instruction {
  font-size: 1.15rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 18px;
  line-height: 1.4;
}

/* ---------------- Q1: Match the Following ---------------- */
.match-interactive-container {
  position: relative;
  background: #f8fafc;
  border: 3px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  min-height: 380px;
  display: flex;
  justify-content: space-between;
}

.match-lines-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.match-column {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
  z-index: 10;
}

.match-col-left {
  width: 38%;
}

.match-col-right {
  width: 44%;
}

.match-item-card {
  background: white;
  border: 3px solid #94a3b8;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.2s ease;
  cursor: grab;
}

.match-item-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.match-item-card:active {
  cursor: grabbing;
}

/* Picture Card Only (No text label) */
.match-picture-card {
  justify-content: center;
  height: 72px;
  background: #f8fafc;
  padding: 6px 14px;
}

.match-picture-card .match-icon-preview {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.12));
  transition: transform 0.2s;
}

.match-picture-card:hover .match-icon-preview {
  transform: scale(1.1);
}

.match-card-idx {
  position: absolute;
  left: 12px;
  top: calc(50% - 12px);
  width: 24px;
  height: 24px;
  background: #e2e8f0;
  color: #475569;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
}

/* Name Card on Right */
.match-name-card {
  height: 72px;
  padding-left: 28px;
}

.match-item-label {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

/* Drag hover and connected states */
.match-name-card.drag-hover {
  border-color: #2563eb !important;
  background: #dbeafe !important;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}

.match-item-card.connected {
  background: #f0fdf4;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Connection Pins */
.match-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid white;
  box-shadow: 0 0 0 3px #3b82f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  transition: transform 0.2s, background-color 0.2s;
  pointer-events: auto;
}

.match-pin:hover {
  transform: scale(1.3);
}

.match-pin-left {
  right: -14px;
  top: calc(50% - 14px);
}

.match-pin-right {
  left: -14px;
  top: calc(50% - 14px);
  background: #10b981;
  box-shadow: 0 0 0 3px #10b981;
}

.match-item-card.connected .match-pin-left,
.match-item-card.connected .match-pin-right {
  background: #22c55e !important;
  box-shadow: 0 0 0 3px #22c55e !important;
}

.match-pin.connected {
  background: #22c55e !important;
  box-shadow: 0 0 0 2px #22c55e !important;
}

.match-controls-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.btn-secondary {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  color: #334155;
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* ---------------- Q2: Sentence Copy Typing ---------------- */
.typing-target-box {
  background: #eff6ff;
  border: 3px dashed #3b82f6;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: center;
}

.target-sentence-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.5px;
}

.typing-target-box small {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
}

.typing-input-area {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  border: 3px solid #cbd5e1;
  border-radius: var(--radius-md);
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  user-select: text;
}

.typing-input-area:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* ---------------- Q3 & Q4: Visual MCQ Cards ---------------- */
.mcq-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.mcq-card {
  background: #ffffff;
  border: 3px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.mcq-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.mcq-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

.mcq-card input[type="radio"] {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
}

.mcq-img-wrap {
  width: 90px;
  height: 90px;
  margin: 8px 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mcq-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.mcq-option-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
}

/* ---------------- Q5: MS Paint Canvas ---------------- */
.paint-layout-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.paint-ref-card {
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.paint-ref-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.paint-ref-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.paint-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.paint-toolbar {
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  background: white;
  border: 2px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.tool-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.tool-btn.active {
  background: #2563eb;
  color: white;
  border-color: #1d4ed8;
}

/* Color Swatches */
.color-palette {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 1px #94a3b8;
  cursor: pointer;
  transition: transform 0.2s;
}

.color-swatch:hover {
  transform: scale(1.2);
}

.color-swatch.selected {
  transform: scale(1.3);
  box-shadow: 0 0 0 3px #2563eb;
}

/* Brush Size Buttons */
.size-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: white;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.size-btn.active {
  background: #dbeafe;
  border-color: #2563eb;
}

.size-dot {
  background: #1e293b;
  border-radius: 50%;
}

.size-dot.sm { width: 4px; height: 4px; }
.size-dot.md { width: 8px; height: 8px; }
.size-dot.lg { width: 14px; height: 14px; }

/* Canvas Frame */
.canvas-frame-wrap {
  background: white;
  border: 3px solid #94a3b8;
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.08);
  overflow: hidden;
  cursor: crosshair;
}

#paintCanvas, #paintCanvasG2 {
  display: block;
  width: 100%;
  height: 440px;
  min-height: 440px;
  touch-action: none;
}

/* ---------------- Grade 2 Spelling Question ---------------- */
.spelling-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 14px;
}

.spelling-card {
  background: #f8fafc;
  border: 2.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.spelling-card:hover {
  border-color: #3b82f6;
  box-shadow: var(--shadow-md);
}

.spelling-badge {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.spelling-img-wrap {
  width: 130px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  padding: 10px;
  margin-bottom: 14px;
}

.spelling-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.spelling-input-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.spelling-input {
  width: 100%;
  max-width: 280px;
  padding: 12px 16px;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 2.5px solid #93c5fd;
  border-radius: 10px;
  outline: none;
  background: white;
  color: #1e3a8a;
  transition: all 0.2s ease;
}

.spelling-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* ---------------- Grade Selector in Login Modal ---------------- */
.grade-selector-box {
  margin-bottom: 16px;
  text-align: left;
}

.grade-selector-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 8px;
  display: block;
}

.grade-pills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grade-pill-option {
  position: relative;
  cursor: pointer;
  display: block;
}

.grade-pill-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.grade-pill-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #f1f5f9;
  border: 2.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #475569;
  transition: all 0.2s ease;
}

.grade-pill-option:hover .grade-pill-badge {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.grade-pill-option.active .grade-pill-badge {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* ---------------- Submit Card ---------------- */
.submit-action-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 3px solid #86efac;
  margin-top: 40px;
}

.submit-btn {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  border: none;
  padding: 18px 48px;
  font-size: 1.5rem;
  font-weight: 900;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: all 0.25s ease;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 25px rgba(22, 163, 74, 0.5);
}

.submit-btn:active {
  transform: translateY(1px);
}

.submit-btn:disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------------- Success Modal ---------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 550px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: zoomIn 0.3s ease;
  border: 4px solid #3b82f6;
}

.modal-celebration-icon {
  font-size: 4rem;
  margin-bottom: 12px;
}

.modal-content-box h2 {
  font-size: 1.8rem;
  font-weight: 900;
  color: #1e3a8a;
  margin-bottom: 10px;
}

.modal-content-box p {
  font-size: 1.1rem;
  color: #475569;
  margin-bottom: 16px;
  line-height: 1.5;
}

.download-file-badge {
  background: #f0fdf4;
  border: 2px solid #86efac;
  color: #166534;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: inline-block;
  word-break: break-all;
}

.btn-modal-close {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  border: none;
  padding: 14px 34px;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(22, 163, 74, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-modal-close:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.45);
}

/* ---------------- Submission Saved Details Box ---------------- */
.submission-saved-box {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 16px 0;
  text-align: left;
}

.saved-box-header {
  font-size: 1rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 12px;
  border-bottom: 2px dashed #e2e8f0;
  padding-bottom: 6px;
}

.saved-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.98rem;
  color: #0f172a;
  word-break: break-all;
}

.file-format-tag {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.docx-tag {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.pdf-tag {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.xlsx-tag {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.btn-folder-connect {
  background: #f1f5f9;
  border: 1.5px solid #94a3b8;
  color: #1e293b;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-folder-connect:hover {
  background: #e2e8f0;
  border-color: #64748b;
  transform: translateY(-1px);
}

.btn-teacher-report {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.btn-teacher-report:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.login-admin-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.btn-folder-connect-login {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1d4ed8;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-folder-connect-login:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

.btn-teacher-report-login {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #15803d;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.btn-teacher-report-login:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

.saved-location-note {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.4;
}

/* ---------------- Login Password Modal ---------------- */
.login-modal-backdrop {
  z-index: 2000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
}

.login-modal-box {
  max-width: 440px;
  border: 4px solid #3b82f6;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.school-logo-large-wrap {
  margin-bottom: 12px;
}

.school-logo-large {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  background: white;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.login-form-container {
  margin-top: 10px;
}

.login-password-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 4px;
  border: 3px solid #93c5fd;
  border-radius: 12px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.login-password-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

.login-error-msg {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  animation: shake 0.4s ease;
}

.btn-login-submit {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 14px;
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.45);
}

/* Animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes bounce {
  from { transform: scale(1.3) translateY(0); }
  to { transform: scale(1.3) translateY(-4px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .paint-layout-grid {
    grid-template-columns: 1fr;
  }
  .match-column {
    width: 48%;
  }
  .exam-hero-card h1 {
    font-size: 1.8rem;
  }
}
