/* Base sizing is scaled up for TV viewing at 5-12 feet: large base font, big icons. */
:root {
  --font-scale: 1.3;
  font-size: calc(16px * var(--font-scale));

  /* Official Scania brand colours (mediaportal.scania.com brand-assets/colours) */
  --scania-blue: #041e42;
  --scania-blue-700: #0f3263;
  --scania-blue-600: #16417f;
  --scania-blue-500: #2058a8;
  --scania-blue-300: #4a89f3;
  --scania-beige: #ceb888;
  --scania-pale-green: #94a596;

  --glass-bg: rgba(4, 30, 66, 0.45);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-shadow: rgba(0, 0, 0, 0.35);
  --text-primary: #f5f8ff;
  --text-secondary: rgba(245, 248, 255, 0.72);
  --accent: var(--scania-blue-300);
}

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

html, body {
  height: 100%;
}

body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--text-primary);
  background: var(--scania-blue);
  overflow-x: hidden;
  min-height: 100vh;
}

/* --- Kiosk slideshow: weather and quiz slides cycle automatically --- */
.kiosk {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.9s ease;
}

.slide.active {
  position: relative;
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.slide.prev {
  position: absolute;
  transform: translateX(-100%);
  opacity: 0;
  z-index: 1;
}

/* --- Animated aurora gradient background (Scania Blue base) --- */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, var(--scania-blue) 0%, var(--scania-blue-700) 45%, var(--scania-blue) 100%);
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
  animation: drift 22s ease-in-out infinite;
}

.blob-1 {
  width: 42vw;
  height: 42vw;
  background: var(--scania-blue-500);
  top: -10%;
  left: -10%;
  animation-duration: 26s;
  opacity: 0.45;
}

.blob-2 {
  width: 38vw;
  height: 38vw;
  background: var(--scania-beige);
  bottom: -15%;
  right: -8%;
  animation-duration: 30s;
  animation-delay: -6s;
}

.blob-3 {
  width: 30vw;
  height: 30vw;
  background: var(--scania-pale-green);
  top: 30%;
  right: 20%;
  animation-duration: 20s;
  animation-delay: -12s;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6%, 8%) scale(1.12); }
  66% { transform: translate(-6%, -4%) scale(0.94); }
}

/* --- Glass panel --- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.75rem;
  backdrop-filter: blur(24px) saturate(110%);
  -webkit-backdrop-filter: blur(24px) saturate(110%);
  box-shadow: 0 1.5rem 3rem var(--glass-shadow);
}

.dashboard {
  max-width: 100rem;
  margin: 0 auto;
  padding: 2.5rem 3rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- Hero (Today) --- */
.hero {
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.location {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.9rem;
  font-weight: 600;
}

.pin-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent);
  flex-shrink: 0;
}

.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
  line-height: 1.2;
}

#current-time {
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#current-date {
  font-size: 1.3rem;
  color: var(--text-secondary);
}

.hero-icon {
  width: clamp(9rem, 14vw, 14rem);
  height: clamp(9rem, 14vw, 14rem);
  filter: drop-shadow(0 1rem 2rem rgba(0, 0, 0, 0.4));
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1rem); }
}

.hero-temp-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-temp {
  font-size: clamp(5rem, 9vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: capitalize;
}

.hero-feels {
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.hero-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.25rem;
}

.chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.1rem;
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: transform 0.25s ease, background 0.25s ease;
}

.chip:hover {
  transform: translateY(-0.3rem);
  background: rgba(255, 255, 255, 0.14);
}

.chip-label {
  font-size: 1.05rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chip-value {
  font-size: 1.7rem;
  font-weight: 600;
}

/* --- Panels (hourly / daily) --- */
.panel {
  padding: 2rem 2.5rem 2.5rem;
}

.panel-title {
  font-size: 2.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* --- Top row: hero + What to Wear side by side --- */
.top-row {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

.top-row-item {
  flex: 1 1 50%;
  min-width: 0;
}

/* --- What to Wear --- */
.advice-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.advice-header {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.advice-header .panel-title {
  margin-bottom: 0;
}

.advice-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.advice-subtitle {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.advice-today-row {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.advice-emoji {
  font-size: clamp(6rem, 11vw, 9rem);
  line-height: 1;
  animation: float 5s ease-in-out infinite;
}

.advice-today-text {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.advice-today-label {
  font-size: 2.8rem;
  font-weight: 700;
}

.advice-today-note {
  font-size: 1.6rem;
  color: var(--text-secondary);
}

.advice-outlook {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.advice-day {
  padding: 1.75rem 1.25rem;
  min-height: 11rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.65rem;
}

.advice-day .advice-day-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
}

.advice-day .advice-day-emoji {
  font-size: 3.25rem;
  line-height: 1;
}

.advice-day .advice-day-text {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.advice-day .advice-day-note {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* --- Hourly strip --- */
.hourly-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1.25rem;
}

.hour-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0.75rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s ease, background 0.25s ease;
}

.hour-card:hover {
  transform: translateY(-0.4rem);
  background: rgba(255, 255, 255, 0.13);
}

.hour-card .hour-label {
  font-size: 1.45rem;
  color: var(--text-secondary);
}

.hour-card img {
  width: 4.5rem;
  height: 4.5rem;
}

.hour-card .hour-temp {
  font-size: 1.9rem;
  font-weight: 700;
}

.hour-card .hour-pop {
  font-size: 1.25rem;
  font-weight: 600;
}

/* --- Daily grid --- */
.daily-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.25rem;
}

.day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.5rem 1rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s ease, background 0.25s ease;
}

.day-card:hover {
  transform: translateY(-0.4rem);
  background: rgba(255, 255, 255, 0.13);
}

.day-card .day-label {
  font-size: 1.25rem;
  font-weight: 600;
}

.day-card img {
  width: 4.5rem;
  height: 4.5rem;
}

.day-card .day-temps {
  font-size: 1.3rem;
  font-weight: 600;
}

.day-card .day-temps .low {
  color: var(--text-secondary);
  font-weight: 400;
}

.day-card .day-pop {
  font-size: 1rem;
  font-weight: 600;
}

/* Rain-chance severity tiers, shared by hourly and daily precipitation labels. */
.pop-low {
  color: var(--text-secondary);
}

.pop-moderate {
  color: #f1c21b;
}

.pop-high {
  color: #ff9a3c;
}

.pop-very-high {
  color: #ff5a5a;
  font-weight: 700;
}

/* --- Entrance animations --- */
.fade-in-up {
  opacity: 0;
  transform: translateY(1.5rem);
  animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Quiz slide --- */
.quiz-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.quiz-card {
  width: 100%;
  max-width: 62rem;
  padding: 3.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-category {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quiz-difficulty {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-transform: capitalize;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quiz-question {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.35;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.quiz-option {
  padding: 1.5rem 1.75rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.4rem;
  font-weight: 500;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}

.quiz-option.correct {
  background: rgba(48, 185, 153, 0.35);
  border-color: var(--scania-pale-green);
  font-weight: 700;
  transform: scale(1.03);
}

.quiz-option.dim {
  opacity: 0.45;
}

/* --- Responsive: smaller screens still usable, TV stays large --- */
@media (max-width: 900px) {
  :root { --font-scale: 1; }

  .top-row {
    flex-direction: column;
  }

  .daily-grid,
  .hourly-strip {
    grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  }

  .advice-outlook {
    grid-template-columns: 1fr;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .hero-main {
    flex-direction: column;
    text-align: center;
  }

  .hero-meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .location {
    justify-content: center;
  }
}
