/* CSS Definitivo — Rádio Ministério Canção Lu Jesus (Subfase 7.3) */

.radio-cabecalho {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.radio-cabecalho h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.radio-cabecalho p {
  font-size: 1.1rem;
  color: #64748b;
}

.radio-card-main {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 12px);
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
}

/* Barra de Status */
.radio-status-barra {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.75rem;
}

.status-ponto {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-aguardando {
  background-color: #eab308;
}

.status-tocando {
  background-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  animation: pulso-radio 2s infinite;
}

.status-pausado {
  background-color: #f59e0b;
}

.status-aovivo {
  background-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  animation: pulso-radio-aovivo 1.5s infinite;
}

.status-erro {
  background-color: #ef4444;
}

@keyframes pulso-radio {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.85; }
}

@keyframes pulso-radio-aovivo {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.85; }
}

.status-texto {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

/* Mensagem de Erro */
.radio-mensagem-erro {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Controles de Ação */
.radio-controles {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-radio-ouvir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: var(--primary-color, #2563eb);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-radio-ouvir:hover {
  background-color: var(--primary-hover, #1d4ed8);
  transform: translateY(-1px);
}

.btn-radio-controle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #475569;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-radio-controle:hover {
  background-color: #334155;
}

/* Section & Wrapper do Player Oficial (Garantido VISÍVEL e Secundário) */
.radio-hero-identidade {
  text-align: center;
  margin-bottom: 1.75rem;
}

.radio-imagem-container {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 520px;
  margin-bottom: 1rem;
}

/* Palco 3D para transição suave Cantor ↔ Logo */
.radio-3d-stage {
  position: relative;
  width: 100%;
  height: 320px;
  perspective: 1000px;
  transform-style: preserve-3d;
  margin: 0 auto;
}

.radio-identidade-img {
  max-width: 520px;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.radio-card-3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  will-change: transform, opacity, z-index;
}

.radio-card-frente {
  z-index: 2;
  transform: translate3d(0, 0, 0) scale(1) rotateY(0deg);
  opacity: 1;
}

.radio-card-tras {
  z-index: 1;
  transform: translate3d(0, 0, -60px) scale(0.92) rotateY(0deg);
  opacity: 0.85;
}

/* Animação 3D de Saída (Frente -> Lateral -> Atrás) em 8 estágios */
.animar-vai-tras {
  animation: trocar-frente-para-tras 1.8s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

/* Animação 3D de Entrada (Atrás -> Lateral -> Frente) em 8 estágios */
.animar-vem-frente {
  animation: trocar-tras-para-frente 1.8s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes trocar-frente-para-tras {
  0% {
    z-index: 2;
    transform: translate3d(0, 0, 0) rotateY(0deg) rotateZ(0deg) scale(1);
    opacity: 1;
  }
  15% {
    z-index: 2;
    transform: translate3d(25px, 0, -15px) rotateY(-6deg) rotateZ(1deg) scale(0.98);
    opacity: 1;
  }
  30% {
    z-index: 2;
    transform: translate3d(55px, 0, -35px) rotateY(-14deg) rotateZ(2deg) scale(0.95);
    opacity: 0.95;
  }
  45% {
    z-index: 2;
    transform: translate3d(70px, 0, -60px) rotateY(-20deg) rotateZ(1.5deg) scale(0.92);
    opacity: 0.9;
  }
  55% {
    z-index: 1;
    transform: translate3d(50px, 0, -85px) rotateY(-16deg) rotateZ(0deg) scale(0.88);
    opacity: 0.85;
  }
  70% {
    z-index: 1;
    transform: translate3d(25px, 0, -75px) rotateY(-10deg) rotateZ(-1deg) scale(0.89);
    opacity: 0.85;
  }
  85% {
    z-index: 1;
    transform: translate3d(5px, 0, -65px) rotateY(-3deg) rotateZ(-0.5deg) scale(0.91);
    opacity: 0.85;
  }
  100% {
    z-index: 1;
    transform: translate3d(0, 0, -60px) rotateY(0deg) rotateZ(0deg) scale(0.92);
    opacity: 0.85;
  }
}

@keyframes trocar-tras-para-frente {
  0% {
    z-index: 1;
    transform: translate3d(0, 0, -60px) rotateY(0deg) rotateZ(0deg) scale(0.92);
    opacity: 0.85;
  }
  15% {
    z-index: 1;
    transform: translate3d(-25px, 0, -50px) rotateY(6deg) rotateZ(-1deg) scale(0.93);
    opacity: 0.9;
  }
  30% {
    z-index: 1;
    transform: translate3d(-55px, 0, -30px) rotateY(14deg) rotateZ(-2deg) scale(0.95);
    opacity: 0.95;
  }
  45% {
    z-index: 1;
    transform: translate3d(-70px, 0, -10px) rotateY(20deg) rotateZ(-1.5deg) scale(0.98);
    opacity: 0.98;
  }
  55% {
    z-index: 2;
    transform: translate3d(-50px, 0, 15px) rotateY(16deg) rotateZ(0deg) scale(1.01);
    opacity: 1;
  }
  70% {
    z-index: 2;
    transform: translate3d(-25px, 0, 10px) rotateY(10deg) rotateZ(1deg) scale(1.01);
    opacity: 1;
  }
  85% {
    z-index: 2;
    transform: translate3d(-5px, 0, 3px) rotateY(3deg) rotateZ(0.5deg) scale(1.005);
    opacity: 1;
  }
  100% {
    z-index: 2;
    transform: translate3d(0, 0, 0) rotateY(0deg) rotateZ(0deg) scale(1);
    opacity: 1;
  }
}

.badge-selo-aovivo {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
  animation: pulso-badge-aovivo 1.5s infinite;
  z-index: 2;
}

.selo-oculto {
  display: none !important;
}

@keyframes pulso-badge-aovivo {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.85; }
}

.radio-nome-ministerio {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.5rem 0 0.25rem 0;
  line-height: 1.3;
}

.radio-subtitulo-destaque {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 1rem;
}

/* Equalizador Decorativo (CSS Puro) */
.equalizador-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 24px;
  margin: 0.5rem auto 1rem auto;
}

.equalizador-wrapper .bar {
  width: 4px;
  background-color: #2563eb;
  border-radius: 2px;
  height: 6px;
  transition: height 0.2s ease;
}

.equalizador-ativo .bar-1 {
  animation: equalizar 1.2s ease-in-out infinite;
}

.equalizador-ativo .bar-2 {
  animation: equalizar 0.8s ease-in-out infinite 0.2s;
}

.equalizador-ativo .bar-3 {
  animation: equalizar 1.5s ease-in-out infinite 0.4s;
}

.equalizador-ativo .bar-4 {
  animation: equalizar 1.0s ease-in-out infinite 0.1s;
}

.equalizador-ativo .bar-5 {
  animation: equalizar 1.3s ease-in-out infinite 0.3s;
}

@keyframes equalizar {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

/* Acessibilidade: Desativa animação em preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
  .equalizador-ativo .bar,
  .badge-selo-aovivo,
  .status-tocando,
  .status-aovivo,
  .animar-vai-tras,
  .animar-vem-frente {
    animation: none !important;
  }
}

.radio-player-origem-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  margin-bottom: 0.5rem;
}

.radio-player-secao {
  margin: 1.75rem auto 0 auto;
  max-width: 380px;
}

.player-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Proporção 16:9 (Garante altura >= 200px) */
  background-color: #000000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid #cbd5e1;
}

.player-wrapper iframe,
.player-wrapper #player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.radio-player-nota {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.85rem;
}

/* Responsividade Média e Mobile */
@media (max-width: 640px) {
  .radio-cabecalho h1 {
    font-size: 1.65rem;
  }

  .radio-card-main {
    padding: 1.25rem;
  }

  .btn-radio-ouvir {
    width: 100%;
  }

  .radio-3d-stage {
    height: 230px;
  }

  .radio-identidade-img {
    max-width: 100%;
  }

  .radio-nome-ministerio {
    font-size: 1.35rem;
  }

  .radio-subtitulo-destaque {
    font-size: 0.95rem;
  }

  .radio-player-secao {
    max-width: 360px;
  }
}

/* Overlay de Sobreposição Visual Experimental (Subfase 7.4F Protótipo) */
.player-live-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem;
  z-index: 5;
  pointer-events: none;
  border-radius: 8px;
  box-sizing: border-box;
}

.overlay-oculto {
  display: none !important;
}

.overlay-identidade-img {
  max-width: 75%;
  max-height: 65%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.overlay-audio-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(30, 41, 59, 0.9);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  letter-spacing: 0.05em;
}

.ponto-ao-vivo {
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #ef4444;
}
