/* Influential "glass": dark, visual-first. The footage is the colour; chrome is charcoal glass, white is the action. */
:root {
  --g-bg: #0b0b0c;
  --g-canvas: #121213;
  --g-panel: rgba(22, 22, 24, .64);
  --g-panel-solid: #19191c;
  --g-panel-2: rgba(255, 255, 255, .06);
  --g-edge: rgba(255, 255, 255, .09);
  --g-edge-2: rgba(255, 255, 255, .16);
  --g-hover: rgba(255, 255, 255, .09);
  --g-active: rgba(255, 255, 255, .15);
  --g-text: #f5f5f7;
  --g-text-2: #a1a1aa;
  --g-text-3: #71717a;
  --g-white: #ffffff;
  --g-ink: #0b0b0c;
  --g-ok: #4ade80;
  --g-warn: #fbbf24;
  --g-bad: #f87171;
  --g-blur: blur(24px) saturate(1.25);
  --g-r: 22px;
  --g-r-sm: 14px;
  --g-font: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --g-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --g-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
.g-root { background: var(--g-bg); color: var(--g-text); font: 13px/1.4 var(--g-font); -webkit-font-smoothing: antialiased; }
.g-grid { background-color: var(--g-canvas); background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 28px 28px; }

/* glass surfaces */
.glass { background: var(--g-panel); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border: 1px solid var(--g-edge); border-radius: var(--g-r); box-shadow: var(--g-shadow); }
.g-solid .glass, .g-solid .glass-soft { background: var(--g-panel-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
.glass-soft { background: var(--g-panel-2); border: 1px solid var(--g-edge); border-radius: var(--g-r-sm); }

/* circular icon buttons */
.g-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--g-text); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; position: relative; transition: background .15s, transform .1s; flex: none; text-decoration: none; }
.g-btn:hover { background: var(--g-hover); }
.g-btn:active { transform: scale(.95); }
.g-btn.on, .g-btn.primary { background: var(--g-white); color: var(--g-ink); }
.g-btn.glassy { background: var(--g-panel); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); border: 1px solid var(--g-edge); }
.g-btn.sm { width: 32px; height: 32px; font-size: 16px; }
.g-btn.xs { width: 26px; height: 26px; font-size: 14px; }
.g-btn[disabled] { opacity: .35; pointer-events: none; }
.g-btn .dot { position: absolute; right: 7px; top: 7px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--g-panel-solid); }

/* pills and chips */
.g-pill { height: 32px; border-radius: 999px; padding: 0 13px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--g-edge); background: var(--g-panel); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); color: var(--g-text); font: 500 12.5px var(--g-font); cursor: pointer; white-space: nowrap; }
.g-pill:hover { background: rgba(40, 40, 44, .75); }
.g-pill.primary { background: var(--g-white); color: var(--g-ink); border-color: transparent; }
.g-pill.primary:hover { background: #e9e9ec; }
.g-pill.sm { height: 28px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
.g-pill .sw { width: 9px; height: 9px; border-radius: 50%; }
.g-pill i { font-size: 15px; }
.g-chip { height: 26px; border-radius: 999px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; background: var(--g-panel-2); border: 1px solid var(--g-edge); color: var(--g-text-2); font: 500 12px var(--g-font); cursor: pointer; white-space: nowrap; }
.g-chip:hover { color: var(--g-text); background: var(--g-hover); }
.g-chip.on { background: var(--g-white); color: var(--g-ink); border-color: transparent; }
.g-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.g-badge { position: absolute; border-radius: 7px; padding: 2px 6px; background: rgba(0, 0, 0, .62); color: #fff; font: 500 11px var(--g-font); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* fields */
.g-input { height: 36px; border-radius: 12px; border: 1px solid var(--g-edge); background: rgba(0, 0, 0, .25); color: var(--g-text); padding: 0 12px; font: 13px var(--g-font); outline: none; width: 100%; box-sizing: border-box; }
.g-input:focus { border-color: var(--g-edge-2); background: rgba(0, 0, 0, .35); }
textarea.g-input { height: auto; padding: 10px 12px; resize: none; line-height: 1.45; }
select.g-input { appearance: none; -webkit-appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; }
.g-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); outline: none; }
.g-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.g-label { font: 500 11px var(--g-font); color: var(--g-text-3); letter-spacing: .04em; text-transform: uppercase; }
.g-muted { color: var(--g-text-2); }
.g-faint { color: var(--g-text-3); }
.g-mono { font-family: var(--g-mono); font-variant-numeric: tabular-nums; }

/* tooltips: <button data-tip="Split">; data-tip-side="right|left|top" */
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; z-index: 90; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #fff; color: var(--g-ink); font: 500 12px var(--g-font); padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
[data-tip-side=right]:hover::after { bottom: auto; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); }
[data-tip-side=left]:hover::after { bottom: auto; left: auto; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); }
[data-tip-side=bottom]:hover::after { bottom: auto; top: calc(100% + 8px); }

/* popovers and sheets */
.g-pop { position: absolute; z-index: 60; min-width: 200px; padding: 8px; border-radius: 18px; animation: g-in .14s ease-out; }
.g-pop .g-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; color: var(--g-text); white-space: nowrap; }
.g-pop .g-item:hover, .g-pop .g-item.on { background: var(--g-hover); }
.g-pop .g-item i { font-size: 16px; color: var(--g-text-2); }
.g-pop .g-sep { height: 1px; background: var(--g-edge); margin: 6px 4px; }
@keyframes g-in { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }

/* posters (9:16 cards) */
.g-poster { position: relative; aspect-ratio: 9 / 14; border-radius: 18px; overflow: hidden; background: #1c1c1f center / cover no-repeat; border: 1px solid var(--g-edge); cursor: pointer; transition: transform .18s, border-color .18s; }
.g-poster:hover { transform: translateY(-2px); border-color: var(--g-edge-2); }
.g-poster video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.g-poster:hover video.ready { opacity: 1; }
.g-poster .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--g-text-3); font-size: 28px; }
.g-poster .shade { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(0,0,0,.65), transparent); pointer-events: none; }
.g-poster .play { position: absolute; right: 10px; bottom: 10px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--g-ink); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .18s; }
.g-poster:hover .play { opacity: 1; }
.g-cap { margin-top: 8px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-sub { display: flex; align-items: center; gap: 6px; color: var(--g-text-2); font-size: 12px; margin-top: 2px; }
.g-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: #fff; animation: g-rot .9s linear infinite; }
@keyframes g-rot { to { transform: rotate(360deg); } }

/* scrollbars */
.g-scroll { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.g-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.g-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

/* toasts */
.g-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.g-toast { display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--g-ink); font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: g-in .16s ease-out; }
.g-toast.bad { background: #2a1313; color: #fecaca; border: 1px solid rgba(248,113,113,.4); }

/* empty state: icon + one line + action */
.g-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 12px; color: var(--g-text-2); text-align: center; }
.g-empty i.big { font-size: 30px; color: var(--g-text-3); }

/* Focus components inside glass pages: same classes, dark tokens, white primary */
.g-root {
  --bg: #0b0b0c; --side: transparent; --surface: #19191c; --surface-2: #232327; --hover: rgba(255,255,255,.07); --selected: rgba(255,255,255,.11);
  --line: rgba(255,255,255,.09); --line-strong: rgba(255,255,255,.16); --fg: #f5f5f7; --fg-2: #d4d4d8; --fg-3: #a1a1aa; --fg-4: #71717a;
  --accent: #ffffff; --accent-hover: #e4e4e7; --accent-soft: rgba(255,255,255,.1); --accent-ring: rgba(255,255,255,.22);
  --ok: #4ade80; --ok-soft: rgba(74,222,128,.14); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.14); --bad: #f87171; --bad-soft: rgba(248,113,113,.14);
  --info: #93c5fd; --info-soft: rgba(147,197,253,.12); --ink: #ffffff; --on-ink: #0b0b0c;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 22px;
  --shadow-sm: none; --shadow: 0 10px 30px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}
.g-root .btn { border-radius: 999px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.09); color: var(--g-text); box-shadow: none; }
.g-root .btn:hover { background: rgba(255,255,255,.12); }
.g-root .btn-primary, .g-root .btn-ink { background: #fff; border-color: #fff; color: #0b0b0c; }
.g-root .btn-primary:hover, .g-root .btn-ink:hover { background: #e4e4e7; border-color: #e4e4e7; }
.g-root .btn-ghost { background: transparent; border-color: transparent; }
.g-root input, .g-root select, .g-root textarea { background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.1); color: var(--g-text); border-radius: 12px; }
.g-root input:focus, .g-root select:focus, .g-root textarea:focus { border-color: rgba(255,255,255,.22); box-shadow: none; }
.g-root input[type=color] { padding: 2px; height: 34px; }
.g-root .dialog, .g-root .sheet { background: var(--g-panel-solid); border: 1px solid var(--g-edge); }
.g-root .dialog-layer, .g-root .sheet-scrim { background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.g-root .card { background: var(--g-panel-2); border: 1px solid var(--g-edge); border-radius: 22px; box-shadow: none; }
.g-root .pill { background: rgba(255,255,255,.08); color: var(--g-text-2); border-radius: 999px; }
.g-root .pill-ok { background: var(--ok-soft); color: var(--g-ok); }
.g-root .toast { background: #fff; color: #0b0b0c; border-radius: 999px; border: 0; }
.g-root .CodeMirror { background: #111113; color: #e4e4e7; }
.g-root .CodeMirror-gutters { background: #111113; border-right: 1px solid var(--g-edge); }
.g-root .CodeMirror-cursor { border-left-color: #fff; }
.g-root .cm-keyword { color: #c4b5fd; } .g-root .cm-string { color: #86efac; } .g-root .cm-number { color: #fcd34d; } .g-root .cm-comment { color: #71717a; }
.g-root .cm-variable-2, .g-root .cm-variable-3, .g-root .cm-type { color: #93c5fd; } .g-root .cm-def { color: #fda4af; } .g-root .cm-property { color: #e4e4e7; }
.g-root input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; min-height: 0; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.14); box-shadow: none; }
.g-root input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.g-root input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
