:root {
  --bg: #0b1220;
  --bg-elevated: #121b30;
  --card: #16213a;
  --card-border: #223055;
  --text: #eef2fb;
  --text-dim: #9aa8c7;
  --accent: #5aa9ff;
  --accent-warm: #ffb454;
  --good: #4ade80;
  --radius: 16px;
  --max-width: 1080px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(1200px 600px at 50% -10%, #1a2647 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site {
  padding: 24px 0 8px;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.blog-nav-link {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  white-space: nowrap;
}

.blog-nav-link:hover { color: var(--text); border-color: var(--accent); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.brand .icon { font-size: 1.5rem; }

.tagline {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 4px 0 0;
}

/* Location controls */
.location-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  align-items: stretch;
}

.location-btn {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease;
}

.location-btn:hover { border-color: var(--accent); }
.location-btn:disabled { opacity: 0.6; cursor: default; }

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}

#city-search {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-family: inherit;
}

#city-search:focus {
  outline: none;
  border-color: var(--accent);
}

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}

.search-result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--card-border);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: rgba(90, 169, 255, 0.1); }

.result-region {
  color: var(--text-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}

.search-empty {
  padding: 10px 14px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* City picker */
.city-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.city-btn {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.city-btn:hover { border-color: var(--accent); color: var(--text); }

.city-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #071022;
  font-weight: 600;
}

/* Main weather card */
.hero-weather {
  background: linear-gradient(160deg, var(--bg-elevated), var(--card));
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 24px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-city {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.hero-updated {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.hero-temp {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.hero-temp .emoji { font-size: 3.2rem; }

.hero-desc {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-top: 6px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.stat .label {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat .value {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2px;
}

/* Tomorrow highlight */
.tomorrow-banner {
  margin-top: 24px;
  background: rgba(90, 169, 255, 0.08);
  border: 1px solid rgba(90, 169, 255, 0.35);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.tomorrow-banner .label {
  font-weight: 700;
  color: var(--accent);
}

.tomorrow-banner .value {
  font-size: 1.1rem;
  font-weight: 600;
}

.nameday-banner {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nameday-banner .value {
  color: var(--text);
  font-weight: 600;
}

.stat .hint {
  color: var(--text-dim);
  font-size: 0.7rem;
  margin-top: 3px;
  line-height: 1.3;
}

/* Vlastná orientačná výstraha (nie oficiálna SHMÚ) */
.warning-banner {
  margin-top: 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.warning-banner[hidden] {
  display: none;
}

.warning-banner .warning-icon {
  font-size: 1.2rem;
  line-height: 1.3;
}

.warning-banner .warning-text {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Kvalita ovzdušia a peľ */
.air-quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.aq-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
}

.aq-card .aq-label {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.aq-card .aq-value {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 3px;
}

.aq-card .aq-hint {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-top: 5px;
  line-height: 1.35;
}

.air-quality-credit {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 12px;
}

.air-quality-credit a {
  color: var(--accent);
}

/* Forecast row */
section.forecast h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.forecast-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}

.forecast-day {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}

.forecast-day.is-tomorrow {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.forecast-day .day-name {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

.forecast-day .day-emoji {
  font-size: 1.6rem;
  margin: 6px 0;
}

.forecast-day .day-temps {
  font-size: 0.9rem;
  font-weight: 600;
}

.forecast-day .day-temps .lo {
  color: var(--text-dim);
  font-weight: 400;
}

/* Hourly forecast */
section.hourly h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.hourly-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.hourly-cell {
  flex: 0 0 auto;
  min-width: 68px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.hourly-cell.is-now {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.hourly-time {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.hourly-emoji {
  font-size: 1.3rem;
  margin: 4px 0;
}

.hourly-temp {
  font-weight: 700;
  font-size: 0.95rem;
}

.hourly-rain {
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 2px;
}

/* Denný graf */
section.daily-chart h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chart-tab {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chart-tab:hover { color: var(--text); border-color: var(--accent); }

.chart-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #071022;
  font-weight: 600;
}

.chart-container {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 12px;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.suntimes-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 8px;
}

.sun-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 12px;
}

.sun-emoji { font-size: 1.8rem; }
.sun-label { color: var(--text-dim); font-size: 0.8rem; }
.sun-value { font-size: 1.2rem; font-weight: 700; }

/* Hory / lyžiarske strediská / kúpaliská */
section.poi-section h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.poi-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 12px;
  line-height: 1.5;
}

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

.poi-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
}

.poi-name {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.poi-temp {
  font-size: 1.3rem;
  font-weight: 700;
}

.poi-desc {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 2px 0 8px;
}

.poi-wind, .poi-extra, .poi-elevation {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* Radar */
section.radar h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.radar-frame-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.radar-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
}

.radar-load-btn {
  width: 100%;
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, var(--bg-elevated), var(--card));
  border: 1px dashed var(--card-border);
  border-radius: 16px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.radar-load-btn:hover { border-color: var(--accent); }
.radar-load-icon { font-size: 2.2rem; }

.radar-credit {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin: 8px 0 0;
}

/* News */
section.news h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s ease;
}

.news-item:hover { border-color: var(--accent); }

.news-item .news-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.news-item .news-meta {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 4px;
}

.state-msg {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 16px 0;
}

/* Trending places */
section.trending h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.trending-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trend-chip {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.trend-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* FAQ */
section.faq h2 {
  font-size: 1.1rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 32px 0 12px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 4px 16px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--accent);
  font-weight: 700;
}

.faq-item[open] summary::before { content: "–"; }

.faq-item p {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 14px 18px;
}

.faq-item a { color: var(--accent); }

/* Footer */
footer.site {
  margin-top: 48px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--card-border);
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

footer.site a { color: var(--text-dim); }
footer.site a:hover { color: var(--accent); }

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

/* Kredit tvorcu webu — plnohodnotné tlačidlo, zámerne najvýraznejší prvok pätičky */
footer.site a.site-credit {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  border: none;
  color: #071022;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(90, 169, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  animation: creditPulse 3.4s ease-in-out infinite;
}

/* Svetlo prebehne cez tlačidlo — pripomenie sa, ale neruší pri čítaní */
footer.site a.site-credit::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-18deg);
  animation: creditShine 5.5s ease-in-out infinite;
  pointer-events: none;
}

footer.site a.site-credit:hover,
footer.site a.site-credit:focus-visible {
  color: #071022;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 26px rgba(255, 180, 84, 0.45);
  filter: saturate(1.15);
  animation-play-state: paused;
}

.site-credit-main {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-credit-main strong {
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-credit-tagline {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(7, 16, 34, 0.78);
}

@keyframes creditPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(90, 169, 255, 0.35); }
  50% { box-shadow: 0 6px 26px rgba(255, 180, 84, 0.6); }
}

@keyframes creditShine {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}

@media (max-width: 560px) {
  .footer-row { flex-direction: column; align-items: flex-start; }
  footer.site a.site-credit { width: 100%; border-radius: 14px; }
}

@media (max-width: 720px) {
  .forecast-row { grid-template-columns: repeat(3, 1fr); }
  .hero-temp { font-size: 3rem; }
  .hero-temp .emoji { font-size: 2.4rem; }
}

/* Jemné animácie pri načítaní */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.location-controls,
.city-picker,
.hero-weather {
  animation: fadeInUp 0.5s ease both;
}

.city-picker { animation-delay: 0.06s; }
.hero-weather { animation-delay: 0.12s; }

.hourly, .forecast, .daily-chart, .poi-section, .radar, .news, .trending, .faq {
  animation: fadeIn 0.6s ease both;
}

.hero-temp .emoji {
  display: inline-block;
  animation: fadeIn 0.4s ease both;
}

.stat, .forecast-day, .poi-card, .hourly-cell {
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.forecast-day:hover, .poi-card:hover {
  transform: translateY(-2px);
}

.city-btn, .trend-chip, .chart-tab {
  transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.city-btn:active, .trend-chip:active, .chart-tab:active {
  transform: scale(0.96);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
