/* Inspirado em vintage-r-dio (CodePen) — tema Bodes do Asfalto */
:root {
  --bodes-accent: #ff9900;
  --bodes-accent2: #ff5722;
  --bodes-dark: #1a1a2e;
  --bodes-glass: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

body.ouvinte-page {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 110px;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  position: relative;
}

body.ouvinte-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 153, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 87, 34, 0.12) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  bottom: -20px;
  animation: floatUp 12s linear forwards, fadeIn 1s forwards;
}

@keyframes floatUp {
  to { transform: translateY(-120vh) rotate(180deg); }
}
@keyframes fadeIn {
  to { opacity: 0.7; }
}

.ouvinte-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  position: relative;
  z-index: 2;
}

.ouvinte-glass {
  background: var(--bodes-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  padding: 2rem 1.5rem;
  text-align: center;
}

.ouvinte-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--bodes-accent), var(--bodes-accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(255, 153, 0, 0.35);
  animation: pulseSmooth 4s infinite ease-in-out;
  overflow: hidden;
}

.ouvinte-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

@keyframes pulseSmooth {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 32px rgba(255, 153, 0, 0.35); }
  50% { transform: scale(1.04); box-shadow: 0 12px 40px rgba(255, 153, 0, 0.5); }
}

.ouvinte-title {
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 0.35rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.pulse-text {
  display: inline-block;
  animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { text-shadow: 0 0 8px rgba(255, 153, 0, 0.3); }
  50% { text-shadow: 0 0 24px rgba(255, 153, 0, 0.8), 0 0 36px rgba(255, 87, 34, 0.4); }
  100% { text-shadow: 0 0 8px rgba(255, 153, 0, 0.3); }
}

.ouvinte-slogan {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* Toca-discos + braço da agulha — adaptado de codepen.io/petru6e4ka/pen/gOamZad */
.turntable-wrap {
  --disc: 240px;
  --s: 0.511;
  --arm-shift: 38px;
  position: relative;
  width: calc(var(--disc) + 70px + var(--arm-shift));
  height: calc(var(--disc) + 24px);
  margin: 0 auto 1.25rem;
  overflow: visible;
}

.cover-wrap {
  width: var(--disc);
  height: var(--disc);
  margin: 0;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* textura metálica do braço */
.metal-shine {
  background-color: hsl(0, 0%, 90%);
  box-shadow:
    inset hsl(0, 0%, 15%) 0 0 0 calc(2px * var(--s)),
    inset hsl(0, 0%, 15%, 0.8) 0 calc(-1px * var(--s)) calc(3px * var(--s)) calc(2px * var(--s)),
    inset hsl(0, 0%, 0%, 0.25) 0 calc(-1px * var(--s)) 0 calc(4px * var(--s)),
    inset hsl(0, 0%, 100%, 0.7) 0 calc(2px * var(--s)) calc(1px * var(--s)) calc(4px * var(--s)),
    hsl(0, 0%, 18%, 0.45) 0 calc(4px * var(--s)) calc(5px * var(--s)) calc(2px * var(--s));
  border-radius: 50%;
}

/* base + braço — posições proporcionais ao CodePen original */
.tonearm-mount {
  position: absolute;
  width: calc(150px * var(--s));
  height: calc(150px * var(--s));
  top: calc(30px * var(--s));
  right: calc(70px * var(--s) - var(--arm-shift));
  z-index: 2;
  pointer-events: none;
}

.tonearm-block {
  position: absolute;
  width: calc(200px * var(--s));
  height: calc(500px * var(--s));
  top: calc(15px * var(--s));
  right: calc(40px * var(--s) - var(--arm-shift));
  transform-origin: center calc(98px * var(--s));
  transform: rotate(0deg);
  transition: transform 1.5s ease-in-out;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.turntable-wrap.playing .tonearm-block {
  transform: rotate(25deg);
}

.tonearm-pivot {
  position: absolute;
  width: calc(62px * var(--s));
  height: calc(62px * var(--s));
  top: calc(62px * var(--s));
  left: calc(65px * var(--s));
  border: 1px solid darkgray;
  box-sizing: border-box;
  box-shadow: calc(-2px * var(--s)) calc(2px * var(--s)) calc(7px * var(--s)) calc(1px * var(--s)) rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.tonearm-tube {
  position: absolute;
  width: calc(18px * var(--s));
  height: calc(310px * var(--s));
  top: calc(23px * var(--s));
  left: calc(85px * var(--s));
  box-shadow: calc(-2px * var(--s)) calc(2px * var(--s)) calc(4px * var(--s)) calc(1px * var(--s)) rgba(0, 0, 0, 0.8);
  background: linear-gradient(
    90deg,
    rgb(255, 255, 255) 0%,
    rgb(94, 94, 94) 0%,
    rgb(255, 255, 255) 48%,
    rgb(213, 213, 213) 73%,
    rgb(179, 175, 175) 100%
  );
  z-index: 3;
}

.tonearm-tube::after {
  content: "";
  position: absolute;
  width: calc(56px * var(--s));
  height: calc(23px * var(--s));
  top: 0;
  left: calc(-20px * var(--s));
  box-shadow: calc(-2px * var(--s)) calc(2px * var(--s)) calc(5px * var(--s)) calc(1px * var(--s)) rgba(0, 0, 0, 0.5);
  background: linear-gradient(
    90deg,
    rgb(255, 255, 255) 0%,
    rgb(94, 94, 94) 0%,
    rgb(255, 255, 255) 48%,
    rgb(213, 213, 213) 73%,
    rgb(179, 175, 175) 100%
  );
  z-index: 5;
}

.tonearm-head {
  position: absolute;
  width: calc(18px * var(--s));
  height: calc(110px * var(--s));
  top: calc(325px * var(--s));
  left: calc(67px * var(--s));
  transform: rotate(20deg);
  box-shadow: calc(-3px * var(--s)) calc(2px * var(--s)) calc(2px * var(--s)) 0 rgba(0, 0, 0, 0.8);
  background: linear-gradient(
    90deg,
    rgb(255, 255, 255) 0%,
    rgb(94, 94, 94) 0%,
    rgb(255, 255, 255) 48%,
    rgb(213, 213, 213) 73%,
    rgb(179, 175, 175) 100%
  );
  z-index: 3;
}

.tonearm-head::before,
.tonearm-head::after {
  content: "";
  position: absolute;
  width: calc(14px * var(--s));
  height: calc(90px * var(--s));
  top: calc(20px * var(--s));
  left: calc(-7px * var(--s));
  box-sizing: border-box;
  box-shadow: calc(-1px * var(--s)) calc(1px * var(--s)) calc(3px * var(--s)) calc(1px * var(--s)) black;
  border-left: calc(5px * var(--s)) solid #232121;
  background-color: #3e3e3e;
  z-index: 5;
}

.tonearm-head::after {
  left: calc(11px * var(--s));
  border-right: calc(5px * var(--s)) solid #232121;
  border-left: none;
  box-shadow: 0 calc(1px * var(--s)) calc(2px * var(--s)) calc(1px * var(--s)) black;
}

/* Disco de vinil — adaptado do player antigo (/root/radio) */
.vinyl-disc {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #111;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  animation: vinylSpin 4s linear infinite paused;
}

.vinyl-disc.playing {
  animation-play-state: running;
}

.vinyl-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 4px
    ),
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.07), transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(0, 0, 0, 0.35), transparent 40%);
  pointer-events: none;
}

.vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42%;
  height: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

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

.vinyl-spindle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(145deg, #eee, #bbb);
  box-shadow:
    inset 0 -1px 2px rgba(0, 0, 0, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

@keyframes vinylSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cover-art {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1a1a2e 0%, #2a2040 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cover-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
}

.now-playing-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--bodes-accent);
  margin-bottom: 0.25rem;
}

.now-playing-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.rotating-text {
  min-height: 3.2em;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 1.25rem 0;
  padding: 0 0.5rem;
  transition: opacity 0.6s ease, transform 0.5s ease;
}

.rotating-text.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.ouvinte-cards {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  text-align: left;
}

.ouvinte-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.ouvinte-card h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bodes-accent);
  margin: 0 0 0.35rem;
}

.ouvinte-card-news h3 {
  text-transform: none;
  letter-spacing: 0.3px;
  font-size: 0.82rem;
  font-weight: 600;
}

.ouvinte-card-news h3 i {
  margin-right: 0.35rem;
  opacity: 0.85;
}

.news-rotate {
  min-height: 3.4em;
  margin: 0;
  line-height: 1.45;
}

.news-rotate a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.news-rotate a:hover {
  color: var(--bodes-accent);
}

.ouvinte-card p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.ouvinte-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.1rem 0 0.25rem;
}

.ouvinte-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  background: rgba(255, 165, 0, 0.15);
  border-color: rgba(255, 165, 0, 0.35);
  color: var(--bodes-accent);
}

.ouvinte-btn:hover {
  transform: scale(1.04);
  background: var(--bodes-accent);
  color: var(--bodes-dark);
}

.ouvinte-btn.sos {
  background: rgba(220, 53, 69, 0.25);
  border-color: rgba(220, 53, 69, 0.5);
  color: #ff6b7a;
  font-size: 1rem;
  padding: 0.65rem 1.4rem;
  animation: sos-pulse 2s ease-in-out infinite;
}

.ouvinte-btn.sos:hover {
  background: #dc3545;
  color: #fff;
}

@keyframes sos-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(220, 53, 69, 0.4); }
  50% { box-shadow: 0 0 28px rgba(220, 53, 69, 0.75); }
}

.ouvinte-btn.wa {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.4);
  color: #25d366;
}

.ouvinte-btn.wa:hover {
  background: #25d366;
  color: #111;
}

.ouvinte-footer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1.5rem;
}

/* Player fixo inferior */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, rgba(255, 153, 0, 0.92), rgba(255, 87, 34, 0.88));
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  padding: 12px 16px;
}

.player-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-cover-mini {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.player-cover-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-info-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--bodes-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-info-artist {
  font-size: 0.78rem;
  color: rgba(26, 26, 46, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(220, 53, 69, 0.85);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  border: none;
  cursor: default;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.player-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, var(--bodes-dark), #2d2d44);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
}

.player-btn:hover { transform: scale(1.06); }
.player-btn:active { transform: scale(0.96); }

.player-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.volume-slider {
  width: 72px;
  height: 4px;
  accent-color: var(--bodes-dark);
  cursor: pointer;
}

#publicPlayer { display: none; }

@media (max-width: 480px) {
  .ouvinte-glass {
    padding: 1.5rem 1rem;
  }

  .live-badge span:last-child { display: none; }
  .volume-slider { width: 48px; }
  .player-cover-mini { width: 44px; height: 44px; font-size: 1.2rem; }
  .player-btn { width: 40px; height: 40px; }
}

/* —— Página S.O.S. —— */
.ouvinte-wrap.sos-page {
  max-width: 540px;
  padding-bottom: 2rem;
}

.ouvinte-logo.sos-logo {
  background: linear-gradient(145deg, #dc3545, #ff5722);
  box-shadow: 0 8px 32px rgba(220, 53, 69, 0.4);
  font-size: 2.4rem;
}

.sos-alert {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.4);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: #ffb4bc;
  margin-bottom: 1.25rem;
  text-align: left;
}

.sos-form {
  text-align: left;
}

.sos-field {
  margin-bottom: 1rem;
}

.sos-field label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--bodes-accent);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.sos-field input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.sos-field input[type="text"]:focus {
  border-color: rgba(255, 153, 0, 0.5);
}

.sos-field input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.sos-block {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.sos-block label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--bodes-accent);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sos-loc-text {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 0.65rem;
}

.sos-loc-text.loc-ok { color: #7dffb0; }
.sos-loc-text.loc-warn { color: var(--bodes-accent); }

.sos-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.sos-check input {
  margin-top: 0.2rem;
  accent-color: var(--bodes-accent);
}

.sos-record-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(145deg, #dc3545, #b02a37);
  color: #fff;
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.sos-record-btn:hover {
  transform: scale(1.02);
}

.sos-record-btn.sos-recording {
  animation: sos-pulse 0.8s ease-in-out infinite;
  background: linear-gradient(145deg, #ff1744, #dc3545);
}

.sos-grav-status {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0.75rem 0 0;
  text-align: center;
}

.sos-grav-status.ok { color: #7dffb0; }

.sos-progress-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 0.65rem;
  overflow: hidden;
}

.sos-progress-wrap.hidden { display: none; }

.sos-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #dc3545, #ff5722);
  border-radius: 3px;
  transition: width 0.15s linear;
}

.sos-submit {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(145deg, #dc3545, #ff5722);
  color: #fff;
  box-shadow: 0 6px 24px rgba(220, 53, 69, 0.45);
  margin-top: 0.5rem;
  transition: opacity 0.2s, transform 0.2s;
}

.sos-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sos-submit:not(:disabled):hover {
  transform: scale(1.02);
}

.sos-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}

.sos-back:hover {
  color: var(--bodes-accent);
}
