/* ==========================================================================
   wetter-site — Official Website Design System & Weather Dashboard
   Theme: Cybernetic Dark (Cyan Accent #38bdf8) · WCAG AAA · Spring Physics
   Entwickelt für Jeremy Benz (@benzjeremy) | GPL-3.0
   ========================================================================== */

:root {
  --bg-page: #080a0f;
  --bg-surface: #0e121b;
  --bg-card: #141a26;
  --bg-card-hover: #1a2232;
  --bg-input: #101420;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(56, 189, 248, 0.35);

  --accent-primary: #38bdf8;
  --accent-primary-hover: #7dd3fc;
  --accent-glow: rgba(56, 189, 248, 0.32);

  --accent-green: #10b981;
  --accent-gold: #f59e0b;
  --accent-orange: #f97316;
  --accent-purple: #818cf8;
  --accent-red: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --spring-bounce: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* ==================== SITE NAVIGATION ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.back-root-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.back-root-btn:hover {
  color: var(--accent-primary);
  border-color: var(--border-strong);
  transform: translateX(-2px);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.brand-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.brand-ver {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  background: rgba(56, 189, 248, 0.14);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: var(--text-primary);
}

.main-nav a.nav-highlight {
  color: var(--accent-primary);
  font-weight: 700;
}

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.lang-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--accent-primary);
  color: #080a0f;
  font-weight: 700;
}

.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-card:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-card.highlight {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--accent-primary);
}

.btn-card.highlight:hover {
  background: rgba(56, 189, 248, 0.25);
}

.mobile-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 18px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

@media (max-width: 880px) {
  .mobile-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
  }
  .main-nav.open {
    display: flex;
  }
}

/* ==================== HERO SECTION ==================== */
.hero-section {
  position: relative;
  padding: 85px 24px 65px;
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, rgba(8, 10, 15, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
}

.hero-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
}

.release-badge {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.perf-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.open-badge {
  background: rgba(129, 140, 248, 0.14);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.license-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 38px;
  }
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 820px;
  margin: 0 auto 40px;
}

.hero-subtitle strong {
  color: var(--text-primary);
}

/* Call to Action Buttons */
.hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-primary);
  color: #080a0f;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all 0.2s var(--spring-bounce);
  text-align: left;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--spring-bounce);
  text-align: left;
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.btn-main-text {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.btn-sub-text {
  display: block;
  font-size: 11px;
  opacity: 0.8;
  font-family: var(--font-mono);
}

/* Quick Telemetry Pill Bar */
.telemetry-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 940px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .telemetry-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: left;
  transition: transform 0.2s var(--spring-bounce), border-color 0.2s;
}

.telemetry-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.tel-icon {
  font-size: 24px;
}

.tel-text {
  display: flex;
  flex-direction: column;
}

.tel-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* ==================== INTERACTIVE WEATHER STATION ==================== */
.station-section {
  padding: 70px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-container {
  max-width: 1240px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 42px;
}

.section-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent-primary);
  margin-bottom: 10px;
  display: inline-block;
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.7px;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.section-sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.station-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.unit-selector {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  padding: 5px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
  gap: 6px;
}

.unit-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0 8px 0 12px;
}

.unit-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.unit-btn:hover {
  color: var(--text-primary);
}

.unit-btn.active {
  background: var(--accent-primary);
  color: #080a0f;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Controls Card */
.station-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  margin-bottom: 40px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 40px 14px 44px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: all 0.15s ease;
}

.search-input-wrapper input:focus {
  border-color: var(--accent-primary);
  background: #131929;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.clear-input-btn {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.clear-input-btn:hover {
  color: var(--text-primary);
}

.btn-geo {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-geo:hover {
  background: rgba(56, 189, 248, 0.22);
  transform: translateY(-1px);
}

/* Quick City Chips */
.quick-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Status Banner */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
  color: var(--text-secondary);
  font-size: 14px;
}

.status-banner.error {
  border-color: var(--accent-red);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Weather Display Container */
.weather-display {
  display: flex !important;
  flex-direction: column;
  gap: 40px;
  animation: fadeIn 0.35s var(--spring-bounce);
  margin-top: 10px;
}

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

/* Current Weather Card */
.current-weather-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, #152033 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

.current-weather-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.current-main-info {
  position: relative;
  z-index: 1;
}

.location-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.loc-pin {
  font-size: 20px;
}

.location-badge h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.coords-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.current-timestamp {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.temp-condition-wrap {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.temp-big {
  display: flex;
  align-items: baseline;
  font-size: clamp(54px, 7.5vw, 82px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text-primary);
}

.temp-unit-symbol {
  font-size: 34px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-left: 8px;
}

.condition-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.condition-text {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.feels-like {
  font-size: 15px;
  color: var(--text-secondary);
}

.feels-like strong {
  color: var(--text-primary);
}

.current-visual {
  position: relative;
  z-index: 1;
  padding-left: 28px;
}

.weather-icon-large {
  font-size: clamp(75px, 11vw, 108px);
  line-height: 1;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5));
  animation: floatWeather 4s ease-in-out infinite alternate;
}

@keyframes floatWeather {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

@media (max-width: 768px) {
  .current-weather-card {
    flex-direction: column-reverse;
    align-items: flex-start;
    padding: 28px;
  }
  .current-visual {
    padding-left: 0;
    margin-bottom: 16px;
    align-self: center;
  }
}

/* Metrics Grid - Generous Card Spacing */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 880px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--spring-bounce), border-color 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.metric-card-pv {
  border-color: rgba(245, 158, 11, 0.25);
  position: relative;
  overflow: hidden;
}

.metric-card-pv::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.8), transparent);
}

.metric-card-pv:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.metric-card-pv .metric-value {
  color: #fde047;
}

.metric-card-pv .metric-icon {
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.metric-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.metric-icon {
  font-size: 20px;
}

.metric-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.metric-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wind-arrow {
  display: inline-block;
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-primary);
}

/* 24-Hour Canvas Chart */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 34px 38px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  margin-bottom: 40px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.chart-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.chart-header h3 {
  font-size: 22px;
  font-weight: 800;
}

.chart-modes {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 6px;
}

.chart-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-mode-btn:hover {
  color: var(--text-primary);
}

.chart-mode-btn.active {
  background: var(--bg-card);
  color: var(--accent-primary);
  border: 1px solid var(--border-strong);
}

#modePVBtn.active {
  color: var(--accent-gold);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  margin: 20px 0;
}

#weatherCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -120%);
  white-space: nowrap;
  z-index: 10;
}

.chart-legend {
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  margin-top: 8px;
}

/* 7-Day Forecast Grid - Generous Spacing */
.forecast-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.forecast-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.forecast-header h3 {
  font-size: 22px;
  font-weight: 800;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 18px;
}

.forecast-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--spring-bounce), border-color 0.2s, box-shadow 0.2s;
}

.forecast-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.forecast-day {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.forecast-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.forecast-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 12px;
}

.forecast-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 16px;
  min-height: 2.7em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forecast-temps {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  font-family: var(--font-mono);
}

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

.temp-min {
  color: var(--text-muted);
  font-weight: 500;
}

/* ==================== FEATURES SECTION ==================== */
.features-section {
  padding: 85px 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: transform 0.25s var(--spring-bounce), border-color 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.f-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== ABOUT & CREDITS SECTION ==================== */
.about-section {
  padding: 85px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

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

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  transition: transform 0.2s var(--spring-bounce), border-color 0.2s;
}

.about-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.about-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #0284c7 100%);
  color: #080a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.ai-avatar {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 26px;
}

.about-info {
  display: flex;
  flex-direction: column;
}

.role-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.ai-badge {
  color: #818cf8;
}

.about-info h3 {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.about-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

.author-links {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.author-links a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.author-links a:hover {
  text-decoration: underline;
}

/* License Box */
.license-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.license-icon {
  font-size: 30px;
}

.license-text {
  flex: 1 1 360px;
}

.license-text h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.license-text p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==================== FOOTER ==================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 44px 24px;
  background: var(--bg-surface);
  margin-top: auto;
}

.footer-content {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-left a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

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

.footer-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.15s ease;
}

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

/* Language Visibility */
[data-lang] {
  display: none;
}
[data-lang].visible {
  display: block;
}
