/* ===== RESET ===== */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html,body { height: 100%; }
img,svg { display:block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }

/* ===== TOKENS DE COR ===== */
:root {
  --background: 0 0% 0%;
  --foreground: 0 0% 100%;
  --card: 0 0% 5%;
  --card-foreground: 0 0% 100%;
  --popover: 0 0% 5%;
  --popover-foreground: 0 0% 100%;
  --primary: 56 18% 51%;
  --primary-foreground: 0 0% 0%;
  --secondary: 0 0% 10%;
  --secondary-foreground: 0 0% 83%;
  --muted: 0 0% 12%;
  --muted-foreground: 0 0% 65%;
  --accent: 56 18% 51%;
  --accent-foreground: 0 0% 0%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 100%;
  --border: 0 0% 16%;
  --input: 0 0% 16%;
  --ring: 56 18% 51%;
  --gold: 56 18% 51%;
  --gold-light: 56 18% 65%;
  --gold-dark: 56 18% 40%;
  --surface: 0 0% 6%;
  --surface-elevated: 0 0% 9%;
  --radius: 0.5rem;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100%;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Montserrat', sans-serif; font-weight: 700; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top:0; left:0; right:0; z-index:50;
  height: 64px;
  background: hsl(var(--background) / 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(var(--border));
}
.nav-inner {
  display:flex; align-items:center; justify-content:space-between; height:100%;
}
.nav-logo { display:flex; align-items:center; gap: 0.5rem; }
.nav-logo-text {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.025em;
  background-image: linear-gradient(135deg, hsl(56 18% 51%), hsl(56 18% 70%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-logo-sub {
  font-size: 0.625rem; font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; color: hsl(var(--muted-foreground));
  margin-top: 2px;
}
.nav-links { display:flex; align-items:center; gap: 1rem; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: hsl(var(--foreground)); }
.nav-links a.nav-cta {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.8rem;
  transition: background .2s, box-shadow .2s;
}
.nav-links a.nav-cta:hover {
  background: hsl(var(--gold-light));
  box-shadow: 0 0 20px hsl(var(--primary) / 0.3);
}
.nav-links a.active { color: hsl(var(--primary)); }

@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  /* no mobile, CTA vira ícone + texto curto */
  .nav-links a.nav-cta {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  .nav-links a.nav-cta .nav-cta-text { display: none; }
}

/* ===== BOTÕES ===== */
.btn-primary {
  display:inline-flex; align-items:center; justify-content:center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 9999px;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: 0.875rem; font-weight: 600;
  transition: all .3s ease; border: 0;
}
.btn-primary:hover {
  background: hsl(var(--gold-light));
  box-shadow: 0 0 30px hsl(var(--primary) / 0.4);
}
.btn-outline {
  display:inline-flex; align-items:center; justify-content:center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 9999px;
  border: 1px solid hsl(var(--primary) / 0.4);
  color: hsl(var(--foreground)); font-weight: 500; font-size: 0.875rem;
  background: transparent; transition: background .2s, border-color .2s;
}
.btn-outline:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--primary) / 0.6);
}

/* ===== BADGE ===== */
.badge {
  display:inline-flex; align-items:center;
  border-radius: 9999px;
  border: 1px solid hsl(var(--primary) / 0.3);
  background: hsl(var(--card) / 0.8);
  padding: 0.375rem 1rem;
  font-size: 0.75rem; font-weight: 500;
  color: hsl(var(--primary));
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pulse-gold {
  0%,100% { box-shadow: 0 0 0 0 hsl(var(--primary) / 0.4); }
  50%     { box-shadow: 0 0 0 12px hsl(var(--primary) / 0); }
}
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slide-out-right {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}
@keyframes equalizer {
  0%,100% { transform: scaleY(0.3); }
  50%     { transform: scaleY(1); }
}

.animate-fade-in  { animation: fade-in .3s ease-out both; }
.animate-fade-up  { animation: fade-up .8s ease-out both; }
.animate-scale-in { animation: scale-in .2s ease-out both; }
.animate-float    { animation: float 2s ease-in-out infinite; }

.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s ease-out, transform .7s ease-out;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== UTILITÁRIOS ===== */
.text-gradient-gold {
  background-image: linear-gradient(135deg, hsl(56 18% 51%), hsl(56 18% 70%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-muted { color: hsl(var(--muted-foreground)); }
.text-gold { color: hsl(var(--primary)); }

/* ===== MAIN LAYOUT ===== */
main { padding-top: 64px; min-height: 100vh; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed; top: 80px; right: 1.5rem; z-index: 100;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
  min-width: 280px; max-width: 380px;
  animation: slide-in-right .3s ease-out both;
  box-shadow: 0 8px 32px hsl(0 0% 0% / 0.4);
}
.toast.success { border-color: hsl(var(--primary) / 0.4); }
.toast.error { border-color: hsl(var(--destructive) / 0.4); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: hsl(var(--primary)); }
.toast.error .toast-icon { color: hsl(var(--destructive)); }
.toast.removing { animation: slide-out-right .3s ease-in both; }

/* ===== PLAYER PAGE ===== */
.player-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
}
.player-layout > * { min-width: 0; }
@media (min-width: 1024px) {
  .player-layout {
    grid-template-columns: 380px 1fr;
    align-items: start;
    gap: 2.5rem;
    padding: 3rem 0;
  }
}

/* Now Playing Card */
.now-playing-card {
  position: sticky; top: 80px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
  width: 100%; max-width: 100%; overflow: hidden; box-sizing: border-box;
}
@media (min-width: 480px) {
  .now-playing-card { padding: 2rem; gap: 1.5rem; }
}

/* Cover Art */
.cover-art {
  width: clamp(140px, 50vw, 200px); height: clamp(140px, 50vw, 200px);
  border-radius: 1rem;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  overflow: hidden; position: relative;
  flex-shrink: 0;
}
.cover-art-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, hsl(var(--surface)), hsl(var(--surface-elevated)));
  display: flex; align-items: center; justify-content: center;
}
.cover-art-placeholder svg {
  width: 64px; height: 64px;
  color: hsl(var(--primary) / 0.4);
}
.cover-art.playing .cover-art-placeholder {
  background: linear-gradient(135deg, hsl(var(--surface)), hsl(56 18% 15%));
  animation: pulse-gold 2s ease-in-out infinite;
}

/* Song Info */
.song-info {
  text-align: center; width: 100%; min-width: 0;
}
.song-title {
  font-size: clamp(0.95rem, 4vw, 1.125rem); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.3;
  color: hsl(var(--foreground));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.song-artist {
  font-size: 0.875rem; font-weight: 400;
  color: hsl(var(--muted-foreground));
  margin-top: 0.25rem;
}
.song-empty {
  font-size: 0.875rem; color: hsl(var(--muted-foreground));
}

/* Equalizer (animação quando tocando) */
.equalizer {
  display: flex; align-items: flex-end; gap: 3px;
  height: 16px; margin-top: 0.5rem;
  opacity: 0; transition: opacity .3s;
}
.equalizer.active { opacity: 1; }
.equalizer-bar {
  width: 3px; border-radius: 2px;
  background: hsl(var(--primary));
  transform-origin: bottom;
}
.equalizer-bar:nth-child(1) { height: 60%; animation: equalizer 0.8s ease-in-out infinite; }
.equalizer-bar:nth-child(2) { height: 100%; animation: equalizer 0.6s ease-in-out infinite 0.1s; }
.equalizer-bar:nth-child(3) { height: 70%; animation: equalizer 1s ease-in-out infinite 0.2s; }
.equalizer-bar:nth-child(4) { height: 90%; animation: equalizer 0.7s ease-in-out infinite 0.05s; }
.equalizer-bar:nth-child(5) { height: 50%; animation: equalizer 0.9s ease-in-out infinite 0.15s; }

/* Progress */
.progress-section { width: 100%; overflow: hidden; }
.progress-times {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}
.progress-track {
  width: 100%; height: 4px;
  background: hsl(var(--border));
  border-radius: 9999px;
  cursor: pointer; position: relative;
  transition: height .15s;
}
.progress-track:hover { height: 6px; }
.progress-fill {
  height: 100%; background: hsl(var(--primary));
  border-radius: 9999px; pointer-events: none;
  transition: width .1s linear;
}
.progress-thumb {
  position: absolute; top: 50%; right: 0;
  transform: translate(50%, -50%);
  width: 12px; height: 12px;
  background: hsl(var(--primary));
  border-radius: 50%; pointer-events: none;
  opacity: 0; transition: opacity .15s;
  box-shadow: 0 0 8px hsl(var(--primary) / 0.6);
}
.progress-track:hover .progress-thumb { opacity: 1; }

/* Controls */
.controls { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.ctrl-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-foreground));
  transition: color .2s, background .2s;
}
.ctrl-btn:hover { color: hsl(var(--foreground)); background: hsl(var(--secondary)); }
.ctrl-btn.active { color: hsl(var(--primary)); }
.ctrl-btn svg { width: 20px; height: 20px; }

.ctrl-btn-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, box-shadow .2s, transform .1s;
  flex-shrink: 0;
}
.ctrl-btn-play:hover {
  background: hsl(var(--gold-light));
  box-shadow: 0 0 24px hsl(var(--primary) / 0.5);
}
.ctrl-btn-play:active { transform: scale(0.95); }
.ctrl-btn-play svg { width: 24px; height: 24px; }

/* Volume */
.volume-section {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%; min-width: 0; overflow: hidden;
}
.volume-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-foreground)); transition: color .2s;
}
.volume-btn:hover { color: hsl(var(--foreground)); }
.volume-btn svg { width: 18px; height: 18px; }
.volume-slider {
  flex: 1; min-width: 0; width: 0;
  height: 4px;
  -webkit-appearance: none; appearance: none;
  background: hsl(var(--border));
  border-radius: 9999px; cursor: pointer;
  outline: none;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  background: hsl(var(--primary));
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 6px hsl(var(--primary) / 0.4);
}
.volume-slider::-moz-range-thumb {
  width: 12px; height: 12px;
  background: hsl(var(--primary));
  border-radius: 50%; cursor: pointer; border: 0;
}

/* ===== PLAYLIST ===== */
.playlist-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  overflow: hidden;
}
.playlist-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid hsl(var(--border));
}
.playlist-title {
  font-size: 1rem; font-weight: 700; letter-spacing: -0.025em;
}
.playlist-count {
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
  background: hsl(var(--surface)); padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}

.playlist-empty {
  padding: 4rem 2rem; text-align: center;
}
.playlist-empty-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  color: hsl(var(--primary) / 0.3);
}
.playlist-empty h3 {
  font-size: 1rem; font-weight: 600; color: hsl(var(--foreground));
}
.playlist-empty p {
  font-size: 0.875rem; color: hsl(var(--muted-foreground));
  margin-top: 0.375rem; margin-bottom: 1.5rem;
}

.playlist-list { list-style: none; }
.playlist-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.playlist-item:last-child { border-bottom: 0; }
.playlist-item:hover { background: hsl(var(--surface)); }
.playlist-item.active {
  background: hsl(var(--primary) / 0.06);
}

.playlist-item-num {
  width: 24px; text-align: center; flex-shrink: 0;
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
  font-weight: 500;
}
.playlist-item.active .playlist-item-num { display: none; }
.playlist-item-eq {
  display: none; width: 24px; flex-shrink: 0;
  align-items: flex-end; gap: 2px; height: 14px;
}
.playlist-item.active .playlist-item-eq { display: flex; }
.playlist-item-eq-bar {
  width: 2px; border-radius: 1px;
  background: hsl(var(--primary));
  transform-origin: bottom;
}
.playlist-item.active.is-playing .playlist-item-eq-bar:nth-child(1) { height: 60%; animation: equalizer 0.8s ease-in-out infinite; }
.playlist-item.active.is-playing .playlist-item-eq-bar:nth-child(2) { height: 100%; animation: equalizer 0.6s ease-in-out infinite 0.1s; }
.playlist-item.active.is-playing .playlist-item-eq-bar:nth-child(3) { height: 70%; animation: equalizer 1s ease-in-out infinite 0.2s; }
.playlist-item.active:not(.is-playing) .playlist-item-eq-bar { height: 40%; }

.playlist-item-info { flex: 1; min-width: 0; }
.playlist-item-title {
  font-size: 0.875rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: hsl(var(--foreground));
  transition: color .15s;
}
.playlist-item.active .playlist-item-title { color: hsl(var(--primary)); }
.playlist-item-date {
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
  margin-top: 0.125rem;
}

.playlist-item-duration {
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
  font-weight: 500; flex-shrink: 0;
}

.playlist-item-actions { flex-shrink: 0; }
.playlist-delete-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-foreground) / 0.5);
  transition: color .2s, background .2s;
  opacity: 0;
}
.playlist-item:hover .playlist-delete-btn { opacity: 1; }
.playlist-delete-btn:hover { color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.1); }
.playlist-delete-btn svg { width: 15px; height: 15px; }

/* ===== UPLOAD PAGE ===== */
.upload-section {
  padding: 3rem 0 4rem;
}
.upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.upload-grid > * { min-width: 0; }
@media (min-width: 768px) {
  .upload-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 2.5rem;
  }
}

.upload-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 1rem;
  overflow: hidden;
  width: 100%; box-sizing: border-box;
}
@media (min-width: 640px) { .upload-card { padding: 1.5rem; } }
@media (min-width: 1024px) { .upload-card { padding: 2rem; } }

/* Drop Zone */
.drop-zone {
  border: 2px dashed hsl(var(--border));
  border-radius: 0.75rem;
  padding: 2rem 0.75rem;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}
@media (min-width: 640px) { .drop-zone { padding: 2.5rem 1.5rem; } }
.drop-zone:hover, .drop-zone.drag-over {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.04);
}
.drop-zone.drag-over .drop-icon { color: hsl(var(--primary)); transform: scale(1.1); }
.drop-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-icon {
  width: 40px; height: 40px; margin: 0 auto 0.75rem;
  color: hsl(var(--primary) / 0.5);
  transition: color .2s, transform .2s;
}
@media (min-width: 640px) { .drop-icon { width: 48px; height: 48px; margin-bottom: 1rem; } }
.drop-title {
  font-size: clamp(0.875rem, 3vw, 1rem); font-weight: 600; color: hsl(var(--foreground));
}
.drop-subtitle {
  font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.375rem;
  word-break: break-word; overflow-wrap: anywhere;
  padding: 0 0.25rem;
}
.drop-formats {
  display: flex; justify-content: center; gap: 0.3rem; margin-top: 0.875rem;
  flex-wrap: wrap; padding: 0;
}
.format-badge {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

/* File Preview List */
.file-queue { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.file-item {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 1rem;
  animation: fade-up .3s ease-out both;
}
.file-item-header {
  display: flex; align-items: center; gap: 0.75rem;
}
.file-icon {
  width: 36px; height: 36px; border-radius: 0.375rem;
  background: hsl(var(--primary) / 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: hsl(var(--primary));
}
.file-icon svg { width: 18px; height: 18px; }
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: hsl(var(--foreground));
}
.file-size { font-size: 0.7rem; color: hsl(var(--muted-foreground)); margin-top: 0.125rem; }
.file-remove-btn {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-foreground));
  transition: color .2s, background .2s;
}
.file-remove-btn:hover { color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.1); }
.file-remove-btn svg { width: 14px; height: 14px; }

.title-input-wrap { margin-top: 0.75rem; }
.title-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); display: block; margin-bottom: 0.375rem;
}
.title-input {
  width: 100%;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--input));
  border-radius: 0.375rem;
  padding: 0.5rem 0.625rem;
  color: hsl(var(--foreground));
  font: inherit; font-size: 0.8rem;
  transition: border-color .2s, box-shadow .2s;
}
.title-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.25);
}

/* Upload Progress */
.upload-progress { margin-top: 0.75rem; }
.upload-progress-bar-track {
  width: 100%; height: 3px;
  background: hsl(var(--border));
  border-radius: 9999px; overflow: hidden;
}
.upload-progress-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--gold-light)));
  border-radius: 9999px;
  transition: width .2s ease;
}
.upload-progress-text {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.7rem; color: hsl(var(--muted-foreground));
  margin-top: 0.375rem;
}
.upload-status-badge {
  font-size: 0.65rem; font-weight: 600; padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}
.upload-status-badge.uploading { color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1); }
.upload-status-badge.done { color: hsl(140 60% 50%); background: hsl(140 60% 50% / 0.1); }
.upload-status-badge.error { color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.1); }

/* Upload button area */
.upload-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.upload-all-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 9999px;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: 0.875rem; font-weight: 600;
  transition: all .3s ease; border: 0;
}
.upload-all-btn:hover {
  background: hsl(var(--gold-light));
  box-shadow: 0 0 24px hsl(var(--primary) / 0.4);
}
.upload-all-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
  box-shadow: none; background: hsl(var(--primary));
}
.upload-all-btn svg { width: 16px; height: 16px; }
.clear-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground)); font-size: 0.875rem; font-weight: 500;
  background: transparent; transition: background .2s, color .2s;
}
.clear-btn:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
.clear-btn svg { width: 16px; height: 16px; }

/* Songs list no upload */
.songs-list-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  overflow: hidden;
  width: 100%; max-width: 100%; box-sizing: border-box;
}
.songs-list-header {
  padding: 1rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 640px) { .songs-list-header { padding: 1.25rem 1.5rem; } }
.songs-list-header h3 { font-size: 1rem; font-weight: 700; }
.songs-list-body { max-height: 500px; overflow-y: auto; }
.songs-list-body::-webkit-scrollbar { width: 4px; }
.songs-list-body::-webkit-scrollbar-track { background: transparent; }
.songs-list-body::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 9999px; }

.songs-list-empty {
  padding: 3rem 1.5rem; text-align: center;
  font-size: 0.875rem; color: hsl(var(--muted-foreground));
}
.songs-list-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border) / 0.5);
  transition: background .15s; min-width: 0;
}
@media (min-width: 640px) { .songs-list-item { padding: 0.875rem 1.5rem; gap: 1rem; } }
.songs-list-item:last-child { border-bottom: 0; }
.songs-list-item:hover { background: hsl(var(--surface)); }
.songs-list-item-icon {
  width: 32px; height: 32px; border-radius: 0.375rem;
  background: hsl(var(--primary) / 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: hsl(var(--primary));
}
.songs-list-item-icon svg { width: 16px; height: 16px; }
.songs-list-item-info { flex: 1; min-width: 0; overflow: hidden; }
.songs-list-item-title {
  font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.songs-list-item-date { font-size: 0.7rem; color: hsl(var(--muted-foreground)); margin-top: 0.125rem; }
.songs-list-delete {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: hsl(var(--muted-foreground) / 0.4);
  transition: color .2s, background .2s;
}
.songs-list-delete:hover { color: hsl(var(--destructive)); background: hsl(var(--destructive) / 0.1); }
.songs-list-delete svg { width: 14px; height: 14px; }

/* Loading spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid hsl(var(--primary-foreground) / 0.3);
  border-top-color: hsl(var(--primary-foreground));
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}

/* Seção hero upload */
.upload-hero {
  padding: 1.5rem 0 0;
  text-align: center;
  overflow: hidden;
}
.upload-hero .badge { margin-bottom: 0.875rem; }
.upload-hero h1 {
  font-size: clamp(1.4rem, 6vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: 0.625rem;
}
.upload-hero p {
  font-size: clamp(0.78rem, 2.5vw, 0.9rem); color: hsl(var(--muted-foreground));
  max-width: 480px; margin: 0 auto;
  line-height: 1.65; padding: 0 0.5rem;
  word-break: break-word; overflow-wrap: anywhere;
}
/* esconde a descrição detalhada em telas muito pequenas — os badges no drop zone já informam os formatos */
@media (max-width: 400px) { .upload-hero p { display: none; } }

/* Seção hero player */
.player-hero {
  padding: 1.5rem 0 0;
}
.player-hero-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem;
}
.player-hero-title {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.player-hero-title h1 {
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 800; letter-spacing: -0.025em;
}
.player-hero-title p {
  font-size: 0.8rem; color: hsl(var(--muted-foreground));
}
@media (max-width: 480px) {
  .player-hero-top .btn-primary { font-size: 0.8rem; padding: 0.625rem 1.25rem; }
}

/* Confirm dialog */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: hsl(0 0% 0% / 0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fade-in .2s ease-out both;
}
.confirm-dialog {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px; width: 100%;
  animation: scale-in .2s ease-out both;
}
.confirm-dialog h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.confirm-dialog p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin-bottom: 1.5rem; line-height: 1.6; }
.confirm-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
.confirm-cancel {
  padding: 0.625rem 1.25rem; border-radius: 0.375rem;
  border: 1px solid hsl(var(--border));
  font-size: 0.875rem; font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: background .2s, color .2s;
}
.confirm-cancel:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
.confirm-delete {
  padding: 0.625rem 1.25rem; border-radius: 0.375rem;
  background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground));
  font-size: 0.875rem; font-weight: 600;
  transition: opacity .2s;
}
.confirm-delete:hover { opacity: 0.85; }

/* Scrollbar global */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 9999px; }
