/* ==========================================================================
   Text2 Weather - Modern Glassmorphism Stylesheet
   Design System: Text2 OS Dark Glass Aesthetic
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-body: #0a0c10;
  --bg-card: rgba(18, 22, 32, 0.75);
  --bg-card-hover: rgba(26, 32, 48, 0.85);
  --bg-card-alt: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-input-focus: rgba(255, 255, 255, 0.1);
  --bg-pill: rgba(255, 255, 255, 0.06);
  --bg-pill-hover: rgba(255, 255, 255, 0.12);
  --bg-pill-active: rgba(59, 130, 246, 0.25);

  /* Primary Accent & Glow */
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;
  --glow-primary: rgba(59, 130, 246, 0.25);

  /* Text Colors */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #ffffff;

  /* Borders & Glass */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.5);
  --border-card: rgba(255, 255, 255, 0.1);
  --glass-blur: 16px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px var(--glow-primary);

  /* Transition Timing */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Suspended Homepage-Style Floating Header (Bo góc tròn, kiểu treo)
   ========================================================================== */

header.site-header {
  position: sticky;
  top: 12px;
  margin: 12px 20px 0 20px;
  background: linear-gradient(135deg, rgba(26, 30, 42, 0.85) 0%, rgba(18, 22, 32, 0.9) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 20px);
  padding: 8px 20px;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(255, 255, 255, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

header.site-header:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.55), 0 4px 15px rgba(59, 130, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.taskbar-left,
.taskbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.taskbar-left {
  gap: 4px;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  color: #ffffff;
  transition: background 0.2s, transform 0.1s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-toggle:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

/* ================= STANDARDIZED TEXT2 BRAND HEADER ================= */
.header-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-back {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  padding: 0;
  box-sizing: border-box;
}

.btn-back i,
.btn-back svg {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateX(-2px);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-back:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.brand-link:hover {
  opacity: 0.92;
}

.brand-logo-card {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  padding: 3.5px;
  box-sizing: border-box;
  transition: transform 0.2s ease;
}

.brand-link:hover .brand-logo-card {
  transform: scale(1.04);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.brand-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
  white-space: nowrap;
}

.brand-name {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand-divider {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0.7;
  user-select: none;
}

.brand-app {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: -0.01em;
  line-height: 1;
}

.taskbar-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  color: #cbd5e1;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  text-decoration: none;
}

.taskbar-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.taskbar-icon:active {
  transform: scale(0.92);
}

.taskbar-icon svg {
  width: 18px;
  height: 18px;
}

.login-btn-custom {
  width: auto !important;
  height: 34px !important;
  padding: 0 16px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  margin-left: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-btn-custom:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-1px);
}

.login-btn-custom:active {
  transform: scale(0.96);
}

/* Base & Reset */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Light Effects */
.weather-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  transition: background 0.8s ease;
}

.weather-ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  transition: all 1.2s ease;
  pointer-events: none;
}

.blob-1 {
  width: 500px;
  height: 500px;
  top: -120px;
  left: 20%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.6) 0%, rgba(14, 165, 233, 0.2) 60%, transparent 80%);
}

.blob-2 {
  width: 450px;
  height: 450px;
  top: 30%;
  right: 10%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(6, 182, 212, 0.2) 60%, transparent 80%);
}

.blob-3 {
  width: 400px;
  height: 400px;
  bottom: 5%;
  left: 15%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(59, 130, 246, 0.1) 60%, transparent 80%);
}

/* Weather condition atmosphere presets */
.atmosphere-clear-day .blob-1 { background: radial-gradient(circle, rgba(245, 158, 11, 0.5) 0%, rgba(59, 130, 246, 0.3) 60%, transparent 80%); }
.atmosphere-clear-night .blob-1 { background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(30, 27, 75, 0.4) 60%, transparent 80%); }
.atmosphere-rain .blob-1 { background: radial-gradient(circle, rgba(14, 165, 233, 0.5) 0%, rgba(30, 58, 138, 0.4) 60%, transparent 80%); }
.atmosphere-thunder .blob-1 { background: radial-gradient(circle, rgba(168, 85, 247, 0.5) 0%, rgba(245, 158, 11, 0.3) 60%, transparent 80%); }
.atmosphere-snow .blob-1 { background: radial-gradient(circle, rgba(224, 242, 254, 0.5) 0%, rgba(186, 230, 253, 0.3) 60%, transparent 80%); }

/* ==========================================================================
   Layout Containers
   ========================================================================== */

.app-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 48px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Breadcrumb & App Sub-Header */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--accent-primary);
}

.breadcrumb-separator {
  color: var(--border-card);
  font-size: 11px;
}

.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Unit Toggle Switch */
.unit-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 3px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
}

.unit-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.unit-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.refresh-spin {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Search Hub & Dynamic Location Bar
   ========================================================================== */

.search-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.search-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.search-input-group {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon-left {
  position: absolute;
  left: 16px;
  color: var(--accent-primary);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.search-icon-left svg {
  width: 18px;
  height: 18px;
}

.weather-search-input {
  width: 100%;
  height: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 0 46px 0 48px;
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  outline: none;
  transition: all var(--transition-normal);
}

.weather-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 14px;
}

.weather-search-input:focus {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.weather-search-input:focus + .search-icon-left {
  transform: scale(1.1);
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.clear-search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.clear-search-btn svg {
  width: 12px;
  height: 12px;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(18, 22, 34, 0.95);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.show {
  display: block;
  animation: fadeInDown 0.2s ease-out forwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.autocomplete-item {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(59, 130, 246, 0.15);
}

.autocomplete-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.autocomplete-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Quick City Chips Bar */
.quick-cities-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.quick-cities-bar::-webkit-scrollbar {
  display: none;
}

.quick-city-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chip-svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.inline-svg {
  display: inline-block;
  vertical-align: -2px;
}

.quick-city-chip:hover {
  background: var(--bg-pill-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.quick-city-chip.active {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

.quick-city-chip.current-loc {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.quick-city-chip.current-loc svg {
  color: #10b981;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #151924;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.show {
  display: block;
  animation: fadeInDown 0.2s ease-out forwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.autocomplete-item {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(59, 130, 246, 0.15);
}

.autocomplete-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.autocomplete-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Quick City Chips Bar */
.quick-cities-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}

.quick-cities-bar::-webkit-scrollbar {
  display: none;
}

.quick-city-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.chip-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.inline-svg {
  display: inline-block;
  vertical-align: -2px;
}

.quick-city-chip:hover {
  background: var(--bg-pill-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.quick-city-chip.active {
  background: var(--bg-pill-active);
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   Loading & Error States
   ========================================================================== */

.state-container {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.state-container.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.skeleton-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.skeleton-line {
  height: 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.skeleton-line.title {
  width: 45%;
  height: 32px;
}

.skeleton-line.temp {
  width: 30%;
  height: 64px;
}

.skeleton-line.subtitle {
  width: 60%;
}

.error-card {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.error-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.error-icon svg {
  width: 28px;
  height: 28px;
}

.error-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.error-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn-retry {
  padding: 10px 24px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-retry:hover {
  background: #dc2626;
}

/* ==========================================================================
   Weather Dashboard Main Grid
   ========================================================================== */

.weather-dashboard {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.4s ease-out forwards;
}

.weather-dashboard.active {
  display: flex;
}

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

/* Glass Card Global Base */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

/* Hero Weather Display */
.hero-weather-card {
  padding: 32px 36px;
  background: linear-gradient(135deg, rgba(26, 32, 50, 0.85) 0%, rgba(15, 18, 28, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-weather-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1;
}

.hero-location-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-location-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-highlight);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.5px;
}

.hero-location-pin {
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
}

.hero-location-pin svg {
  width: 26px;
  height: 26px;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.hero-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
}

.hero-temp-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
}

.hero-temperature {
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text-highlight);
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-temp-unit {
  font-size: 32px;
  font-weight: 600;
  color: var(--accent-primary);
  -webkit-text-fill-color: var(--accent-primary);
}

.hero-temp-extremes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-extreme-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.extreme-high { color: var(--accent-rose); }
.extreme-low { color: var(--accent-cyan); }

.hero-condition-summary {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-feels-like {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Hero Right Icon & Quick Stats */
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  gap: 12px;
}

.hero-weather-icon-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon-aura {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-primary) 0%, transparent 70%);
  filter: blur(16px);
  animation: pulseAura 4s ease-in-out infinite;
}

@keyframes pulseAura {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.hero-weather-icon {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  position: relative;
  z-index: 2;
  transition: transform var(--transition-normal);
}

.hero-weather-icon:hover {
  transform: scale(1.08) rotate(3deg);
}

.hero-quick-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.aqi-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.aqi-good { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.aqi-moderate { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.aqi-unhealthy { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* ==========================================================================
   Hourly Forecast Strip
   ========================================================================== */

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.hourly-forecast-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.hourly-forecast-track::-webkit-scrollbar {
  height: 6px;
}

.hourly-forecast-track::-webkit-scrollbar-track {
  background: transparent;
}

.hourly-forecast-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

.hourly-item {
  min-width: 86px;
  padding: 16px 10px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  cursor: default;
}

.hourly-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-card);
  transform: translateY(-2px);
}

.hourly-item.now {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.hourly-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.hourly-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.hourly-temp {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.hourly-rain-prob {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ==========================================================================
   Dashboard Mid Section: Daily Forecast & Metrics Grid
   ========================================================================== */

.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 24px;
}

/* Daily Forecast */
.daily-forecast-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-row {
  display: grid;
  grid-template-columns: 85px 36px 1fr 100px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.daily-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.daily-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.daily-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.daily-condition-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.daily-condition-text {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-rain-chance {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.daily-temp-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.daily-temp-min {
  color: var(--text-muted);
}

.daily-temp-bar {
  flex: 1;
  max-width: 50px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #06b6d4 0%, #f59e0b 100%);
}

.daily-temp-max {
  color: var(--text-main);
}

/* ==========================================================================
   Metrics Grid (Key Weather Parameters)
   ========================================================================== */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.metric-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all var(--transition-fast);
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.metric-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.metric-icon-wrap svg {
  width: 16px;
  height: 16px;
}

.metric-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-highlight);
  letter-spacing: -0.5px;
}

.metric-sub {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.metric-footer-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.metric-progress {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  transition: width 0.6s ease;
}

/* Specific color indicators */
.uv-progress { background: linear-gradient(90deg, #10b981 0%, #f59e0b 50%, #ef4444 100%); }
.humidity-progress { background: linear-gradient(90deg, #38bdf8 0%, #3b82f6 100%); }

/* Daylight Tracker in Metric */
.sun-cycle-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Smart Lifestyle & Advisory Card
   ========================================================================== */

.advisory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.advisory-item {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--transition-fast);
}

.advisory-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.advisory-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.advisory-icon-box svg {
  width: 20px;
  height: 20px;
}

.advisory-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.advisory-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.advisory-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .advisory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.header-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

.header-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: #60a5fa;
}

.header-action-btn {
  height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.header-action-btn:active {
  transform: scale(0.96);
}

.header-action-btn svg {
  width: 15px;
  height: 15px;
  color: var(--accent-primary);
}

@media (max-width: 768px) {
  header.site-header {
    margin: 8px 12px 0 12px;
    padding: 6px 12px;
    min-height: 50px;
  }

  .btn-back {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
  }

  .brand-logo-card {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    padding: 3px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-divider {
    font-size: 13px;
  }

  .brand-app {
    font-size: 13px;
  }

  .header-action-btn span {
    display: none;
  }

  .header-action-btn {
    padding: 0 10px;
  }
}

@media (max-width: 768px) {
  .app-wrapper {
    padding: 12px 14px 40px;
    gap: 18px;
  }

  .hero-weather-card {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    text-align: center;
    gap: 18px;
  }

  .hero-left {
    align-items: center;
  }

  .hero-location-name {
    font-size: 26px;
    justify-content: center;
  }

  .hero-temp-row {
    justify-content: center;
  }

  .hero-temperature {
    font-size: 64px;
  }

  .hero-condition-summary {
    justify-content: center;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .weather-search-input {
    height: 48px;
    font-size: 16px; /* Prevents iOS auto zoom */
  }

  .advisory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-temperature {
    font-size: 54px;
  }

  .hero-location-name {
    font-size: 22px;
  }

  .daily-row {
    grid-template-columns: 70px 30px 1fr 80px;
    padding: 10px 10px;
  }
}