/* FreeMedia — prototipo. Material 3 en panel/registro; home pública más llamativa. */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --primary: #3F51B5; --on-primary: #fff; --primary-c: #DEE0FF; --on-primary-c: #00105C; --sec-c: #E2E1EC;
  --surface: #FBF8FF; --surface-2: #EFEDF4; --card: #FFFFFF;
  --on-surface: #1B1B21; --on-surface-v: #46464F; --outline: #767680; --outline-v: #C6C5D0;
  --error: #BA1A1A; --error-c: #FFDAD6; --ok: #1B6C3A; --ok-c: #C9F0D2; --warn-c: #FFE08A;
  --shadow-1: 0 1px 2px rgba(0,0,0,.18), 0 1px 3px 1px rgba(0,0,0,.08);
  --shadow-2: 0 2px 6px 2px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.2);
  --rc: var(--primary); /* color de la radio */
}
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: Roboto, "Segoe UI", system-ui, sans-serif; font-size: 14px; color: var(--on-surface); background: var(--surface); -webkit-font-smoothing: antialiased; padding-bottom: 88px; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1 { font-size: 28px; line-height: 36px; font-weight: 400; margin: 0; }
h2 { font-size: 20px; line-height: 28px; font-weight: 500; margin: 0 0 4px; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 4px; }
p { margin: 0 0 8px; }
.muted { color: var(--on-surface-v); }
.small { font-size: 12px; }
.ms { font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; display: inline-block; white-space: nowrap; direction: ltr; font-feature-settings: "liga"; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; width: 1em; overflow: hidden; flex: none; vertical-align: middle; }
.ms.fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* Barra */
.bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 16px; background: var(--surface-2); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 500; color: var(--on-surface); }
.brand .ms { color: var(--primary); font-size: 28px; }
.nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.nav a { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; color: var(--on-surface-v); font-weight: 500; }
.nav a:hover { background: rgba(0,0,0,.05); }
.nav a.on { background: var(--sec-c); color: var(--on-surface); }
.bar .spacer { flex: 1; }
@media (max-width: 760px) { .bar { gap: 8px; padding: 0 8px; } .brand span:last-child, .nav .t { display: none; } .nav { justify-content: flex-start; } .nav a { padding: 0 12px; } }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 32px; }
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-1); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.radios { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.section { margin-top: 32px; }
.section > h2 { margin-bottom: 12px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 24px; border-radius: 20px; border: 0; font-weight: 500; white-space: nowrap; text-decoration: none; transition: box-shadow .2s, background-color .2s; }
.btn .ms { font-size: 18px; margin-left: -6px; }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.filled:hover { box-shadow: var(--shadow-1); }
.btn.tonal { background: var(--sec-c); color: var(--on-surface); }
.btn.outlined { background: transparent; border: 1px solid var(--outline); color: var(--primary); }
.btn.text { background: transparent; color: var(--primary); padding: 0 12px; }
.btn:hover.tonal, .btn:hover.outlined, .btn:hover.text { background-color: rgba(63,81,181,.1); }
.btn.big { height: 52px; padding: 0 32px; border-radius: 26px; font-size: 16px; }
.btn.rc { background: var(--rc); color: #fff; }
.btn.lightbtn { background: #fff; color: var(--primary); }

/* Campos */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.field label { font-size: 12px; font-weight: 500; color: var(--on-surface-v); }
.field input, .field select, .field textarea { height: 48px; padding: 0 14px; border: 1px solid var(--outline); border-radius: 8px; background: #fff; outline: none; }
.field textarea { height: 96px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.field .help { font-size: 12px; color: var(--on-surface-v); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 500; background: var(--sec-c); }
.chip.ok { background: var(--ok-c); color: var(--ok); }
.chip.warn { background: var(--warn-c); color: #5F4A00; }
.chip.live { background: var(--error-c); color: var(--error); }
.chip .ms { font-size: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters .chip { height: 34px; border: 1px solid var(--outline-v); background: transparent; border-radius: 8px; cursor: pointer; }
.filters .chip.on { background: var(--sec-c); border-color: transparent; }

/* HERO público (más llamativo) */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #1A237E 0%, #3F51B5 55%, #7C4DFF 100%); }
.hero .in { max-width: 1120px; margin: 0 auto; padding: 64px 16px 72px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 52px; font-weight: 500; letter-spacing: -.5px; }
.hero p.lead { font-size: 18px; line-height: 28px; opacity: .92; margin: 16px 0 28px; max-width: 520px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.outlined { color: #fff; border-color: rgba(255,255,255,.7); }
.hero .art { display: flex; justify-content: center; }
.hero .disc { width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), rgba(255,255,255,.08)); display: grid; place-items: center; box-shadow: 0 0 0 24px rgba(255,255,255,.07), 0 0 0 56px rgba(255,255,255,.05); }
.hero .disc .ms { font-size: 110px; }
@media (max-width: 760px) { .hero .in { grid-template-columns: 1fr; padding: 40px 16px 48px; } .hero h1 { font-size: 34px; line-height: 40px; } .hero .art { display: none; } }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step .num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-c); color: var(--on-primary-c); display: grid; place-items: center; font-weight: 500; margin-bottom: 12px; }
.step .ms.big { font-size: 36px; color: var(--primary); margin-bottom: 8px; }

/* Tarjeta de radio en el directorio */
.rcard { position: relative; overflow: hidden; padding: 0; transition: transform .15s, box-shadow .15s; }
.rcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.rcard .top { height: 96px; display: flex; align-items: flex-end; padding: 12px 16px; color: #fff; background: linear-gradient(135deg, var(--rc), color-mix(in srgb, var(--rc) 55%, #000)); }
.rcard .logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; color: var(--rc); display: grid; place-items: center; font-size: 28px; font-weight: 700; margin: -32px 0 0 16px; position: relative; box-shadow: var(--shadow-1); }
.rcard .body { padding: 8px 16px 16px; }
.rcard .now { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--on-surface-v); }
.rcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.rcard .rank { position: absolute; top: 10px; left: 12px; background: rgba(0,0,0,.35); color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.playfab { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--rc); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-1); }
.playfab .ms { font-size: 26px; }

/* AdSense simulado */
.ad { display: grid; place-items: center; min-height: 90px; border: 1px dashed var(--outline-v); border-radius: 12px; background: repeating-linear-gradient(45deg, #fff, #fff 10px, #F5F2FA 10px, #F5F2FA 20px); color: var(--on-surface-v); font-size: 12px; text-align: center; margin: 24px 0; }
.ad.rect { min-height: 250px; margin: 0; }

/* Estado vacío */
.empty { text-align: center; padding: 40px 16px; }
.empty .ms { font-size: 64px; color: var(--outline); }

/* Reproductor fijo */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.15); display: flex; align-items: center; gap: 16px; padding: 10px 16px; min-height: 72px; transform: translateY(0); }
.player[hidden] { display: none !important; }
.player .logo { width: 48px; height: 48px; border-radius: 12px; background: var(--rc); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.player .info { flex: 1; min-width: 0; }
.player .info b, .player .info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .vol { display: flex; align-items: center; gap: 8px; }
.player input[type=range] { accent-color: var(--rc); width: 100px; }
@media (max-width: 560px) { .player .vol input[type=range] { width: 72px; } .player .info .small { display: none; } }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.eq i { width: 3px; background: var(--rc); height: 4px; border-radius: 2px; }
.eq.on i { animation: eq 0.9s ease-in-out infinite; }
.eq.on i:nth-child(2) { animation-delay: .2s; } .eq.on i:nth-child(3) { animation-delay: .4s; } .eq.on i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 16px; } }

/* Landing de radio */
.rhero { color: #fff; background: linear-gradient(135deg, var(--rc), color-mix(in srgb, var(--rc) 50%, #000)); }
.rhero .in { max-width: 1120px; margin: 0 auto; padding: 40px 16px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.rhero .biglogo { width: 120px; height: 120px; border-radius: 28px; background: #fff; color: var(--rc); display: grid; place-items: center; font-size: 52px; font-weight: 700; box-shadow: var(--shadow-2); }
.rhero .txt { flex: 1; min-width: 240px; }
.rhero h1 { font-size: 40px; line-height: 46px; font-weight: 500; }
.rhero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.rhero .chip { background: rgba(255,255,255,.18); color: #fff; }
.bigplay { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.bigplay .pbtn { width: 68px; height: 68px; border-radius: 50%; border: 0; background: #fff; color: var(--rc); display: grid; place-items: center; box-shadow: var(--shadow-2); }
.bigplay .pbtn .ms { font-size: 40px; }
.bigplay .t small { opacity: .85; display: block; }
.bigplay .t b { font-size: 16px; }
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.sched { width: 100%; border-collapse: collapse; }
.sched td { padding: 10px 6px; border-bottom: 1px solid var(--outline-v); }
.sched td:first-child { font-weight: 500; width: 64px; color: var(--rc); }
.sched tr:last-child td { border-bottom: 0; }
.soc { display: flex; flex-wrap: wrap; gap: 8px; }
.soc a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--sec-c); color: var(--on-surface); font-weight: 500; }
.soc a.wa { background: #25D366; color: #fff; }
.own-ad { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #FFF3E0, #FFE0B2); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.own-ad .ms { font-size: 36px; color: #E65100; }
.pwa { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--primary-c); color: var(--on-primary-c); margin-top: 16px; }
.pwa .grow { flex: 1; }
.footer { text-align: center; padding: 24px 16px; color: var(--on-surface-v); font-size: 12px; }

/* Panel de la radio */
.progress { height: 12px; border-radius: 6px; background: var(--sec-c); overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.progress.good i { background: #2E7D32; } .progress.mid i { background: #F9A825; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi b { display: block; font-size: 28px; font-weight: 400; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin-top: 12px; }
.bars i { flex: 1; background: var(--primary-c); border-radius: 4px 4px 0 0; min-height: 4px; }
.bars i.today { background: var(--primary); }
.sw { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--outline-v); gap: 12px; }
.sw:last-child { border-bottom: 0; }
.sw input { appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--sec-c); border: 2px solid var(--outline); position: relative; cursor: pointer; transition: .2s; flex: none; }
.sw input::after { content: ""; position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--outline); transition: .2s; }
.sw input:checked { background: var(--primary); border-color: var(--primary); }
.sw input:checked::after { left: 26px; width: 20px; height: 20px; top: 4px; background: #fff; }
.alert { padding: 12px 16px; border-radius: 12px; background: var(--warn-c); color: #4A3A00; display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }

/* Panel de demostración */
.demo { position: fixed; left: 12px; bottom: 96px; z-index: 70; font-size: 12px; }
.demo-btn { height: 36px; border-radius: 18px; border: 0; background: #1B1B21; color: #fff; padding: 0 14px; box-shadow: var(--shadow-2); display: inline-flex; align-items: center; gap: 6px; }
.demo-box { position: absolute; bottom: 44px; left: 0; width: 280px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-2); padding: 16px; }
.demo-box label { display: block; margin: 10px 0 2px; font-weight: 500; }
.demo-box input[type=range] { width: 100%; accent-color: var(--primary); }
.snack { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #303036; color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 90; box-shadow: var(--shadow-2); }

/* Páginas reales */
.flash { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 10px; max-width: 92vw; padding: 12px 20px; border-radius: 12px; color: #fff; background: #303036; box-shadow: var(--shadow-2); }
.flash.ok .ms { color: #8BE6A0; } .flash.err { background: #7A1F1F; }
img.lg { object-fit: cover; width: 40px; height: 40px; border-radius: 12px; display: block; background: #fff; }
.rname .lg, span.lg { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.rcard img.logo { object-fit: cover; padding: 0; display: block; }
img.biglogo { object-fit: cover; padding: 0; display: block; }
.secret { font-family: ui-monospace, Consolas, monospace; }

/* Programación pública */
.dtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; scrollbar-width: thin; }
.dtab { position: relative; flex: none; height: 38px; padding: 0 16px; border-radius: 19px; border: 1px solid var(--outline-v); background: transparent; color: var(--on-surface-v); font-weight: 500; }
.dtab.on { background: var(--rc, var(--primary)); border-color: transparent; color: #fff; }
.dtab.hoy::after { content: ""; position: absolute; top: 5px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: #FF4081; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.pitem { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--outline-v); }
.pitem.con-desc { cursor: pointer; }
.pitem.past { opacity: .55; }
.pitem.now { border-color: var(--rc, var(--primary)); background: color-mix(in srgb, var(--rc, var(--primary)) 14%, transparent); box-shadow: 0 0 0 1px var(--rc, var(--primary)); }
.phora { display: flex; flex-direction: column; min-width: 52px; line-height: 18px; } .phora b { font-weight: 500; } .phora span { font-size: 12px; color: var(--on-surface-v); }
.ptxt { flex: 1; min-width: 0; } .ptit { font-weight: 500; } .phost, .pdesc { font-size: 13px; color: var(--on-surface-v); margin-top: 2px; } .pdesc { margin-top: 8px; line-height: 1.45; }
.onair { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 2px 10px; border-radius: 10px; background: #FF1744; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: ping 1.6s infinite; }
.pvacio { text-align: center; padding: 24px 8px; color: var(--on-surface-v); }
.nowprog { display: block; margin-top: 8px; font-size: 14px; }
.nowprog .live-dot { color: #FF5252; vertical-align: middle; }
.rcard .now span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }

/* Barra de volumen del reproductor */
.player .vol { display: flex; align-items: center; gap: 4px; }
.player .vol[hidden] { display: none !important; }
.player .vol .icon-btn { color: inherit; }
.player input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--rc, var(--primary)) var(--p, 80%), rgba(128,128,128,.35) var(--p, 80%)); outline: none; width: 110px; accent-color: var(--rc, var(--primary)); cursor: pointer; }
.player input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--rc, var(--primary)); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.player input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--rc, var(--primary)); }
.player input[type=range]:focus-visible { outline: 3px solid #B388FF; outline-offset: 4px; }
.player[hidden] { display: none !important; }
.player img.logo { object-fit: cover; border-radius: 12px; background: var(--rc, var(--primary)); }

/* Publicidad propia de las radios */
.ownad-wrap { margin: 16px 0; text-align: center; }
.ownad { display: inline-block; max-width: 100%; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
.ownad img { display: block; max-width: 100%; height: auto; max-height: 280px; }
.ownad-tag { display: block; font-size: 11px; color: var(--on-surface-v); margin-top: 4px; letter-spacing: .4px; }
.adthumb { width: 120px; height: 60px; object-fit: cover; border-radius: 8px; background: var(--sec-c); }
