/* Liquid Glass design tokens: shared by the app and the PC dashboard */
:root {
  color-scheme: light dark;
  --bg: #eef1f8;
  --text: #0b0b0f;
  --text2: rgba(60, 60, 67, 0.64);
  --text3: rgba(60, 60, 67, 0.38);
  --sep: rgba(60, 60, 67, 0.12);
  --glass: rgba(255, 255, 255, 0.48);
  --glass-strong: rgba(255, 255, 255, 0.7);
  --glass-press: rgba(255, 255, 255, 0.82);
  --rim: rgba(255, 255, 255, 0.85);
  --rim-low: rgba(255, 255, 255, 0.25);
  --edge: rgba(0, 0, 0, 0.06);
  --shadow: 0 10px 30px -8px rgba(40, 50, 120, 0.18), 0 2px 6px rgba(20, 20, 60, 0.06);
  --accent: #0a84ff;
  --accent-2: #5e5ce6;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff375f;
  --blob1: #8ec5ff;
  --blob2: #c7a6ff;
  --blob3: #ffb3cd;
  --blob4: #a4f0d8;
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #04050a;
    --text: #f5f5f7;
    --text2: rgba(235, 235, 245, 0.62);
    --text3: rgba(235, 235, 245, 0.32);
    --sep: rgba(255, 255, 255, 0.09);
    --glass: rgba(38, 40, 52, 0.42);
    --glass-strong: rgba(48, 50, 64, 0.62);
    --glass-press: rgba(70, 72, 90, 0.7);
    --rim: rgba(255, 255, 255, 0.2);
    --rim-low: rgba(255, 255, 255, 0.04);
    --edge: rgba(0, 0, 0, 0.5);
    --shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    --blob1: #1546a8;
    --blob2: #5221a3;
    --blob3: #93204f;
    --blob4: #0b6e58;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

/* Living wallpaper: the colour the glass refracts */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.backdrop i {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.8;
  animation: drift 26s var(--ease) infinite alternate;
}
.backdrop i:nth-child(1) { width: 60vmax; height: 60vmax; background: var(--blob1); top: -25vmax; left: -20vmax; }
.backdrop i:nth-child(2) { width: 50vmax; height: 50vmax; background: var(--blob2); top: 10vmax; right: -25vmax; animation-duration: 32s; }
.backdrop i:nth-child(3) { width: 45vmax; height: 45vmax; background: var(--blob3); bottom: -25vmax; left: 5vmax; animation-duration: 38s; }
.backdrop i:nth-child(4) { width: 35vmax; height: 35vmax; background: var(--blob4); bottom: 5vmax; right: 0; animation-duration: 30s; opacity: 0.55; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vmax, 4vmax) scale(1.08); }
  100% { transform: translate(-4vmax, 8vmax) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) { .backdrop i { animation: none; } }

/* The glass material: translucency, refraction blur, specular rim, depth */
.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  border-radius: var(--r-lg);
  box-shadow:
    var(--shadow),
    inset 0 1px 0.5px var(--rim),
    inset 0 -1px 0.5px var(--rim-low),
    0 0 0 0.5px var(--edge);
}
.glass::after { /* specular sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(120% 60% at 15% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(160deg, transparent 60%, rgba(255, 255, 255, 0.08));
  mix-blend-mode: soft-light;
}
.glass.strong { background: var(--glass-strong); }

/* Capsule chips (tap to filter) */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 20px 10px; scroll-padding: 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform 0.35s var(--spring), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s;
}
.chip:active { transform: scale(0.92); }
.chip .n { font-size: 12px; font-weight: 600; color: var(--text2); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white), var(--accent));
  color: #fff;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}
.chip[aria-pressed="true"] .n { color: rgba(255, 255, 255, 0.82); }
.chip[aria-pressed="true"]::after { opacity: 0.5; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform 0.35s var(--spring), opacity 0.2s, filter 0.2s;
}
.btn:active { transform: scale(0.95); }
.btn.primary {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, white), var(--accent));
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.z { opacity: 0.28; }
.tnum { font-variant-numeric: tabular-nums; }

@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.5s var(--spring) both; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--sep); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
