/* ==========================================================================
   HIGH-LEGIBILITY APPLE WEATHER & KIOSK DISPLAY (1680x720 STRICT NO-SCROLL)
   Diurnal Night/Day/Sunset Engine for 24/7 Digital Signage
   Branding: Developed By Camel Communication
   ========================================================================== */

:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', Roboto, sans-serif;
  
  /* Day Glass Materials */
  --glass-bg: rgba(255, 255, 255, 0.16);
  --glass-bg-hover: rgba(255, 255, 255, 0.22);
  --glass-card: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.28);
  --glass-border-subtle: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);

  /* Accents */
  --apple-orange: #ff9500;
  --apple-yellow: #ffcc00;
  --apple-green: #34c759;
  --apple-blue: #007aff;
  --apple-cyan: #30b0c7;

  /* Typography */
  --text-pure: #ffffff;
  --text-subtle: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.65);

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 9999px;
}

/* Reset & Strict Viewport */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden !important;
  font-family: var(--font-family);
  color: var(--text-pure);
  position: relative;
  -webkit-font-smoothing: antialiased;
  background-color: #1a3860;
  transition: background 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   DIURNAL SKY THEMES (Day -> Sunset / Twilight -> Starry Night)
   ========================================================================== */

/* 1. Day Clear Sky */
body.weather-day-clear {
  background: linear-gradient(180deg, #1b4f8a 0%, #2f73b8 40%, #589de0 80%, #87beee 100%);
}

/* 2. Day Cloudy Sky */
body.weather-day-clouds {
  background: linear-gradient(180deg, #243f66 0%, #3a5e8c 40%, #557eae 80%, #769fcf 100%);
}

/* 3. Golden Hour / Sunset (Approaching & During Sunset) */
body.weather-sunset {
  background: linear-gradient(180deg, #1b1c3a 0%, #3a224c 30%, #683056 60%, #ba5544 85%, #df744a 100%);
}

/* 4. Deep Midnight Starry Night (After Sunset / Nighttime) */
body.weather-night,
body.weather-night-clear,
body.weather-night-clouds {
  background: linear-gradient(180deg, #050813 0%, #0c1426 35%, #132240 70%, #1a2f58 100%);
}

/* 5. Rain Sky */
body.weather-rain {
  background: linear-gradient(180deg, #182333 0%, #25374f 45%, #385070 80%, #4d698f 100%);
}

/* Night-time Glass Materials (Soft Dark Frosted Glass to Prevent Screen Glare at Night) */
body.weather-night .glass-card,
body.weather-night-clear .glass-card,
body.weather-night-clouds .glass-card {
  background: rgba(12, 22, 42, 0.62);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

body.weather-night .kiosk-footer-bar,
body.weather-night-clear .kiosk-footer-bar,
body.weather-night-clouds .kiosk-footer-bar {
  background: rgba(10, 18, 36, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
}

body.weather-night .sky-light-bloom,
body.weather-night-clear .sky-light-bloom,
body.weather-night-clouds .sky-light-bloom {
  background: radial-gradient(circle, rgba(160, 200, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
}

/* Procedural Sky Canvas & Ambient Light */
.sky-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.sky-gradient-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: 2;
}

.sky-light-bloom {
  position: fixed;
  top: -120px;
  left: 20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 220, 150, 0.28) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 2;
  transition: background 2s ease;
}

/* ==========================================================================
   VIEWPORT STRUCTURE (Target 1680x720 strictly without scroll)
   ========================================================================== */
.kiosk-viewport {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 18px;
  gap: 8px;
  overflow: hidden;
}

/* ==========================================================================
   TOP SYSTEM BAR
   ========================================================================== */
.kiosk-header {
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.live-pill:hover {
  background: rgba(255, 255, 255, 0.28);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--apple-green);
  box-shadow: 0 0 10px var(--apple-green);
  animation: pulseBeacon 1.8s infinite ease-in-out;
}

@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.live-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-pure);
  text-transform: uppercase;
}

.header-location-sub {
  font-size: 13.5px;
  color: var(--text-subtle);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kiosk-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  padding: 5px 15px;
  color: var(--text-pure);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kiosk-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   MAIN SPLIT (Left: Weather, Right: Clock)
   ========================================================================== */
.kiosk-main-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.kiosk-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  padding: 14px 18px;
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease, border-color 0.5s ease;
}

/* ==========================================================================
   LEFT: WEATHER SECTION (LARGE & GLANCEABLE)
   ========================================================================== */
.hero-weather-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  min-height: 195px;
}

.hero-weather-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-heading-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loc-subtag {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--apple-yellow);
}

.location-city-title {
  font-size: clamp(30px, 2.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-pure);
  line-height: 1.1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.accent-gidc {
  color: var(--apple-yellow);
  font-weight: 900;
}

.temp-readout-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.temp-massive {
  font-size: clamp(74px, 5.8vw, 88px);
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--text-pure);
  line-height: 0.9;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.temp-deg-symbol {
  font-size: 42px;
  font-weight: 300;
  color: var(--text-subtle);
  margin-top: -30px;
  margin-left: -12px;
}

.temp-status-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.weather-condition-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-pure);
  text-transform: capitalize;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.feels-like-text {
  font-size: 15.5px;
  color: var(--text-subtle);
}

.feels-like-text strong {
  color: #fff;
  font-weight: 700;
}

.high-low-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  color: var(--text-subtle);
  margin-top: 2px;
}

.high-low-pill strong {
  color: #fff;
}

.hl-dot {
  color: var(--text-muted);
}

.hero-weather-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.weather-art-large {
  width: 95px;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apple-art-svg {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.sync-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

/* 4 Large Telemetry Cards (2x2 Grid) */
.glance-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.glance-card {
  background: var(--glass-card);
  border: 1.5px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-top-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon-emoji {
  font-size: 16px;
}

.card-label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.aqi-level-badge {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.aqi-good { background: rgba(52, 199, 89, 0.3); color: #86efac; border: 1px solid rgba(52, 199, 89, 0.5); }
.aqi-fair { background: rgba(255, 204, 0, 0.3); color: #fde047; border: 1px solid rgba(255, 204, 0, 0.5); }
.aqi-mod  { background: rgba(255, 149, 0, 0.3); color: #fdba74; border: 1px solid rgba(255, 149, 0, 0.5); }
.aqi-poor { background: rgba(255, 59, 48, 0.3); color: #fca5a5; border: 1px solid rgba(255, 59, 48, 0.5); }

.card-tag-badge {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--apple-yellow);
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.card-big-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: clamp(34px, 2.7vw, 42px);
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.card-unit-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-subtle);
}

.card-sub-info {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rainbow-aqi-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #34c759 0%, #ffcc00 35%, #ff9500 70%, #ff3b30 100%);
  position: relative;
  margin: 4px 0;
}

.aqi-needle-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: left 0.6s ease;
}

.wind-content-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wind-dial-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass-pt {
  position: absolute;
  font-size: 8px;
  font-weight: 800;
  color: var(--text-subtle);
}

.compass-pt.pt-n { top: 2px; }
.compass-pt.pt-e { right: 3px; }
.compass-pt.pt-s { bottom: 2px; }
.compass-pt.pt-w { left: 3px; }

.compass-pointer {
  width: 3px;
  height: 34px;
  background: linear-gradient(180deg, #ff3b30 50%, rgba(255, 255, 255, 0.5) 50%);
  border-radius: 2px;
  transform: rotate(0deg);
  transition: transform 0.6s ease;
}

.compass-pin {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.card-progress-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  margin: 4px 0;
}

.card-progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.8s ease;
}

.card-progress-bar.fill-cyan { background: linear-gradient(90deg, #38bdf8, #00f0ff); }
.card-progress-bar.fill-amber { background: linear-gradient(90deg, var(--apple-yellow), var(--apple-orange)); }

/* ==========================================================================
   RIGHT: APPLE HOROLOGY SECTION
   ========================================================================== */
.clock-giant-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 16px 20px;
}

.clock-digital-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}

.ist-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 149, 0, 0.18);
  border: 1.5px solid rgba(255, 149, 0, 0.45);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--apple-orange);
  letter-spacing: 0.06em;
}

.ist-beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apple-orange);
  box-shadow: 0 0 8px var(--apple-orange);
  animation: pulseBeacon 1.4s infinite;
}

.digital-time-giant {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 1px;
}

.digits-large {
  font-size: clamp(48px, 4.2vw, 58px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-pure);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.25);
  line-height: 1;
}

.ampm-large {
  font-size: 24px;
  font-weight: 700;
  color: var(--apple-orange);
}

.date-large {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text-subtle);
  margin-top: 2px;
}

.analog-dial-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 380px;
  position: relative;
}

.apple-watch-svg {
  height: 100%;
  max-height: 365px;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.4));
}

.clock-large-num {
  font-family: var(--font-family);
  font-size: 28px;
  font-weight: 700;
  fill: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.dial-center-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  fill: rgba(255, 255, 255, 0.75);
}

.dial-center-sub {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.14em;
  fill: rgba(255, 255, 255, 0.5);
}

.clock-bottom-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-progress-block {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dp-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
}

.dp-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pure);
}

.dp-track {
  width: 100%;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.dp-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #ffcc00, var(--apple-orange));
  transition: width 0.6s ease;
}

.uptime-badge-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.kiosk-status-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-subtle);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pill-dot.green { background: var(--apple-green); }
.pill-dot.amber { background: var(--apple-yellow); }

/* ==========================================================================
   BOTTOM BRANDING BAR
   ========================================================================== */
.kiosk-footer-bar {
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  transition: background 0.5s ease;
}

.footer-left-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.footer-dim-text {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 500;
}

.branding-showcase-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 183, 3, 0.6);
  border-radius: var(--radius-pill);
  padding: 5px 22px;
  box-shadow: 0 2px 14px rgba(255, 183, 3, 0.25);
  transition: all 0.3s ease;
}

.branding-showcase-box:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 183, 3, 0.9);
}

.camel-emblem-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.camel-emblem-svg {
  filter: drop-shadow(0 2px 6px rgba(255, 183, 3, 0.6));
}

.branding-text-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.branding-prefix {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--text-subtle);
}

.branding-company-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 183, 3, 0.4);
}

.footer-right-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulsar-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apple-green);
  box-shadow: 0 0 8px var(--apple-green);
  animation: pulseBeacon 2s infinite;
}

/* ==========================================================================
   RESPONSIVE SCALING FOR 1680x720 NO-SCROLL
   ========================================================================== */
@media (max-height: 720px) {
  .kiosk-viewport {
    padding: 8px 14px;
    gap: 6px;
  }
  .kiosk-header {
    height: 34px;
    min-height: 34px;
  }
  .hero-weather-card {
    padding: 12px 18px;
    min-height: 180px;
  }
  .location-city-title {
    font-size: 28px;
  }
  .temp-massive {
    font-size: 76px;
  }
  .weather-art-large {
    width: 82px;
    height: 82px;
  }
  .apple-art-svg {
    width: 80px;
    height: 80px;
  }
  .glance-cards-grid {
    gap: 8px;
  }
  .glance-card {
    padding: 8px 12px;
  }
  .card-big-value {
    font-size: 32px;
  }
  .digits-large {
    font-size: 48px;
  }
  .analog-dial-stage {
    max-height: 330px;
  }
  .apple-watch-svg {
    max-height: 320px;
  }
  .clock-large-num {
    font-size: 24px;
  }
  .kiosk-footer-bar {
    height: 38px;
    min-height: 38px;
  }
  .branding-company-name {
    font-size: 15px;
  }
}

@media (max-width: 1024px) {
  html, body {
    overflow-y: auto !important;
    height: auto;
  }
  .kiosk-viewport {
    height: auto;
    overflow-y: auto;
  }
  .kiosk-main-split {
    grid-template-columns: 1fr;
  }
  .analog-dial-stage {
    max-height: 360px;
    height: 360px;
  }
}
