/* ============================================================
   PerúOndas — Estilos Principales
   Paleta: Negro profundo · Rojo peruano · Blanco roto
   Tipografía: Syne (display) + DM Sans (body)
   ============================================================ */

:root {
  --bg-base:       #08080e;
  --bg-surface:    #111119;
  --bg-card:       #161622;
  --bg-hover:      #1e1e2e;
  --bg-glass:      rgba(22, 22, 34, 0.85);

  --accent:        #e63c6a;
  --accent-light:  #ff6b92;
  --accent-dim:    rgba(230, 60, 106, 0.15);
  --accent-border: rgba(230, 60, 106, 0.35);

  --purple:        #7c5ce8;
  --purple-dim:    rgba(124, 92, 232, 0.15);

  --text-primary:  #f0eef8;
  --text-secondary:#a09db8;
  --text-muted:    #5a5870;

  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(255,255,255,0.14);

  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-xl:     24px;
  --radius-full:   999px;

  --nav-h:         62px;
  --bar-h:         72px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --transition:   0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: var(--bar-h);
}

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── UTILIDADES ───────────────────────────────────────────── */
.hidden { display: none !important; }
.spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ NAVBAR ═══════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  background: rgba(8,8,14,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-dot {
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.4); }
}

.nav-tabs {
  display: flex;
  gap: 2px;
  margin-left: 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-tab:hover  { color: var(--text-primary); background: var(--bg-hover); }
.nav-tab.active { color: var(--accent-light); background: var(--accent-dim); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--accent-border); }
.search-box i { font-size: 15px; color: var(--text-muted); }
.search-box input {
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  width: 210px;
}
.search-box input::placeholder { color: var(--text-muted); }

.btn-menu-mobile { display: none; }

/* ══ LAYOUT PRINCIPAL ═══════════════════════════════════════ */
.main-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 28px 0;
}

/* ══ HERO — PLAYER + TRENDING ═══════════════════════════════ */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin-bottom: 36px;
}

/* ── NOW PLAYING CARD ──────────────────────────────────────── */
.now-playing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.now-playing-card::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(230,60,106,0.1) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.np-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}
.live-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 1s infinite;
}

.np-body {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.np-cover {
  width: 82px; height: 82px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1c1230, #12203a);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
  transition: transform var(--transition-slow);
}
.now-playing-card.playing .np-cover {
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

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

.np-station {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-song {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.tag.genre {
  background: var(--purple-dim);
  color: #b09eff;
}

/* ── WAVEFORM ──────────────────────────────────────────────── */
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 40px;
  margin-bottom: 18px;
}
.wave-bar {
  width: 3px;
  background: var(--accent-dim);
  border-radius: 2px;
  height: 4px;
  transition: background var(--transition);
}
.playing .wave-bar {
  background: rgba(230,60,106,0.5);
  animation: wave var(--spd, 0.8s) ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}
@keyframes wave {
  0%,100% { height: 4px; }
  50%      { height: var(--h, 20px); }
}

/* ── PLAYER CONTROLS ──────────────────────────────────────── */
.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-ctrl {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-ctrl:hover   { color: var(--text-primary); background: var(--bg-hover); }
.btn-ctrl.sm      { width: 32px; height: 32px; font-size: 16px; }

.btn-play {
  width: 50px; height: 50px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}
.btn-play::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: ring-out 2s ease-out infinite;
}
@keyframes ring-out {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}
.btn-play:hover { background: var(--accent-light); transform: scale(1.06); }
.btn-play.sm    { width: 42px; height: 42px; font-size: 17px; }

.vol-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  margin-left: 4px;
}
.vol-group i { font-size: 16px; color: var(--text-muted); }

input[type="range"] {
  -webkit-appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--bg-hover);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

/* ── TRENDING PANEL ───────────────────────────────────────── */
.trending-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.trend-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.trend-item:hover            { background: var(--bg-hover); }
.trend-item.active-station   { background: var(--accent-dim); }

.trend-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.trend-cover {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.trend-info    { flex: 1; min-width: 0; }
.trend-name    { font-size: 12px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trend-meta    { font-size: 11px; color: var(--text-muted); }
.trend-count   { font-size: 11px; color: var(--accent-light); font-weight: 600; flex-shrink: 0; }

/* ── SKELETON ─────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-card) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
  height: 58px;
  margin-bottom: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ══ FILTROS ════════════════════════════════════════════════ */
.filter-bar {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.cat-pill i { font-size: 14px; }
.cat-pill:hover { border-color: var(--border-hover); color: var(--text-primary); }
.cat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.region-bar {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 22px;
  scrollbar-width: none;
}
.region-bar::-webkit-scrollbar { display: none; }

.region-chip {
  flex-shrink: 0;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.region-chip:hover { background: var(--bg-hover); color: var(--text-primary); }
.region-chip.active {
  background: var(--purple-dim);
  border-color: rgba(124,92,232,0.4);
  color: #b09eff;
}

/* ── SECTION HEADER ───────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.section-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ══ STATIONS GRID ═══════════════════════════════════════════ */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 13px;
  margin-bottom: 28px;
}

.station-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.station-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.station-card.playing {
  border-color: var(--accent-border);
  background: rgba(230,60,106,0.06);
}
.station-card.playing::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-border);
  pointer-events: none;
}

.live-badge {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  text-transform: uppercase;
}

.sc-logo {
  width: 54px; height: 54px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.sc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-listeners {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.sc-listeners i { font-size: 12px; }

.sc-play-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-light);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.sc-play-btn:hover,
.station-card.playing .sc-play-btn {
  background: var(--accent);
  color: #fff;
}

/* ══ PODCASTS GRID ═══════════════════════════════════════════ */
.podcasts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.pod-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition-slow);
}
.pod-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.pod-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 12px;
}
.pod-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.pod-meta { font-size: 11px; color: var(--text-muted); }

/* ══ MUSIC LIST ═══════════════════════════════════════════════ */
.music-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 28px; }

.music-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.music-item:hover { background: var(--bg-hover); }
.mi-num { font-size: 13px; color: var(--text-muted); width: 22px; text-align: center; flex-shrink: 0; }
.mi-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.mi-info { flex: 1; min-width: 0; }
.mi-title  { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi-artist { font-size: 11px; color: var(--text-muted); }
.mi-heart  { font-size: 15px; color: var(--text-muted); cursor: pointer; transition: color var(--transition); padding: 4px; }
.mi-heart:hover, .mi-heart.active { color: var(--accent); }
.mi-dur    { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ══ PAGINATION ══════════════════════════════════════════════ */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 36px;
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover  { background: var(--bg-hover); color: var(--text-primary); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ══ EMPTY / LOADING STATE ════════════════════════════════════ */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1 / -1;
}
.loading-state i, .empty-state i { font-size: 36px; }
.empty-state small { font-size: 12px; color: var(--text-muted); opacity: 0.7; }

/* ══ PLAYER BAR ══════════════════════════════════════════════ */
.player-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: rgba(10,10,18,0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.pb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.pb-cover {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.pb-info { min-width: 0; }
.pb-name  { display: block; font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-track { display: block; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-heart { background: none; border: none; color: var(--text-muted); font-size: 17px; cursor: pointer; transition: color var(--transition); margin-left: 8px; }
.pb-heart:hover, .pb-heart.active { color: var(--accent); }

.pb-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.pb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}
.pb-right i { font-size: 16px; color: var(--text-muted); }
.pb-right input { width: 90px; }

/* ══ TOAST ═══════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: calc(var(--bar-h) + 16px);
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  font-size: 13px;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  animation: slide-in 0.25s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: var(--accent-border); }

/* ══ CONTENT SECTION ════════════════════════════════════════ */
.content-section { margin-bottom: 8px; }

/* ══ RESPONSIVE ═════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }
  .trending-panel { display: none; }
}

@media (max-width: 680px) {
  .navbar { padding: 0 16px; }
  .nav-tabs .nav-tab span { display: none; }
  .search-box { display: none; }
  .btn-menu-mobile { display: flex; }
  .main-layout { padding: 16px 14px 0; }
  .now-playing-card { padding: 18px; }
  .np-station { font-size: 17px; }
  .stations-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
  .pb-right input { width: 70px; }
  .pb-right .btn-ctrl:last-child { display: none; }
}
