:root {
  --bg: #0c0718;
  --bg-2: #150d29;
  --surface: #1c1336;
  --surface-2: #261a47;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f6f1ff;
  --muted: #a99fc9;
  --pink: #ff3d8b;
  --violet: #7b5cff;
  --cyan: #3ee0ff;
  --green: #3ddc97;
  --red: #ff5a6a;
  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --radius: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 61, 139, 0.18), transparent 60%),
    radial-gradient(900px 600px at 110% 10%, rgba(123, 92, 255, 0.22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; }
.hidden { display: none !important; }

.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.2s;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--grad); color: white; box-shadow: 0 6px 24px rgba(255, 61, 139, 0.35); }
.btn-ghost { background: var(--surface-2); }
.btn-danger { background: rgba(255, 90, 106, 0.15); color: var(--red); }

.field {
  width: 100%;
  padding: 0.95em 1.1em;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123, 92, 255, 0.2); }
.field::placeholder { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.muted { color: var(--muted); }
.code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.tag-yt { background: rgba(255, 90, 106, 0.15); color: var(--red); }
.tag-ready { background: rgba(61, 220, 151, 0.15); color: var(--green); }
.tag-me { background: rgba(255, 61, 139, 0.18); color: var(--pink); }
.tag-cancel { background: rgba(255, 176, 32, 0.16); color: #ffb020; }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg);
  padding: 0.75em 1.2em; border-radius: 999px;
  font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 1em; }
.eq i { width: 4px; background: var(--pink); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; background: var(--violet); }
.eq i:nth-child(3) { animation-delay: -0.6s; background: var(--cyan); }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.spinner {
  width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 2.5px solid var(--surface-2); border-top-color: var(--pink);
  animation: spin 0.8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
