/*
  styles.css — Rádio Online
  Visual mobile-first, dark-mode, animações, tipografia, acessibilidade
  ———
  Cores principais:
    Fundo: #181A20 → #23272e (degradê vertical)
    Player: #30353B (carcaça), #23272e (display), #FFF (texto display)
    Texto: #FFFFFF, #B0C4DE
    Detalhes: #FFF, #B0C4DE
*/

:root {
  --color-bg-top: #181A20;
  --color-bg-bottom: #23272e;
  --color-player: #23272e;
  --color-display: #23272e;
  --color-neon: #FFF;
  --color-text-main: #FFF;
  --color-text-sec: #B0C4DE;
  --color-border: #23272e;
  --color-ad-bg: #181A20;
  --radius-player: 18px;
  --font-display: 'Orbitron', sans-serif;
  --font-text: 'Titillium Web', Arial, sans-serif;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-top: #181A20;
    --color-bg-bottom: #23272e;
    --color-player: #23272e;
    --color-display: #23272e;
    --color-text-main: #FFF;
    --color-text-sec: #B0C4DE;
    --color-ad-bg: #181A20;
  }
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-text);
  background: none;
  color: var(--color-text-main);
  min-height: 100vh;
  /* Novo fundo mais claro */
  background: linear-gradient(180deg, #23272b 0%, #353a40 100%);
  padding-bottom: 70px !important;
  box-sizing: border-box;
}

.background-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to bottom, var(--color-bg-top) 0%, var(--color-bg-bottom) 100%);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(32, 34, 38, 0.92); /* cinza ainda mais escuro e translúcido */
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding: 0.7rem 0;
}
.logo {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.main-content {
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  box-sizing: border-box;
}

/* Banners */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--color-ad-bg);
  border-radius: 12px;
  margin: 1.2rem auto;
  min-height: 60px;
  width: 100%;
  max-width: 100vw;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
}
.ad-slot[data-size="970x90"] {
  min-width: 320px;
  min-height: 90px;
  max-width: 970px;
  height: 90px;
}
.ad-slot[data-size="970x250"] {
  min-width: 320px;
  min-height: 180px;
  max-width: 970px;
  height: 250px;
}

/* Player vintage high-tech */
.radio-player {
  position: relative;
  background: var(--color-player);
  border-radius: var(--radius-player);
  box-shadow: 0 4px 24px 0 #000a;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  margin: 1.5rem 0 2rem 0;
  width: 100%;
  max-width: 550px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}
.speaker-grill {
  width: 32px;
  height: 120px;
  background: linear-gradient(145deg, #23272b 60%, #353a40 100%);
  border-radius: 18px;
  box-shadow: 0 2px 12px 0 #0005;
  margin: 0 12px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #444;
}
.speaker-grill.left {
  left: -44px;
}
.speaker-grill.right {
  right: -44px;
}
.speaker-grill::before, .speaker-grill::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background: #181a1b;
  border-radius: 50%;
  margin: 8px auto;
  box-shadow: 0 0 0 2px #333, 0 2px 8px #0008;
}
.speaker-grill::after {
  width: 10px;
  height: 10px;
  background: #333;
  margin-top: 0;
}
.player-display {
  background: var(--color-display);
  color: #FFF;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  border-radius: 8px;
  box-shadow: 0 0 12px 0 #FFF4, 0 0 0 2px #FFF;
  padding: 0.7rem 1.2rem;
  margin-bottom: 0.7rem;
  text-align: center;
  min-width: 180px;
  min-height: 2.2em;
  text-shadow: 0 0 8px #FFF, 0 0 2px #23272e;
  transition: background var(--transition), color var(--transition);
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
  text-overflow: ellipsis;
  position: relative;
  border: 2px solid #FFF;
  width: 95%;
  max-width: 500px;
  min-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
#song-title {
  display: block;
  max-width: 95vw;
  overflow: hidden; /* Remover overflow-x: auto */
  text-overflow: ellipsis;
  color: #FFF;
  font-weight: bold;
  text-shadow: 0 0 8px #FFF;
  /* Marquee effect para texto longo */
  animation: none;
  width: 98%;
  min-width: 220px;
  max-width: 480px;
  margin: 0 auto;
  white-space: normal;
  word-break: break-word;
}
@media (min-width: 601px) {
  #song-title.marquee {
    animation: marquee 12s linear infinite;
  }
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.player-display:focus {
  outline: 2px solid #FFF;
}

.audio-visualizer {
  display: block;
  margin: 0.2rem auto 0.7rem auto;
  width: 260px;
  height: 40px;
  background: transparent;
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 0.2rem;
}
.play-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(145deg, #23272e 60%, #30353B 100%);
  border: 3px solid #FFF;
  color: #FFF;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px 0 #FFF4;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), border var(--transition);
  outline: none;
  position: relative;
}
.play-btn:active, .play-btn:focus {
  border-color: #FFF;
  box-shadow: 0 0 0 3px #FFF5;
}
.play-btn.loading {
  pointer-events: none;
}
.play-btn.loading .fa-play,
.play-btn.loading .fa-stop {
  opacity: 0;
}
.play-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #FFF3;
  border-top: 2px solid #FFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.play-btn .fa-play, .play-btn .fa-stop {
  pointer-events: none;
  color: #FFF;
}

.volume-slider {
  width: 90px;
  accent-color: #FFF;
  background: transparent;
  transition: accent-color var(--transition);
}
.volume-slider::-webkit-slider-thumb {
  background: #FFF;
  border: 1px solid #FFF;
}
.volume-slider::-moz-range-thumb {
  background: #FFF;
  border: 1px solid #FFF;
}

/* Botões extras */
.player-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 0.7rem 0 1.2rem 0;
}
.action-btn {
  background: #23272e;
  color: #FFF;
  border: 2px solid #FFF;
  border-radius: 22px;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px 0 #FFF4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.action-btn:focus, .action-btn:hover {
  background: #FFF;
  color: #23272e;
  outline: 2px solid #FFF;
}

/* Slideshow central */
.slideshow-container {
  width: 100%;
  max-width: 550px;
  margin: 1.2rem auto 1.2rem auto;
  position: relative;
  aspect-ratio: 16/9;
  background: #0a1a2f;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.10);
}
.slideshow {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.slide {
  min-width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .5s cubic-bezier(.4,0,.2,1);
  position: absolute;
  top: 0; left: 0;
  z-index: 1;
  pointer-events: none;
}
.slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: #FFF;
  border: 2px solid #FFF;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background var(--transition), color var(--transition);
}
.slide-arrow:focus, .slide-arrow:hover {
  background: #FFF;
  color: #23272e;
  outline: 2px solid #FFF;
}
.slide-arrow.prev { left: 10px; }
.slide-arrow.next { right: 10px; }
.slide-dots {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 4;
}
.slide-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFF;
  opacity: 0.7;
  border: 2px solid #23272e;
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
}
.slide-dot.active {
  background: #FFF;
  opacity: 1;
}
.slide-placeholder {
  background: linear-gradient(135deg, #23272e 0%, #181A20 50%, #23272e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  padding: 2rem;
  min-height: 200px;
  border-radius: 12px;
  border: 2px solid #FFF3;
}
.slide-placeholder i {
  color: #FFF;
  opacity: 0.8;
}

/* Modal (incorporar/compartilhar) */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.45);
  align-items: center;
  justify-content: center;
}
.modal[aria-hidden="false"] {
  display: flex;
}
.modal-content {
  background: var(--color-player);
  color: #FFF;
  border-radius: 14px;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 0 4px 32px 0 #000a;
  max-width: 340px;
  width: 90vw;
  position: relative;
  text-align: center;
  border: 2px solid #FFF3;
}
.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  background: none;
  border: none;
  color: #FFF;
  font-size: 2rem;
  cursor: pointer;
  transition: color var(--transition);
}
.modal-close:focus, .modal-close:hover {
  color: #FFF;
  outline: 2px solid #FFF;
}
#embed-code, #share-link {
  width: 100%;
  font-size: 1rem;
  padding: 0.5rem;
  margin: 0.7rem 0 1.2rem 0;
  border-radius: 8px;
  border: 1px solid #FFF;
  background: #23272e;
  color: #FFF;
  font-family: var(--font-text);
  text-align: center;
}
#share-link {
  background: #23272e;
  color: #FFF;
  border: 2px solid #FFF;
}

/* Rodapé */
.site-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: rgba(24,26,32,0.98);
  padding: 0.7rem 0;
  z-index: 100;
  text-align: center;
  box-shadow: 0 -2px 12px 0 rgba(0,0,0,0.10);
  color: var(--color-text-sec);
  font-size: 1rem;
  letter-spacing: 0.5px;
}

/* Acessibilidade e foco visível */
:focus {
  outline: 2px solid var(--color-neon);
  outline-offset: 2px;
}

/* Responsividade */
@media (max-width: 600px) {
  .main-content, .slideshow-container {
    max-width: 100vw;
    padding: 0 0.2rem;
  }
  .radio-player {
    min-height: 180px;
    padding-top: 0.2rem;
  }
  .player-display {
    font-size: 1rem;
    padding: 0.5rem 0.7rem;
    max-width: 98vw;
  }
  #song-title {
    max-width: 90vw;
    font-size: 0.98em;
  }
  .audio-visualizer {
    width: 200px;
  }
  .ad-slot[data-size="970x90"], .ad-slot[data-size="970x250"] {
    min-width: 0;
    width: 100vw;
    max-width: 100vw;
    height: auto;
  }
  .slide-arrow {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .speaker-grill {
    height: 70px;
    width: 22px;
    position: absolute;
    top: 8px;
    bottom: unset;
    z-index: 2;
  }
  .speaker-grill.left {
    left: 2vw;
    right: auto;
    top: 8px;
    bottom: unset;
    transform: none;
  }
  .speaker-grill.right {
    right: 2vw;
    left: auto;
    top: 8px;
    bottom: unset;
    transform: none;
  }
  .player-controls {
    position: relative;
    z-index: 3;
  }
  .site-footer {
    position: relative;
    width: 100%;
    bottom: auto;
    box-shadow: none;
  }
  .speaker-grill.left, .speaker-grill.right {
    bottom: 70px;
  }
  .slideshow-container {
    margin-bottom: 1.2rem;
  }
  .speaker-grill {
    display: none !important;
  }
}

/* Suavidade para transições */
*, *::before, *::after {
  box-sizing: border-box;
  transition: background var(--transition), color var(--transition), border var(--transition), box-shadow var(--transition);
} 

.share-btn {
  background: none;
  border: none;
  color: #FFF;
  font-size: 1.7rem;
  width: auto;
  height: auto;
  box-shadow: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2em;
  margin: 0;
  transition: color 0.2s;
  outline: none;
  filter: none;
  z-index: 1000;
  pointer-events: auto;
  position: relative;
}
.share-btn i {
  margin: 0;
  font-size: 1.5em;
  color: #FFF;
  text-shadow: 0 2px 8px #23272e, 0 0 2px #000, 0 0 2px #FFF8; /* sombra para contraste */
}
.share-btn:active, .share-btn:focus, .share-btn:hover {
  color: #4a90e2;
  background: none;
  filter: none;
  transform: scale(1.15);
}

/* Botão admin */
.admin-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(40,44,52,0.85);
  color: #FFF;
  border: 2px solid #4a90e2;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 2px 12px 0 #0005;
  cursor: pointer;
  z-index: 200;
  transition: background 0.2s, border 0.2s, color 0.2s;
}
.admin-btn:hover, .admin-btn:focus {
  background: #4a90e2;
  color: #FFF;
  border-color: #FFF;
} 

.admin-float {
  position: fixed;
  top: 18px;
  right: 18px;
  background: transparent;
  color: #4a90e2;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: none;
  cursor: pointer;
  z-index: 200;
  transition: background 0.2s, color 0.2s;
}
.admin-float:hover, .admin-float:focus {
  background: #4a90e2;
  color: #FFF;
} 

.slideshow-container {
  margin-bottom: 3.5rem;
}
@media (max-width: 600px) {
  .slideshow-container {
    margin-bottom: 1.2rem;
  }
} 