/* =========================================================================
   Radio del Mundo — estilos de la sección (usa las variables de marca
   definidas en ../styles.css :root)
   ========================================================================= */

/* ---------- Hero ---------- */
.rd-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 60%, #0c1a44 100%);
  color: #fff;
  padding: 104px 0 40px;
  text-align: center;
}
.rd-hero-inner { max-width: 760px; }
.rd-eyebrow {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .04em;
  margin-bottom: 6px;
  font-size: .95rem;
}
.rd-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-bottom: 14px;
}
.rd-lead {
  color: #d6e2ff;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 26px;
}
.rd-lead em { font-style: normal; color: #fff; font-weight: 600; }

.rd-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.rd-search { position: relative; flex: 1 1 320px; max-width: 420px; }
.rd-search-ico {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: rgba(255, 255, 255, .6);
}
#search {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-family: inherit;
  font-size: .98rem;
  outline: none;
  transition: border-color .15s, background .15s;
}
#search::placeholder { color: rgba(255, 255, 255, .6); }
#search:focus { border-color: var(--accent); background: rgba(255, 255, 255, .18); }

/* Desplegable de sugerencias del buscador */
.rd-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  z-index: 30;
  list-style: none; margin: 0; padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(9, 20, 48, .35);
  max-height: 320px; overflow-y: auto;
  text-align: left;
}
.rd-suggest[hidden] { display: none; }
.rd-suggest li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink); font-size: .95rem; font-weight: 500;
  cursor: pointer;
}
.rd-suggest li:hover, .rd-suggest li.active { background: var(--bg-alt); color: var(--brand); }
.rd-flag { font-size: 1.25rem; line-height: 1; }
.rd-suggest-lang { margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--ink-soft); }

.rd-lang {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
}
.rd-lang-btn {
  border: 0; background: transparent;
  color: #d6e2ff; font-family: inherit; font-weight: 600; font-size: .88rem;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s;
}
.rd-lang-btn:hover { color: #fff; }
.rd-lang-btn.is-active { background: var(--accent); color: #06122b; }

/* ---------- Escenario del globo ---------- */
.rd-stage-wrap { padding: 28px 24px 60px; }
.rd-stage {
  position: relative;
  height: min(84vh, 840px);
  min-height: 540px;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #14224e 0%, #0d1430 45%, #070b18 100%);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(46, 163, 242, .18);
}
.rd-globe { width: 100%; height: 100%; }

.rd-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: .86rem;
  margin-top: 16px;
}

/* Leyenda de colores */
.rd-legend {
  position: absolute; top: 16px; left: 16px; z-index: 6;
  display: flex; gap: 14px; flex-wrap: wrap;
  background: rgba(9, 14, 33, .68);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 9px 14px; border-radius: 12px;
  font-size: .82rem; color: #dfe7ff;
}
.rd-legend span { display: flex; align-items: center; gap: 6px; }
.rd-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }

.rd-hint {
  position: absolute;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 6;
  display: flex; align-items: center; gap: 10px;
  background: rgba(9, 14, 33, .72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 10px 18px; border-radius: 999px;
  font-size: .88rem; color: #dfe7ff;
  transition: opacity .4s;
  white-space: nowrap;
}
.rd-hint-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  animation: rd-pulse 1.8s infinite;
}
@keyframes rd-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 163, 242, .6); }
  70% { box-shadow: 0 0 0 12px rgba(46, 163, 242, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 163, 242, 0); }
}

.rd-loader {
  position: absolute; inset: 0; z-index: 8;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: #070b18; color: #cdd8f5;
  transition: opacity .5s;
}
.rd-loader.hide { opacity: 0; pointer-events: none; }
.rd-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255, 255, 255, .15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: rd-spin .9s linear infinite;
}
@keyframes rd-spin { to { transform: rotate(360deg); } }

/* ---------- Panel de emisoras (dentro del escenario) ---------- */
.rd-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(370px, 90%);
  z-index: 7;
  background: rgba(11, 17, 40, .96);
  backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.rd-panel.open { transform: translateX(0); }
.rd-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
}
.rd-panel-head h2 { font-family: "Fredoka", sans-serif; font-size: 1.35rem; }
.rd-panel-head p { font-size: .83rem; color: var(--accent); margin-top: 2px; }
.rd-panel-close {
  border: 0; background: rgba(255, 255, 255, .08); color: #fff;
  font-size: 1.5rem; line-height: 1; width: 34px; height: 34px; border-radius: 10px;
  cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.rd-panel-close:hover { background: rgba(255, 255, 255, .18); }
.rd-panel-body {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.rd-station {
  display: flex; align-items: center; gap: 12px;
  padding: 11px; border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rd-station:hover { background: rgba(46, 163, 242, .12); border-color: rgba(46, 163, 242, .4); }
.rd-station.playing { background: rgba(46, 163, 242, .18); border-color: var(--accent); }
.rd-station-play {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent); color: #06122b; border-radius: 50%;
}
.rd-station.playing .rd-station-play { background: #fff; }
.rd-station-info { min-width: 0; flex: 1; color: #eaf0ff; }
.rd-station-name {
  font-weight: 600; font-size: .93rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-station-tags {
  font-size: .77rem; color: #9fb0d8; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rd-panel-msg { text-align: center; color: #9fb0d8; padding: 36px 18px; font-size: .9rem; line-height: 1.5; }
.rd-panel-msg .rd-spinner { margin: 0 auto 14px; }

/* ---------- Reproductor fijo ---------- */
.rd-player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(9, 14, 33, .95);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(46, 163, 242, .25);
  transform: translateY(100%);
  transition: transform .3s;
}
.rd-player.show { transform: translateY(0); }
.rd-player-inner { display: flex; align-items: center; gap: 16px; padding: 12px 24px; }
.rd-player-play {
  width: 48px; height: 48px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent); color: #06122b; border: 0; border-radius: 50%;
  cursor: pointer; transition: transform .12s;
}
.rd-player-play:hover { transform: scale(1.06); }
.rd-player-info { min-width: 0; flex: 1; display: flex; flex-direction: column; color: #fff; }
.rd-player-info strong { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-player-info span { font-size: .8rem; color: #9fb0d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-player-vol { display: flex; align-items: center; gap: 8px; color: #9fb0d8; }
.rd-player-vol input { width: 90px; accent-color: var(--accent); cursor: pointer; }
.rd-player-stop {
  border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #dfe7ff;
  font-family: inherit; font-weight: 600; font-size: .85rem;
  padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: background .15s;
}
.rd-player-stop:hover { background: rgba(255, 255, 255, .1); }
.rd-player-play.is-loading svg { display: none; }
.rd-player-play.is-loading::after {
  content: ""; width: 20px; height: 20px;
  border: 2px solid rgba(6, 18, 43, .3); border-top-color: #06122b;
  border-radius: 50%; animation: rd-spin .8s linear infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .rd-hero { padding: 92px 0 30px; }
  .rd-controls { flex-direction: column; }
  .rd-search { flex-basis: auto; width: 100%; }
  .rd-lang { width: 100%; justify-content: center; }
  .rd-stage-wrap { padding: 20px 14px 48px; }
  .rd-stage { height: 68vh; min-height: 440px; border-radius: 18px; }
  .rd-legend { top: 10px; left: 10px; gap: 8px; padding: 7px 10px; font-size: .74rem; }
  .rd-hint { font-size: .8rem; bottom: 14px; padding: 8px 14px; white-space: normal; text-align: center; width: 82%; justify-content: center; }
  .rd-panel { width: 100%; }
  .rd-player-inner { gap: 10px; padding: 10px 14px; }
  .rd-player-vol { display: none; }
  .rd-player-stop { padding: 8px 12px; }
}

/* =========================================================================
   Acentos destacados
   ========================================================================= */
.rd-accents-wrap { margin-top: 22px; text-align: center; }
.rd-accents-label {
  display: block; font-size: .82rem; font-weight: 600;
  color: rgba(255, 255, 255, .7); letter-spacing: .03em; margin-bottom: 10px;
}
.rd-accents {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.rd-accent {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; font-family: inherit; font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: background .15s, border-color .15s, transform .12s;
}
.rd-accent:hover { background: var(--accent); color: #06122b; border-color: var(--accent); transform: translateY(-2px); }
.rd-accent-flag { font-size: 1.1rem; }

/* Botón que abre el juego */
.rd-game-trigger {
  margin: 22px auto 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  background: #fff; color: var(--brand);
  border: 0; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1rem;
  cursor: pointer; box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  transition: transform .12s, box-shadow .15s;
}
.rd-game-trigger:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }

/* =========================================================================
   CTA cursos
   ========================================================================= */
.rd-cta { background: var(--bg-alt); padding: 56px 24px; text-align: center; }
.rd-cta-inner { max-width: 640px; }
.rd-cta h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--brand); margin-bottom: 10px; }
.rd-cta p { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.6; margin-bottom: 24px; }
.rd-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========================================================================
   Modo juego (overlay)
   ========================================================================= */
.rd-game {
  position: fixed; inset: 0; z-index: 80;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(7, 11, 24, .82); backdrop-filter: blur(6px);
}
.rd-game.open { display: flex; }
.rd-game-card {
  position: relative;
  width: min(520px, 100%);
  background: linear-gradient(160deg, #16265c 0%, #0d1430 100%);
  border: 1px solid rgba(46, 163, 242, .3);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  padding: 32px 28px 26px; color: #fff; text-align: center;
}
.rd-game-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 10px; border: 0;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; transition: background .15s;
}
.rd-game-close:hover { background: rgba(255, 255, 255, .2); }
.rd-game-eyebrow { color: var(--accent); font-weight: 600; font-size: .9rem; }
.rd-game-card h2 { font-family: "Fredoka", sans-serif; font-size: 1.7rem; margin: 4px 0 6px; }
.rd-game-help { color: #b9c6ea; font-size: .92rem; margin-bottom: 20px; }

.rd-game-player {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px; padding: 14px; margin-bottom: 20px;
}
.rd-game-play {
  width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--accent); color: #06122b; border: 0; border-radius: 50%; cursor: pointer;
  transition: transform .12s;
}
.rd-game-play:hover { transform: scale(1.06); }
.rd-game-player span { color: #dfe7ff; font-size: .95rem; }

.rd-game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rd-game-opt {
  padding: 14px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-family: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rd-game-opt:hover:not(:disabled) { background: rgba(46, 163, 242, .18); border-color: var(--accent); }
.rd-game-opt:disabled { cursor: default; opacity: .85; }
.rd-game-opt.correct { background: #1f8a4c; border-color: #2fce74; opacity: 1; }
.rd-game-opt.wrong { background: #a5343a; border-color: #e05b62; opacity: 1; }

.rd-game-reveal { margin-top: 18px; font-size: 1rem; color: #eaf0ff; }
.rd-game-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 22px; flex-wrap: wrap;
}
.rd-game-score { color: #b9c6ea; font-size: .95rem; }
.rd-game-score strong { color: #fff; font-size: 1.05rem; }

/* ---------- Responsive de lo nuevo ---------- */
@media (max-width: 720px) {
  .rd-accent { font-size: .82rem; padding: 7px 12px; }
  .rd-game-trigger { font-size: .92rem; padding: 11px 18px; }
  .rd-game-card { padding: 28px 18px 22px; }
  .rd-game-card h2 { font-size: 1.4rem; }
  .rd-cta { padding: 44px 18px; }
}

/* =========================================================================
   Layout de dos columnas: controles (izquierda) + globo (derecha)
   ========================================================================= */
.rd-app {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 24px 32px;
  height: calc(100vh - 74px);
  min-height: 560px;
}
.rd-side {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 65%, #0c1a44 100%);
  color: #fff;
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.rd-side-head .rd-eyebrow { margin-bottom: 4px; }
.rd-side-head h1 { font-size: 1.7rem; line-height: 1.1; margin: 0 0 8px; }
.rd-side-head .rd-lead { font-size: .9rem; color: #cdd8f5; margin: 0; max-width: none; }
.rd-side .rd-search { width: 100%; max-width: none; flex: none; }
.rd-side .rd-lang { width: 100%; justify-content: center; }
.rd-side .rd-accents-wrap { margin-top: 0; text-align: left; }
.rd-side .rd-accents { justify-content: flex-start; }
.rd-side .rd-game-trigger { margin: 0; width: 100%; justify-content: center; }
.rd-side .rd-note { color: rgba(255, 255, 255, .55); text-align: left; margin: auto 0 0; padding-top: 4px; }
.rd-app .rd-stage { height: 100%; min-height: 0; }

@media (max-width: 980px) {
  .rd-app {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    padding: 16px 16px 28px;
    gap: 16px;
  }
  .rd-side { overflow: visible; gap: 14px; }
  .rd-app .rd-stage { height: 66vh; min-height: 420px; }
}
