:root {
  --primary: #ff6600;
  --secondary: #e65c00;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg-soft: #f8fafc;
}

.colleges-section {
  padding-top: 40px;
}

.exam-grid {
  margin-top: 20px;
  align-items: stretch;
}

.colleges-section .exam-grid {
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 18px;
}

.college-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 11px;
  min-height: 264px;
  padding: 20px;
  border: 1px solid #e8edf3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.college-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 102, 0, 0.09), transparent 34%),
    linear-gradient(180deg, transparent 55%, rgba(248, 250, 252, 0.78));
  opacity: 0.9;
}

.college-card > * {
  position: relative;
  z-index: 1;
}

.college-card .exam-abbr {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 1.08rem;
  line-height: 1.32;
}

.college-card .exam-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 0;
}

.college-card .exam-level {
  align-self: start;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff4eb;
  color: #b45309;
  border: 1px solid #fed7aa;
}

.college-card .exam-name,
.college-card .exam-body {
  margin-bottom: 0;
}

.college-card .exam-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 0.84rem;
}

.college-card .exam-body {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #475569;
  min-height: 0;
  font-size: 0.88rem;
}

.clear-search-btn {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-right: 1px solid #e2e8f0 !important;
}

.clear-search-btn:hover {
  background: #e2e8f0 !important;
}

.college-search-form {
  display: grid;
  gap: 14px;
}

.college-search-bar {
  width: 100%;
}

.college-search-loading .exam-sections {
  opacity: 0.62;
  transition: opacity 0.18s ease;
}

.college-select-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
}

.college-select-row select {
  min-width: 230px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

.clear-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 9px 14px;
  text-decoration: none;
  font-size: 0.86rem;
}

.college-filter-bar {
  top: 64px;
}

.alpha-tabs .filter-tab {
  color: var(--muted);
  text-decoration: none;
}

.state-chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px 80px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.state-chip-row::-webkit-scrollbar {
  display: none;
}

.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: 0.15s ease;
}

.state-chip span {
  color: var(--muted);
  font-weight: 600;
}

.state-chip:hover,
.state-chip.active {
  border-color: #ff8a33;
  background: #fff4eb;
  color: var(--secondary);
}

.state-section-block {
  margin-bottom: 42px;
}

.state-section-block:last-child {
  margin-bottom: 0;
}

.college-section-header {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-filter-link {
  color: var(--primary);
  border: 1px solid #ffd3b0;
  background: #fff7f0;
  border-radius: 999px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.section-filter-link:hover {
  background: var(--primary);
  color: #fff;
}

.college-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
  margin-bottom: 0;
  max-height: 58px;
  overflow: hidden;
}

.college-tags span {
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.college-card .exam-footer-row {
  align-self: end;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid #eef2f7;
}

.college-card .exam-conducting {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  padding-right: 10px;
}

.college-card .exam-link {
  flex: 0 0 auto;
}

.filter-list {
  max-height: 190px;
  overflow: auto;
  padding: 8px 0;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}

.filter-item input {
  accent-color: var(--primary);
}

.meta-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.state-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 18px;
  padding: 12px 14px;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  background: #fff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
}

.state-results-toolbar form {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.state-results-toolbar label {
  color: var(--muted);
  font-size: 0.82rem;
}

.state-results-toolbar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff7f0;
  color: var(--text);
  padding: 8px 28px 8px 10px;
  font: inherit;
  outline: none;
}

.db-error-banner {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.empty-state {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 18px;
  color: #64748b;
  text-align: center;
  font-weight: 600;
  display: block;
}

.state-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.state-page-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #ffd3b0;
  border-radius: 999px;
  background: #fff7f0;
  color: var(--primary);
  padding: 10px 14px;
  text-decoration: none;
  transition: 0.15s ease;
}

.state-page-link:hover {
  background: var(--primary);
  color: #fff;
}

.state-page-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 576px) {
  .search-section {
    padding: 40px 16px !important;
  }

  .college-search-bar {
    border-radius: 20px !important;
    flex-direction: column;
    padding: 8px !important;
    gap: 6px !important;
  }

  .college-search-bar input {
    width: 100%;
    padding: 12px 16px !important;
    border-radius: 14px 14px 0 0 !important;
    border-bottom: 1px solid rgba(128,128,128,0.15) !important;
  }

  .college-search-bar button {
    width: 100%;
    border-radius: 0 0 14px 14px !important;
    padding: 12px 20px !important;
  }

  .college-select-row {
    align-items: stretch;
    flex-direction: column;
  }

  .college-select-row select,
  .clear-link {
    width: 100%;
    justify-content: center;
  }

  .state-chip-row {
    padding: 12px 18px;
  }

  .college-section-header {
    align-items: flex-start;
    gap: 12px;
  }

  .state-results-toolbar,
  .state-pagination {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .state-results-toolbar form {
    justify-content: center;
  }
}




/* --- GEN-Z DARK THEME OVERRIDES --- */
:root {
  --primary: #ff6600 !important;
  --primary-dark: #e05500 !important;
  --text: #ffffff !important;
  --muted: #94a3b8 !important;
  --line: rgba(255,255,255,0.06) !important;
  --bg-main: #050a15 !important;
  --bg-card: rgba(13, 22, 39, 0.65) !important;
}

body {
  background: var(--bg-main) !important;
  color: var(--text) !important;
  font-family: 'Inter', sans-serif !important;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.site-main {
  background: var(--bg-main) !important;
}

/* SEARCH SECTION */
.search-section {
  background: radial-gradient(circle at top right, rgba(255,102,0, 0.1), transparent 40%),
              radial-gradient(circle at bottom left, rgba(255, 102, 0, 0.05), transparent 40%),
              #0a1128 !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  padding: 80px 20px !important;
}
.search-inner h2 {
  font-family: 'Poppins', sans-serif !important;
  font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
  font-weight: 800 !important;
  color: #fff !important;
  letter-spacing: -0.5px !important;
  text-transform: uppercase;
}
.search-inner p {
  color: #cbd5e1 !important;
  font-size: 1.1rem !important;
}

/* GLASSY SEARCH BAR */
.college-search-bar {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 100px !important;
  padding: 6px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  transition: border-color 0.3s ease !important;
}
.college-search-bar:focus-within {
  border-color: rgba(255,102,0, 0.5) !important;
  box-shadow: 0 8px 32px rgba(255,102,0, 0.1) !important;
}
.college-search-bar input {
  background: transparent !important;
  color: #fff !important;
  font-size: 1.05rem !important;
  padding-left: 20px !important;
}
.college-search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}
.college-search-bar button {
  background: var(--primary) !important;
  color: #050a15 !important;
  border-radius: 100px !important;
  padding: 12px 32px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  transition: all 0.3s ease !important;
}
.college-search-bar button:hover {
  background: var(--primary-dark) !important;
  transform: scale(1.02) !important;
  box-shadow: 0 0 20px rgba(255,102,0, 0.4) !important;
}

/* GLASSY CARDS */
.college-card {
  background: var(--bg-card) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative;
  overflow: hidden;
}
.college-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.college-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  border-color: rgba(255,102,0, 0.5) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255,102,0, 0.15) !important;
}
.college-card:hover::before {
  opacity: 1;
}
.college-card::after { display: none !important; }

/* CARD TYPOGRAPHY */
.exam-abbr { 
  color: #fff !important; 
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
  transition: color 0.3s ease !important;
}
.college-card:hover .exam-abbr { color: var(--primary) !important; }

.exam-name i { color: var(--primary) !important; }
.exam-name { color: #cbd5e1 !important; }
.exam-body { color: #94a3b8 !important; }

/* LEVEL & TAGS */
.exam-level {
  background: rgba(255,102,0, 0.1) !important;
  color: var(--primary) !important;
  border: 1px solid rgba(255,102,0, 0.2) !important;
  border-radius: 100px !important;
  backdrop-filter: blur(4px) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-size: 0.7rem !important;
}
.college-tags span {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border-radius: 100px !important;
}

/* CARD FOOTER */
.exam-footer-row { 
  border-top: 1px solid rgba(255,255,255,0.06) !important;
  margin-top: 10px !important;
}
.exam-conducting { color: #64748b !important; }
.exam-link { 
  color: var(--primary) !important; 
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.5px !important;
}

/* FILTERS & TABS */
.filter-bar, .state-chip-row {
  background: rgba(5, 10, 21, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.filter-tab { 
  color: #64748b !important; 
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-size: 0.8rem !important;
}
.filter-tab:hover, .filter-tab.active { 
  color: var(--primary) !important; 
  border-bottom: 2px solid var(--primary) !important; 
}

.state-chip {
  background: rgba(255,255,255,0.03) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 100px !important;
}
.state-chip:hover, .state-chip.active {
  background: rgba(255,102,0, 0.1) !important;
  color: var(--primary) !important;
  border-color: rgba(255,102,0, 0.4) !important;
  box-shadow: 0 0 15px rgba(255,102,0, 0.1) !important;
}

.section-title { color: #fff !important; }
.section-filter-link {
  background: rgba(255,102,0, 0.1) !important;
  border: 1px solid rgba(255,102,0, 0.3) !important;
  color: var(--primary) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-radius: 100px !important;
}
.section-filter-link:hover {
  background: var(--primary) !important;
  color: #050a15 !important;
  box-shadow: 0 0 20px rgba(255,102,0, 0.3) !important;
}

/* RESULTS TOOLBAR */
.state-results-toolbar {
  background: rgba(255,255,255,0.02) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 100px !important;
  color: #cbd5e1 !important;
}
.state-results-toolbar select {
  background: rgba(0,0,0,0.2) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 100px !important;
}
.state-results-toolbar select option { background: #050a15; color: #fff; }

.empty-state {
  background: rgba(255,255,255,0.02) !important;
  border: 1px dashed rgba(255,255,255,0.1) !important;
  color: #64748b !important;
  backdrop-filter: blur(12px) !important;
  border-radius: 20px !important;
}

.exam-section { background: var(--bg-main) !important; border-bottom: none !important; }
.exam-section:nth-child(even) { background: #070d1a !important; }

.clear-search-btn {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #fff !important;
  backdrop-filter: blur(8px) !important;
}
.clear-search-btn:hover { background: rgba(255,255,255,0.1) !important; }
.college-select-row select {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  color: #fff !important;
  border-radius: 100px !important;
}

/* -- LIGHT MODE OVERRIDES ------------------------------------------ */
body.light-mode, body.light-mode .site-main {
  background: #f8fafc !important;
  color: #1e293b !important;
}

body.light-mode .search-section {
  background: radial-gradient(circle at top right, rgba(255,102,0, 0.2), transparent 40%),
              radial-gradient(circle at bottom left, rgba(255, 102, 0, 0.1), transparent 40%),
              #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
body.light-mode .search-inner h2 { color: #0f172a !important; }
body.light-mode .search-inner p { color: #475569 !important; }

body.light-mode .college-search-bar {
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05) !important;
}
body.light-mode .college-search-bar:focus-within {
  border-color: var(--primary) !important;
  box-shadow: 0 8px 32px rgba(255,102,0, 0.2) !important;
}
body.light-mode .college-search-bar input { color: #0f172a !important; }
body.light-mode .college-search-bar input::placeholder { color: #94a3b8 !important; }
body.light-mode .college-search-bar button {
  background: var(--primary) !important;
  color: #0f172a !important;
}

body.light-mode .college-card {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04) !important;
}
body.light-mode .college-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 20px rgba(255,102,0, 0.2) !important;
}
body.light-mode .exam-abbr { color: #0f172a !important; }
body.light-mode .college-card:hover .exam-abbr { color: #c2410c !important; }
body.light-mode .exam-name i { color: #c2410c !important; }
body.light-mode .exam-name { color: #475569 !important; }
body.light-mode .exam-body { color: #64748b !important; }
body.light-mode .exam-footer-row { border-top-color: #e2e8f0 !important; }
body.light-mode .exam-conducting { color: #94a3b8 !important; }
body.light-mode .exam-link { color: #c2410c !important; }

body.light-mode .exam-level {
  background: var(--primary) !important;
  color: #0f172a !important;
  border-color: #a3e635 !important;
}
body.light-mode .college-tags span {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

body.light-mode .filter-bar, body.light-mode .state-chip-row {
  background: rgba(255, 255, 255, 0.8) !important;
  border-bottom-color: #e2e8f0 !important;
}
body.light-mode .filter-tab { color: #64748b !important; }
body.light-mode .filter-tab:hover, body.light-mode .filter-tab.active {
  color: #c2410c !important;
  border-bottom-color: var(--primary) !important;
}
body.light-mode .state-chip {
  background: #ffffff !important;
  color: #475569 !important;
  border-color: #e2e8f0 !important;
}
body.light-mode .state-chip:hover, body.light-mode .state-chip.active {
  background: rgba(255,102,0, 0.2) !important;
  color: #c2410c !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 15px rgba(255,102,0, 0.15) !important;
}

body.light-mode .section-title { color: #0f172a !important; }
body.light-mode .section-filter-link {
  background: rgba(255,102,0, 0.2) !important;
  border-color: var(--primary) !important;
  color: #c2410c !important;
}
body.light-mode .section-filter-link:hover {
  background: var(--primary) !important;
  color: #0f172a !important;
}

body.light-mode .state-results-toolbar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}
body.light-mode .state-results-toolbar select {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body.light-mode .state-results-toolbar select option { background: #fff; color: #0f172a; }
body.light-mode .clear-search-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
body.light-mode .college-select-row select {
  background: #fff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-mode .empty-state {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}
body.light-mode .exam-section:nth-child(even) { background: #f1f5f9 !important; }

