/* ═══════════════════════════════════════════════════
   Radio Streaming Player — Frontend Styles
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── Variables / Reset ── */
.rsp-player {
  --rsp-primary: #ff4d4d;
  --rsp-bg: #1a1a2e;
  --rsp-accent: #e94560;
  --rsp-text: #ffffff;
  --rsp-text-muted: rgba(255,255,255,0.5);
  --rsp-radius: 24px;
  font-family: 'Outfit', -apple-system, sans-serif;
  box-sizing: border-box;
}
.rsp-player *, .rsp-player *::before, .rsp-player *::after { box-sizing: border-box; }

/* ══════════════════════════════════════
   FULL PLAYER
══════════════════════════════════════ */
.rsp-player.rsp-full {
  position: relative;
  border-radius: var(--rsp-radius);
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto 24px;
  background: var(--rsp-bg);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ── Theme: Dark ── */
.rsp-player.rsp-full.theme-dark {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
}

/* ── Theme: Light ── */
.rsp-player.rsp-full.theme-light {
  background: linear-gradient(160deg, #f8f9ff 0%, #e8ecf8 100%);
  --rsp-text: #1a1a2e;
  --rsp-text-muted: rgba(0,0,0,0.45);
  box-shadow: 0 24px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.07);
}

/* ── Theme: Glass ── */
.rsp-player.rsp-full.theme-glass {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}

/* ── Theme: Neon ── */
.rsp-player.rsp-full.theme-neon {
  background: #050510;
  border: 1px solid var(--rsp-primary);
  box-shadow:
    0 0 0 1px var(--rsp-primary),
    0 0 30px rgba(255,77,77,0.25),
    0 32px 80px rgba(0,0,0,0.6);
}
.rsp-player.rsp-full.theme-neon .rsp-live-badge { box-shadow: 0 0 12px var(--rsp-accent); }
.rsp-player.rsp-full.theme-neon .rsp-name { text-shadow: 0 0 20px var(--rsp-primary); }

/* ── Visualizer ── */
.rsp-visualizer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0 16px;
  opacity: 0.15;
  pointer-events: none;
}

.rsp-bar {
  flex: 1;
  background: var(--rsp-primary);
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
  animation: rsp-idle-bounce 1.8s ease-in-out infinite alternate;
}

@keyframes rsp-idle-bounce {
  0%   { transform: scaleY(0.2); opacity: 0.5; }
  100% { transform: scaleY(1);   opacity: 1;   }
}

.rsp-player.playing .rsp-visualizer {
  opacity: 0.35;
}
.rsp-player.playing .rsp-bar {
  animation: rsp-play-wave 0.5s ease-in-out infinite alternate;
}

@keyframes rsp-play-wave {
  0%   { transform: scaleY(0.15); }
  100% { transform: scaleY(1);    }
}

/* ── Content ── */
.rsp-content {
  position: relative;
  z-index: 2;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Identity ── */
.rsp-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rsp-logo {
  width: 72px; height: 72px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.1);
}
.rsp-logo img { width: 100%; height: 100%; object-fit: cover; }

.rsp-logo-placeholder {
  width: 72px; height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--rsp-accent), var(--rsp-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

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

.rsp-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rsp-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.rsp-live-badge span {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: rsp-pulse 1.2s ease infinite;
}
@keyframes rsp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.rsp-name {
  color: var(--rsp-text);
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsp-slogan {
  color: var(--rsp-text-muted);
  font-size: 13px;
  font-weight: 400;
  margin: 0;
  line-height: 1.5;
}

/* ── Controls ── */
.rsp-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.rsp-play-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rsp-accent), var(--rsp-primary));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 0 var(--rsp-accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.rsp-play-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.2s;
}
.rsp-play-btn:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 4px rgba(233,69,96,0.25); }
.rsp-play-btn:hover::before { opacity: 1; }
.rsp-play-btn:active { transform: scale(0.97); }
.rsp-play-btn svg { width: 26px; height: 26px; }

.rsp-player.loading .icon-play  { display: none !important; }
.rsp-player.loading .icon-pause { display: none !important; }
.rsp-player.loading .icon-load  { display: block !important; }
.rsp-player.playing .icon-play  { display: none !important; }
.rsp-player.playing .icon-pause { display: block !important; }
.rsp-player.playing .icon-load  { display: none !important; }

/* ── Volume ── */
.rsp-volume-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.rsp-mute-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  width: 38px; height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rsp-text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
}
.rsp-mute-btn:hover { background: rgba(255,255,255,0.12); color: var(--rsp-text); }
.rsp-mute-btn svg { width: 18px; height: 18px; }

.rsp-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  outline: none;
  cursor: pointer;
}
.rsp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--rsp-primary);
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.15s;
}
.rsp-volume::-webkit-slider-thumb:hover { transform: scale(1.25); }
.rsp-volume::-moz-range-thumb {
  width: 16px; height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--rsp-primary);
  cursor: pointer;
}

/* ── Social ── */
.rsp-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rsp-social-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255,255,255,0.1);
}
.rsp-social-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.rsp-social-btn svg { width: 18px; height: 18px; }

.rsp-social-btn.fb  { background: #1877f2; color: #fff; }
.rsp-social-btn.ig  { background: linear-gradient(45deg,#fd5949,#d6249f,#285aeb); color: #fff; }
.rsp-social-btn.tw  { background: #000; color: #fff; }
.rsp-social-btn.wa  { background: #25d366; color: #fff; }

/* ── Light theme overrides ── */
.theme-light .rsp-mute-btn {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.5);
}
.theme-light .rsp-mute-btn:hover { background: rgba(0,0,0,0.1); color: rgba(0,0,0,0.8); }
.theme-light .rsp-volume {
  background: rgba(0,0,0,0.1);
}
.theme-light .rsp-social-btn {
  border-color: rgba(0,0,0,0.08);
}

/* ══════════════════════════════════════
   MINI PLAYER
══════════════════════════════════════ */
.rsp-player.rsp-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--rsp-bg);
  border-radius: 16px;
  padding: 14px 18px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
}

.rsp-mini.theme-dark { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.rsp-mini.theme-light { background: linear-gradient(135deg, #f0f2fc, #e4e8f8); --rsp-text: #1a1a2e; --rsp-text-muted: rgba(0,0,0,0.4); }
.rsp-mini.theme-glass { background: rgba(255,255,255,0.08); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.14); }
.rsp-mini.theme-neon { background: #050510; border: 1px solid var(--rsp-primary); box-shadow: 0 0 20px rgba(255,77,77,0.2), 0 8px 32px rgba(0,0,0,0.5); }

.rsp-mini .rsp-mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  flex-shrink: 0;
}
.rsp-mini .rsp-bar {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  animation: rsp-idle-bounce 1.5s ease-in-out infinite alternate;
}
.rsp-mini.playing .rsp-bar { animation: rsp-play-wave 0.45s ease-in-out infinite alternate; }

.rsp-mini-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.rsp-live-dot {
  width: 8px; height: 8px;
  background: #2ed573;
  border-radius: 50%;
  flex-shrink: 0;
  animation: rsp-pulse 1.2s ease infinite;
}
.rsp-mini-info strong {
  color: var(--rsp-text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rsp-mini .rsp-play-btn {
  width: 42px; height: 42px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.rsp-mini .rsp-play-btn svg { width: 18px; height: 18px; }

.rsp-mini .rsp-volume {
  width: 70px;
}

/* ══════════════════════════════════════
   FLOATING PLAYER
══════════════════════════════════════ */
.rsp-player.rsp-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  animation: rsp-float-in 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes rsp-float-in {
  from { transform: translateY(80px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.rsp-floating-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--rsp-bg);
  border-radius: 20px;
}
.rsp-floating.theme-dark .rsp-floating-inner { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.rsp-floating.theme-neon .rsp-floating-inner { background: #050510; border: 1px solid var(--rsp-primary); box-shadow: 0 0 24px rgba(255,77,77,0.25); }
.rsp-floating.theme-glass .rsp-floating-inner { background: rgba(15,15,30,0.85); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.12); }

.rsp-float-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.rsp-floating .rsp-mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}
.rsp-floating .rsp-bar {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  animation: rsp-idle-bounce 1.5s ease-in-out infinite alternate;
}
.rsp-floating.playing .rsp-bar { animation: rsp-play-wave 0.45s ease-in-out infinite alternate; }

.rsp-floating .rsp-play-btn {
  width: 40px; height: 40px;
}
.rsp-floating .rsp-play-btn svg { width: 17px; height: 17px; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 480px) {
  .rsp-player.rsp-full .rsp-content { padding: 22px 20px; }
  .rsp-player.rsp-full .rsp-name { font-size: 18px; }
  .rsp-logo, .rsp-logo-placeholder { width: 56px; height: 56px; }
  .rsp-play-btn { width: 54px; height: 54px; }
  .rsp-player.rsp-floating { bottom: 16px; right: 16px; }
}
