/* Exam Paper Styling & Print Rules */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Caveat:wght@600;700&family=Fredoka:wght@500;600;700&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --paper-bg: #ffffff;
  --ink-color: #0f172a;
  --pen-red: #dc2626;
  --pen-green: #059669;
}

body {
  font-family: 'Tajawal', sans-serif;
  color: var(--ink-color);
  background-color: #f1f5f9;
  user-select: none;
  -webkit-user-select: none;
}

.font-en {
  font-family: 'Fredoka', 'Tajawal', sans-serif;
}

.font-formal {
  font-family: 'Amiri', 'Tajawal', serif;
}

.font-red-pen {
  font-family: 'Caveat', 'Amiri', cursive, sans-serif;
}

/* Realistic Exam Paper Container */
.exam-sheet {
  background-color: var(--paper-bg);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.05);
  position: relative;
  background-image: radial-gradient(#e2e8f0 0.8px, transparent 0.8px);
  background-size: 24px 24px;
}

/* Authentic double border for official exam papers */
.exam-border {
  border: 3px double #1e293b;
}

.exam-divider {
  border-bottom: 2px dashed #94a3b8;
}

/* Dotted Lines for Handwriting Input */
.dotted-line-input {
  border-bottom: 2px dotted #475569;
  background: transparent;
  outline: none;
  transition: border-color 0.2s ease;
}

.dotted-line-input:focus {
  border-bottom-color: #0284c7;
}

/* Question numbering badge like official school papers */
.q-badge {
  background-color: #0f172a;
  color: #ffffff;
}

/* Option bubbles that look like test choices */
.bubble-option {
  transition: all 0.15s ease;
}

.bubble-option:active {
  transform: scale(0.95);
}

/* Teacher Stamp Animation */
@keyframes stampIn {
  0% {
    opacity: 0;
    transform: scale(2.5) rotate(-18deg);
  }
  70% {
    opacity: 1;
    transform: scale(0.95) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-12deg);
  }
}

.stamp-active {
  animation: stampIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Print Styling for Authentic Physical Exam Sheets */
@media print {
  body {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .no-print {
    display: none !important;
  }

  .exam-sheet {
    box-shadow: none !important;
    border: none !important;
    background-image: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .exam-border {
    border: 2px solid #000000 !important;
  }

  .page-break {
    page-break-after: always;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}