/* =====================================================================
   FULL-SITE LIQUID GLASS THEME
   iOS-style: a colourful ambient field behind frosted, rim-lit glass
   surfaces. Linked after each page's inline <style> (and after
   liquid-glass.css, which handles the buttons), so it overrides them
   without any markup changes.
   ===================================================================== */

:root {
  --page-w: clamp(1100px, 72vw, 1480px);
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --bg: #07080d;
  --bg-soft: rgba(255, 255, 255, 0.04);
  --panel: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(255, 255, 255, 0.14);
  --wool: #f5f6fa;
  --wool-dim: #aab0c0;
  /* neutral pearl accents instead of blue; the seasonal palettes still override these */
  --moss: rgba(255, 255, 255, 0.22);
  --moss-bright: #eceffa;
  --ember: #ffffff;
  --ember-glow: #ffd6ec;

  /* colours of the ambient field behind the glass */
  --amb-1: rgba(139, 92, 246, 0.62);
  --amb-2: rgba(236, 72, 153, 0.50);
  --amb-3: rgba(20, 184, 166, 0.44);
  --amb-4: rgba(251, 146, 60, 0.36);
  --amb-5: rgba(168, 85, 247, 0.34);

  --glass-fill: linear-gradient(135deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 38%,
    rgba(255, 255, 255, 0.03) 62%,
    rgba(255, 255, 255, 0.09) 100%);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-blur: blur(26px) saturate(175%);
  --glass-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.30),
    inset -1px -1px 0 rgba(255, 255, 255, 0.09),
    inset 0 0 24px rgba(255, 255, 255, 0.04),
    0 14px 40px rgba(0, 0, 0, 0.38);
}
/* Christmas: a winter night sky in the same blue hue as the snow scene (hsl 210), kept dark enough
   that the white snow and white text stay readable. For the red/green festive glow instead, use:
   amb-1 rgba(220,38,38,.48)  amb-2 rgba(22,163,74,.44)  amb-3 rgba(250,204,21,.24)
   amb-4 rgba(220,38,38,.32)  amb-5 rgba(22,163,74,.28) */
body.theme-christmas {
  --bg: #070c18;
  --amb-1: rgba(70, 140, 235, 0.52);
  --amb-2: rgba(120, 190, 255, 0.34);
  --amb-3: rgba(40, 100, 210, 0.46);
  --amb-4: rgba(150, 205, 255, 0.26);
  --amb-5: rgba(60, 130, 230, 0.34);
}

/* Halloween: near-black base, pumpkin-orange and ember glows, warm-tinted glass. The atmosphere
   (fog, candle flicker, embers, vignette) is added by halloween.css. */
body.theme-halloween {
  --bg: #070403;
  --wool-dim: #bfa999;
  --moss: rgba(255, 140, 40, 0.30);
  --moss-bright: #ff8a2a;
  --ember: #ff7a1a;
  --ember-glow: #ffa24a;
  --amb-1: rgba(255, 100, 10, 0.62);
  --amb-2: rgba(190, 40, 6, 0.46);
  --amb-3: rgba(255, 140, 20, 0.40);
  --amb-4: rgba(120, 25, 3, 0.42);
  --amb-5: rgba(255, 80, 5, 0.30);
  --glass-fill: linear-gradient(135deg,
    rgba(255, 170, 100, 0.15) 0%,
    rgba(255, 120, 40, 0.05) 40%,
    rgba(70, 25, 5, 0.12) 62%,
    rgba(255, 150, 70, 0.10) 100%);
  --glass-border: rgba(255, 160, 80, 0.24);
  --glass-shadow:
    inset 1px 1px 0 rgba(255, 190, 120, 0.32),
    inset -1px -1px 0 rgba(255, 120, 40, 0.10),
    inset 0 0 24px rgba(255, 110, 30, 0.05),
    0 14px 40px rgba(0, 0, 0, 0.55);
}
/* the glass buttons set their own tint, so give them the orange one explicitly */
body.theme-halloween .btn.btn-primary {
  --glass: rgba(255, 115, 20, 0.34);
  --glass-hover: rgba(255, 140, 50, 0.24);
  --rim: rgba(255, 175, 95, 0.52);
  --edge: rgba(255, 100, 10, 0.34);
}
body.theme-halloween .nav-cta {
  --glass: rgba(255, 115, 20, 0.20);
  --glass-hover: rgba(255, 140, 50, 0.30);
  --rim: rgba(255, 170, 90, 0.40);
  --edge: rgba(255, 100, 10, 0.26);
}
body.theme-halloween .icon-btn.save {
  --glass: rgba(255, 115, 20, 0.26);
  --glass-hover: rgba(255, 140, 50, 0.36);
  --rim: rgba(255, 170, 90, 0.42);
  --edge: rgba(255, 100, 10, 0.28);
}

/* ---------- ambient field ---------- */
/* overflow-x: hidden on both html and body makes body a (non-scrolling) scroll container, which
   silently breaks position: sticky on the header; clip does the same clipping without that */
html, body { overflow-x: clip; }
body { background: var(--bg); }
body::before { display: none; }            /* the film-grain overlay would dirty the glass */
.fog { display: none; }
body::after {
  content: "";
  position: fixed;
  inset: -10%;
  will-change: transform;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(48% 52% at 22% 26%, var(--amb-1), transparent 70%),
    radial-gradient(44% 48% at 80% 24%, var(--amb-2), transparent 70%),
    radial-gradient(52% 56% at 52% 60%, var(--amb-5), transparent 72%),
    radial-gradient(50% 54% at 78% 88%, var(--amb-3), transparent 70%),
    radial-gradient(42% 46% at 12% 86%, var(--amb-4), transparent 70%);
  animation: glass-drift 30s ease-in-out infinite alternate;
}
@keyframes glass-drift {
  from { transform: translate3d(-2%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

/* the hero and sections painted their own opaque backgrounds, which would hide the field */
.hero { background: transparent !important; }
section { border-top: none; }

/* ---------- footer stays at the bottom on tall / zoomed-out viewports ---------- */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
footer { margin-top: auto; padding: 16px 0; }
footer .wrap { gap: 8px 24px !important; }
footer .logo { font-size: 14px; }
footer .foot-note { font-size: 10.5px; }

/* ---------- floating pill header ---------- */
body { padding-top: 72px; }
html { scroll-padding-top: 96px; }
/* fixed rather than sticky: sticky silently stops working if any ancestor gets an overflow
   value (older Safari, in-app browsers), and this must stay pinned above everything else */
header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 1100;
  width: min(var(--page-w), calc(100% - 24px));
  margin: 0 auto;
  border-radius: 30px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
nav { padding: 10px 12px 10px 24px; max-width: none; }
.wrap { max-width: var(--page-w); }
.mobile-menu {
  background: transparent;
  border-bottom: none;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 4px 24px 14px;
}
.mobile-menu a { border-bottom-color: rgba(255, 255, 255, 0.08); }

/* ---------- glass surfaces ---------- */
.card, .stream-panel, .contact-box, .update-card, .login-box {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.stat, .edit-row, .season-option {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.add-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 22px;
}
.card, .update-card { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease; }
.card:hover, .update-card:hover { border-color: rgba(255, 255, 255, 0.34); transform: translateY(-3px); }

/* the stats grid drew its dividers with a 1px gap on a coloured container; give each its own pane */
.about-stats { gap: 12px; background: none; border: none; border-radius: 0; overflow: visible; }

.stream-panel-head { background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.10); }
.stream-frame-wrap { background: rgba(0, 0, 0, 0.55); }
.stream-status.is-live .status-dot { background: #30d158; box-shadow: 0 0 10px #30d158; }
.stream-status.is-live .status-text { color: #6ee79a; }

.contact-row { border-bottom-color: rgba(255, 255, 255, 0.10); }
footer { border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ---------- type ---------- */
.hero-title { letter-spacing: -0.035em; font-weight: 700; }
.hero-title .accent {
  font-style: italic;
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, var(--ember-glow) 55%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  padding-right: 0.06em;
}
.section-title { letter-spacing: -0.02em; }

/* ---------- fields ---------- */
input, textarea, select,
.field-grid input, .field-grid textarea, .field-grid select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: var(--wool);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
input:focus, textarea:focus, select:focus,
.field-grid input:focus, .field-grid textarea:focus, .field-grid select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.12);
}
::placeholder { color: rgba(255, 255, 255, 0.35); }

/* ---------- admin ---------- */
.admin-tab {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--wool-dim);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.admin-tab:hover { border-color: rgba(255, 255, 255, 0.32); color: var(--wool); }
.admin-tab.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.14));
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--wool);
  font-weight: 600;
}
.season-option:hover { border-color: rgba(255, 255, 255, 0.34); }
.season-option.active {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: var(--glass-shadow), 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.status-banner {
  border-radius: 16px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.status-banner.ok { background: rgba(48, 209, 88, 0.14); color: #6ee79a; border: 1px solid rgba(48, 209, 88, 0.40); }
.status-banner.err { background: rgba(255, 69, 58, 0.14); color: #ff8a84; border: 1px solid rgba(255, 69, 58, 0.40); }
#loginError { color: #ff8a84; }

/* iOS-style toggle */
.toggle-slider { background: rgba(255, 255, 255, 0.20); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4); }
.toggle-slider::before { background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.toggle-switch input:checked + .toggle-slider { background: #30d158; }

/* ---------- fallbacks / small screens ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-fill: linear-gradient(135deg, rgba(40, 44, 58, 0.92), rgba(24, 27, 38, 0.92)); }
}
@media (max-width: 720px) {
  header { width: calc(100% - 16px); top: 8px; border-radius: 26px; }
  body { padding-top: 62px; }
  html { scroll-padding-top: 84px; }
  nav { padding: 8px 10px 8px 14px; }
  .card, .stream-panel, .contact-box, .update-card, .login-box { border-radius: 24px; }
}

/* ---------- bento tiles ---------- */
/* (home + about) */
.bento-section { padding: 36px 0 44px; }
.tile {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  min-width: 0;
}

.tile-label {
  display: block; margin-bottom: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wool-dim);
}

/* ---------- skeleton loading ---------- */
/* Shimmering placeholder shapes shown while a section's data loads. Put .sk on any block and size it with
   .sk-line / .sk-pill or an explicit width and height; stack lines inside a .sk-stack. The sweep follows
   the active season, and is switched off for people who ask for reduced motion. */
.sk {
  --sk-base: rgba(255, 255, 255, 0.1);
  --sk-glint: rgba(255, 255, 255, 0.2);
  position: relative; overflow: hidden;
  background: var(--sk-base);
  border-radius: 10px;
}
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 25%, var(--sk-glint) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: sk-sweep 1.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes sk-sweep { to { transform: translateX(100%); } }
.sk-line { display: block; height: 12px; border-radius: 999px; }
.sk-stack > .sk-line + .sk-line { margin-top: 10px; }
.sk-pill { display: block; flex: 0 0 auto; width: 96px; height: 30px; border-radius: 999px; }
body.theme-halloween .sk { --sk-base: rgba(255, 140, 50, 0.16); --sk-glint: rgba(255, 175, 90, 0.3); }
body.theme-christmas .sk { --sk-base: rgba(150, 190, 255, 0.14); --sk-glint: rgba(190, 215, 255, 0.3); }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; opacity: 0; } }
