/* ===================================================
   BASE VARIABLES & RESET (Mobile Optimized - Pure White)
=================================================== */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --navy: #0f172a;
  --ink: #111827;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --border: #e2e8f0; /* Slightly darker border for white bg */
  --bg-soft: #f8fafc;
  --gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.mobile-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #ffffff; /* ðŸ”¥ Pure White Background */
  -webkit-font-smoothing: antialiased;
  padding-bottom: 90px; 
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
.icon { width: 1em; height: 1em; stroke-width: 2; flex-shrink: 0; }
.wrap { padding: 0 16px; }

/* ===================================================
   MOBILE HEADER (Exact Screenshot Match)
=================================================== */
header.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03); /* Subtle shadow on white */
}
header.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding-top: env(safe-area-inset-top);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.logo-badge {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 10px rgba(37,99,235,.25);
}
.logo-badge .icon { width: 18px; height: 18px; }
.logo span.accent { color: var(--blue); }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #374151;
}

/* ===================================================
   PREMIUM APP HERO
=================================================== */
.app-hero .wrap { position: relative; }
.app-hero-bg {
  position: relative;
  background: var(--gradient);
  overflow: hidden;
  padding: calc(18px + env(safe-area-inset-top)) 0 26px;
  border-radius: 0 0 28px 28px;
}
.app-hero-blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.app-hero-blob.b1 { width: 160px; height: 160px; top: -60px; right: -40px; }
.app-hero-blob.b2 { width: 110px; height: 110px; bottom: -40px; left: -30px; background: rgba(255,255,255,.08); }
.app-hero-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; position: relative; z-index: 1;
}
.app-hello { font-size: 12.5px; color: rgba(255,255,255,.8); margin: 0 0 3px; font-weight: 600; }
.app-hero-title { font-size: 20px; line-height: 1.28; color: #fff; font-weight: 800; margin: 0; letter-spacing: -.2px; }
.app-bell-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.app-bell-btn .dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: #fbbf24; border: 1.5px solid #4338ca;
}
.app-search-pill {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border-radius: 14px; padding: 13px 14px;
  box-shadow: 0 14px 28px -10px rgba(15,23,42,.2); position: relative; z-index: 1;
}
.app-search-pill .icon { width: 18px; height: 18px; color: var(--gray-400); }
.app-search-pill input { border: none; outline: none; background: transparent; font-size: 13.5px; width: 100%; color: var(--ink); }
.app-stat-row {
  display: flex; align-items: center; justify-content: space-around;
  margin-top: 16px; position: relative; z-index: 1;
}
.app-stat { text-align: center; color: #fff; }
.app-stat strong { display: block; font-size: 15px; font-weight: 800; }
.app-stat span { display: block; font-size: 10px; color: rgba(255,255,255,.8); margin-top: 1px; }
.app-stat-divider { width: 1px; height: 26px; background: rgba(255,255,255,.25); }

/* ===================================================
   FLOATING FEATURE STRIP (2x2 GRID)
=================================================== */
.feature-strip { padding: 0 0 4px; }
.feature-card {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: #fff; border-radius: 16px; margin-top: -18px;
  position: relative; z-index: 2; border: 1px solid var(--border);
  box-shadow: 0 16px 32px -14px rgba(15,23,42,.12); overflow: hidden;
}
.feature-item { padding: 14px; display: flex; align-items: center; gap: 10px; }
.feature-item:nth-child(odd) { border-right: 1px solid var(--border); }
.feature-item:nth-child(1), .feature-item:nth-child(2) { border-bottom: 1px solid var(--border); }
.feature-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.feature-icon.blue { background: #eff6ff; color: #2563eb; }
.feature-icon.purple { background: #faf5ff; color: #9333ea; }
.feature-icon.sky { background: #f0f9ff; color: #0284c7; }
.feature-item h4 { font-size: 12.5px; margin: 0 0 2px; font-weight: 700; color: var(--ink); }
.feature-item p { font-size: 9.5px; margin: 0; color: var(--gray-500); line-height: 1.3; }

/* ===================================================
   SECTION HEADINGS & RHYTHM
=================================================== */
.section { padding: 24px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; padding: 0 16px;}
.section-head h2 { font-size: 16.5px; font-weight: 800; margin: 0; color: var(--ink); }
.section-head h2::before {
  content: ""; display: inline-block; width: 4px; height: 16px;
  border-radius: 2px; background: var(--gradient); margin-right: 8px; vertical-align: -2px;
}
.view-all {
  font-size: 11.5px; font-weight: 600; color: var(--blue);
  background: #eff6ff; padding: 6px 12px; border-radius: 20px;
  display: flex; align-items: center; gap: 4px; border: 1px solid #bfdbfe;
}
.view-all .icon { width: 12px; height: 12px; }

/* ===================================================
   HORIZONTAL SCROLL (SWIPE ROWS)
=================================================== */
.swipe-row {
  display: flex; overflow-x: auto; gap: 16px; 
  padding: 0 16px 10px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.swipe-row::-webkit-scrollbar { display: none; }

/* 1. Categories / Board Icons */
.cat-card, .board-card {
  flex: 0 0 68px; scroll-snap-align: start; text-align: center;
}
.cat-card:active, .board-card:active { transform: scale(.92); }
.cat-icon, .board-icon {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; border: 1px solid var(--border);
}
.cat-icon .icon, .board-icon .icon { width: 26px; height: 26px; }
.cat-card h3, .board-card h3 { font-size: 11px; font-weight: 600; margin: 0; line-height: 1.3; color: #1e293b;}

/* Icon Colors & Backgrounds (White BG safe) */
.green { background: #dcfce7; color: #16a34a; border-color:#bbf7d0;}
.blue { background: #dbeafe; color: #2563eb; border-color:#bfdbfe;}
.purple { background: #f3e8ff; color: #9333ea; border-color:#e9d5ff;}
.emerald { background: #d1fae5; color: #059669; border-color:#a7f3d0;}
.amber { background: #fef3c7; color: #d97706; border-color:#fde68a;}
.pink { background: #fce7f3; color: #db2777; border-color:#fbcfe8;}
.skyblue { background: #e0f2fe; color: #0284c7; border-color:#bae6fd;}
.orange { background: #ffedd5; color: #ea580c; border-color:#fed7aa;}
.red { background: #fee2e2; color: #dc2626; border-color:#fecaca;}
.teal { background: #ccfbf1; color: #0d9488; border-color:#99f6e4;}
.indigo { background: #e0e7ff; color: #4f46e5; border-color:#c7d2fe;}
.violet { background: #ede9fe; color: #7c3aed; border-color:#ddd6fe;}
.cyan { background: #cffafe; color: #0891b2; border-color:#a5f3fc;}
.lime { background: #dcfce7; color: #4d7c0f; border-color:#bbf7d0;}

/* 2. Popular Exams */
.exam-card {
  flex: 0 0 240px; scroll-snap-align: start; background: #fff;
  border-radius: 16px; padding: 16px;
  box-shadow: 0 4px 16px rgba(15,23,42,.06); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.exam-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gradient); }
.exam-card:active { transform: scale(.97); }
.exam-top { display: flex; gap: 12px; margin-bottom: 12px; }
.exam-logo { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; text-align: center; line-height: 1.1; padding: 2px;}
.exam-card h3 { font-size: 14.5px; margin: 0 0 3px; font-weight: 700; color: #0f172a;}
.exam-card .exam-sub { font-size: 11px; color: var(--gray-500); -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;}
.exam-tags { display: flex; gap: 6px; margin: 12px 0 14px; flex-wrap: wrap; }
.exam-tags span { font-size: 10px; padding: 4px 8px; border-radius: 6px; background: var(--bg-soft); color: #475569; font-weight: 600; border: 1px solid #e2e8f0;}
.exam-tags span.hi { background: #eff6ff; color: #1d4ed8; border-color:#bfdbfe;}
.exam-card .details-link { font-size: 12.5px; font-weight: 600; color: var(--blue); background: #eff6ff; display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 8px; width: 100%; border:1px solid #bfdbfe;}

/* ===================================================
   GRIDS (Subjects & Tips)
=================================================== */
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px;}
.subject-card { background: #fff; border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 10px rgba(15,23,42,.04); border: 1px solid var(--border);}
.subject-card:active { transform: scale(.95); }
.subject-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(0,0,0,0.05);}
.subject-icon .icon { width: 20px; height: 20px; }
.subject-card h4 { font-size: 12.5px; margin: 0 0 3px; font-weight: 700; color: #1e293b;}
.subject-card p { font-size: 10.5px; color: var(--gray-500); margin: 0; }

.tips-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; padding: 0 16px;}
.tip-card { background: #fff; border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 10px rgba(15,23,42,.04); border: 1px solid var(--border);}
.tip-card:active { transform: scale(.98); }
.tip-thumb { width: 58px; height: 58px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff;}
.tip-thumb .icon { width: 24px; height: 24px; }
.tip-card h4 { font-size: 13px; margin: 0 0 6px; font-weight: 700; color:#0f172a; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;}
.tip-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 6px; margin-bottom: 6px; }
.tip-date { font-size: 10.5px; color: var(--gray-500); font-weight: 500;}

.tips-stats { display: grid; grid-template-columns: repeat(2, 1fr); row-gap: 18px; column-gap: 12px; border-top: 1px solid var(--border); padding: 20px 16px 0; margin: 0 16px;}
.tip-stat { display: flex; align-items: center; gap: 10px; }
.stat-icon { width: 36px; height: 36px; border-radius: 50%; background: #eff6ff; color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon .icon { width: 18px; height: 18px; }
.tip-stat h5 { font-size: 12.5px; margin: 0 0 2px; font-weight: 700; color: #1e293b;}
.tip-stat p { font-size: 10.5px; color: var(--gray-500); margin: 0; }