/* daylight-theme.css - Daylight Sky (mix: flat + organic clouds) */

/* =======================
   VARIABLES (edit here)
   ======================= */
:root{
  --sky-from: #E9F4FF;
  --sky-to:   #BBDFFF;
  --blue-main: #187BCE;
  --blue-dark: #125FA1;
  --gold: #FFC857;
  --muted: #51606B;
  --card-bg: #FFFFFF;
  --text-primary: #13202A;
  --radius: 14px;
  --shadow: 0 8px 26px rgba(18, 33, 52, 0.06);
  --shadow-hover: 0 14px 40px rgba(24, 123, 206, 0.12);
  --transition: 240ms cubic-bezier(.2,.9,.3,1);
  --container-max: 1200px;
}

/* Dark mode variables */
body.bj-theme.dark-mode {
  --sky-from: #0F1419;
  --sky-to: #1A1F2E;
  --blue-main: #4A9EFF;
  --blue-dark: #6DB3FF;
  --gold: #FFD966;
  --muted: #A8B5C0;
  --card-bg: #1F2937;
  --text-primary: #E5E7EB;
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 14px 40px rgba(74, 158, 255, 0.15);
}

/* =======================
   BASE LAYOUT
   ======================= */
*{box-sizing:border-box}
body.bj-theme{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--sky-from), var(--sky-to));
  color: var(--text-primary);
  margin:0;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  min-height:100vh;
  overflow-x:hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* page container */
.container{
  width: min(92%, var(--container-max));
  margin:0 auto;
}

/* =======================
   ANIMATED SKY (SVG layers)
   ======================= */
.sky-anim, .balloon-anim{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.55;
  will-change: background-position, transform;
}

/* sky (parallax slow slide) */
.sky-anim{
  background-image: url('../images/clouds_smooth.svg');
  background-repeat: repeat-x;
  background-size: 180% auto;
  animation: skySlide 60s linear infinite;
}

/* balloons (subtle floating objects) */
.balloon-anim{
  background-image: url('../images/balloons_float.svg');
  background-repeat: repeat-x;
  background-size: 220% auto;
  animation: balloonsFloat 20s ease-in-out infinite;
  opacity: 0.18;
  z-index: -1;
}

/* Keyframes */
@keyframes skySlide {
  0% { background-position: 0 0; }
  100% { background-position: -1400px 0; }
}
@keyframes balloonsFloat {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-18px) translateX(-40px); }
  100% { transform: translateY(0) translateX(0); }
}

/* Respect user's reduced motion preference */
.reduced-motion .sky-anim,
.reduced-motion .balloon-anim {
  animation: none !important;
  opacity: 0.38;
}

/* =======================
   HEADER
   ======================= */
.main-header{
  position: sticky;
  top:0;
  z-index: 40;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(18,28,40,0.04);
  box-shadow: var(--shadow);
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.bj-theme.dark-mode .main-header {
  background: rgba(31, 41, 55, 0.85);
  border-bottom-color: rgba(200, 210, 220, 0.1);
}
.header-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 0;
}
.logo{
  display:flex;
  gap:10px;
  align-items:center;
  color: var(--blue-dark);
  text-decoration:none;
  font-weight:800;
  font-family: 'Poppins', Inter, sans-serif;
  font-size:1.25rem;
}
.logo i{
  color: var(--gold);
  font-size:1.5rem;
  transform-origin:center;
  animation: balloonTiny 5s ease-in-out infinite;
}

.logo-img {
  height: 6.5rem;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  animation: balloonTiny 5s ease-in-out infinite;
}

@keyframes balloonTiny {
  0%{ transform: translateY(0) rotate(-4deg); }
  50%{ transform: translateY(-12px) rotate(6deg); }
  100%{ transform: translateY(0) rotate(-4deg); }
}

/* nav */
.nav-desktop ul{
  display:flex;
  gap:18px;
  list-style:none;
  align-items:center;
  margin:0;
  padding:0;
}
.nav-desktop a{
  text-decoration:none;
  color:var(--muted);
  font-weight:600;
  padding:8px 10px;
  border-radius:8px;
  transition: var(--transition);
}
.nav-desktop a:hover{ color:var(--blue-main); transform: translateY(-2px); }

/* balance chip */
.balance-chip{
  background: linear-gradient(90deg, rgba(24,123,206,0.95), rgba(33,158,188,0.95));
  color:white;
  padding:6px 12px;
  border-radius:18px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  font-weight:700;
  box-shadow: 0 8px 30px rgba(24,123,206,0.12);
}

/* language active */
.lang { padding:6px 8px; border-radius:8px; color:var(--muted); text-decoration:none; }
.lang.active{ background:var(--gold); color:var(--blue-dark); }

/* theme switcher */
.theme-switcher { display: flex; align-items: center; }
.theme-toggle-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  padding: 8px;
  cursor: pointer;
  color: var(--blue-dark);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-btn:hover {
  color: var(--blue-main);
  transform: scale(1.15) rotate(20deg);
}

.mobile-theme-toggle {
  background: none;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--blue-dark);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  font-size: 0.95rem;
  text-align: left;
}
.mobile-theme-toggle:hover {
  background: rgba(24, 123, 206, 0.08);
  color: var(--blue-main);
  transform: translateX(4px);
}

/* logout button */
.logout-item { display: flex; align-items: center; }
.logout-item form { display: inline; }
.logout-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
  font-size: 1.1rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logout-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.2));
  border-color: #dc2626;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.logout-btn:active {
  transform: scale(0.95);
}

body.bj-theme.dark-mode .logout-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
  border-color: rgba(239, 68, 68, 0.5);
  color: #ff7f7f;
}

body.bj-theme.dark-mode .logout-btn:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.25));
  border-color: #ff7f7f;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* login button */
.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue-main), var(--blue-dark));
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(24, 123, 206, 0.15);
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(24, 123, 206, 0.25);
}

/* burger */
.burger{
  display:none;
  background:none;
  border:0;
  font-size:1.2rem;
  padding:8px;
  cursor: pointer;
  color: var(--blue-dark);
  transition: var(--transition);
}
.burger:hover { color: var(--blue-main); transform: scale(1.1); }

/* mobile panel */
.mobile-panel{
  position:fixed;
  inset:0;
  display:none;
  z-index:60;
  background:linear-gradient(rgba(18,28,40,0.3), rgba(18,28,40,0.45));
  backdrop-filter: blur(4px);
  animation: panelFadeIn 300ms ease-out;
}
.mobile-panel[aria-hidden="false"]{ display:block; }

@keyframes panelFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mobile-panel-inner{
  width:320px;
  max-width:88%;
  background:white;
  height: auto;
  max-height: calc(100vh - 20px);
  float:right;
  box-shadow: -18px 0 40px rgba(16,24,40,0.12);
  padding:12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 300ms ease-out;
  transition: background 0.3s ease;
}

body.bj-theme.dark-mode .mobile-panel-inner {
  background: #1F2937;
}

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

.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(18,28,40,0.08);
}

.mobile-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--blue-dark);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  font-family: 'Poppins', Inter;
}
.mobile-brand i { color: var(--gold); font-size: 1.3rem; }

.mobile-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border-radius: 6px;
}
.mobile-close:hover { background: rgba(18,28,40,0.05); color: var(--blue-dark); }

.mobile-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mobile-links li {
  display: flex;
  align-items: center;
}

.mobile-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--blue-dark);
  text-decoration: none;
  font-weight: 600;
  width: 100%;
  transition: var(--transition);
  font-size: 0.95rem;
}
.mobile-links a:hover {
  background: rgba(24,123,206,0.08);
  color: var(--blue-main);
  transform: translateX(4px);
}

.mobile-links i {
  font-size: 1.1rem;
  color: var(--blue-main);
  width: 20px;
  text-align: center;
}

.mobile-balance {
  padding: 10px 12px !important;
  background: linear-gradient(90deg, rgba(24,123,206,0.08), rgba(33,158,188,0.08));
  border-radius: 8px;
  color: var(--blue-main);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.mobile-balance i { color: var(--gold); }

.mobile-lang {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(18,28,40,0.08);
}

.mobile-lang a {
  flex: 1;
  padding: 8px !important;
  text-align: center;
  border: 1.5px solid rgba(18,28,40,0.1);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 6px !important;
  transition: var(--transition);
}

.mobile-lang a:hover {
  border-color: var(--blue-main);
  background: rgba(24,123,206,0.05) !important;
  transform: none;
}

.mobile-lang a.active {
  background: var(--gold) !important;
  color: var(--blue-dark) !important;
  border-color: var(--gold);
}

/* mobile logout button */
.btn-ghost {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-ghost:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.2));
  border-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.btn-ghost:active {
  transform: translateY(0);
}

body.bj-theme.dark-mode .btn-ghost {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
  border-color: rgba(239, 68, 68, 0.5);
  color: #ff7f7f;
}

body.bj-theme.dark-mode .btn-ghost:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.25));
  border-color: #ff7f7f;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* =======================
   MAIN / HERO / MAP
   ======================= */
.page{ padding: 36px 0 64px; flex:1; }
.page-container{ width: min(96%, var(--container-max)); margin: 0 auto; }

/* hero */
.hero{ display:grid; grid-template-columns: 1fr 1fr; gap:22px; align-items:stretch; margin-bottom:18px; }
.hero-left{ padding:22px; }
.hero-left .hero-title{ font-family:'Poppins', Inter; font-size:2rem; color:var(--blue-dark); margin-bottom:8px; }
.hero-left .hero-sub{ color:var(--muted); margin-bottom:14px; }
.hero-cta{ display:flex; gap:12px; margin-top:8px; }
.btn{ display:inline-flex; align-items:center; gap:10px; padding:10px 14px; border-radius:10px; font-weight:800; text-decoration:none; transition: var(--transition); }
.btn-primary{ background: linear-gradient(90deg, var(--blue-main), var(--blue-dark)); color:white; box-shadow: 0 12px 36px rgba(24,123,206,0.12);}
.btn-outline{ background:transparent; border:1px solid rgba(16,24,40,0.06); color:var(--muted); }

body.bj-theme.dark-mode .btn-outline {
  border-color: rgba(74, 158, 255, 0.3);
  color: var(--muted);
}

/* map area */
.hero-map{ display:flex; align-items:center; justify-content:center; min-height: 320px; border-radius:12px; overflow:hidden; background:#fff; box-shadow:var(--shadow); border:1px solid rgba(18,28,40,0.04); transition: background 0.3s ease, border-color 0.3s ease; }

body.bj-theme.dark-mode .hero-map {
  background: #1F2937;
  border-color: rgba(200, 210, 220, 0.1);
}
.map-fake{ color:var(--muted); padding:18px; }

/* =======================
   CARDS / FLIGHT LIST
   ======================= */
.card{ background: var(--card-bg); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: var(--transition); }

.flight-list{ display:flex; flex-direction:column; gap:12px; }
.flight-card{ display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px; border-radius:12px; background:#fff; border:1px solid #E7F1FB; box-shadow: 0 8px 22px rgba(18,28,40,0.04); transition: var(--transition); cursor: pointer; text-decoration: none; color: inherit; }
.flight-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #B3D9F2; }
.flight-title{ color:var(--blue-dark); font-weight:800; }
.flight-sub{ color:var(--muted); }

body.bj-theme.dark-mode .flight-card {
  background: #2D3748;
  border-color: rgba(74, 158, 255, 0.2);
  color: var(--text-primary);
}

body.bj-theme.dark-mode .flight-card:hover {
  border-color: rgba(74, 158, 255, 0.4);
}

body.bj-theme.dark-mode .flight-title {
  color: var(--blue-dark);
}

/* badge */
.badge-altitude{ color:var(--blue-main); font-weight:800; }

/* =======================
   MESSAGES
   ======================= */
.messages{ list-style:none; padding:0; margin:0 0 18px 0; display:flex; flex-direction:column; gap:10px; }
.msg{ display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border-radius:10px; background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(250,250,250,0.95)); border:1px solid rgba(20,34,48,0.02); color:var(--blue-dark); font-weight:700; transition: background 0.3s ease, color 0.3s ease; }
.msg-success{ background:#E7F9F1; color:#056644; }
.msg-error{ background:#FFECEC; color:#8a1b1b; }

body.bj-theme.dark-mode .msg {
  background: linear-gradient(90deg, rgba(45, 55, 72, 0.8), rgba(45, 55, 72, 0.8));
  border-color: rgba(200, 210, 220, 0.1);
  color: var(--text-primary);
}

body.bj-theme.dark-mode .msg-success {
  background: rgba(16, 185, 129, 0.15);
  color: #86EFAC;
}

body.bj-theme.dark-mode .msg-error {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
}

/* =======================
   FOOTER
   ======================= */
.footer{ padding:18px 0; color:var(--muted); border-top:1px solid rgba(18,28,40,0.03); transition: border-color 0.3s ease; }

body.bj-theme.dark-mode .footer {
  border-top-color: rgba(200, 210, 220, 0.1);
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 1000px){
  .hero{ grid-template-columns: 1fr; }
  .hero-map{ min-height:220px; }
  .nav-desktop{ display:none; }
  .burger{ display:inline-flex; }
  .logo .brand-text{ display:inline-block; }
  .header-wrap{ padding:10px 0; }
}
@media (max-width: 520px){
  .page{ padding:20px 0; }
  .logo .brand-text{ display:none; }
  .hero-left .hero-title{ font-size:1.4rem; text-align:center; }
  .hero-left{ padding:16px; }
  .hero-cta{ justify-content:center; flex-wrap:wrap; }
  .mobile-panel-inner{ padding:12px; }
}

/* =======================
   FORMS
   ======================= */

.form-field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--blue-dark);
  font-size: 0.9rem;
}

.form-field input,
.form-field textarea,
.form-field select {
  padding: 10px 12px;
  border: 1px solid rgba(18,28,40,0.1);
  border-radius: 8px;
  background: white;
  color: var(--blue-dark);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--blue-main);
  box-shadow: 0 0 0 3px rgba(24,123,206,0.1);
  background: rgba(233,244,255,0.5);
}

.form-field input::placeholder {
  color: var(--muted);
}

.form-errors {
  background: linear-gradient(135deg, rgba(234,38,38,0.08), rgba(234,38,38,0.04));
  border-left: 3px solid #EA2626;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.form-errors p {
  color: #7C2D2D;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-errors p:last-child {
  margin-bottom: 0;
}

.field-error {
  background: linear-gradient(135deg, rgba(249,115,115,0.1), rgba(249,115,115,0.05));
  border-left: 2px solid #F97373;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 6px;
  font-size: 0.85rem;
}

.field-error p {
  color: #991B1B;
  margin: 0;
  font-weight: 600;
}

/* =======================
   BUTTONS
   ======================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--blue-main), var(--blue-dark));
  color: white;
  box-shadow: 0 8px 20px rgba(24,123,206,0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(24,123,206,0.2);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--blue-main);
  color: var(--blue-main);
}

.btn-outline:hover {
  background: rgba(24,123,206,0.05);
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

/* accessibility helpers */
.sr-only{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.no-scroll{ overflow:hidden; height:100vh; }
