/* Mixtape Karaoke: shared styles */
:root {
  --bg: #0a0a1a;
  --bg-2: #13132a;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #16162e;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f3ff;
  --muted: #a3a2bf;
  --pink: #ff006e;
  --orange: #ff7b00;
  --yellow: #ffbe0b;
  --green: #06d6a0;
  --blue: #118ab2;
  --purple: #8338ec;
  --danger: #ff4d6d;
  --radius: 14px;
  --display: 'Bowlby One SC', 'Impact', sans-serif;
  --body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% -10%, rgba(131, 56, 236, 0.22), transparent 55%),
    radial-gradient(ellipse at 90% 110%, rgba(255, 0, 110, 0.16), transparent 55%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}
a { color: var(--yellow); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.title-gradient {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ff006e, #ff7b00, #ffbe0b, #06d6a0, #118ab2, #8338ec);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .title-gradient { animation: none; } }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.6em 1.2em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 600; font-size: 0.92rem;
  cursor: pointer; text-decoration: none; color: var(--text);
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.13); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--purple), var(--pink)); border-color: transparent; color: #fff; box-shadow: 0 4px 18px rgba(131, 56, 236, 0.35); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #9450f5, #ff2a85); }
.btn-go { background: linear-gradient(135deg, var(--green), var(--blue)); border-color: transparent; color: #fff; }
.btn-danger { color: var(--danger); border-color: rgba(255, 77, 109, 0.4); background: rgba(255, 77, 109, 0.08); }
.btn-danger:hover:not(:disabled) { background: rgba(255, 77, 109, 0.18); }
.btn-sm { padding: 0.35em 0.8em; font-size: 0.82rem; }
.btn-icon { padding: 0.35em 0.55em; min-width: 2.1em; font-size: 0.9rem; border-radius: 10px; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }

.field { display: flex; flex-direction: column; gap: 0.3em; }
.field > span { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.field small { color: var(--muted); font-size: 0.8rem; }
.input {
  width: 100%;
  padding: 0.65em 0.9em;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.3); }
textarea.input { resize: vertical; min-height: 8em; line-height: 1.5; }

.switch { display: inline-flex; align-items: center; gap: 0.6em; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 2.6em; height: 1.5em; border-radius: 999px; background: rgba(255, 255, 255, 0.15); position: relative; transition: background 0.2s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 0.2em; left: 0.2em; width: 1.1em; height: 1.1em; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(1.1em); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(131, 56, 236, 0.5); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }

.toast-wrap { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 5000; display: flex; flex-direction: column; gap: 0.5rem; align-items: center; pointer-events: none; }
.toast { background: #22223f; border: 1px solid var(--line); padding: 0.6em 1.1em; border-radius: 999px; font-size: 0.9rem; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); animation: toastIn 0.25s ease; }
.toast.error { border-color: rgba(255, 77, 109, 0.6); color: #ffd0d8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
