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

:root {
  --bg: #120a1e;
  --surface: #221633;
  --surface2: #2e2045;
  --border: rgba(255, 255, 255, 0.14);
  --text: #faf7ff;
  --muted: #c4b8d4;
  --neon-pink: #ff2d9a;
  --neon-cyan: #00d4ff;
  --gold: #f5c518;
  --gold-dim: #c9a012;
  --pink: var(--neon-pink);
  --purple: #b84dff;
  --gradient: linear-gradient(90deg, var(--neon-pink), var(--purple) 45%, var(--neon-cyan));
  --gradient-gold: linear-gradient(180deg, #ffe566, var(--gold) 50%, var(--gold-dim));
  --radius: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Outfit", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

/* Palco / fundo musical */
.bg-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(184, 77, 255, 0.15), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 50%, rgba(255, 45, 154, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 100% 60%, rgba(0, 212, 255, 0.1), transparent),
    var(--bg);
}

.bg-stage__spot {
  position: absolute;
  top: -10%;
  width: 55%;
  height: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: spotPulse 6s ease-in-out infinite alternate;
}

.bg-stage__spot--left {
  left: -15%;
  background: var(--neon-pink);
}

.bg-stage__spot--right {
  right: -15%;
  background: var(--neon-cyan);
  animation-delay: -3s;
}

.bg-stage__vinyl {
  position: absolute;
  bottom: 8%;
  right: -8%;
  width: min(280px, 50vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    #1a1028 0 2px,
    #120a1c 2px 4px
  );
  box-shadow: inset 0 0 0 12px #0a0610, 0 0 80px rgba(0, 0, 0, 0.6);
  opacity: 0.2;
  animation: spinSlow 24s linear infinite;
}

@keyframes spotPulse {
  to {
    opacity: 0.65;
    transform: scale(1.08);
  }
}

@keyframes spinSlow {
  to {
    transform: rotate(360deg);
  }
}

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

/* Header — palco karaokê */
.site-header {
  position: relative;
  z-index: 2;
  margin: 0 0.5rem 0.5rem;
  padding: 1.1rem 0.5rem 0.9rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 18, 48, 0.72) 0%, rgba(18, 10, 30, 0.55) 100%);
  border: 1px solid rgba(255, 45, 154, 0.25);
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.08) inset,
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(255, 45, 154, 0.08);
  overflow: hidden;
}

.site-header__lights {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 45, 154, 0.06) 48%,
    rgba(0, 212, 255, 0.06) 52%,
    transparent 60%
  );
  animation: lightSweep 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lightSweep {
  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-8%);
  }
  50% {
    opacity: 1;
    transform: translateX(8%);
  }
}

.site-header__notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-header__notes span {
  position: absolute;
  font-size: 1.25rem;
  opacity: 0.2;
  animation: noteFloat 8s ease-in-out infinite;
}

.site-header__notes span:nth-child(1) {
  left: 8%;
  top: 20%;
  color: var(--neon-pink);
}

.site-header__notes span:nth-child(2) {
  right: 12%;
  top: 15%;
  animation-delay: -2s;
  color: var(--neon-cyan);
}

.site-header__notes span:nth-child(3) {
  left: 15%;
  bottom: 25%;
  animation-delay: -4s;
  color: var(--gold);
}

.site-header__notes span:nth-child(4) {
  right: 8%;
  bottom: 20%;
  animation-delay: -6s;
  color: var(--neon-pink);
}

@keyframes noteFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-10px) rotate(12deg);
    opacity: 0.35;
  }
}

.site-header__inner {
  position: relative;
  text-align: center;
}

.brand {
  display: block;
  text-decoration: none;
  margin: 0 auto;
  max-width: min(640px, 98vw);
}

.brand__img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 28px rgba(255, 45, 154, 0.35));
  background: transparent;
}

@media (max-width: 768px) {
  .site-header {
    margin: 0 0.35rem 0.5rem;
    padding: 1rem 0.35rem 0.85rem;
  }

  .brand {
    max-width: min(720px, 100vw);
    margin-left: -0.15rem;
    margin-right: -0.15rem;
  }

  .brand__img {
    width: 100%;
    max-height: none;
    transform: scale(1.06);
    transform-origin: center top;
    filter: drop-shadow(0 10px 32px rgba(0, 212, 255, 0.2));
  }

  .site-header__meta {
    margin-top: 0.65rem;
  }

  .stat-pill {
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
  }
}

@media (min-width: 769px) {
  .brand {
    max-width: min(560px, 92vw);
  }
}

.site-header__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.stat-pill strong {
  color: var(--gold);
  font-weight: 700;
}

.stat-pill--mic {
  border-color: rgba(245, 197, 24, 0.35);
  background: rgba(245, 197, 24, 0.08);
}

.stat-pill--mic strong {
  color: #ffe566;
}

.stat-pill__icon {
  font-size: 1rem;
}

/* Equalizador animado */
.equalizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 28px;
  margin-top: 0.85rem;
}

.equalizer span {
  width: 4px;
  border-radius: 2px;
  background: var(--gradient);
  animation: eqBar 0.9s ease-in-out infinite alternate;
}

.equalizer span:nth-child(1) { height: 40%; animation-delay: 0s; }
.equalizer span:nth-child(2) { height: 70%; animation-delay: 0.1s; }
.equalizer span:nth-child(3) { height: 55%; animation-delay: 0.2s; }
.equalizer span:nth-child(4) { height: 90%; animation-delay: 0.15s; }
.equalizer span:nth-child(5) { height: 60%; animation-delay: 0.25s; }
.equalizer span:nth-child(6) { height: 85%; animation-delay: 0.05s; }
.equalizer span:nth-child(7) { height: 50%; animation-delay: 0.3s; }
.equalizer span:nth-child(8) { height: 75%; animation-delay: 0.12s; }
.equalizer span:nth-child(9) { height: 45%; animation-delay: 0.22s; }
.equalizer span:nth-child(10) { height: 65%; animation-delay: 0.18s; }

@keyframes eqBar {
  to {
    height: 100%;
  }
}

/* Busca */
.search-panel {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.5rem 1rem 0.85rem;
  background: linear-gradient(var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.search-panel__label {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--neon-cyan);
  text-align: center;
}

.search-box {
  position: relative;
  margin-bottom: 0.65rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.7;
}

.search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.input {
  width: 100%;
  padding: 1rem 2.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  border-color: var(--neon-pink);
  box-shadow:
    0 0 0 3px rgba(255, 45, 154, 0.2),
    0 0 20px rgba(0, 212, 255, 0.12);
}

.filters {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 0.5rem;
}

.filters::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  padding: 0.55rem 0.9rem;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.chip.is-active {
  border-color: transparent;
  background: var(--gradient);
  color: #0c0618;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(255, 45, 154, 0.35);
}

.sort-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.select {
  flex: 1;
  max-width: 200px;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge--nac {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.badge--int {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}

/* Main grid */
.main {
  position: relative;
  z-index: 1;
  padding: 0 1rem calc(1rem + var(--safe-bottom));
  max-width: 1100px;
  margin: 0 auto;
}

.status {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.35rem 0 0.75rem;
  text-align: center;
}

.song-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 400px) {
  .song-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 700px) {
  .song-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

@media (min-width: 1000px) {
  .song-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.song-card__btn {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface) 0%, #2a1d42 100%);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  min-height: 88px;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

@media (min-width: 500px) {
  .song-card__btn {
    flex-direction: column;
    min-height: unset;
  }
}

.song-card__btn:hover,
.song-card__btn:focus-visible {
  border-color: rgba(255, 45, 154, 0.45);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(0, 212, 255, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.song-card__cover-wrap {
  flex-shrink: 0;
  width: 88px;
  min-height: 88px;
  background: linear-gradient(145deg, #3d2a5c, #5a3d8a);
  position: relative;
  overflow: hidden;
}

@media (min-width: 500px) {
  .song-card__cover-wrap {
    width: 100%;
    aspect-ratio: 1;
    min-height: unset;
  }
}

.song-card__cover-ph,
.song-card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.song-card__cover-ph {
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  background: linear-gradient(145deg, #4a3470, #6b4a9e 55%, #3d2860);
  color: #ffe566;
  transition: opacity 0.2s ease;
}

.song-card__cover-ph.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.song-card__cover {
  z-index: 2;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.song-card__cover.is-loaded {
  opacity: 1;
}

.song-card__body {
  padding: 0.65rem 0.75rem;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.song-card__code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}

.song-card__title {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.song-card__artist {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-card__badge {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.65;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn--more {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 1rem auto 1.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--more:hover:not(:disabled) {
  border-color: var(--purple);
}

.btn--primary {
  width: 100%;
  margin-top: 0.5rem;
  background: var(--gradient);
  color: #0a0a12;
}

/* Modal */
.modal {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal__sheet {
  position: fixed;
  inset: auto 0 0 0;
  max-height: 92dvh;
  overflow-y: auto;
  background: linear-gradient(180deg, #2a1d42 0%, #1a1028 100%);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border);
  animation: slideUp 0.3s ease;
}

@media (min-width: 640px) {
  .modal {
    max-width: 480px;
    margin: auto;
  }

  .modal__sheet {
    position: relative;
    inset: unset;
    margin: 5vh auto;
    max-height: 90vh;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
}

.modal__toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: max(0.65rem, env(safe-area-inset-top, 0px)) 0.75rem 0.5rem;
  margin: 0;
  background: linear-gradient(180deg, #2a1d42 70%, transparent);
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.modal__close-text {
  font-size: 0.85rem;
  font-weight: 600;
}

.modal__hero {
  position: relative;
  background: #0a0610;
}

.modal__cover-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  max-height: min(52vh, 380px);
  padding: 0.5rem;
  background: radial-gradient(ellipse at center, #2a1840 0%, #0a0610 70%);
}

.modal__cover-ph {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 4rem;
  transition: opacity 0.2s ease;
}

.modal__cover-ph.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal__cover {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 100%;
  max-height: min(50vh, 360px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal__cover.is-loaded {
  opacity: 1;
}

.modal__code-wrap {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: rgba(10, 10, 18, 0.85);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.modal__code-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.modal__code {
  font-family: "JetBrains Mono", monospace;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal__sheet {
  color: var(--text);
}

.modal__body {
  padding: 1rem 1.25rem 1.5rem;
  color: var(--text);
}

.modal__title {
  margin: 0.5rem 0 0.15rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.modal__artist {
  margin: 0;
  font-size: 1rem;
  color: #c4b8d4;
}

.modal__section {
  margin-top: 1.25rem;
}

.modal__section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
}

.modal__bio {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.modal__lyrics {
  margin: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
  max-height: 280px;
  overflow-y: auto;
  color: var(--text);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1rem calc(1rem + var(--safe-bottom));
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 45, 154, 0.15);
  background: linear-gradient(0deg, rgba(12, 6, 24, 0.9), transparent);
}

.footer__logo {
  display: block;
  margin: 0 auto 0.75rem;
  width: min(200px, 55vw);
  height: auto;
  opacity: 0.85;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.footer strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer a {
  color: var(--purple);
  text-decoration: none;
}

.footer-meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.75;
}

.footer-install {
  display: block;
  margin: 0.75rem auto 0;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 45, 154, 0.4);
  border-radius: 999px;
  background: rgba(255, 45, 154, 0.12);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.footer-install[hidden] {
  display: none;
}

/* PWA — instalar app */
.pwa-install {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 1rem;
  padding-bottom: calc(1rem + var(--safe-bottom));
}

.pwa-install[hidden] {
  display: none !important;
}

.pwa-install__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.pwa-install__card {
  position: relative;
  width: min(400px, 100%);
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 20px;
  background: linear-gradient(165deg, #2a1a42 0%, #140c22 100%);
  border: 1px solid rgba(255, 45, 154, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: slideUp 0.35s ease;
}

.pwa-install__icon {
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  margin-bottom: 0.75rem;
}

.pwa-install__title {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.pwa-install__text {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.pwa-install__text strong {
  color: var(--gold);
}

.pwa-install__actions {
  display: flex;
  gap: 0.5rem;
}

.pwa-install__actions .btn {
  flex: 1;
  min-height: 48px;
}

.pwa-install__actions .btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}
