:root {
  --bg: #0a0705;
  --glow: rgba(214, 138, 26, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(circle at 50% 35%, var(--glow), transparent 60%),
    #050403;
  font-family: "Oswald", system-ui, sans-serif;
  color: #fff;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

/* Palco que centraliza o card em qualquer tela */
.stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*
  Card mantém a proporção 9:16 da arte.
  - No celular ocupa a largura toda (até o limite da altura).
  - No desktop fica centralizado, limitado pela altura da viewport.
*/
.card {
  position: relative;
  aspect-ratio: 900 / 1600;
  width: min(100%, calc(100dvh * 900 / 1600));
  max-width: 480px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  background: #000;
  /* Permite dimensionar o player em unidades de container (cqw) */
  container-type: inline-size;
}

.art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

/* Áreas clicáveis sobrepostas — posicionadas em % sobre a arte */
.hit {
  position: absolute;
  display: block;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hit:focus-visible {
  outline: 2px solid #ffcf66;
  outline-offset: 3px;
  border-radius: 999px;
}
.hit:hover { transform: scale(1.06); }
.hit:active { transform: scale(0.96); }

/* Instagram (inferior esquerdo) */
.hit--instagram {
  left: 17.5%;
  top: 74.2%;
  width: 13.5%;
  height: 6.2%;
  border-radius: 50%;
}

/* WhatsApp (inferior direito) */
.hit--whatsapp {
  left: 77.5%;
  top: 74.2%;
  width: 13.5%;
  height: 6.2%;
  border-radius: 50%;
}

/* Barra do site (rodapé) */
.hit--site {
  left: 6.5%;
  top: 92.2%;
  width: 87%;
  height: 4.6%;
  border-radius: 999px;
}

/* ====================================================================
   PLAYER (HTML/CSS) — canto superior esquerdo, sobre a arte
   Dimensionado em cqw para escalar junto com a largura do card.
   ==================================================================== */
.player {
  position: absolute;
  left: 3.2%;
  top: 3.6%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2cqw;
  font-size: 4cqw; /* base para os em internos */
}

/* Botão redondo vermelho com play/pause */
.player__btn {
  position: relative;
  flex: 0 0 auto;
  width: 11cqw;
  height: 11cqw;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #ff5b4d, #e2231a 60%, #b3140d);
  box-shadow: 0 0.4cqw 1.6cqw rgba(226, 35, 26, 0.5), inset 0 0 0 0.3cqw rgba(255, 255, 255, 0.12);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.player__btn:hover { transform: scale(1.06); }
.player__btn:active { transform: scale(0.94); }
.player__btn:focus-visible { outline: 2px solid #ffcf66; outline-offset: 2px; }

/* Cauda de balão (igual à arte) embaixo do play principal */
.player__btn:not(.player__btn--vol)::after {
  content: "";
  position: absolute;
  left: 12%;
  bottom: -8%;
  border-left: 2.4cqw solid transparent;
  border-right: 2.4cqw solid transparent;
  border-top: 3cqw solid #c5160e;
  transform: rotate(8deg);
}

/* Ícones (mostrados/escondidos por estado) */
.ico { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.ico--play {
  width: 0; height: 0;
  border-left: 3.6cqw solid #fff;
  border-top: 2.4cqw solid transparent;
  border-bottom: 2.4cqw solid transparent;
  margin-left: 0.6cqw;
}
.ico--pause {
  width: 3.6cqw; height: 4.4cqw;
  border-left: 1.2cqw solid #fff;
  border-right: 1.2cqw solid #fff;
}
.player.is-playing .ico--play { display: none; }
.player:not(.is-playing) .ico--pause { display: none; }

/* Barra de progresso clicável */
.player__bar {
  position: relative;
  width: 15cqw;
  height: 2.2cqw;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 0.2cqw rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.player__bar:focus-visible { outline: 2px solid #ffcf66; outline-offset: 2px; }
.player__fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6a3d, #e2231a);
}
.player__thumb {
  position: absolute;
  right: -1.2cqw;
  top: 50%;
  width: 3cqw;
  height: 3cqw;
  border-radius: 50%;
  background: #ff4a3a;
  transform: translateY(-50%);
  box-shadow: 0 0 1.6cqw rgba(255, 74, 58, 0.9);
}

/* Volume: botão de mudo + popover com slider */
.player__vol { position: relative; }
.player__btn--vol {
  width: 8.4cqw;
  height: 8.4cqw;
  background: radial-gradient(circle at 35% 30%, #2b2b2e, #161617 70%);
  box-shadow: 0 0.3cqw 1.2cqw rgba(0, 0, 0, 0.5), inset 0 0 0 0.25cqw rgba(255, 255, 255, 0.08);
}

/* Ícone de alto-falante (CSS) */
.ico--vol, .ico--muted {
  width: 4.6cqw; height: 4.6cqw;
  transform: translate(-50%, -50%);
}
.ico--vol::before, .ico--muted::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1.8cqw; height: 2.4cqw;
  background: #fff;
  transform: translateY(-50%);
  clip-path: polygon(0 30%, 45% 30%, 100% 0, 100% 100%, 45% 70%, 0 70%);
}
.ico--vol::after {
  content: "";
  position: absolute;
  left: 2.6cqw; top: 50%;
  width: 1.6cqw; height: 1.6cqw;
  border: 0.5cqw solid #fff;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 0 50% 0 0;
  transform: translateY(-50%) rotate(0deg);
}
.ico--muted::after {
  content: "";
  position: absolute;
  left: 2.8cqw; top: 50%;
  width: 2.6cqw; height: 0.5cqw;
  background: #ff6a5a;
  transform: translateY(-50%) rotate(45deg);
}
.player.is-muted .ico--vol { display: none; }
.player:not(.is-muted) .ico--muted { display: none; }

/* Popover do slider de volume (aparece no hover/foco) */
.player__volpop {
  position: absolute;
  left: 50%;
  top: calc(100% + 1.6cqw);
  transform: translateX(-50%) scale(0.9);
  transform-origin: top center;
  padding: 2cqw 1.6cqw;
  border-radius: 2cqw;
  background: rgba(12, 10, 9, 0.92);
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.6), inset 0 0 0 0.2cqw rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.player__vol:hover .player__volpop,
.player__vol:focus-within .player__volpop {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

/* Slider de volume (range nativo estilizado) */
.player__volrange {
  -webkit-appearance: none;
  appearance: none;
  width: 26cqw;
  height: 2.2cqw;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2231a var(--vol, 80%), rgba(255,255,255,0.22) var(--vol, 80%));
  cursor: pointer;
}
.player__volrange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 4cqw; height: 4cqw;
  border-radius: 50%;
  background: #ff4a3a;
  box-shadow: 0 0 1.4cqw rgba(255, 74, 58, 0.9);
  cursor: pointer;
}
.player__volrange::-moz-range-thumb {
  width: 4cqw; height: 4cqw;
  border: 0;
  border-radius: 50%;
  background: #ff4a3a;
  cursor: pointer;
}

.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;
}

/* Telas muito largas: nada além do card centralizado (já tratado).
   Telas baixas (paisagem no celular): garante que o card caiba na altura. */
@media (max-height: 560px) {
  .card { width: calc(100dvh * 900 / 1600); }
}
