:root {
  --bg: #0b1622;
  --bg-2: #102233;
  --card: #14293d;
  --card-hover: #1a3450;
  --line: #24425f;
  --text: #eef4fa;
  --muted: #9db3c8;
  --accent: #ff6b3d;
  --accent-2: #ffb23d;
  --live: #2ee88a;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 96px; /* espacio para el reproductor fijo */
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- Encabezado ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 22, 34, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  overflow: hidden; flex: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.nav { display: flex; gap: 20px; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }

/* ---------- Portada ---------- */
.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(255,107,61,.22), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(46,232,138,.10), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--live); background: rgba(46,232,138,.1); padding: 6px 12px; border-radius: 99px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(46,232,138,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(46,232,138,0); } 100% { box-shadow: 0 0 0 0 rgba(46,232,138,0); } }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; margin: 16px 0 12px; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 52ch; margin: 0 0 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; cursor: pointer; font: inherit; font-weight: 700;
  padding: 14px 22px; border-radius: 99px; text-decoration: none;
  background: var(--accent); color: #fff;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); background: #ff7e55; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--card); }
.btn svg { width: 18px; height: 18px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.featured {
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: 24px; padding: 28px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.featured .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.featured .row { display: flex; align-items: center; gap: 16px; margin: 14px 0 20px; }
.featured h2 { margin: 0; font-size: 1.5rem; }
.featured .meta { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 48px; margin-bottom: 20px; }
.bars i { flex: 1; background: linear-gradient(var(--accent-2), var(--accent)); border-radius: 3px; height: 20%; opacity: .35; }
.playing .bars i { opacity: 1; animation: eq 1s ease-in-out infinite alternate; }
.bars i:nth-child(3n) { animation-delay: -.3s; } .bars i:nth-child(4n) { animation-delay: -.6s; } .bars i:nth-child(5n) { animation-delay: -.15s; }
@keyframes eq { 0% { height: 15%; } 50% { height: 90%; } 100% { height: 40%; } }

/* ---------- Logo / avatar ---------- */
.avatar {
  flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
  background: linear-gradient(135deg, #234a6e, #1a3450); color: var(--accent-2);
  border: 1px solid var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 48px; height: 48px; font-size: 1rem; border-radius: 12px; }

/* ---------- Emisoras ---------- */
section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 1.8rem; letter-spacing: -.01em; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters input, .filters select {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 0;
}
.filters input { width: 220px; }
.filters input:focus, .filters select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.station {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
  transition: background .15s, border-color .15s, transform .15s;
}
.station:hover { background: var(--card-hover); transform: translateY(-2px); }
.station.active { border-color: var(--accent); }
.station .head { display: flex; gap: 12px; align-items: center; }
.station h3 { margin: 0; font-size: 1.05rem; line-height: 1.25; }
.station .freq { color: var(--accent-2); font-weight: 700; font-size: .9rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .78rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; }
.tag.live-tag { color: var(--live); border-color: rgba(46,232,138,.35); background: rgba(46,232,138,.08); }
.station .actions { display: flex; gap: 8px; margin-top: auto; align-items: center; }
.play-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 10px; padding: 10px;
  background: var(--accent); color: #fff;
}
.play-btn[disabled] { background: var(--bg-2); color: var(--muted); cursor: not-allowed; border: 1px dashed var(--line); }
.play-btn svg { width: 16px; height: 16px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); text-decoration: none;
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.empty { color: var(--muted); text-align: center; padding: 40px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Info ---------- */
.info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.info .box { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info h3 { margin: 0 0 6px; font-size: 1.05rem; }
.info p { margin: 0; color: var(--muted); }

.contact { text-align: center; background: linear-gradient(135deg, rgba(255,107,61,.15), rgba(255,178,61,.08)); border: 1px solid var(--line); border-radius: 24px; padding: 40px 24px; }
.contact h2 { margin: 0 0 8px; }
.contact p { color: var(--muted); margin: 0 0 20px; }

footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Reproductor fijo ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(16, 34, 51, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(100%); transition: transform .25s;
}
.player.show { transform: none; }
.player .wrap { display: flex; align-items: center; gap: 14px; height: 80px; }
.player .now { flex: 1; min-width: 0; }
.player .now strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .now span { color: var(--muted); font-size: .85rem; }
.player .status { color: var(--live); font-weight: 700; }
.player .status.err { color: var(--accent); }
.big-play {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--accent); color: #fff; display: grid; place-items: center;
}
.big-play svg { width: 22px; height: 22px; }
.vol { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.vol input { width: 110px; accent-color: var(--accent); }
.vol svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .info { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .filters, .filters input, .filters select { width: 100%; }
  .vol { display: none; }
  .hero { padding-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
