:root,
[data-theme="light"] {
  /* Crisp Light Theme Palette (Default for Indian Hostel Hub) */
  --bg-main: #f4f6fc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-highlight: rgba(79, 70, 229, 0.4);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent-primary: #4f46e5; /* Royal Indigo */
  --accent-hover: #4338ca;
  --accent-light: rgba(79, 70, 229, 0.08);
  
  --accent-secondary: #059669; /* Emerald Green */
  --accent-amber: #d97706; /* Warm Amber */
  --accent-rose: #e11d48; /* Rose Crimson */

  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(226, 232, 240, 0.9);
  --shadow-lg: 0 12px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
  
  --map-bg: #e2e8f0;
  --map-grid-dot: rgba(15, 23, 42, 0.12);
  --map-grid-line: rgba(15, 23, 42, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #1f293d;
  --bg-card-hover: #26334d;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(99, 102, 241, 0.4);
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-primary: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.15);
  
  --accent-secondary: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --glass-bg: rgba(17, 24, 39, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);

  --map-bg: #0f172a;
  --map-grid-dot: rgba(255, 255, 255, 0.05);
  --map-grid-line: rgba(255, 255, 255, 0.03);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Container & Layout */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  height: 72px;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
}

.logo-highlight {
  color: var(--accent-primary);
}

.logo-badge {
  font-size: 0.7rem;
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid var(--border-highlight);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--border-color);
}

.nav-link.active {
  color: var(--accent-primary);
  background: var(--accent-light);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-secondary);
}

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-accent:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-light);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}
.btn-block {
  width: 100%;
}

/* TAB NAVIGATION CONTENT */
.tab-content {
  display: none;
  animation: fadeIn 0.35s ease;
}
.tab-content.active {
  display: block;
}

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

/* HERO SECTION */
.hero-section {
  position: relative;
  padding: 64px 24px 48px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.18) 0%, transparent 65%);
  border-bottom: 1px solid var(--border-color);
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent-primary);
  border: 1px solid var(--border-highlight);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
}

/* SEARCH BOX CARD */
.search-box-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.search-inputs-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr;
  gap: 16px;
  margin-bottom: 20px;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-field input[type="text"],
.search-field select,
.form-control {
  width: 100%;
  height: 46px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-field input[type="text"]:focus,
.search-field select:focus,
.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-field input[type="range"] {
  height: 46px;
  accent-color: var(--accent-primary);
}

.search-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.quick-pills-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.pill-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.pill-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.search-submit-btn {
  height: 46px;
  padding: 0 24px;
}

/* TOOLBAR & CONTROLS */
.toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  margin-top: 12px;
  border-bottom: 1px solid var(--border-color);
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.results-meta h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.location-tag {
  font-size: 0.82rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-secondary);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.view-toggle-group {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.view-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-box label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.sort-box select {
  height: 38px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0 12px;
  font-size: 0.88rem;
}

/* EXPLORER LAYOUT: GRID VS SPLIT MAP */
.explorer-layout {
  padding: 24px 0 60px;
  display: grid;
  gap: 24px;
  transition: var(--transition);
}

.explorer-layout.grid-view {
  grid-template-columns: 1fr;
}

.explorer-layout.grid-view .map-container {
  display: none;
}

.explorer-layout.split-view {
  grid-template-columns: 1.2fr 1fr;
}

.explorer-layout.split-view .map-container {
  display: block;
  position: sticky;
  top: 92px;
  height: calc(100vh - 120px);
}

/* HOSTELS GRID */
.hostels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.explorer-layout.split-view .hostels-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* HOSTEL CARD DESIGN */
.hostel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.hostel-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg);
}

.hostel-card.active-highlight {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-surface);
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hostel-card:hover .card-img-wrapper img {
  transform: scale(1.06);
}

.card-badge-left {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-gender {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.badge-gender.boys { background: #3b82f6; color: #fff; }
.badge-gender.girls { background: #ec4899; color: #fff; }
.badge-gender.coed { background: #8b5cf6; color: #fff; }

.badge-verified {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  color: var(--accent-secondary);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-bookmark-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.card-bookmark-btn:hover, .card-bookmark-btn.saved {
  background: #fff;
  color: var(--accent-rose);
}

.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
}

.card-location {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.card-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.amenity-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  display: flex;
  flex-direction: column;
}

.price-num {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--accent-secondary);
}

.price-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 8px;
}

/* SIMULATED MAP INTERFACE */
.map-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.map-header {
  padding: 14px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.map-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-legend {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.pin-boys { background: #3b82f6; }
.dot.pin-girls { background: #ec4899; }
.dot.pin-coed { background: #8b5cf6; }

.simulated-map {
  position: relative;
  width: 100%;
  flex-grow: 1;
  background: var(--map-bg);
  background-image: 
    radial-gradient(var(--map-grid-dot) 1px, transparent 0),
    linear-gradient(to right, var(--map-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--map-grid-line) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
  overflow: hidden;
}

.map-campus-center {
  position: absolute;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
  z-index: 10;
  border: 2px solid #fff;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
  z-index: 20;
}

.map-pin:hover, .map-pin.active {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--accent-primary);
  color: #fff;
  z-index: 30;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
}

.map-pin.pin-boys { border-color: #3b82f6; }
.map-pin.pin-girls { border-color: #ec4899; }
.map-pin.pin-coed { border-color: #8b5cf6; }

/* ROOMMATE MATCHER GRID & CARDS */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.flex-gap {
  display: flex;
  gap: 16px;
}

.roommates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-bottom: 60px;
}

.roommate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.roommate-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
}

.rm-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.rm-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.rm-info h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.rm-major {
  font-size: 0.82rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.rm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.rm-tag {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.rm-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.rm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.rm-budget {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.rm-budget strong {
  color: var(--accent-secondary);
  font-size: 1.05rem;
}

/* COMPARISON TRAY */
.comparison-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-highlight);
  padding: 14px 24px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.4);
}

.comparison-tray.visible {
  transform: translateY(0);
}

.comp-tray-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.comp-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.comp-items-previews {
  display: flex;
  gap: 10px;
}

.comp-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--accent-primary);
}

.comp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comp-thumb-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--accent-rose);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

/* MODALS & OVERLAYS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow-lg);
}

.modal-backdrop.active .modal-box {
  transform: scale(1);
}

.modal-sm { max-width: 420px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1100px; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--accent-rose);
}

.modal-title {
  margin-bottom: 6px;
}

/* HOSTEL DETAIL MODAL STYLES */
.detail-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.detail-main-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.detail-sub-imgs {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.detail-sub-imgs img {
  width: 100%;
  height: 152px;
  object-fit: cover;
}

.detail-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
  margin-bottom: 20px;
}

.d-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 4px;
  cursor: pointer;
  transition: var(--transition);
}

.d-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.room-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.room-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: var(--transition);

}

.room-plan-card:hover {
  border-color: var(--accent-primary);
}

.mess-timetable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.mess-timetable th, .mess-timetable td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.88rem;
}

.mess-timetable th {
  background: var(--bg-card);
  color: var(--accent-primary);
}

/* COMPARISON TABLE */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th, .comparison-table td {
  padding: 14px;
  border: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.9rem;
}

.comparison-table th {
  background: var(--bg-card);
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 600;
  background: var(--bg-card);
}

/* TOAST NOTIFICATIONS */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--accent-secondary);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* FORM STYLING HELPER */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.88rem;
}

.margin-top-md { margin-top: 16px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); font-size: 0.88rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* FOOTER */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding-top: 60px;
  margin-top: 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

.brand-col .footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 16px 0;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links a:hover {
  background: var(--accent-primary);
  color: #fff;
}

.footer-col h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-col a:hover {
  color: var(--accent-primary);
}

.helpline-num {
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .search-inputs-grid {
    grid-template-columns: 1fr 1fr;
  }
  .explorer-layout.split-view {
    grid-template-columns: 1fr;
  }
  .explorer-layout.split-view .map-container {
    height: 400px;
    position: relative;
    top: 0;
  }
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .search-inputs-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }
}
