/* theme-glass-clear.css — CosmicOdds "Clear Glass" site-wide retheme
   ══════════════════════════════════════════════════════════════════════
   TEST TREE ONLY (IronFeathers_test). Origin: UI Lab experiment
   2026-08-13-header-nav, V3 "Futuristic Flow" glass, transparency raised
   per request. Kokonut UI-derived techniques (MIT, @dorianbaffier):
   frosted-glass layering from liquid-glass-card / spotlight-cards.

   CONTRACT (same as theme-nebula.css): additive override layer, loaded
   LAST in index.html. No selectors removed, no logic touched.
   ROLLBACK: delete the single <link rel="stylesheet" href="theme-glass-clear.css">
   line in index.html.

   TUNING: all transparency lives in the knobs below. Lower alpha = clearer
   glass; raise blur to keep text readable over the busy starfield.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --clear-a-panel-1: 0.26;  /* main window fill, light end            */
  --clear-a-panel-2: 0.40;  /* main window fill, dense end            */
  --clear-a-shell:   0.26;  /* HUD section shells                     */
  --clear-a-chrome:  0.30;  /* buttons, chips, tab shells             */
  --clear-a-menu:    0.55;  /* dropdown menus (readability floor)     */
  --clear-a-modal:   0.80;  /* floating dialogs (readability floor)   */
  --clear-blur:        18px;
  --clear-blur-strong: 26px;
  --clear-edge: rgba(56, 232, 255, 0.30);
  --clear-specular: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* ── 1. Core window panels ─────────────────────────────────────────── */
.panel {
  background: linear-gradient(135deg,
    rgba(15, 23, 42, var(--clear-a-panel-1)) 0%,
    rgba(10, 18, 32, var(--clear-a-panel-2)) 100%);
  backdrop-filter: blur(var(--clear-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--clear-blur)) saturate(150%);
  box-shadow: var(--clear-specular), 0 14px 34px rgba(0, 0, 0, 0.35);
}
.panel-purple {
  background: linear-gradient(135deg,
    rgba(88, 28, 135, 0.14) 0%,
    rgba(15, 23, 42, var(--clear-a-panel-2)) 100%);
}
.panel-red {
  background: linear-gradient(135deg,
    rgba(127, 29, 29, 0.14) 0%,
    rgba(15, 23, 42, var(--clear-a-panel-2)) 100%);
}

/* ── 2. HUD shells & panelized windows (v2 layout) ─────────────────── */
.hud-section-shell {
  background: rgba(10, 18, 32, var(--clear-a-shell));
  backdrop-filter: blur(var(--clear-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--clear-blur)) saturate(150%);
}
.hud-panelized,
.panel-bevel.hud-panelized,
.score-display-v2.hud-panelized,
.story-panel.hud-panelized,
.evidence-panel.hud-panelized,
.object-selector-section.hud-panelized {
  /* keep the cursor-follow radial highlight, thin the base glass */
  background-image:
    radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(57, 230, 255, 0.14), transparent 42%),
    linear-gradient(135deg,
      rgba(10, 18, 32, var(--clear-a-panel-1)),
      rgba(6, 12, 24, var(--clear-a-panel-2))) !important;
  backdrop-filter: blur(var(--clear-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--clear-blur)) saturate(150%);
}

/* ── 3. Story window (readable floor: text over long scroll) ───────── */
.story-panel {
  background: linear-gradient(135deg,
    rgba(88, 28, 135, 0.12) 0%,
    rgba(30, 20, 50, 0.22) 30%,
    rgba(15, 23, 42, 0.48) 100%) !important;
  backdrop-filter: blur(var(--clear-blur-strong)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--clear-blur-strong)) saturate(140%);
}

/* ── 4. Header frame: glass instead of solid slab (video unaffected) ─ */
.header-frame {
  background: linear-gradient(135deg,
    rgba(10, 26, 46, 0.42) 0%,
    rgba(5, 21, 37, 0.30) 50%,
    rgba(2, 10, 20, 0.38) 100%);
  backdrop-filter: blur(var(--clear-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--clear-blur)) saturate(150%);
}

/* ── 5. Chrome: buttons, chips, tab shells, slider shell ───────────── */
.info-btn,
.header-action-btn,
.header-action-btn-labeled,
.info-btn-labeled {
  background: rgba(15, 25, 45, var(--clear-a-chrome));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--clear-specular), 0 0 15px rgba(0, 180, 220, 0.14);
}
.belief-slider-wrapper {
  background: rgba(15, 25, 45, var(--clear-a-chrome));
  backdrop-filter: blur(var(--clear-blur));
  -webkit-backdrop-filter: blur(var(--clear-blur));
}
.category-tabs-container {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(var(--clear-blur));
  -webkit-backdrop-filter: blur(var(--clear-blur));
}
.category-tab:not(.active) {
  background: rgba(30, 41, 59, 0.32);
}
.card-glass {
  background: rgba(15, 23, 42, 0.34) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.counter-badge {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── 6. Language selector: clearer trigger, readable menu ──────────── */
.horiz-lang-trigger {
  background: linear-gradient(135deg,
    rgba(15, 25, 45, 0.45) 0%, rgba(10, 20, 35, 0.55) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.horiz-lang-item {
  background: linear-gradient(135deg,
    rgba(20, 30, 50, var(--clear-a-menu)) 0%,
    rgba(15, 25, 45, 0.62) 100%);
  backdrop-filter: blur(var(--clear-blur-strong));
  -webkit-backdrop-filter: blur(var(--clear-blur-strong));
}

/* ── 7. Modals: still glass, but a readability floor ───────────────── */
.feedback-dialog {
  background: linear-gradient(135deg,
    rgba(15, 23, 42, var(--clear-a-modal)) 0%,
    rgba(10, 18, 32, 0.86) 100%);
  backdrop-filter: blur(var(--clear-blur-strong)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--clear-blur-strong)) saturate(140%);
}
.feedback-overlay {
  background: rgba(0, 0, 0, 0.55);
}

/* ── 8. Inline image module chrome (monitor slideshow) ─────────────── */
.inline-image-module {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.inline-image-header,
.inline-image-meta {
  background: rgba(2, 6, 23, 0.42);
}

/* ── 9. Accessibility: honor reduced-transparency preferences ──────── */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --clear-a-panel-1: 0.82;
    --clear-a-panel-2: 0.92;
    --clear-a-shell:   0.85;
    --clear-a-chrome:  0.85;
    --clear-a-menu:    0.95;
    --clear-a-modal:   0.97;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   v2 — FUTURISTIC LAYER (2026-08-13, same UI Lab origin)
   Header: spinning HUD symbols + running ticker line.
   Windows: dynamic "breathing" shadows tuned to the space-video palette
   (cyan → purple → magenta drift), aurora edge sweep on the story window.
   All motion disabled under prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════════════ */

/* ── 10. Header: spinning HUD symbols (flank the title block) ──────── */
.header-content-tall::before,
.header-content-tall::after {
  position: absolute;
  top: 14px;
  z-index: 3;
  font-size: 17px;
  line-height: 1;
  pointer-events: none;
  opacity: 0.85;
}
.header-content-tall::before {
  content: "✦";
  inset-inline-start: 16px;
  color: var(--hud-cyan, #38e8ff);
  filter: drop-shadow(0 0 8px rgba(56, 232, 255, 0.8));
  animation: glass-spin 9s linear infinite;
}
.header-content-tall::after {
  content: "❂";
  inset-inline-end: 16px;
  color: #e14eca;
  filter: drop-shadow(0 0 8px rgba(225, 78, 202, 0.8));
  animation: glass-spin 7s linear infinite reverse;
}
@keyframes glass-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── 11. Header: running ticker line (bottom edge of the frame) ────── */
.header-title-row::after {
  content: "◈ UALM-B LIVE ANOMALY FEED ◈ 123 OBJECTS TRACKED ◈ NO RUMORS · NO VIBES — PURE PHYSICS AND PROBABILITY ◈ INTERSTELLAR · SOLAR · COSMIC ◈ COSMICODDS.COM ◈";
  position: absolute;
  bottom: 4px;
  left: 0;
  z-index: 2;
  white-space: nowrap;
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(56, 232, 255, 0.55);
  text-shadow: 0 0 8px rgba(56, 232, 255, 0.35);
  animation: glass-ticker 32s linear infinite;
}
@keyframes glass-ticker {
  from { transform: translateX(60vw); }
  to   { transform: translateX(-105%); }
}

/* ── 12. Dynamic breathing shadows (play against the video palette) ── */
/* Un-clipped windows: animated box-shadow */
.panel {
  animation: glass-breathe-box 11s ease-in-out infinite alternate;
}
.story-panel {
  animation: glass-breathe-story 13s ease-in-out infinite alternate;
}
.header-frame {
  animation: glass-breathe-header 9s ease-in-out infinite alternate;
}
@keyframes glass-breathe-box {
  0%   { box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 10px 34px rgba(0,0,0,.35), 0 0 22px rgba(56, 232, 255, 0.10); }
  50%  { box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 14px 40px rgba(0,0,0,.38), 0 0 30px rgba(163, 113, 247, 0.16); }
  100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 12px 36px rgba(0,0,0,.36), 0 0 26px rgba(225, 78, 202, 0.13); }
}
@keyframes glass-breathe-story {
  0%   { box-shadow: 0 4px 30px rgba(0,0,0,.3), 0 0 24px rgba(123, 47, 247, 0.12); }
  100% { box-shadow: 0 4px 30px rgba(0,0,0,.3), 0 0 34px rgba(225, 78, 202, 0.18); }
}
@keyframes glass-breathe-header {
  0%   { box-shadow: 0 0 20px rgba(0, 180, 220, 0.28), 0 0 44px rgba(0, 180, 220, 0.12), inset 0 0 30px rgba(0, 180, 220, 0.08); }
  100% { box-shadow: 0 0 26px rgba(163, 113, 247, 0.30), 0 0 58px rgba(225, 78, 202, 0.14), inset 0 0 34px rgba(123, 47, 247, 0.10); }
}
/* Clipped windows (clip-path eats box-shadow): animate drop-shadow filters */
.hud-section-shell {
  animation: glass-breathe-shell 10s ease-in-out infinite alternate;
}
.hud-panelized,
.panel-bevel.hud-panelized,
.score-display-v2.hud-panelized,
.story-panel.hud-panelized,
.evidence-panel.hud-panelized,
.object-selector-section.hud-panelized {
  animation: glass-breathe-clip 12s ease-in-out infinite alternate;
}
@keyframes glass-breathe-shell {
  0%   { filter: drop-shadow(0 0 12px rgba(56, 232, 255, 0.13)); }
  100% { filter: drop-shadow(0 0 18px rgba(163, 113, 247, 0.20)); }
}
@keyframes glass-breathe-clip {
  0%   { filter: drop-shadow(0 0 10px rgba(56, 232, 255, 0.10)); }
  50%  { filter: drop-shadow(0 0 16px rgba(225, 78, 202, 0.14)); }
  100% { filter: drop-shadow(0 0 13px rgba(163, 113, 247, 0.17)); }
}

/* ── 13. Aurora edge sweep on the story window (Chromium; safe no-op
        elsewhere). Kokonut spotlight-cards edge technique. ──────────── */
@property --glass-sweep {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.story-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: conic-gradient(from var(--glass-sweep),
    transparent 0%, rgba(56, 232, 255, 0.45) 6%, transparent 14%,
    transparent 58%, rgba(225, 78, 202, 0.38) 68%, transparent 78%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: glass-sweep-rot 8s linear infinite;
}
@keyframes glass-sweep-rot {
  to { --glass-sweep: 360deg; }
}

/* ── 14. Motion accessibility: switch every v2 effect off ──────────── */
@media (prefers-reduced-motion: reduce) {
  .header-content-tall::before,
  .header-content-tall::after,
  .header-title-row::after,
  .panel, .story-panel, .header-frame,
  .hud-section-shell,
  .hud-panelized,
  .panel-bevel.hud-panelized,
  .score-display-v2.hud-panelized,
  .story-panel.hud-panelized,
  .evidence-panel.hud-panelized,
  .object-selector-section.hud-panelized {
    animation: none !important;
  }
  .story-panel::after { animation: none; opacity: 0.35; }
}

/* ── NebulaRail (app.jsx) is styled only by theme-nebula.css. Under Clear Glass it has no
   rules and dumps as inline white text at the top of the shell — hide it. ── */
.nebula-rail { display: none !important; }

/* ── 15. Header command nav (was styled only by theme-nebula.css, which Clear
        Glass replaced — without these rules the pill stacked vertically at the
        left edge and Info / G.A.I. / Feedback / Blog / Progress were clipped
        by the header's overflow:hidden). Ported to the glass look. ──────── */
.nebula-nav-row { justify-content: center !important; margin-bottom: 14px; }
/* room for the pill above the ticker line (header is overflow:hidden) */
.header-frame.hud-command-bar { min-height: clamp(160px, 14vw, 208px); }
.nebula-pill-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9999px;
  background: rgba(10, 18, 36, var(--clear-a-chrome));
  border: 1px solid var(--clear-edge);
  backdrop-filter: blur(var(--clear-blur));
  -webkit-backdrop-filter: blur(var(--clear-blur));
  box-shadow: var(--clear-specular), 0 8px 32px rgba(0, 0, 0, 0.45);
}
.nebula-pill-nav .info-btn,
.nebula-pill-nav .header-action-btn,
.nebula-pill-nav .header-action-btn-labeled {
  border-radius: 9999px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
}
.nebula-pill-nav .info-btn:hover,
.nebula-pill-nav .header-action-btn:hover,
.nebula-pill-nav .header-action-btn-labeled:hover {
  background: rgba(123, 47, 247, 0.30);
  border-color: rgba(225, 78, 202, 0.55);
  box-shadow: 0 0 16px rgba(225, 78, 202, 0.40);
}
/* G.A.I. is live: green glow */
.nebula-pill-nav .header-action-btn-labeled.gai-link {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(69, 240, 138, 0.45);
  cursor: pointer;
}
.nebula-pill-nav .header-action-btn-labeled.gai-link:hover {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(69, 240, 138, 0.85);
  box-shadow: 0 0 18px rgba(69, 240, 138, 0.45);
}
