/* PaperMCQs.online — Redesign: "Exam Ledger" identity */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700;8..60,900&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --ink: #0B1F3F;
  --ink-light: #16315E;
  --paper: #F7F5F0;
  --signal: #D97706;
  --signal-dark: #B45309;
  --slate: #475569;
  --slate-light: #94A3B8;
  --success: #15803D;
  --line: #E2E0D8;
  --white: #FFFFFF;

  /* Backward-compat mappings (used by older inline styles elsewhere) */
  --primary: var(--ink);
  --secondary: var(--ink-light);
  --accent: var(--signal);
  --bg: var(--paper);
  --text: #1A1A1A;
  --text-muted: var(--slate);
  --border: var(--line);
  --danger: #B91C1C;
  --card-shadow: 0 2px 12px rgba(11,31,63,0.06);
  --card-hover: 0 10px 30px rgba(11,31,63,0.12);
}

* { box-sizing: border-box; }
body { background: var(--paper); color: #1A1A1A; font-family: 'Inter', system-ui, sans-serif; }
h1, h2, h3, .display-font { font-family: 'Source Serif 4', Georgia, serif; }
.mono { font-family: 'JetBrains Mono', monospace; }

a { color: var(--ink); }

/* ===== Navbar ===== */
#mainNav {
  background: var(--ink);
  padding: 14px 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#mainNav .navbar-brand { font-family:'Source Serif 4',serif; font-weight: 700; font-size: 1.45rem; letter-spacing: 0; }
#mainNav .nav-link { color: rgba(255,255,255,0.75) !important; font-weight: 500; padding: 6px 14px !important; border-radius: 4px; transition: all 0.2s; font-size:0.92rem; }
#mainNav .nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.08); }
.search-input { border-radius: 4px 0 0 4px !important; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #fff; }
.search-input::placeholder { color: rgba(255,255,255,0.45); }
.search-input:focus { background: #fff; color: var(--text); box-shadow: none; border-color:#fff; }
.btn-accent { background: var(--signal); border-color: var(--signal); color: #fff; border-radius: 0 4px 4px 0 !important; }
.btn-accent:hover { background: var(--signal-dark); border-color: var(--signal-dark); color: #fff; }

/* ===== Hero — "Result Slip" ===== */
.hero-section {
  background: var(--ink);
  padding: 70px 0 0;
  position: relative;
  overflow: visible;
}
.hero-section::before, .hero-section::after { content:none; }
.hero-eyebrow {
  display:inline-flex; align-items:center; gap:8px;
  font-family:'JetBrains Mono',monospace; font-size:0.72rem; letter-spacing:0.12em; text-transform:uppercase;
  color: var(--signal); border:1px solid rgba(217,119,6,0.4); padding:6px 14px; border-radius:3px;
  background: rgba(217,119,6,0.08);
}
.hero-section h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: #fff;
}
.hero-section .lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255,255,255,0.7); font-family:'Inter',sans-serif; line-height:1.7; }
.btn-hero-primary { background: var(--signal); color: #fff; font-weight: 600; border-radius: 4px; padding: 13px 30px; border: none; transition: all 0.2s; font-size:0.95rem; }
.btn-hero-primary:hover { background: var(--signal-dark); color: #fff; transform: translateY(-1px); }
.btn-hero-outline { border: 1.5px solid rgba(255,255,255,0.3); color: #fff; font-weight: 600; border-radius: 4px; padding: 12px 28px; transition: all 0.2s; font-size:0.95rem; }
.btn-hero-outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; color: #fff; }

/* The signature "Result Card" — looks like an official admit-card/result slip */
.result-slip {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(11,31,63,0.25);
  overflow: hidden;
  transform: translateY(40px);
  margin-bottom: -40px;
  position: relative;
  z-index: 5;
}
.result-slip-head {
  background: var(--paper);
  border-bottom: 2px dashed var(--line);
  padding: 14px 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.result-slip-head .label { font-family:'JetBrains Mono',monospace; font-size:0.7rem; letter-spacing:0.08em; text-transform:uppercase; color:var(--slate); }
.result-slip-head .roll { font-family:'JetBrains Mono',monospace; font-size:0.78rem; color:var(--ink); font-weight:700; }
.result-slip-grid { display:grid; grid-template-columns:repeat(4,1fr); }
.result-slip-cell { padding: 22px 18px; text-align:center; border-right:1px solid var(--line); }
.result-slip-cell:last-child { border-right:none; }
.result-slip-cell .num { font-family:'JetBrains Mono',monospace; font-weight:700; font-size:1.9rem; color:var(--ink); display:block; line-height:1; }
.result-slip-cell .lbl { font-size:0.74rem; color:var(--slate); margin-top:6px; display:block; text-transform:uppercase; letter-spacing:0.04em; }
@media (max-width: 767px) {
  .result-slip-grid { grid-template-columns:repeat(2,1fr); }
  .result-slip-cell { border-bottom:1px solid var(--line); }
  .result-slip-cell:nth-child(odd) { border-right:1px solid var(--line); }
}

/* ===== Section Headers ===== */
.section-eyebrow { font-family:'JetBrains Mono',monospace; font-size:0.72rem; letter-spacing:0.1em; text-transform:uppercase; color:var(--signal); font-weight:700; }
.section-title { font-size: 1.9rem; font-weight: 700; color: var(--ink); font-family:'Source Serif 4',serif; margin-top:6px; }
.section-subtitle { color: var(--slate); font-size: 1rem; }
.section-divider { display:none; }

/* ===== Subject Cards ===== */
.subject-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 22px;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  height: 100%;
  border-top: 3px solid var(--card-color, var(--ink));
}
.subject-card::before { content:none; }
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover); }
.subject-icon { width: 50px; height: 50px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 16px; }
.subject-card h5 { font-weight: 700; font-size: 1.08rem; margin-bottom: 6px; font-family:'Source Serif 4',serif; }
.subject-card .mcq-count { color: var(--slate); font-size: 0.82rem; margin-bottom: 16px; font-family:'JetBrains Mono',monospace; }
.btn-view { border-radius: 4px; font-size: 0.82rem; font-weight: 600; padding: 6px 18px; }

/* ===== Exam Cards ===== */
.exam-card {
  background: var(--ink);
  border-radius: 6px;
  padding: 26px 22px;
  color: #fff;
  transition: all 0.25s;
  height: 100%;
  position: relative;
  border-left: 3px solid var(--signal);
}
.exam-card::after { content:none; }
.exam-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(11,31,63,0.22); }
.exam-card .exam-icon { font-size: 2.1rem; margin-bottom: 12px; color: var(--signal); }
.exam-card h5 { font-weight: 700; margin-bottom: 4px; font-family:'Source Serif 4',serif; }
.exam-card .exam-count { opacity: 0.65; font-size: 0.85rem; font-family:'JetBrains Mono',monospace; }
.exam-card .btn-exam { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; border-radius: 4px; font-size: 0.78rem; font-weight: 600; padding: 6px 16px; transition: all 0.2s; }
.exam-card .btn-exam:hover { background: var(--signal); border-color:var(--signal); }

/* ===== MCQ Cards ===== */
.mcq-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  margin-bottom: 18px;
  transition: all 0.2s;
}
.mcq-card:hover { box-shadow: var(--card-shadow); border-color: var(--ink); }
.mcq-number { background: var(--ink); color: #fff; width: 30px; height: 30px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; font-family:'JetBrains Mono',monospace; }
.mcq-question { font-weight: 600; font-size: 1rem; line-height: 1.6; color: #1A1A1A; }
.mcq-options { list-style: none; padding: 0; margin: 16px 0 0; }
.mcq-options li {
  padding: 10px 16px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mcq-options li:hover { border-color: var(--ink); background: #F8F8F5; }
.mcq-options li.correct { border-color: var(--success); background: #F0FDF4; color: #065F46; }
.mcq-options li.wrong { border-color: var(--danger); background: #FEF2F2; color: #991B1B; }
.option-label {
  background: var(--ink);
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
  font-family:'JetBrains Mono',monospace;
}
.btn-show-answer {
  background: var(--ink);
  color: #fff; border: none; border-radius: 4px;
  padding: 8px 22px; font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-show-answer:hover { background: var(--ink-light); }
.answer-box {
  display: none;
  background: #FAFAF7;
  border: 1px solid var(--line);
  border-left: 3px solid var(--success);
  border-radius: 4px;
  padding: 16px;
  margin-top: 14px;
}
.answer-box .correct-label { color: var(--success); font-weight: 700; font-size: 0.9rem; }
.answer-box .explanation { color: #374151; font-size: 0.9rem; line-height: 1.6; margin-top: 8px; }
.badge-exam { font-size: 0.7rem; padding: 4px 10px; border-radius: 3px; font-weight: 600; }
.badge-difficulty-easy { background: #DCFCE7; color: #065F46; }
.badge-difficulty-medium { background: #FEF3C7; color: #92400E; }
.badge-difficulty-hard { background: #FEE2E2; color: #991B1B; }

/* ===== Breadcrumb ===== */
.breadcrumb-section { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 0; }
.breadcrumb-item a { color: var(--ink); text-decoration: none; font-size: 0.85rem; }
.breadcrumb-item.active { color: var(--slate); font-size: 0.85rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--slate); }

/* ===== Test/Timer ===== */
.timer-bar { background: var(--ink); color: #fff; border-radius: 6px; padding: 16px 24px; position: sticky; top: 80px; z-index: 100; }
.timer-display { font-size: 2rem; font-weight: 700; font-family: 'JetBrains Mono',monospace; }
.timer-warning .timer-display { color: #FCA5A5; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }
.test-progress { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.15); overflow: hidden; }
.test-progress .progress-fill { height: 100%; background: var(--signal); border-radius: 3px; transition: width 0.3s; }
.score-circle {
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  background: rgba(255,255,255,0.08);
}
.score-circle .score-pct { font-size: 2.2rem; font-weight: 700; font-family:'JetBrains Mono',monospace; }
.score-circle .score-label { font-size: 0.78rem; opacity: 0.8; }

/* ===== Notes Cards ===== */
.note-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 22px; height: 100%; transition: all 0.25s; }
.note-card:hover { box-shadow: var(--card-shadow); transform: translateY(-2px); }
.note-icon { font-size: 2.2rem; color: var(--danger); }
.btn-download { background: var(--ink); color: #fff; border: none; border-radius: 4px; padding: 8px 20px; font-size: 0.85rem; font-weight: 600; }
.btn-download:hover { background: var(--ink-light); color:#fff; }

/* ===== Search ===== */
.search-result-item { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; margin-bottom: 12px; transition: all 0.2s; }
.search-result-item:hover { box-shadow: var(--card-shadow); border-color: var(--ink); }
.search-result-item mark { background: #FEF3C7; color: var(--ink); border-radius: 2px; padding: 0 3px; }

/* ===== Pagination ===== */
.pagination .page-link { border-radius: 4px !important; margin: 0 2px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.pagination .page-item.active .page-link { background: var(--ink); border-color: var(--ink); }
.pagination .page-link:hover { background: #F8F8F5; border-color: var(--ink); }

/* ===== Footer ===== */
.footer { background: var(--ink); }
.footer-top { border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--signal); }
.social-link { color: rgba(255,255,255,0.55); font-size: 1.15rem; transition: color 0.2s; }
.social-link:hover { color: var(--signal); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); }

/* ===== Inner Page Hero ===== */
.page-hero { background: var(--ink); color: #fff; padding: 46px 0 42px; }
.page-hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); font-weight: 700; font-family:'Source Serif 4',serif; }
.page-hero .badge { font-size: 0.85rem; padding: 6px 14px; border-radius: 4px; }

/* ===== Sidebar ===== */
.sidebar-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 22px; margin-bottom: 20px; }
.sidebar-card h6 { font-weight: 700; color: var(--ink); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--paper); font-family:'Source Serif 4',serif; }
.sidebar-subject-link { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 4px; text-decoration: none; color: #1A1A1A; font-size: 0.88rem; transition: all 0.2s; margin-bottom: 4px; }
.sidebar-subject-link:hover { background: #F8F8F5; color: var(--ink); }
.sidebar-subject-link .count-badge { background: var(--paper); color: var(--slate); font-size: 0.75rem; padding: 2px 8px; border-radius: 3px; font-weight: 600; font-family:'JetBrains Mono',monospace; }

/* ===== Stats Section ===== */
.stats-section { background: #fff; padding: 50px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.stat-item { text-align: center; }
.stat-item .num { font-family:'JetBrains Mono',monospace; font-size: 2.2rem; font-weight: 700; display: block; color:var(--ink); }
.stat-item .lbl { font-size: 0.82rem; color:var(--slate); text-transform:uppercase; letter-spacing:0.04em; }

/* ===== Contact Form ===== */
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 36px; box-shadow: var(--card-shadow); }
.form-control, .form-select { border-radius: 4px; border-color: var(--line); padding: 10px 14px; }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,31,63,0.08); }
.btn-submit { background: var(--ink); color: #fff; border: none; border-radius: 4px; padding: 12px 36px; font-weight: 700; transition: all 0.2s; }
.btn-submit:hover { background: var(--ink-light); color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-section { padding: 50px 0 0; }
  .mcq-card { padding: 16px; }
  .timer-bar { border-radius: 0; position: fixed; top: 0; left: 0; right: 0; z-index: 999; }
  .stat-item .num { font-size: 1.7rem; }
  .result-slip { transform: translateY(24px); margin-bottom: -24px; }
}

/* ===== Animations ===== */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.animate-in { animation: fadeInUp 0.5s ease forwards; opacity: 0; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
