* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
  font-family: 'Roboto', 'Noto Sans', sans-serif;
}

/* ── Photo container ── */

#photo-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.photo.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Blurred backdrop ── */

.photo-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  transform: scale(1.08);
  opacity: 0.9;
  z-index: 0;
}

.photo-backdrop.hidden {
  display: none;
}

/* ── Transition: crossfade ── */

.photo.fade-out {
  animation: fadeOut var(--transition-duration, 1s) ease forwards;
}

.photo.fade-in {
  animation: fadeIn var(--transition-duration, 1s) ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Transition: slide ── */

.photo.slide-out-left {
  animation: slideOutLeft var(--transition-duration, 1s) ease forwards;
}

.photo.slide-in-right {
  animation: slideInRight var(--transition-duration, 1s) ease forwards;
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Transition: zoom ── */

.photo.zoom-out {
  animation: zoomOut var(--transition-duration, 1s) ease forwards;
}

.photo.zoom-in {
  animation: zoomIn var(--transition-duration, 1s) ease forwards;
}

@keyframes zoomOut {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(1.15); opacity: 0; }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Transition: ken burns (continuous pan-zoom on current, crossfade to next) ── */

.photo.ken-burns-active {
  animation: kenBurns var(--ken-burns-duration, 8s) ease-in-out forwards;
}

@keyframes kenBurns {
  0%   { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.12) translate(-2%, -2%); }
}

/* ── Overlays ── */

.overlay {
  position: absolute;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.5s ease;
}

.overlay.hidden {
  display: none;
}

/* ── Info overlay (clock + date + weather) — positionable container ── */

#overlay-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.2;
}

.overlay-top-left     { top: 40px;    left: 48px;  }
.overlay-top-right    { top: 40px;    right: 48px; text-align: right; }
.overlay-bottom-left  { bottom: 40px; left: 48px;  }
.overlay-bottom-right { bottom: 40px; right: 48px; text-align: right; }

#overlay-clock {
  font-size: 52px;
  font-weight: 300;
  letter-spacing: 2px;
}

#overlay-date {
  font-size: 22px;
  font-weight: 300;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

#overlay-weather {
  font-size: 26px;
  font-weight: 300;
}

#overlay-clock.hidden,
#overlay-date.hidden,
#overlay-weather.hidden {
  display: none;
}

#overlay-caption {
  bottom: 40px;
  max-width: 55%;
  line-height: 1.4;
}

#overlay-caption.caption-bottom-right {
  right: 48px;
  text-align: right;
}

#overlay-caption.caption-bottom-left {
  left: 48px;
}

#overlay-caption .caption-filename {
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 4px;
}

#overlay-caption .caption-date {
  font-size: 17px;
  font-weight: 300;
  opacity: 0.85;
}

#overlay-caption .caption-camera {
  font-size: 15px;
  font-weight: 300;
  opacity: 0.7;
}

/* ── Splash / idle screen ── */

/* Brand palette: Sunflower Yellow #F5C10E, Deep Brown #2D1506, Off-White #F7F3EC.
   Gradient uses tinted/darkened variants to keep the TV background subtle. */

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #3d1e08 0%, #2D1506 45%, #1a0b02 65%, #000 100%);
  transition: opacity 0.8s ease;
}

#splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

#splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  animation: splashFadeIn 1.2s ease forwards;
}

#splash-logo {
  width: 200px;
  height: 200px;
  box-sizing: content-box;
  border-radius: 36px;
  background: #F7F3EC;
  padding: 14px;
  box-shadow: 0 8px 48px rgba(245, 193, 14, 0.4), 0 0 80px rgba(245, 193, 14, 0.15);
  animation: splashPulse 3s ease-in-out infinite;
}

#splash-title {
  font-size: 56px;
  font-weight: 300;
  letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 30px rgba(245, 193, 14, 0.55);
}

#splash-subtitle {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.55);
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes splashPulse {
  0%, 100% { box-shadow: 0 8px 48px rgba(245, 193, 14, 0.35), 0 0 80px rgba(245, 193, 14, 0.15); }
  50%       { box-shadow: 0 8px 64px rgba(245, 193, 14, 0.55), 0 0 120px rgba(245, 193, 14, 0.25); }
}
