/* ==========================================================================
   LED Lobby Screen (2400 x 5760, 5:12) — iOS Glassmorphism Theme
   Pure CSS, GPU-friendly transform-only animations, no external CDNs.
   ========================================================================== */

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

:root {
  --font-sans: "HarmonyOS Sans", "SF Pro Display", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-num: "SF Pro Display", "HarmonyOS Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.56);

  --glass-bg: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.06) 100%
  );
  --glass-border: rgba(255, 255, 255, 0.24);
  --glass-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.30),
    inset 0 -3px 24px rgba(255, 255, 255, 0.04),
    0 36px 90px rgba(0, 8, 28, 0.48);
  --radius-card: 80px;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  cursor: none;
}

/* Fixed 2400 x 5760 Design Canvas (scaled by js/main.js via transform) */
#stage {
  position: relative;
  width: 2400px;
  height: 5760px;
  transform-origin: top left;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: linear-gradient(165deg, #07122e 0%, #0b224d 42%, #0a2f46 78%, #07192c 100%);
}

/* ==========================================================================
   Animated Background Blobs (transform-only keyframes for low GPU load)
   ========================================================================== */

.bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(180px);
  will-change: transform;
  opacity: 0.85;
}

.blob-a {
  width: 2200px;
  height: 2200px;
  top: -450px;
  left: -400px;
  background: radial-gradient(circle at 40% 40%, #2b58ff 0%, #1a3399 45%, rgba(26, 51, 153, 0) 72%);
  animation: driftA 38s ease-in-out infinite alternate;
}

.blob-b {
  width: 2400px;
  height: 2400px;
  top: 1700px;
  right: -650px;
  background: radial-gradient(circle at 50% 50%, #14b8a6 0%, #0d6e7a 45%, rgba(13, 110, 122, 0) 72%);
  animation: driftB 46s ease-in-out infinite alternate;
}

.blob-c {
  width: 2100px;
  height: 2100px;
  bottom: -400px;
  left: -350px;
  background: radial-gradient(circle at 50% 50%, #7c3aed 0%, #3b2d99 45%, rgba(59, 45, 153, 0) 72%);
  animation: driftC 52s ease-in-out infinite alternate;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, 0.04) 0%, rgba(2, 8, 24, 0.42) 100%);
}

@keyframes driftA {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(260px, 340px, 0) scale(1.12); }
  100% { transform: translate3d(120px, 620px, 0) scale(0.96); }
}

@keyframes driftB {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-340px, -280px, 0) scale(1.14); }
  100% { transform: translate3d(-180px, 360px, 0) scale(0.94); }
}

@keyframes driftC {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(380px, -320px, 0) scale(1.1); }
  100% { transform: translate3d(200px, -120px, 0) scale(1.02); }
}

/* ==========================================================================
   Shared Glassmorphism Card
   ========================================================================== */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(48px) saturate(145%);
  -webkit-backdrop-filter: blur(48px) saturate(145%);
  border: 2px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.card {
  position: absolute;
  left: 100px;
  width: 2200px;
  border-radius: var(--radius-card);
  z-index: 1;
}

/* ==========================================================================
   1. Top Bar (0 – 300px)
   ========================================================================== */

.topbar {
  position: absolute;
  top: 0;
  left: 100px;
  width: 2200px;
  height: 300px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 44px;
}

#brand-logo {
  height: 124px;
  max-width: 280px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

#brand-logo.broken {
  display: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#brand-zh {
  font-size: 76px;
  font-weight: 700;
  letter-spacing: 6px;
  line-height: 1.1;
  color: var(--text-primary);
  text-shadow: 0 4px 24px rgba(0, 10, 35, 0.45);
}

#brand-sub {
  font-size: 46px;
  font-weight: 500;
  letter-spacing: 10px;
  line-height: 1.1;
  color: var(--text-secondary);
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 48px;
  border-radius: 999px;
}

.live-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.9);
  animation: livePulse 2.8s ease-in-out infinite;
}

.status-text {
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 6px;
  color: var(--text-secondary);
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.86); }
}

/* ==========================================================================
   2. Clock Card (300 – 1500px)
   ========================================================================== */

.clock-card {
  top: 300px;
  height: 1140px;
  padding: 76px 110px 84px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.clock-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

#clock-hm {
  font-family: var(--font-num);
  font-size: 680px;
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -14px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  text-shadow: 0 18px 60px rgba(0, 12, 42, 0.42);
  display: inline-flex;
  align-items: baseline;
  perspective: 1200px;
}

#clock-h,
#clock-m {
  display: inline-block;
  min-width: 2ch;
  text-align: center;
}

#clock-hm .colon {
  display: inline-block;
  margin: 0 10px;
  transform: translateY(-38px);
  opacity: 0.78;
}

#clock-s {
  font-family: var(--font-num);
  font-size: 168px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  margin-left: 36px;
  margin-top: 44px;
  min-width: 2.1ch;
  display: inline-block;
  text-align: left;
  text-shadow: 0 8px 30px rgba(0, 12, 42, 0.35);
}

.divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.24) 20%,
    rgba(255, 255, 255, 0.24) 80%,
    rgba(255, 255, 255, 0) 100%
  );
}

.date-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.date-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 56px;
  font-size: 98px;
  font-weight: 600;
  letter-spacing: 4px;
  line-height: 1.15;
}

.date-sub {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 64px;
  font-size: 62px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--text-secondary);
}

#date-en {
  font-family: var(--font-num);
  letter-spacing: 2px;
}

#lunar {
  color: rgba(186, 230, 253, 0.92);
}

/* ==========================================================================
   3. Weather Card (1500 – 2700px)
   ========================================================================== */

.weather-card {
  top: 1500px;
  height: 1140px;
  padding: 64px 96px 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.weather-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#weather-location {
  font-size: 60px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--text-primary);
}

#weather-updated {
  font-size: 42px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.weather-now {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  padding: 12px 0;
}

#weather-icon {
  width: 300px;
  height: 300px;
  flex: 0 0 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 16px 36px rgba(0, 15, 45, 0.4));
}

#weather-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.weather-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

#weather-temp {
  font-family: var(--font-num);
  font-size: 276px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -6px;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  text-shadow: 0 12px 42px rgba(0, 12, 40, 0.38);
}

#weather-desc {
  font-size: 68px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--text-secondary);
}

.weather-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 600px;
}

.meta-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 48px;
  border-radius: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}

#weather-humidity,
#weather-hilo {
  font-family: var(--font-sans);
  font-size: 54px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  color: var(--text-primary);
  white-space: nowrap;
}

/* 4-Day Forecast Strip */
#forecast {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  width: 100%;
}

.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 36px 24px;
  border-radius: 48px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.16);
}

.fd-name {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--text-secondary);
}

.fd-icon {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fd-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.fd-hi {
  font-family: var(--font-num);
  font-size: 64px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text-primary);
}

.fd-lo {
  font-family: var(--font-num);
  font-size: 48px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text-muted);
}

/* ==========================================================================
   4. Promo Slides Card (2700 – 5500px)
   ========================================================================== */

.slides-card {
  top: 2700px;
  height: 2740px;
  overflow: hidden;
  padding: 0;
}

/* Crisp glass rim overlay on top of full-bleed photos */
.slides-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  border: 2px solid var(--glass-border);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.30);
  pointer-events: none;
  z-index: 6;
}

#slides {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(6, 14, 34, 0.55);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  pointer-events: none;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 260px 104px 156px;
  background: linear-gradient(
    to top,
    rgba(4, 10, 26, 0.90) 0%,
    rgba(4, 10, 26, 0.58) 52%,
    rgba(4, 10, 26, 0) 100%
  );
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.slide-title {
  font-size: 124px;
  font-weight: 700;
  letter-spacing: 8px;
  line-height: 1.12;
  color: var(--text-primary);
  text-shadow: 0 8px 36px rgba(0, 0, 0, 0.55);
}

.slide-subtitle {
  font-size: 64px;
  font-weight: 400;
  letter-spacing: 6px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

#slide-dots {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 34px;
  border-radius: 999px;
  background: rgba(6, 14, 34, 0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}

#slide-dots .dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease;
}

#slide-dots .dot.active {
  width: 76px;
  background: #ffffff;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   5. Bottom Ticker (5500 – 5760px)
   ========================================================================== */

#ticker {
  position: absolute;
  top: 5500px;
  left: 100px;
  width: 2200px;
  height: 180px;
  border-radius: 90px;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 60px;
  overflow: hidden;
}

#ticker.hidden {
  display: none;
}

.ticker-track {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

#ticker-text {
  display: inline-block;
  padding-left: 100%;
  font-size: 60px;
  font-weight: 500;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.92);
  will-change: transform;
  animation: tickerMarquee 26s linear infinite;
}

@keyframes tickerMarquee {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* ==========================================================================
   Digit Flip Animation (toggled via .flip for 600ms by js/clock.js)
   ========================================================================== */

.flip {
  display: inline-block;
  animation: digitFlip 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
}

@keyframes digitFlip {
  0% {
    opacity: 0.35;
    transform: translate3d(0, -24px, 0) rotateX(48deg);
  }
  55% {
    opacity: 1;
    transform: translate3d(0, 4px, 0) rotateX(-6deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0deg);
  }
}
