/* ==========================================================================
   PYQ CATEGORY SCREEN — Premium Daylight UI (Apple/SaaS Inspired)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background-color: #f9fbff;
  color: #1e293b;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── Background Elements ─────────────────────────────────────── */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(219, 234, 254, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(224, 231, 255, 0.4) 0%, transparent 40%);
}

.bg-pattern {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.2;
  z-index: -1;
  pointer-events: none;
  mask-image: linear-gradient(to top, black, transparent);
  -webkit-mask-image: linear-gradient(to top, black, transparent);
}

/* ── Floating Header ─────────────────────────────────────────── */
.floating-header-wrapper {
  padding: 20px 16px;
  position: relative;
  z-index: 100;
}

.floating-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 
    0 10px 25px rgba(71, 64, 196, 0.05),
    0 4px 10px rgba(0, 0, 0, 0.02),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.header-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(71, 64, 196, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4740c4;
  transition: transform 0.2s, box-shadow 0.2s;
}

.header-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(71, 64, 196, 0.04);
}

.header-btn svg {
  width: 20px;
  height: 20px;
}

.header-center {
  text-align: center;
}

.header-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.3px;
}

.header-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

/* ── Main Title Section ──────────────────────────────────────── */
.title-section {
  padding: 20px 24px 10px;
  position: relative;
  animation: fadeIn 0.8s ease forwards;
}

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

.main-heading {
  font-size: 34px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -1px;
  margin: 0 0 16px 0;
  line-height: 1.2;
}

.question-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
}

.qc-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eff6ff;
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.qc-icon-box svg {
  width: 20px;
  height: 20px;
}

.qc-text {
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
}

/* ── Decorative Constellation ────────────────────────────────── */
.decor-container {
  position: absolute;
  top: 10px;
  right: 20px;
  width: 120px;
  height: 100px;
  pointer-events: none;
}

.decor-item {
  position: absolute;
  animation: float 4s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.1); }
}

/* ── Category Cards List ─────────────────────────────────────── */
.category-list {
  padding: 16px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cat-card-wrapper {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.cat-card {
  position: relative;
  background: #ffffff;
  border-radius: 28px;
  padding: 20px 24px 20px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.cat-card:active {
  transform: translateY(0) scale(0.98);
}

/* Left colored strip */
.cat-strip {
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 6px;
  border-radius: 0 6px 6px 0;
}

/* Icon Box */
.cat-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.cat-icon-box svg {
  width: 32px;
  height: 32px;
}

/* Card Content */
.cat-content {
  flex: 1;
}

.cat-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.cat-meta {
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
}

.cat-meta-dot {
  margin: 0 6px;
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
}

/* Right Arrow */
.cat-arrow-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cat-arrow-btn svg {
  width: 20px;
  height: 20px;
}

/* ── Theme Colors per Category ───────────────────────────────── */

/* Long Questions (Blue) */
.theme-long .cat-strip { background: #3b82f6; }
.theme-long .cat-icon-box { background: #eff6ff; color: #3b82f6; }
.theme-long .cat-title { color: #2563eb; }
.theme-long .cat-arrow-btn { color: #3b82f6; }

/* Short Notes (Green) */
.theme-short .cat-strip { background: #10b981; }
.theme-short .cat-icon-box { background: #ecfdf5; color: #10b981; }
.theme-short .cat-title { color: #059669; }
.theme-short .cat-arrow-btn { color: #10b981; }

/* Very Short (Orange) */
.theme-vshort .cat-strip { background: #f59e0b; }
.theme-vshort .cat-icon-box { background: #fffbeb; color: #f59e0b; }
.theme-vshort .cat-title { color: #d97706; }
.theme-vshort .cat-arrow-btn { color: #f59e0b; }

/* ── Question Screen Navigation ────────────────────────────── */
.q-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  margin-bottom: 24px;
  margin-top: -10px;
}

.q-counter {
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 2px;
}

.nav-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
  font-family: inherit;
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  color: #94a3b8;
}

.nav-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(59,130,246,0.1);
  border-color: #bfdbfe;
}

.nav-btn:not(:disabled):active {
  transform: translateY(0);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Main Question Card ──────────────────────────────────────── */
.q-card-wrapper {
  padding: 0 20px 30px;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.q-card {
  background: #ffffff;
  border-radius: 30px;
  padding: 28px 32px 36px;
  box-shadow: 
    0 24px 50px rgba(71,64,196,0.05),
    0 4px 12px rgba(0,0,0,0.02),
    inset 0 0 0 1px rgba(255,255,255,0.8);
  position: relative;
}

.q-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.q-type-badge {
  background: #eff6ff;
  color: #2563eb;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(59,130,246,0.15);
}

.q-marks {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

.q-text {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
  letter-spacing: -0.2px;
}

/* ── Section Label ───────────────────────────────────────────── */
.sections-label-wrapper {
  padding: 0 32px;
  margin-bottom: 20px;
  animation: fadeIn 0.8s ease forwards;
}

.sections-label {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.sections-label-line {
  width: 32px;
  height: 3px;
  background: #3b82f6;
  border-radius: 2px;
}

/* ── Revision Cards ──────────────────────────────────────────── */
.sections-grid {
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sec-btn {
  background: #ffffff;
  border-radius: 26px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  box-shadow: 
    0 12px 24px rgba(0,0,0,0.03),
    0 2px 6px rgba(0,0,0,0.02),
    inset 0 0 0 1px rgba(255,255,255,0.8);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  font-family: inherit;
}

.sec-btn:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 16px 32px rgba(0,0,0,0.05),
    0 4px 12px rgba(0,0,0,0.03),
    inset 0 0 0 1px rgba(255,255,255,0.9);
}

.sec-btn:active {
  transform: translateY(0) scale(0.98);
}

.sec-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 12px rgba(0,0,0,0.04);
}

.sec-icon-box svg {
  width: 28px;
  height: 28px;
}

.sec-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.sec-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  color: #3b82f6;
}

.sec-arrow-btn svg {
  width: 16px;
  height: 16px;
}

/* Hardcoded icon box colors based on index for the 4 expected cards */
.sec-btn:nth-child(1) .sec-icon-box { background: #f3e8ff; color: #9333ea; }
.sec-btn:nth-child(2) .sec-icon-box { background: #fef08a; color: #ca8a04; }
.sec-btn:nth-child(3) .sec-icon-box { background: #d1fae5; color: #059669; }
.sec-btn:nth-child(4) .sec-icon-box { background: #f1f5f9; color: #475569; }

