:root {
  --bg-navy: #0b0d22;
  --panel-bg: rgba(14, 16, 21, 0.55);
  --text-light: #f6f7fd;
  --text-dim: rgba(246, 247, 253, 0.55);
  --accent-red: #ff3131;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--text-light);
  background: var(--bg-navy);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 125px 20px 60px;
  /* Em telas com notch/Dynamic Island (principalmente na vertical), soma a
     área segura do sistema para o conteúdo não ficar colado/atrás dele. */
  padding-top: calc(125px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(20px + env(safe-area-inset-left, 0px));
  padding-right: calc(20px + env(safe-area-inset-right, 0px));
  background-image: url("../assets/bg_prime.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  overflow: hidden;
}

@supports (height: 100dvh) {
  .hero {
    min-height: 100dvh;
  }
}

/* iOS Safari (e em geral qualquer touchscreen) não lida bem com
   background-attachment: fixed — a imagem pode sumir ou piscar.
   O tema original do WordPress também desativa o "fixo" em telas de toque. */
@media (hover: none) and (pointer: coarse) {
  .hero {
    background-attachment: scroll;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--bg-navy);
  opacity: 0.65;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  margin: 0 0 20px;
}

.logo img {
  display: block;
  max-width: 195px;
  height: auto;
}

/* Player */
.player {
  width: 100%;
  height: 74px;
  border-radius: 12px;
  background: var(--panel-bg);
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow: hidden;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* Ordem fixa dos blocos do player: play/pause sempre à esquerda, capa
   sempre à direita — independente de wrap ou de mudanças futuras. */
.player__toggle {
  order: 1;
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  border: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Só o ícone (play/pause) fica maior aqui — o botão em si mantém o
     tamanho original (74px) para não mexer na altura da barra do player;
     no celular a média query abaixo mantém o padding original. */
  padding: 15px;
  color: var(--text-light);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.player__toggle svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.player__toggle .icon-pause {
  display: none;
}

.player.is-playing .icon-play {
  display: none;
}

.player.is-playing .icon-pause {
  display: block;
}

.player__body {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  position: relative;
}

.player__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.player__title-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

/* Respaldo visual: se por algum motivo a rolagem não estiver ativa (nome
   comprido mas o texto ainda não começou a deslizar), corta com reticências
   em vez de cortar a palavra no meio. Só vale quando NÃO está rolando —
   enquanto desliza, o próprio JavaScript cuida da posição do texto. */
.player__title-wrap:not(.is-marquee) {
  text-overflow: ellipsis;
}

.player__title {
  display: inline-block;
  font-size: 17px;
  font-weight: bold;
  color: var(--text-light);
  white-space: nowrap;
  will-change: transform;
}

/* A rolagem em si é controlada via JavaScript (Web Animations API) para
   evitar inconsistências do Safari/iOS com @keyframes + custom properties;
   a classe .is-marquee só existe como marcador. */

.player__status {
  font-size: 12px;
  color: var(--text-dim);
}

.player__volume {
  order: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  color: var(--text-dim);
}

.player__volume .icon-volume,
.player__volume .icon-mute {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: none;
}

.player__mute {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.player__mute .icon-mute {
  display: none;
}

.player__mute.is-muted .icon-volume {
  display: none;
}

.player__mute.is-muted .icon-mute {
  display: block;
}

.player__range {
  width: 80px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent-red);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

/* Safari/iOS ignora o "accent-color" em versões mais antigas e desenha a
   trilha e o botão do slider com o estilo nativo do sistema; recriamos os
   dois manualmente para ficar igual em qualquer navegador. */
.player__range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(246, 247, 253, 0.3);
}

.player__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--accent-red);
  border: none;
  cursor: pointer;
}

.player__range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(246, 247, 253, 0.3);
}

.player__range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-red);
  border: none;
  cursor: pointer;
}

.player__cover {
  order: 4;
  flex: 0 0 74px;
  width: 74px;
  height: 74px;
  background: #000;
}

.player__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Social icons */
.social {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
}

.social a {
  color: var(--text-light);
  display: inline-flex;
  width: 24px;
  height: 24px;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.social a:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.social svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.copyright {
  margin: 18px 0 0;
  font-size: 11px;
  color: var(--text-light);
  text-align: center;
}

@media (max-width: 600px) {
  .hero {
    padding: 89px 16px 40px;
    padding-top: calc(89px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
  }

  .logo img {
    max-width: 155px;
  }

  .player {
    height: auto;
    min-height: 76px;
    flex-wrap: nowrap;
  }

  .player__toggle {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    padding: 19px;
  }

  .player__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
  }

  .player__title {
    font-size: 16px;
  }

  .player__status {
    font-size: 11px;
  }

  .player__volume {
    display: none;
  }

  .player__cover {
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
  }

  .social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
  }

  .social a {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 400px) {
  .hero {
    padding: 64px 14px 32px;
    padding-top: calc(64px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(14px + env(safe-area-inset-left, 0px));
    padding-right: calc(14px + env(safe-area-inset-right, 0px));
  }

  .logo img {
    max-width: 130px;
  }

  .logo {
    margin-bottom: 14px;
  }

  .player__toggle {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 16px;
  }

  .player__body {
    padding: 6px 8px;
  }

  .player__title {
    font-size: 15px;
  }

  .player__status {
    font-size: 10px;
  }

  .player__cover {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
  }

  .social {
    gap: 12px;
  }

  .social a {
    width: 20px;
    height: 20px;
  }

  .copyright {
    font-size: 10px;
  }
}
