/* Liquid-glass homepage (Ian #15 step 11), see-through
   panels over a colorful, moving background.
   Palette from /styles.css: lime #8acd00, deep blue #1615d4, neon yellow #d6ff2d, ink #050505.
   Glass recipe matches the admin side (public/admin-ui.css).
   Color vs Admin background is a site-wide admin toggle (data-home-bg). */

:root {
  /* Same glass recipe as the admin side (public/admin-ui.css): one even
     translucent tint, frosted blur, thin 1px edge, one thin top highlight. */
  --glass-text: #101015;
  --glass-text-soft: rgba(16, 16, 22, 0.62);
  --card-bg: rgba(255, 255, 255, 0.38);
  --card-blur: blur(28px) saturate(170%);
  --card-border: rgba(255, 255, 255, 0.75);
  --card-hi: rgba(255, 255, 255, 0.95);
  --card-shadow: 0 30px 60px rgba(40, 44, 80, 0.18);
  --item-bg: rgba(255, 255, 255, 0.42);
  --item-blur: blur(12px) saturate(160%);
  --item-border: rgba(255, 255, 255, 0.7);
  --item-hi: rgba(255, 255, 255, 0.9);
  --item-shadow: 0 2px 8px rgba(40, 44, 80, 0.06);
  --blob-a: #d6ff2d;
  --blob-b: #2b2cff;
  --blob-c: #f4ff7a;
  --blob-d: #5b6dff;
  --blob-e: #b6f000;
}

/* ── Background: lime stage plus drifting blurred blobs in both modes. ── */
.stage {
  background:
    radial-gradient(rgba(5, 5, 5, 0.07) 1px, transparent 1.6px) 0 0 / 22px 22px,
    var(--stage-color, #8acd00);
}
.glass-blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; transition: opacity 0.4s ease; }
.glass-blobs i { position: absolute; border-radius: 50%; filter: blur(48px); animation: glass-drift 16s ease-in-out infinite alternate; will-change: transform; }
.glass-blobs i:nth-child(1) { width: 78vmax; height: 78vmax; left: -30vmax; top: -24vmax; background: var(--blob-a); }
.glass-blobs i:nth-child(2) { width: 62vmax; height: 62vmax; right: -26vmax; top: 14vh; background: var(--blob-b); animation-duration: 19s; animation-delay: -6s; }
.glass-blobs i:nth-child(3) { width: 56vmax; height: 56vmax; left: -18vmax; bottom: -22vmax; background: var(--blob-d); animation-duration: 23s; animation-delay: -11s; }
.glass-blobs i:nth-child(4) { width: 40vmax; height: 40vmax; right: -8vmax; bottom: -10vmax; background: var(--blob-c); animation-duration: 17s; animation-delay: -3s; }
.glass-blobs i:nth-child(5) { width: 34vmax; height: 34vmax; left: 20vw; top: 34vh; background: var(--blob-e); animation-duration: 21s; animation-delay: -8s; }
@keyframes glass-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(9vmax, 6vmax, 0) scale(1.12); }
  100% { transform: translate3d(-5vmax, 11vmax, 0) scale(0.94); }
}
body:has(.card.live-mode) .glass-blobs { opacity: 0.4; }

/* "Admin" mode mirrors the admin side's page tone and follows its light/dark/auto theme. */
html[data-home-bg="admin"] {
  --admin-page-bg: #050505;
  --blob-a: rgba(138, 205, 0, 0.75);
  --blob-b: rgba(40, 40, 230, 0.85);
  --blob-c: rgba(214, 255, 45, 0.45);
  --blob-d: rgba(196, 20, 45, 0.55);
  --blob-e: rgba(90, 110, 255, 0.55);
  --glass-text: #ffffff;
  --glass-text-soft: rgba(255, 255, 255, 0.7);
  --card-bg: rgba(24, 24, 30, 0.52);
  --card-border: rgba(255, 255, 255, 0.14);
  --card-hi: rgba(255, 255, 255, 0.22);
  --card-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  --item-bg: rgba(255, 255, 255, 0.08);
  --item-border: rgba(255, 255, 255, 0.12);
  --item-hi: rgba(255, 255, 255, 0.10);
  --item-shadow: none;
}
html[data-home-bg="admin"][data-admin-theme="light"] {
  --admin-page-bg: #eef0f6;
  --blob-a: rgba(138, 205, 0, 0.6);
  --blob-b: rgba(80, 90, 255, 0.55);
  --blob-c: rgba(214, 255, 45, 0.5);
  --blob-d: rgba(255, 90, 120, 0.45);
  --blob-e: rgba(120, 140, 255, 0.4);
  --glass-text: #101015;
  --glass-text-soft: rgba(16, 16, 22, 0.6);
  --card-bg: rgba(255, 255, 255, 0.50);
  --card-border: rgba(255, 255, 255, 0.75);
  --card-hi: rgba(255, 255, 255, 0.95);
  --card-shadow: 0 30px 60px rgba(40, 44, 80, 0.18);
  --item-bg: rgba(255, 255, 255, 0.45);
  --item-border: rgba(255, 255, 255, 0.7);
  --item-hi: rgba(255, 255, 255, 0.9);
  --item-shadow: 0 2px 8px rgba(40, 44, 80, 0.06);
}
html[data-home-bg="admin"] .stage { background: radial-gradient(rgba(127, 127, 127, 0.10) 1px, transparent 1.6px) 0 0 / 22px 22px, var(--admin-page-bg); }
html[data-home-bg="admin"] body:has(.card.live-mode) .stage { background: var(--stage-color, #000); }


/* ── The card. The glass lives on ::before so the rows inside still blur the
   real background instead of the card's own pane. ── */
.card {
  background: transparent;
  border-radius: 32px;
  box-shadow: var(--card-shadow);
  color: var(--glass-text);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit;
  background: var(--card-bg);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 var(--card-hi);
}
.hero, .links, .thought-bubble { position: relative; z-index: 1; }
.handle { color: var(--glass-text); }

/* ── Rows, buttons, bubbles and pills: the admin's small-surface glass. ── */
.link,
.waitlist-button, .business-btn, .share-button, .map-button,
.social, .locations-wrap, .thought-bubble, .profile-bubble {
  background: var(--item-bg);
  -webkit-backdrop-filter: var(--item-blur);
  backdrop-filter: var(--item-blur);
  border: 1px solid var(--item-border);
  box-shadow: inset 0 1px 0 var(--item-hi), var(--item-shadow);
  color: var(--glass-text);
}
.link {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.link::after { content: none; }
.link .label { color: var(--glass-text); }
.link .dots { color: var(--glass-text-soft); }
.link .thumb { border-radius: 10px; }
.link:hover, .link:focus-visible { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--item-hi), 0 8px 20px rgba(5, 5, 5, 0.12); }
.link.authorizing { background: rgba(42, 42, 58, 0.55); color: #fff; }
.donations-sublist { border-left-color: var(--item-border); }

/* Round top buttons. */
.waitlist-button, .business-btn, .share-button, .map-button { width: 44px; height: 44px; border-radius: 999px; }
.waitlist-button:hover, .waitlist-button:focus-visible,
.business-btn:hover, .business-btn:focus-visible,
.share-button:hover, .share-button:focus-visible,
.map-button:hover, .map-button:focus-visible { border-color: var(--card-border); }
.share-button { right: 66px; }
.map-button { right: 118px; }

/* Social bubbles keep their brand colors. */
.social { width: 44px; height: 44px; border-radius: 999px; }
.social[aria-label="TikTok"] { color: #050505; }
.social[aria-label="Twitch"] { color: #9146ff; }
.social[aria-label="YouTube"] { color: #ff0000; }
.social[aria-label="Discord"] { color: #5865f2; }
html[data-home-bg="admin"]:not([data-admin-theme="light"]) .social[aria-label="TikTok"] { color: #ffffff; }
html[data-home-bg="admin"]:not([data-admin-theme="light"]) .social[aria-label="Discord"] { color: #8c95ff; }
html[data-home-bg="admin"]:not([data-admin-theme="light"]) .social[aria-label="Twitch"] { color: #b48aff; }
.social svg { width: 24px; height: 24px; }

/* Location ticker and the LA line become small glass pills. */
.locations-wrap { height: 30px; border-radius: 999px; padding: 0 6px; }
.location-item { color: var(--glass-text-soft); }
.location-sep { color: var(--glass-text-soft); opacity: 0.5; }
.thought-bubble { display: table; margin: 24px auto 0; padding: 8px 16px; border-radius: 999px; color: var(--glass-text-soft); }

/* Profile bubble (thought tail too). */
.profile-bubble::before, .profile-bubble::after {
  background: var(--item-bg);
  -webkit-backdrop-filter: var(--item-blur); backdrop-filter: var(--item-blur);
}

/* ── #16 live-status flash: same clear glass, live colors for text. ── */
.card.live-mode { color: var(--live-text-color, #ffffff); }
.card.live-mode::before { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.card.live-mode .link,
.card.live-mode .waitlist-button, .card.live-mode .business-btn,
.card.live-mode .share-button, .card.live-mode .map-button,
.card.live-mode .social, .card.live-mode .locations-wrap, .card.live-mode .thought-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: var(--live-text-color, #ffffff);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.card.live-mode .link .label, .card.live-mode .link .dots,
.card.live-mode .handle, .card.live-mode .location-item { color: var(--live-text-color, #ffffff); }

/* Popup ad matches. */
.creator-ad { border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 14px 32px rgba(5, 5, 5, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.queue-popup-close { width: 44px; height: 44px; }
.creator-ad-close { width: 44px; height: 44px; }

/* ── Phone first. ── */
@media (max-width: 480px) {
  .page { padding: 10px 10px 18px; }
  .card { min-height: calc(100vh - 20px); border-radius: 28px; box-shadow: var(--card-shadow); }
}

/* No backdrop-filter at all: frosted fallback that stays readable. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card::before { background: rgba(255, 255, 255, 0.42); }
  .link, .social, .waitlist-button, .business-btn, .share-button, .map-button,
  .locations-wrap, .thought-bubble, .profile-bubble { background: rgba(255, 255, 255, 0.55); }
  html[data-home-bg="admin"]:not([data-admin-theme="light"]) .card::before { background: rgba(20, 20, 24, 0.85); }
  html[data-home-bg="admin"]:not([data-admin-theme="light"]) .link { background: rgba(40, 40, 48, 0.8); }
}
@media (prefers-reduced-motion: reduce) { .glass-blobs i { animation: none; } }
@media (prefers-reduced-transparency: reduce) {
  .card::before { background: rgba(255, 255, 255, 0.6); }
  .link { background: rgba(255, 255, 255, 0.7); }
}

/* ── Link list: blue-tinted glass (Ian #15 step 11 notes, 7:17am). Same frosted
   recipe, tinted with the brand deep blue, white text. Applies in every mode. ── */
:root {
  --link-bg: rgba(43, 44, 255, 0.42);
  --link-border: rgba(170, 180, 255, 0.55);
  --link-hi: rgba(220, 225, 255, 0.55);
  --link-text: #ffffff;
  --link-text-soft: rgba(255, 255, 255, 0.72);
}
html[data-home-bg="admin"] {
  --link-bg: rgba(43, 44, 255, 0.30);
  --link-border: rgba(140, 150, 255, 0.35);
  --link-hi: rgba(200, 205, 255, 0.28);
}
html[data-home-bg="admin"][data-admin-theme="light"] {
  --link-bg: rgba(43, 44, 255, 0.48);
  --link-border: rgba(170, 180, 255, 0.6);
  --link-hi: rgba(220, 225, 255, 0.6);
}
.card .link {
  background: var(--link-bg);
  border-color: var(--link-border);
  box-shadow: inset 0 1px 0 var(--link-hi), 0 2px 10px rgba(22, 21, 212, 0.14);
  color: var(--link-text);
}
.card .link .label { color: var(--link-text); }
.card .link .dots { color: var(--link-text-soft); }
.card .link:hover, .card .link:focus-visible { box-shadow: inset 0 1px 0 var(--link-hi), 0 8px 20px rgba(22, 21, 212, 0.28); }
.card .link.authorizing { background: rgba(42, 42, 58, 0.55); color: #fff; }

/* ── Ian #15 step 11 notes (7:20am): brighter, more saturated blue links;
   the blue background flares are now red. ── */
:root {
  --blob-b: #ff2a2a;
  --blob-d: #ff4d4d;
  --link-bg: rgba(40, 70, 255, 0.78);
  --link-border: rgba(150, 175, 255, 0.85);
  --link-hi: rgba(225, 232, 255, 0.75);
}
html[data-home-bg="admin"] {
  --blob-b: rgba(230, 30, 40, 0.85);
  --blob-e: rgba(255, 80, 90, 0.55);
  --link-bg: rgba(40, 70, 255, 0.7);
  --link-border: rgba(150, 175, 255, 0.7);
  --link-hi: rgba(215, 222, 255, 0.5);
}
html[data-home-bg="admin"][data-admin-theme="light"] {
  --blob-b: rgba(255, 50, 60, 0.55);
  --blob-e: rgba(255, 110, 120, 0.4);
  --link-bg: rgba(40, 70, 255, 0.8);
  --link-border: rgba(150, 175, 255, 0.85);
  --link-hi: rgba(225, 232, 255, 0.75);
}
.card .link { box-shadow: inset 0 1px 0 var(--link-hi), 0 2px 14px rgba(40, 70, 255, 0.35); }
.card .link:hover, .card .link:focus-visible { box-shadow: inset 0 1px 0 var(--link-hi), 0 8px 24px rgba(40, 70, 255, 0.5); }

/* ── Ian #15 step 11 notes (7:35am): no background dot grid, brighter green,
   slightly brighter blue links, more dramatic flare movement. ── */
.stage { background: var(--stage-color, #a6f000); }
body:not(:has(.card.live-mode)) .stage { background: #a6f000; }
html[data-home-bg="admin"] .stage { background: var(--admin-page-bg); }
html[data-home-bg="admin"] body:has(.card.live-mode) .stage { background: var(--stage-color, #000); }
:root {
  --blob-a: #e2ff3d;
  --blob-e: #c4ff1a;
  --link-bg: rgba(50, 95, 255, 0.86);
  --link-border: rgba(165, 190, 255, 0.9);
}
html[data-home-bg="admin"] {
  --blob-a: rgba(160, 235, 0, 0.85);
  --link-bg: rgba(50, 95, 255, 0.8);
}
html[data-home-bg="admin"][data-admin-theme="light"] {
  --blob-a: rgba(160, 235, 0, 0.7);
  --link-bg: rgba(50, 95, 255, 0.86);
}
.glass-blobs i { animation-name: glass-drift-big; }
.glass-blobs i:nth-child(1) { animation-duration: 12s; }
.glass-blobs i:nth-child(2) { animation-duration: 14s; }
.glass-blobs i:nth-child(3) { animation-duration: 16s; }
.glass-blobs i:nth-child(4) { animation-duration: 11s; }
.glass-blobs i:nth-child(5) { animation-duration: 15s; }
@keyframes glass-drift-big {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(18vmax, 10vmax, 0) scale(1.25); }
  66%  { transform: translate3d(-12vmax, 20vmax, 0) scale(0.85); }
  100% { transform: translate3d(8vmax, -10vmax, 0) scale(1.15); }
}
@media (prefers-reduced-motion: reduce) { .glass-blobs i { animation: none; } }

/* ── Ian #15 step 11 notes (7:45am): flare movement between the original and
   the 7:35 version; link icons centered vertically in their rows. The base
   .link grid reserved an empty second row plus an 8px row gap, which pushed
   the icon, label and dots up; rows now only appear when a player shows. ── */
.glass-blobs i { animation-name: glass-drift-mid; }
.glass-blobs i:nth-child(1) { animation-duration: 14s; }
.glass-blobs i:nth-child(2) { animation-duration: 17s; }
.glass-blobs i:nth-child(3) { animation-duration: 19s; }
.glass-blobs i:nth-child(4) { animation-duration: 13s; }
.glass-blobs i:nth-child(5) { animation-duration: 18s; }
@keyframes glass-drift-mid {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  33%  { transform: translate3d(13vmax, 8vmax, 0) scale(1.18); }
  66%  { transform: translate3d(-8vmax, 15vmax, 0) scale(0.9); }
  100% { transform: translate3d(6vmax, -6vmax, 0) scale(1.08); }
}
.card .link { grid-template-rows: auto; }
.card .link .thumb, .card .link .label, .card .link .dots { align-self: center; line-height: 1; }
.card .link .thumb { display: grid; place-items: center; }
@media (prefers-reduced-motion: reduce) { .glass-blobs i { animation: none; } }

/* Ian #15 (Nov 11 8:08am): white @handle; badge icons optically centered in their bubbles; TikTok badge gets cyan/red side accents. */
.handle, .card.live-mode .handle { color: #ffffff; }
.social svg { display: block; }
.social[aria-label="TikTok"] svg { width: 26px; height: 26px; transform: translate(0.75px, -1.25px); }
.social[aria-label="YouTube"] svg { transform: translateY(0.5px); }

/* ── Ian #15 (Nov 11 8:17am): every homepage mode follows the viewer's device
   light/dark setting (data-admin-theme = device scheme, or this device's admin
   Light/Dark choice). Admin mode is now neutral: white in light, black in dark,
   neutral glass with the admin page RGB bokeh (green, blue, red). Color mode keeps the green, with a dark
   variant for dark-mode devices. Live-status flash rules above still win. ── */

/* Admin, dark: black page, neutral dark glass. */
html[data-home-bg="admin"] {
  --admin-page-bg: #000000;
  /* RGB bokeh matching the admin page (Ian #15 Nov 11 6:30pm): green, blue, red. */
  --blob-a: rgba(138, 205, 0, 0.42);
  --blob-b: rgba(40, 38, 255, 0.56);
  --blob-c: rgba(40, 38, 255, 0.30);
  --blob-d: rgba(220, 24, 52, 0.42);
  --blob-e: rgba(138, 205, 0, 0.18);
  --link-bg: rgba(255, 255, 255, 0.10);
  --link-border: rgba(255, 255, 255, 0.16);
  --link-hi: rgba(255, 255, 255, 0.18);
  --link-text: #ffffff;
  --link-text-soft: rgba(255, 255, 255, 0.65);
}
/* Admin, light: white page, neutral light glass. */
html[data-home-bg="admin"][data-admin-theme="light"] {
  --admin-page-bg: #f5f5f7;
  --blob-a: rgba(138, 205, 0, 0.46);
  --blob-b: rgba(80, 90, 255, 0.40);
  --blob-c: rgba(80, 90, 255, 0.24);
  --blob-d: rgba(255, 90, 120, 0.38);
  --blob-e: rgba(138, 205, 0, 0.16);
  --link-bg: rgba(255, 255, 255, 0.55);
  --link-border: rgba(255, 255, 255, 0.85);
  --link-hi: rgba(255, 255, 255, 0.95);
  --link-text: #101015;
  --link-text-soft: rgba(16, 16, 22, 0.55);
}
html[data-home-bg="admin"] .card .link { box-shadow: inset 0 1px 0 var(--link-hi), 0 2px 10px rgba(0, 0, 0, 0.18); }
html[data-home-bg="admin"] .card .link:hover, html[data-home-bg="admin"] .card .link:focus-visible { box-shadow: inset 0 1px 0 var(--link-hi), 0 8px 22px rgba(0, 0, 0, 0.26); }
html[data-home-bg="admin"][data-admin-theme="light"] .card .link { box-shadow: inset 0 1px 0 var(--link-hi), 0 2px 10px rgba(40, 44, 80, 0.08); }
html[data-home-bg="admin"][data-admin-theme="light"] .card .link:hover, html[data-home-bg="admin"][data-admin-theme="light"] .card .link:focus-visible { box-shadow: inset 0 1px 0 var(--link-hi), 0 8px 22px rgba(40, 44, 80, 0.14); }
html[data-home-bg="admin"][data-admin-theme="light"] .handle { color: #101015; }

/* Color, dark: deep green page, same green and red flares (dimmed), dark glass. */
html[data-home-bg="color"][data-admin-theme="dark"] {
  --blob-a: rgba(166, 240, 0, 0.55);
  --blob-b: rgba(230, 30, 40, 0.55);
  --blob-c: rgba(214, 255, 45, 0.30);
  --blob-d: rgba(255, 77, 77, 0.40);
  --blob-e: rgba(166, 240, 0, 0.35);
  --glass-text: #ffffff;
  --glass-text-soft: rgba(255, 255, 255, 0.7);
  --card-bg: rgba(16, 20, 10, 0.50);
  --card-border: rgba(255, 255, 255, 0.14);
  --card-hi: rgba(255, 255, 255, 0.22);
  --card-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  --item-bg: rgba(255, 255, 255, 0.08);
  --item-border: rgba(255, 255, 255, 0.14);
  --item-hi: rgba(255, 255, 255, 0.12);
  --item-shadow: none;
  --link-bg: rgba(50, 95, 255, 0.72);
  --link-border: rgba(150, 175, 255, 0.6);
  --link-hi: rgba(215, 222, 255, 0.45);
}
html[data-home-bg="color"][data-admin-theme="dark"] body:not(:has(.card.live-mode)) .stage { background: #142000; }
html[data-home-bg="color"][data-admin-theme="dark"] .social[aria-label="TikTok"] { color: #ffffff; }
html[data-home-bg="color"][data-admin-theme="dark"] .social[aria-label="Discord"] { color: #8c95ff; }
html[data-home-bg="color"][data-admin-theme="dark"] .social[aria-label="Twitch"] { color: #b48aff; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-home-bg="color"][data-admin-theme="dark"] .card::before { background: rgba(18, 24, 10, 0.88); }
}
/* The Color-mode green stage rule (body:not(:has(.card.live-mode)) .stage) outranked the
   Admin page colour, which is why Admin showed green. Admin's own page colour wins now. */
html[data-home-bg="admin"] body:not(:has(.card.live-mode)) .stage { background: var(--admin-page-bg); }

/* Home: Color glass tint picked in Home Customization > Color and status (Ian #18, Nov 12). */
html[data-home-bg="color"][data-glass-tint] {
  --link-bg: color-mix(in srgb, var(--glass-tint) 42%, transparent);
  --link-border: color-mix(in srgb, color-mix(in srgb, var(--glass-tint) 45%, #ffffff) 55%, transparent);
  --link-hi: color-mix(in srgb, color-mix(in srgb, var(--glass-tint) 20%, #ffffff) 55%, transparent);
}
