/* YouTube Music style — shared design tokens and primitives */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  --bg-deep: #0f0f0f;
  --bg-base: #0f0f0f;
  --bg-raise: #1d1d1d;
  --bg-panel: #212121;
  --bg-input: #2a2a2a;

  --line-soft: rgba(255, 255, 255, 0.08);
  --line-mid: rgba(255, 255, 255, 0.14);

  --text-strong: #ffffff;
  --text-base: #b3b3b3;
  --text-muted: #717171;

  --accent: #ff0000;
  --accent-2: #ff4e45;
  --accent-3: #ff6b6b;
  --accent-soft: rgba(255, 0, 0, 0.12);

  --ok: #2ecc71;
  --warn: #f39c12;
  --danger: #ff4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(255, 0, 0, 0.2), 0 10px 30px rgba(255, 0, 0, 0.15);

  --font-ui: "Roboto", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-display: "Roboto", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg-deep);
  color: var(--text-base);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 700;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-mid);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-strong);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn:active { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { background: #cc0000; }

.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: rgba(255, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(255, 68, 68, 0.12); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* --- Form fields -------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.field .hint { font-size: 12px; color: var(--text-muted); }

.input,
.select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: rgba(113, 113, 113, 0.9); }
.input:focus,
.select:focus {
  border-color: rgba(255, 0, 0, 0.6);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.select { appearance: none; cursor: pointer; }

/* --- Misc primitives ---------------------------------------------------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line-mid);
  background: rgba(255, 255, 255, 0.04);
}
.badge-on { color: var(--ok); border-color: rgba(46, 204, 113, 0.3); background: rgba(46, 204, 113, 0.1); }
.badge-off { color: var(--text-muted); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

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

/* Brand mark — YouTube Music style */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
}
.brand-play {
  display: block;
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 11px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}
.brand-name em { font-style: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
