/* ============================================================
   RADYO MODA 102.5 – V2.6.1 MOBILE LIVE PLAYER STYLES
   ============================================================ */

:root {
  --bg-dark: #07111f;
  --bg-card: rgba(13, 22, 38, 0.88);
  --primary-red: #dc2626;
  --primary-blue: #2563eb;
  --accent-gold: #fbbf24;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.12);
  --font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-dark);
  font-family: var(--font-family);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(8px, 2vh, 16px) 16px;
  position: relative;
}

/* Background Ambient Glow */
.bg-ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.16), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(37, 99, 235, 0.16), transparent 50%),
              #07111f;
  z-index: 1;
}

/* Player Card Container */
.player-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.5rem 1.25rem 1.25rem 1.25rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
  margin: auto;
}

/* Desktop Responsiveness */
@media (min-width: 1024px) {
  .player-card {
    max-width: 480px;
    padding: 1.75rem 1.5rem 1.5rem 1.5rem;
  }
}

/* Header & Badges */
.card-header {
  margin-bottom: 0.75rem;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.live-badge .pulse-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.station-name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-bottom: 2px;
}

.station-slogan {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
}

.station-subtext {
  font-size: 0.72rem;
  font-weight: 600;
  color: #ef4444;
  margin-top: 2px;
}

/* Logo Stage (~20-25% Enlarged Logo) */
.logo-stage {
  position: relative;
  width: 145px;
  height: 145px;
  margin: 0.6rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(220, 38, 38, 0.35);
  animation: spinRing 20s linear infinite;
}

.player-card.playing .ring-pulse {
  border-color: #ef4444;
  animation-duration: 6s;
}

.logo-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 50%;
  background: #0f172a;
  padding: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 2;
}

/* Equalizer Bars */
.eq-bars {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 20px;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.eq-bars span {
  width: 4px;
  background: #3b82f6;
  border-radius: 2px;
  height: 5px;
  transition: height 0.2s ease;
}

.player-card.playing .eq-bars span:nth-child(1) { animation: eqBar 0.8s ease-in-out infinite alternate; }
.player-card.playing .eq-bars span:nth-child(2) { animation: eqBar 1.1s ease-in-out infinite alternate 0.2s; background: #ef4444; }
.player-card.playing .eq-bars span:nth-child(3) { animation: eqBar 0.7s ease-in-out infinite alternate 0.4s; }
.player-card.playing .eq-bars span:nth-child(4) { animation: eqBar 1.3s ease-in-out infinite alternate 0.1s; background: #fbbf24; }
.player-card.playing .eq-bars span:nth-child(5) { animation: eqBar 0.9s ease-in-out infinite alternate 0.3s; }

/* Song Status Info (Multi-line Error Text Safe) */
.now-playing-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  width: 100%;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.now-playing-title {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.now-playing-text {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.35;
  word-break: break-word;
}

.player-card.error .now-playing-box {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}

.player-card.error .now-playing-text {
  color: #fca5a5;
}

/* Main Controls */
.controls-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.play-btn-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-play-large {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: none;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 44px;
  min-height: 44px;
}

.btn-play-large:hover, .btn-play-large:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.7);
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.retry-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fca5a5;
  margin-top: 4px;
}

.btn-ctrl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  min-width: 44px;
  min-height: 44px;
}

.btn-ctrl:hover, .btn-ctrl:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Volume Slider */
.volume-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
}

.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dc2626;
  cursor: pointer;
}

/* External Action Links Grid */
.action-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  width: 100%;
}

.action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 0.5rem 0.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  min-height: 44px;
  cursor: pointer;
}

.action-btn:hover, .action-btn:focus-visible {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.action-btn.wa-btn {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.action-btn.wa-btn:hover {
  background: #22c55e;
  color: #ffffff;
}

.action-btn.full-width-btn {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 8px;
  padding: 0.6rem 1rem;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  border: 1px solid #3b82f6;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 99999;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Animations */
.spin-animate {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@keyframes spinRing {
  100% { transform: rotate(360deg); }
}

@keyframes eqBar {
  0% { height: 4px; }
  100% { height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .ring-pulse, .eq-bars span, .live-badge .pulse-dot, .spin-animate {
    animation: none !important;
  }
}
