:root {
  --bg: #0b0f14;
  --card: #121926;
  --text: #e7eef7;
  --muted: #a9b6c7;
  --border: rgba(255,255,255,0.10);
  --accent: #5aa7ff;
  --danger: #ff5a6b;
}

* { box-sizing: border-box; }

/* --- UPDATED BACKGROUND SECTION --- */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  /* Deep dark blue base */
  background-color: #0b0f14;
  /* Two glowing lights: Blue on top-left, Red on top-right */
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(90, 167, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(255, 90, 107, 0.15) 0%, transparent 50%);
  background-attachment: fixed; /* Keeps background still while scrolling */
  color: var(--text);
  min-height: 100vh;
}
/* ---------------------------------- */

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.row { display: flex; align-items: center; justify-content: space-between; }
.col { flex: 1; }
.gap { gap: 16px; }

.topbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(11,15,20,0.75);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  z-index: 100; /* Added z-index to ensure nav stays on top */
}

.brand { font-weight: 800; letter-spacing: 0.5px; }

.nav { display: flex; gap: 14px; }
.nav a {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.nav a.active, .nav a:hover {
  border-color: var(--border);
  background: rgba(255,255,255,0.05);
}

/* Responsive navigation / mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 20px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* When nav becomes mobile it will overlay under the topbar */
.nav.mobile-open {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% + 8px);
  background: rgba(11,15,20,0.95);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  z-index: 1200;
}

.nav.mobile-open a {
  padding: 10px 12px;
  border-radius: 10px;
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  padding: 22px 0;
}
.heroImg {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.heroText h1 { margin: 0 0 8px; font-size: 40px; }
.heroText p { margin: 0 0 14px; color: var(--muted); }

.card {
  background: rgba(18,25,38,0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.formGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
label { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
input, select {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline: none;
}
input:focus, select:focus { border-color: rgba(90,167,255,0.6); }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.btn:hover { background: rgba(255,255,255,0.10); text-decoration: none; }
.btn.primary { background: rgba(90,167,255,0.25); border-color: rgba(90,167,255,0.45); }
.btn.danger { background: rgba(255,90,107,0.20); border-color: rgba(255,90,107,0.45); }

.hint { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

/* Flash messages (Flask) */
.flashWrap { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.flash { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: #fff; box-shadow: 0 8px 20px rgba(2,16,35,.06); }
.flash.success { border-color: rgba(34, 197, 94, .35); }
.flash.info { border-color: rgba(59, 130, 246, .35); }
.flash.warning { border-color: rgba(245, 158, 11, .35); }
.flash.danger { border-color: rgba(239, 68, 68, .35); }

/* Small helpers */
.bigClock { font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: 1px; }

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-bottom: 26px;
}

.cardImg {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.pageHeader { padding: 18px 0 10px; }
.pageHeader h1 { margin: 0 0 6px; }
.pageHeader p { margin: 0; color: var(--muted); }

.monoBox {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.22);
  color: var(--text);
}

.sideImg {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.bigClock {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 2px;
  /* Apply the animation */
  animation: rgbGlow 6s linear infinite;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
  .formGrid { grid-template-columns: 1fr; }
  .row { flex-direction: column; align-items: stretch; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .container { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 480px) {
  .heroText h1 { font-size: 22px; }
  .heroText p { font-size: 13px; }
  .heroImg { height: 200px; }
  .card { padding: 12px; border-radius: 12px; }
  .btn { padding: 9px 10px; font-size: 14px; }
  .formGrid { gap: 10px; }
  .pageHeader { padding: 12px 0 8px; }
  .pageHeader h1 { font-size: 20px; }
  .monoBox { font-size: 12px; padding: 10px; }
  .sideImg { height: 160px; }
}

.resultBox .alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; }
.alert.success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.35); }
.alert.danger  { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.35); }

.kpiRow { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0,1fr)); margin: 12px 0; }
.kpi { border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px; }
.kpi .k { opacity: .8; font-size: 12px; margin-bottom: 6px; }
.kpi .v { font-size: 22px; font-weight: 700; }
@media (max-width: 700px){ .kpiRow { grid-template-columns: 1fr; } }


/* RGB Glowing Animation */
@keyframes rgbGlow {
  0%   { color: #ff0000; text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000; }
  15%  { color: #ff7f00; text-shadow: 0 0 20px #ff7f00, 0 0 40px #ff7f00; }
  30%  { color: #ffff00; text-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00; }
  45%  { color: #00ff00; text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00; }
  60%  { color: #00ffff; text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff; }
  75%  { color: #0000ff; text-shadow: 0 0 20px #0000ff, 0 0 40px #0000ff; }
  90%  { color: #ff00ff; text-shadow: 0 0 20px #ff00ff, 0 0 40px #ff00ff; }
  100% { color: #ff0000; text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000; }
}

/* --- Admin Dashboard Styles --- */
.table-wrap { overflow-x: auto; margin-top: 16px; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.admin-table th { text-align: left; padding: 12px; background: rgba(255,255,255,0.05); border-bottom: 2px solid var(--border); color: var(--muted); }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.booking-row:hover td { background: rgba(255,255,255,0.02); }
.badge { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge.success { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.badge.danger { background: rgba(255, 90, 107, 0.2); color: #ff5a6b; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.text-muted { color: var(--muted); }
.mono { font-family: monospace; letter-spacing: 0.5px; }

@media (max-width: 700px) {
  .admin-table td input { width: 100%; box-sizing: border-box; }
  .admin-table td { padding: 8px; }
}

/* --- City Selection Modal --- */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: #121926;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0b0f14;
}
.modal-header h2 { margin: 0; font-size: 20px; color: var(--text); }
.close-modal { cursor: pointer; font-size: 28px; color: var(--muted); line-height: 1; }
.close-modal:hover { color: var(--danger); }

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

@media (max-width: 700px) {
  .modal-content { width: 100%; height: 100%; border-radius: 8px; max-width: none; max-height: none; }
  .modal-body { padding: 12px; }
  .hotel-mini-img { height: 110px; }
}

/* Hotel Grid inside Popup */
.city-group { margin-bottom: 24px; }
.city-title { 
  font-size: 18px; 
  color: var(--accent); 
  margin-bottom: 12px; 
  border-bottom: 1px solid rgba(255,255,255,0.05); 
  padding-bottom: 5px; 
}

.hotel-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.hotel-card-mini {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.hotel-card-mini:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: rgba(255,255,255,0.06);
}

.hotel-mini-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: #000;
}

.hotel-mini-info { padding: 12px; }
.hotel-mini-name { font-weight: bold; font-size: 15px; margin-bottom: 6px; display: block; color: var(--text); }
.hotel-mini-price { color: #4ade80; font-size: 14px; font-weight: 700; }
.hotel-mini-meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; }

/* Print Styles */
@media print {
  .topbar, .nav, .footer, .btn, .sideImg, .pageHeader p, .hint, #searchSummary {
    display: none !important;
  }
  
  body, .card {
    background: white !important;
    color: black !important;
    border: none !important;
    box-shadow: none !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* Focus solely on the receipt box */
  #receipt {
    display: block !important;
    border: 2px solid #000 !important;
    color: #000 !important;
    padding: 20px !important;
    font-family: sans-serif;
  }
}

/* --- Payment Form Styles --- */
.payment-form {
  padding: 10px;
}

.pay-label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

.pay-input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-family: monospace; /* Looks like card numbers */
  letter-spacing: 1px;
}

.pay-input:focus {
  border-color: var(--accent);
  outline: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1); /* Turns the black icon white */
  cursor: pointer;
  opacity: 0.6;
  transition: 0.2s;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}
/* Flash messages (Flask) */
.flashWrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(18,25,38,0.92);   /* dark card, matches your theme */
  color: var(--text);               /* readable text */
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Add a bold colored stripe so you instantly see the type */
.flash.success { border-left: 5px solid rgba(34,197,94,0.9); }
.flash.info    { border-left: 5px solid rgba(59,130,246,0.9); }
.flash.warning { border-left: 5px solid rgba(245,158,11,0.95); }
.flash.danger  { border-left: 5px solid rgba(255,90,107,0.95); }

/* Extra contrast for danger (optional but nice) */
.flash.danger {
  background: rgba(255,90,107,0.14);
  border-color: rgba(255,90,107,0.35);
}
