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

:root {
  /* ETAPA — paleta oficial redefinida: preto+grafite+dourado+creme,
     com os valores exatos fornecidos nesta etapa. */
  --bg-void: #101010;
  --bg-app: #101010;
  --bg-panel: #141414;
  --bg-panel-raised: #181818;
  --bg-input: #141414;
  --border: #3a3a3d;
  --border-soft: #232323;

  --text-primary: #ece9e1;
  --text-secondary: #f3e2b5;
  --text-muted: #9b9b96;

  --accent: #c9a227;
  --accent-strong: #ddb949;
  --accent-dim: #8a721b;
  --accent-cyan: #ddb949;
  --danger: #e2604f;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(1200px 800px at 15% -10%, #10201a 0%, var(--bg-app) 45%), var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

p {
  margin: 0;
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent-dim);
  color: #05120c;
}

.icon {
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}

.icon--flip {
  transform: scaleX(-1);
}

.icon + span {
  margin-left: 6px;
}

/* ---------- Scrollbar estilizado (grafite suave, sutil sobre o fundo escuro) ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3d var(--bg-panel);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: #3a3a3d;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #59554a;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- View header ---------- */

.view-header {
  margin-bottom: 28px;
}

.view-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

.view-subtitle {
  margin-top: 6px;
  color: var(--text-muted);
}

/* ---------- Panels ---------- */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-panel);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel__head h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.panel__badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(51, 224, 161, 0.1);
  border: 1px solid rgba(51, 224, 161, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

.panel--actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-note {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-top: 10px;
}

/* ---------- ETAPA 11: Catálogo interno ---------- */

#catalog-search-results {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
}

.catalog-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
}

.catalog-result--artist {
  background: transparent;
  border-style: dashed;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.catalog-result__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.catalog-result__info strong {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.catalog-result__info span {
  font-size: 0.95rem;
}

.catalog-result__added {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}

.future-panel {
  border-style: dashed;
  opacity: 0.88;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #04130d;
}

.btn--primary:hover {
  filter: brightness(1.08);
}

.btn--ghost {
  background: var(--bg-panel-raised);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--accent-dim);
}

.btn--ghost.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--danger {
  background: transparent;
  border-color: rgba(226, 96, 79, 0.4);
  color: var(--danger);
  margin-left: auto;
}

.btn--danger:hover {
  background: rgba(226, 96, 79, 0.1);
  border-color: var(--danger);
}

.btn--small {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.icon-btn:hover {
  border-color: var(--accent-dim);
  color: var(--text-primary);
}

.link {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 500;
}

/* ---------- Forms ---------- */

.input,
.select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
}

.input:focus,
.select:focus,
textarea:focus {
  border-color: var(--accent-dim);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  align-items: center;
}

.toolbar .input {
  flex: 1 1 220px;
}

.toolbar .select {
  flex: 0 1 170px;
}

.form-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.field--wide {
  grid-column: 1 / -1;
}

.field-hint {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- Lyrics editor (add-song) ---------- */

.lyrics-editor__rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.lyrics-row {
  display: grid;
  grid-template-columns: 24px 1fr 70px 28px;
  align-items: center;
  gap: 10px;
}

.lyrics-row__index {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.76rem;
  text-align: right;
}

.lyrics-row__fields {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
}

.lyrics-row__auto-field {
  display: flex;
  gap: 4px;
  align-items: center;
}

.lyrics-row__auto-field .input {
  flex: 1;
}

.lyrics-row__time {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-size: 0.76rem;
  text-align: right;
}

/* ---------- Progress bar ---------- */

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.progress-label {
  flex: 0 0 110px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 999px;
}

.progress-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  width: 36px;
  text-align: right;
}

/* ---------- Range sliders ---------- */

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.range-row span:first-child {
  flex: 0 0 130px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.range-row input[type='range'] {
  flex: 1;
  accent-color: var(--accent);
}

.range-value {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  width: 44px;
  text-align: right;
}

/* ---------- Tags / pills ---------- */

.tag {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.tag--mono {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.pill {
  font-size: 0.74rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.future-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.empty-state p {
  max-width: 380px;
  margin: 0 auto 18px;
}

/* ---------- Home ENSAYA PLAY (estado vazio premium) ---------- */

.home-empty-hero {
  position: relative;
  text-align: center;
  padding: 48px 28px 40px;
  margin-bottom: 20px;
  background: linear-gradient(165deg, #151515 0%, #101010 65%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.home-empty-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.14), transparent 70%);
  pointer-events: none;
}

.home-empty-hero__decor {
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
}

.home-empty-hero__decor img {
  width: 83px;
  height: 83px;
  object-fit: contain;
}

.home-empty-hero__eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.home-empty-hero__title {
  position: relative;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}

.home-empty-hero__message {
  position: relative;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 26px;
  line-height: 1.55;
}

.tag--demo {
  background: rgba(201, 162, 39, 0.12);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-song-card {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 6px 6px;
}

.demo-song-card__cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--bg-panel-raised), var(--bg-input));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.demo-song-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 180px;
}

.demo-song-card__info strong {
  font-size: 0.98rem;
}

.demo-song-card__info span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.demo-song-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.how-it-works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  padding: 8px 6px 18px;
}

.how-it-works__step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  padding-left: 2px;
}

.how-it-works__number {
  position: absolute;
  top: -4px;
  right: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--border);
}

.how-it-works__icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-soft);
  color: var(--accent);
  margin-bottom: 4px;
}

.how-it-works__step strong {
  font-size: 0.88rem;
}

.how-it-works__step span:last-child {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.home-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 10px 10px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-wrap: wrap;
  text-align: center;
}

.home-footer strong {
  color: var(--accent);
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0.02em;
}

.home-footer__rule {
  flex: 1;
  min-width: 24px;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
}

.btn--gold-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(160deg, var(--accent-strong), var(--accent));
  color: #0b0b0b;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: var(--radius-lg);
  border: none;
  min-height: 48px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 14px rgba(214, 169, 40, 0.25);
}

.btn--gold-cta:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(214, 169, 40, 0.35);
}

.btn--gold-cta:active {
  transform: scale(0.97);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--error {
  border-color: var(--danger);
  color: #ffd7d0;
}

/* ---------- Telas de autenticação (login/registrar/recuperar senha) ---------- */

.auth-screen {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.auth-card__logo {
  object-fit: contain;
  margin-bottom: 14px;
}

.auth-card h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.auth-card .view-subtitle {
  margin-bottom: 22px;
}

.auth-card .form-grid {
  text-align: left;
  gap: 14px;
}

.auth-card .form-actions {
  margin-top: 4px;
}

.auth-card .form-actions .btn {
  width: 100%;
}

.auth-card__google-btn {
  width: 100%;
  margin-top: 12px;
}

.auth-card__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
