/* =================================================== */
/*  NEET UG MCC COUNSELLING EXPLORER — STYLESHEET      */
/*  Supports Dark & Light Mode, Mobile Bottom Nav & PDF*/
/*  Designed & Developed by Karan Kumar Meher          */
/* =================================================== */

/* ========================= */
/*  THEME TOKENS / VARIABLES */
/* ========================= */
:root, [data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #161e31;
  --bg-card-hover: #1c263e;
  --bg-surface: #101726;
  --bg-controls: rgba(11, 15, 25, 0.94);
  --bg-modal: #131b2e;
  
  --border-subtle: rgba(99, 102, 241, 0.18);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.45);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-accent: #818cf8;

  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);

  /* Tier Color Accents */
  --tier1: #f59e0b;
  --tier1-bg: rgba(245, 158, 11, 0.12);
  --tier1-border: rgba(245, 158, 11, 0.35);
  --tier2: #10b981;
  --tier2-bg: rgba(16, 185, 129, 0.12);
  --tier2-border: rgba(16, 185, 129, 0.35);
  --tier3: #3b82f6;
  --tier3-bg: rgba(59, 130, 246, 0.12);
  --tier3-border: rgba(59, 130, 246, 0.35);
  --tier4: #8b5cf6;
  --tier4-bg: rgba(139, 92, 246, 0.12);
  --tier4-border: rgba(139, 92, 246, 0.35);
  --tier5: #64748b;
  --tier5-bg: rgba(100, 116, 139, 0.12);
  --tier5-border: rgba(100, 116, 139, 0.35);

  --fav-active: #f43f5e;
  --fav-active-bg: rgba(244, 63, 94, 0.15);
  --fav-active-border: rgba(244, 63, 94, 0.4);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  --input-bg: #141c2e;
  --header-bg-gradient: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.2) 0%, transparent 65%);
  --bottom-nav-bg: rgba(16, 23, 38, 0.94);
  --pills-fade: #0b0f19;
}

/* ========================= */
/*  LIGHT THEME TOKENS       */
/* ========================= */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-surface: #e2e8f0;
  --bg-controls: rgba(241, 245, 249, 0.96);
  --bg-modal: #ffffff;
  
  --border-subtle: rgba(99, 102, 241, 0.22);
  --border-card: #cbd5e1;
  --border-glow: rgba(99, 102, 241, 0.45);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-accent: #4f46e5;

  --accent: #4f46e5;
  --accent-light: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.18);
  --accent-gradient: linear-gradient(135deg, #4f46e5, #7c3aed, #db2777);

  /* Tier Color Accents Light */
  --tier1: #d97706;
  --tier1-bg: #fef3c7;
  --tier1-border: #fcd34d;
  --tier2: #059669;
  --tier2-bg: #d1fae5;
  --tier2-border: #6ee7b7;
  --tier3: #2563eb;
  --tier3-bg: #dbeafe;
  --tier3-border: #93c5fd;
  --tier4: #7c3aed;
  --tier4-bg: #ede9fe;
  --tier4-border: #c4b5fd;
  --tier5: #475569;
  --tier5-bg: #f1f5f9;
  --tier5-border: #cbd5e1;

  --fav-active: #e11d48;
  --fav-active-bg: #ffe4e6;
  --fav-active-border: #fda4af;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

  --input-bg: #ffffff;
  --header-bg-gradient: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  --bottom-nav-bg: rgba(255, 255, 255, 0.94);
  --pills-fade: #f1f5f9;
}

/* ========================= */
/*  RESET & BASE             */
/* ========================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
  padding-bottom: 84px; /* Space for mobile bottom bar */
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* App Container */
.app-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========================= */
/*  TOP NAVBAR               */
/* ========================= */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  font-size: 1.6rem;
  line-height: 1;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.nav-tagline {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Creator Site Link Button */
.nav-creator-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.nav-creator-btn:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}
.creator-icon {
  font-size: 0.95rem;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.84rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  box-shadow: var(--shadow-sm);
}
.theme-toggle-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.theme-icon {
  font-size: 1.05rem;
}

/* Nav PDF Button */
.nav-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.84rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.nav-pdf-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* ========================= */
/*  HERO SECTION             */
/* ========================= */
.hero {
  position: relative;
  padding: 38px 0 30px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--header-bg-gradient);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--tier1-bg);
  border: 1px solid var(--tier1-border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tier1);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Typing Animation Container */
.typing-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  max-width: 90%;
}
.typing-prefix {
  font-size: 0.9rem;
}
.typing-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-accent);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}
.typing-cursor {
  font-weight: 900;
  color: var(--accent);
  animation: blinkCursor 0.75s infinite;
}
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 auto 20px;
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Hero CTA Group */
.hero-cta-group {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.hero-creator-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.hero-creator-btn:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-arrow {
  transition: transform 0.2s ease;
}
.hero-creator-btn:hover .btn-arrow {
  transform: translateX(3px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  min-width: 96px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.stat-pill:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-accent);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
  font-weight: 700;
}

.stat-fav {
  border-color: var(--fav-active-border);
  background: var(--fav-active-bg);
  cursor: pointer;
}
.stat-fav .stat-num {
  color: var(--fav-active);
}

/* =================================================== */
/*  QUICK FILTER PILLS WITH HORIZONTAL SCROLL ENHANCER */
/* =================================================== */
.quick-pills-section {
  padding: 8px 0 6px;
  position: relative;
}

.quick-pills-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Fading Gradients on left and right edges */
.quick-pills-wrapper::before,
.quick-pills-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 8px;
  width: 28px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}
.quick-pills-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary), transparent);
}
.quick-pills-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary), transparent);
}

/* Scroll Arrows for Desktop & Tablets */
.pills-arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.pills-arrow-btn:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: scale(1.08);
}
.pills-arrow-btn.prev {
  margin-right: 6px;
}
.pills-arrow-btn.next {
  margin-left: 6px;
}

/* Scroll container */
.quick-pills-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 6px 10px;
  scroll-behavior: smooth;
  width: 100%;
}
.quick-pills-scroll::-webkit-scrollbar {
  height: 4px;
}
.quick-pills-scroll::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
.quick-pills-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.quick-pill {
  flex-shrink: 0;
  padding: 8px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.quick-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.quick-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Scroll Hint Pill */
.scroll-hint-pill {
  position: absolute;
  right: 44px;
  bottom: -4px;
  font-size: 0.68rem;
  color: var(--text-accent);
  font-weight: 700;
  pointer-events: none;
  opacity: 0.85;
  animation: pulseHint 2s infinite ease-in-out;
  display: none; /* Shown dynamically on mobile */
}
@keyframes pulseHint {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(4px); opacity: 1; }
}

/* =================================================== */
/*  CONTROLS PANEL (STICKY & ULTRA SLEEK)              */
/* =================================================== */
.controls-panel {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 12px 0;
  background: var(--bg-controls);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.controls-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-and-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search Box */
.search-wrapper {
  position: relative;
  flex: 1;
  height: 48px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-wrapper input {
  width: 100%;
  height: 100%;
  padding: 0 40px 0 42px;
  background: var(--input-bg);
  border: 1.5px solid var(--border-card);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.search-wrapper input::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.search-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.clear-btn.visible {
  display: flex;
}
.clear-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Filter Modal Open Button */
.filter-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.filter-modal-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.filter-btn-icon {
  font-size: 1.1rem;
}
.active-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* =================================================== */
/*  EXPORT PDF BUTTONS (FIXED FOR DESKTOP & MOBILE)    */
/* =================================================== */
.pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px var(--accent-glow);
  transition: all 0.25s ease;
}
.pdf-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
  filter: brightness(1.1);
}
.pdf-btn .btn-icon {
  font-size: 1.05rem;
}

/* Dedicated Fav PDF Button */
.fav-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 18px;
  background: var(--fav-active-bg);
  border: 1.5px solid var(--fav-active-border);
  border-radius: 12px;
  color: var(--fav-active);
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.fav-pdf-btn:hover {
  background: var(--fav-active);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--fav-active-bg);
}

/* Desktop Only PDF Button Helper */
.desktop-only-btn {
  display: inline-flex;
}

/* Fav Toggle Button */
.fav-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fav-toggle-btn:hover {
  border-color: var(--fav-active);
  color: var(--fav-active);
}
.fav-toggle-btn.active {
  background: var(--fav-active-bg);
  border-color: var(--fav-active);
  color: var(--fav-active);
}

/* Active Chips Tag Bar */
.active-chips-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.chips-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.chips-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--tier1-bg);
  border: 1px solid var(--tier1-border);
  color: var(--tier1);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.filter-chip:hover {
  filter: brightness(1.15);
}
.clear-all-chips-btn {
  background: none;
  border: none;
  color: var(--fav-active);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* Result Info Bar */
.result-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.result-info span {
  font-weight: 800;
  color: var(--text-accent);
}
.quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.reset-filters-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}
.reset-filters-btn:hover {
  color: var(--accent);
}

/* =================================================== */
/*  FILTER BOTTOM SHEET / MODAL                        */
/* =================================================== */
.filter-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.filter-modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.filter-modal-sheet {
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.filter-modal-backdrop.open .filter-modal-sheet {
  transform: translateY(0);
}

.filter-sheet-header {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border-card);
}
.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-card);
  border-radius: 2px;
  margin: 0 auto 10px;
}
.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet-title-row h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.sheet-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-close-btn:hover {
  background: var(--fav-active);
  color: #ffffff;
}

.filter-sheet-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-sheet-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.filter-sheet-group label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.filter-sheet-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--border-card);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
}
.filter-sheet-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.filter-sheet-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.filter-sheet-footer {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-card);
  background: var(--bg-modal);
}
.sheet-btn {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sheet-btn.reset-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  flex: 0.4;
}
.sheet-btn.apply-btn {
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* ========================= */
/*  COLLEGE CARDS & LIST     */
/* ========================= */
.college-list {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 400px;
}

/* State / Tier Group Header */
.state-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 0 6px;
  margin-top: 8px;
}
.state-header:first-child {
  margin-top: 0;
  padding-top: 6px;
}
.state-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.state-header .state-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  background: var(--border-subtle);
  color: var(--text-accent);
  border-radius: 999px;
}
.state-header .state-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-subtle), transparent);
}

/* Individual College Card */
.college-card {
  display: grid;
  grid-template-columns: 54px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.college-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}
.college-card[data-tier="1"]::before { background: var(--tier1); }
.college-card[data-tier="2"]::before { background: var(--tier2); }
.college-card[data-tier="3"]::before { background: var(--tier3); }
.college-card[data-tier="4"]::before { background: var(--tier4); }
.college-card[data-tier="5"]::before { background: var(--tier5); }

.college-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* MCC Badge */
.mcc-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 8px 4px;
  min-width: 54px;
}
.mcc-badge .mcc-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.mcc-badge .mcc-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-accent);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
}

/* Card Main Body */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.college-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  word-break: break-word;
}

.college-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag-state {
  background: var(--tier3-bg);
  color: var(--tier3);
  border: 1px solid var(--tier3-border);
}

.tag-quota {
  background: var(--tier2-bg);
  color: var(--tier2);
  border: 1px solid var(--tier2-border);
}
.tag-quota.open-seat {
  background: var(--tier1-bg);
  color: var(--tier1);
  border: 1px solid var(--tier1-border);
}

.tag-category {
  background: var(--tier4-bg);
  color: var(--tier4);
  border: 1px solid var(--tier4-border);
}

/* College Info (Fee & Bond) */
.college-info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px solid var(--border-card);
}
.info-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.info-item strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Tier Badge */
.tier-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 10px;
  min-width: 68px;
  text-align: center;
}
.tier-badge[data-tier="1"] { background: var(--tier1-bg); border: 1px solid var(--tier1-border); color: var(--tier1); }
.tier-badge[data-tier="2"] { background: var(--tier2-bg); border: 1px solid var(--tier2-border); color: var(--tier2); }
.tier-badge[data-tier="3"] { background: var(--tier3-bg); border: 1px solid var(--tier3-border); color: var(--tier3); }
.tier-badge[data-tier="4"] { background: var(--tier4-bg); border: 1px solid var(--tier4-border); color: var(--tier4); }
.tier-badge[data-tier="5"] { background: var(--tier5-bg); border: 1px solid var(--tier5-border); color: var(--tier5); }

.tier-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tier-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Favourite Heart Button */
.fav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.fav-btn:hover {
  border-color: var(--fav-active);
  background: var(--fav-active-bg);
  transform: scale(1.12);
}
.fav-btn.fav-active {
  background: var(--fav-active-bg);
  border-color: var(--fav-active);
  box-shadow: 0 0 12px var(--fav-active-bg);
}

@keyframes favPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.fav-btn.pulse {
  animation: favPulse 0.3s ease;
}

/* =================================================== */
/*  MOBILE BOTTOM NAVIGATION BAR                       */
/* =================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bottom-nav-bg);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  justify-content: space-around;
  align-items: center;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 12px;
  position: relative;
  transition: all 0.2s ease;
  min-width: 54px;
}
.bottom-nav-item .nav-item-icon {
  font-size: 1.3rem;
  line-height: 1.2;
}
.bottom-nav-item .nav-item-label {
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 2px;
}
.bottom-nav-item.active {
  color: var(--accent);
}
.bottom-nav-item:active {
  transform: scale(0.92);
}

/* Bottom Nav Badges */
.bottom-badge {
  position: absolute;
  top: 0px;
  right: 8px;
  background: var(--fav-active);
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}
.bottom-badge-dot {
  position: absolute;
  top: 4px;
  right: 12px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

/* ========================= */
/*  NO RESULTS & FOOTER      */
/* ========================= */
.no-results {
  text-align: center;
  padding: 60px 20px;
}
.no-results-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}
.no-results h2 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.no-results p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.inline-reset-btn {
  max-width: 220px;
  margin: 0 auto;
}

.app-footer {
  padding: 30px 0 20px;
  margin-top: 30px;
}
.footer-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.footer-creator-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--tier1-bg);
  border: 1px solid var(--tier1-border);
  border-radius: 999px;
  color: var(--tier1);
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 16px;
}
.footer-links {
  margin-bottom: 16px;
}
.footer-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--accent-gradient);
  color: #ffffff !important;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all 0.25s ease;
}
.footer-site-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.footer-disclaimer {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.footer-disclaimer a {
  color: var(--accent-light);
}

/* =================================================== */
/*  RESPONSIVE DESIGN (TABLETS & MOBILE SCREENS)       */
/* =================================================== */
@media (min-width: 769px) {
  /* On desktop, show bottom sheet centered like a modal */
  .filter-modal-backdrop {
    align-items: center;
  }
  .filter-modal-sheet {
    border-radius: 20px;
    transform: scale(0.92);
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .filter-modal-backdrop.open .filter-modal-sheet {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 84px;
  }

  .top-nav {
    padding: 10px 0;
  }
  .nav-title {
    font-size: 0.95rem;
  }
  .nav-creator-btn {
    display: none;
  }
  .nav-actions .nav-pdf-btn {
    display: none;
  }
  .desktop-only-btn {
    display: none !important;
  }

  .hero {
    padding: 20px 0 16px;
  }
  .hero-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
    margin-bottom: 10px;
  }
  .hero h1 {
    font-size: 1.6rem;
  }
  .typing-container {
    padding: 5px 14px;
    margin-bottom: 12px;
  }
  .typing-text {
    font-size: 0.78rem;
  }
  .hero-subtitle {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }
  .hero-creator-btn {
    font-size: 0.78rem;
    padding: 8px 16px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stat-pill {
    min-width: unset;
    padding: 8px 10px;
  }
  .stat-num {
    font-size: 1.2rem;
  }
  .stat-label {
    font-size: 0.62rem;
  }

  /* Quick Pills mobile adjustments */
  .pills-arrow-btn {
    display: none;
  }
  .scroll-hint-pill {
    display: block;
  }

  .filter-modal-btn .filter-btn-text {
    display: none;
  }
  .filter-modal-btn {
    padding: 0 14px;
  }

  /* College Card Mobile Layout */
  .college-card {
    grid-template-columns: 44px 1fr auto;
    padding: 14px 12px;
    gap: 10px;
  }
  .tier-badge {
    display: none;
  }
  .mcc-badge {
    min-width: 44px;
    padding: 6px 2px;
  }
  .mcc-badge .mcc-num {
    font-size: 0.92rem;
  }
  .college-name {
    font-size: 0.9rem;
    line-height: 1.3;
  }
  .meta-tag {
    font-size: 0.68rem;
    padding: 2px 6px;
  }
  .college-info {
    flex-direction: column;
    gap: 2px;
  }
  .info-item {
    font-size: 0.72rem;
  }

  .mobile-bottom-nav {
    display: flex;
  }
}

/* =================================================== */
/*  PRINT STYLESHEET                                   */
/* =================================================== */
@media print {
  .top-nav, .controls-panel, .mobile-bottom-nav, .app-footer, .fav-btn, .quick-pills-section, .filter-modal-backdrop {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0;
  }
  .college-card {
    break-inside: avoid;
    border: 1px solid #cccccc !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #000000 !important;
    margin-bottom: 8px;
  }
  .college-name {
    color: #000000 !important;
  }
}
