/* 
 * METAR Fog Analysis - SynopX Design Theme
 * Glassmorphic Aurora Aesthetic with Dark/Light Support
 */

:root {
  --primary: #0ea5e9;
  --secondary: #6366f1;
  --accent: #f43f5e;
  --bg-dark: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.7);
  --border-glass: rgba(255, 255, 255, 0.12);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  font-family: "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================
   ANIMATED GRADIENT BACKGROUND & ORBS
   ========================================= */
.bg-animation {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -2;
  background: linear-gradient(45deg, #0f172a, #1e1b4b, #020617, #172554);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: floatOrb 12s infinite ease-in-out alternate;
}
.orb-1 {
  width: 420px;
  height: 420px;
  background: rgba(14, 165, 233, 0.18);
  top: -80px;
  left: -80px;
}
.orb-2 {
  width: 520px;
  height: 520px;
  background: rgba(99, 102, 241, 0.18);
  bottom: -120px;
  right: -100px;
  animation-delay: -5s;
}
.orb-3 {
  width: 350px;
  height: 350px;
  background: rgba(244, 63, 94, 0.14);
  top: 45%;
  left: 40%;
  animation-duration: 16s;
  animation-delay: -3s;
}

@keyframes floatOrb {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-35px) scale(1.08); }
}

/* =========================================
   GLASSMORPHISM PANELS & CARDS
   ========================================= */
.glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
}

.core-glass-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(14, 165, 233, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
}

.glass-card:hover::before {
  opacity: 1;
}

/* =========================================
   CUSTOM SCROLLBAR
   ========================================= */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.45);
  border-color: rgba(56, 189, 248, 0.6);
}

/* =========================================
   TYPOGRAPHY & EFFECTS
   ========================================= */
.main-title {
  background: linear-gradient(to right, #38bdf8, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3.5s infinite linear;
  background-size: 200% auto;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin-bottom: 1rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.glass-card:hover .icon-wrapper {
  transform: scale(1.1) rotate(4deg);
}

/* =========================================
   CATEGORY BADGES
   ========================================= */
.badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border-width: 1px;
}
.badge-very-dense {
  background-color: rgba(214, 39, 40, 0.2);
  color: #fca5a5;
  border-color: rgba(214, 39, 40, 0.4);
}
.badge-dense {
  background-color: rgba(255, 140, 26, 0.2);
  color: #fdba74;
  border-color: rgba(255, 140, 26, 0.4);
}
.badge-moderate {
  background-color: rgba(95, 179, 161, 0.2);
  color: #6ee7b7;
  border-color: rgba(95, 179, 161, 0.4);
}
.badge-shallow {
  background-color: rgba(242, 209, 107, 0.2);
  color: #fde047;
  border-color: rgba(242, 209, 107, 0.4);
}
.badge-no-fog {
  background-color: rgba(100, 116, 139, 0.2);
  color: #cbd5e1;
  border-color: rgba(100, 116, 139, 0.3);
}

/* =========================================
   TABLE STYLING
   ========================================= */
.glass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.glass-table th {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.glass-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  white-space: nowrap;
}
.glass-table tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

/* =========================================
   LIGHT THEME OVERRIDES
   ========================================= */
body.light-theme {
  --bg-dark: #f0f4f8;
  --card-bg: rgba(255, 255, 255, 0.88);
  --border-glass: rgba(0, 0, 0, 0.1);
  --text-main: #0f172a;
  --text-muted: #475569;
  background-color: var(--bg-dark);
  color: var(--text-main);
}

body.light-theme .bg-animation {
  background: linear-gradient(45deg, #f0f4f8, #e2e8f0, #cbd5e1, #dbeafe);
  background-size: 400% 400%;
}
body.light-theme .orb-1 { background: rgba(14, 165, 233, 0.1); }
body.light-theme .orb-2 { background: rgba(99, 102, 241, 0.1); }
body.light-theme .orb-3 { background: rgba(244, 63, 94, 0.08); }

body.light-theme .glass-panel,
body.light-theme .core-glass-panel,
body.light-theme .glass-card {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06) !important;
  color: #0f172a;
}

body.light-theme .glass-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .glass-table td {
  color: #1e293b;
  border-bottom-color: rgba(0, 0, 0, 0.05);
}
body.light-theme .glass-table tr:hover td {
  background: rgba(14, 165, 233, 0.04);
}

body.light-theme .text-slate-200,
body.light-theme .text-slate-300 {
  color: #334155 !important;
}
body.light-theme .text-slate-400 {
  color: #64748b !important;
}
body.light-theme .text-white {
  color: #0f172a !important;
}

/* =======================================================================
   UNIVERSAL ADVANCED FOOTER — IMD Component
   Author & Lead: Lal Kamal : IMD
   ======================================================================= */
.advanced-footer {
  --ft-bg-start: rgba(15, 23, 42, 0.94);
  --ft-bg-end: rgba(30, 41, 59, 0.97);
  --ft-accent: #38bdf8;
  --ft-gold: #fbbf24;
  --ft-text: #f8fafc;
  --ft-muted: #94a3b8;
  --ft-border: rgba(255, 255, 255, 0.08);

  background: linear-gradient(135deg, var(--ft-bg-start) 0%, var(--ft-bg-end) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--ft-border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 36px rgba(0, 0, 0, 0.35);
  color: var(--ft-text);
  font-family: "Inter", "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 30px 24px 22px;
  margin-top: 48px;
  position: relative;
  z-index: 40;
}

.footer-container {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

/* Developer Row */
.footer-dev-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 500;
  color: #e2e8f0;
  letter-spacing: 0.3px;
}

.footer-dev-row .dev-label {
  color: var(--ft-muted);
  font-weight: 500;
}

.footer-dev-row .highlight-name {
  color: #ffffff;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  text-shadow:
    0 0 6px rgba(56, 189, 248, 0.7),
    0 0 16px rgba(14, 165, 233, 0.5),
    0 0 28px rgba(2, 132, 199, 0.35);
  animation: dev-glow-pulse 2.2s infinite alternate ease-in-out;
  display: inline-block;
  transition: transform 0.25s ease;
}
.footer-dev-row .highlight-name:hover {
  transform: scale(1.04);
}

@keyframes dev-glow-pulse {
  0% {
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.6), 0 0 14px rgba(14, 165, 233, 0.4), 0 0 24px rgba(2, 132, 199, 0.25);
  }
  100% {
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.95), 0 0 20px rgba(14, 165, 233, 0.75), 0 0 35px rgba(2, 132, 199, 0.5);
  }
}

.footer-dev-row .imd-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fde047;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 2px 10px;
  border-radius: 6px;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
  letter-spacing: 1px;
  transition: all 0.25s ease;
}
.footer-dev-row .imd-pill:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.2));
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

/* Metadata Row (Location, Data Source, Visitors) */
.footer-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--ft-muted);
  line-height: 1.6;
}

.footer-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-meta-item.source-item .source-title {
  color: #cbd5e1;
}
.footer-meta-item.source-item strong {
  color: #38bdf8;
  font-weight: 600;
}

.footer-meta-sep {
  color: rgba(255, 255, 255, 0.18);
  font-weight: 300;
  user-select: none;
}

.footer-visitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}
.footer-visitor-badge:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}
.footer-visitor-badge i {
  color: #38bdf8;
  font-size: 0.78rem;
}
.footer-visitor-badge #visitorCount {
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Glowing Divider */
.footer-divider-glow {
  width: 100%;
  max-width: 680px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.3), rgba(251, 191, 36, 0.3), transparent);
  margin: 2px 0;
}

/* Copyright & Back to Top Row */
.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.78);
  letter-spacing: 0.4px;
}

.footer-copyright {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-footer-backtotop {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}
.btn-footer-backtotop:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.15));
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}
.btn-footer-backtotop i {
  font-size: 0.72rem;
  color: #38bdf8;
  transition: transform 0.25s ease;
}
.btn-footer-backtotop:hover i {
  transform: translateY(-2px);
}

/* Floating Bottom Credits Pill (matches Image 1 & India_Lightning.html) */
.map-footer-pill {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 14px rgba(251, 191, 36, 0.2);
  border-radius: 24px;
  padding: 6px 18px;
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  user-select: none;
  opacity: 1;
  visibility: visible;
}
.map-footer-pill:hover {
  background: rgba(30, 41, 59, 0.98);
  border-color: #fbbf24;
  color: #fbbf24;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65), 0 0 18px rgba(251, 191, 36, 0.35);
}
.map-footer-pill.hidden-pill {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateX(-50%) translateY(20px);
}

@media (max-width: 640px) {
  .advanced-footer {
    padding: 22px 14px 18px;
    border-radius: 16px 16px 0 0;
    margin-top: 24px;
  }
  .footer-dev-row {
    font-size: 0.95rem;
  }
  .footer-dev-row .highlight-name {
    font-size: 1.18rem;
  }
  .footer-meta-row {
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
  }
  .footer-meta-sep {
    display: none;
  }
  .footer-bottom-row {
    flex-direction: column;
    gap: 10px;
  }
}
