/* StreamPanel TV: los colores vienen del Personalizador como variables (--sptv-*). */
:root {
  --sptv-text: #f8fafc;
  --sptv-muted: rgba(248, 250, 252, .72);
  --sptv-card: rgba(15, 23, 42, .55);
  --sptv-line: rgba(255, 255, 255, .14);
  --sptv-page: #0b0f17;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sptv-page); color: var(--sptv-text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.sptv-wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sptv-skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: #fff; color: #000; border-radius: 6px; }
.sptv-skip:focus { left: 8px; }

/* Encabezado */
.sptv-header { position: sticky; top: 0; z-index: 10; background: var(--sptv-header, color-mix(in srgb, var(--sptv-to) 85%, black)); border-bottom: 1px solid var(--sptv-line); backdrop-filter: blur(8px); }
.admin-bar .sptv-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .sptv-header { top: 0; position: relative; } }
.sptv-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.sptv-brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.sptv-logo { display: block; height: var(--sptv-logo-h, 44px); max-width: min(260px, 55vw); width: auto; object-fit: contain; }
.sptv-brand-name { font-weight: 800; font-size: 20px; letter-spacing: .2px; }
.sptv-menu { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.sptv-menu a { display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--sptv-muted); }
.sptv-menu a:hover, .sptv-menu a[aria-current="page"], .sptv-menu .current-menu-item > a { background: rgba(255, 255, 255, .12); color: var(--sptv-text); }

/* Portada */
.sptv-hero { position: relative; padding: 40px 0 48px; text-align: center; overflow: hidden;
  background: var(--sptv-bg-image, none) center / cover no-repeat, linear-gradient(135deg, var(--sptv-from), var(--sptv-to)); }
.sptv-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--sptv-from) 80%, transparent), color-mix(in srgb, var(--sptv-to) 88%, transparent)); }
.sptv-hero > * { position: relative; }
.sptv-hero-small { padding: 36px 0; }
.sptv-title { margin: 0; font-size: clamp(26px, 4.5vw, 42px); line-height: 1.15; font-weight: 800; }
.sptv-title-logo { line-height: 0; }
.sptv-logo-white .sptv-logo, .sptv-logo-white .sptv-hero-logo { filter: brightness(0) invert(1); }
.sptv-hero-logo { display: inline-block; height: clamp(64px, 12vw, 120px); width: auto; max-width: min(480px, 90%); object-fit: contain; }
.sptv-tagline { margin: 10px auto 0; max-width: 760px; font-size: clamp(15px, 2.2vw, 19px); font-style: italic; color: var(--sptv-muted); }
.sptv-notice { margin: 24px auto 0; max-width: 560px; padding: 14px 18px; border-radius: 12px; background: rgba(0, 0, 0, .35); }

.sptv-switch { display: inline-flex; gap: 4px; margin: 24px auto 0; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); }
.sptv-switch button { border: 0; border-radius: 999px; padding: 9px 18px; background: transparent; color: var(--sptv-muted); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.sptv-switch button[aria-selected="true"] { background: var(--sptv-text); color: #111827; }

/* El reproductor siempre cabe en la pantalla: 16:9 en video, tarjeta en radio. */
.sptv-player { margin: 18px auto 0; width: 100%; max-width: 1040px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.sptv-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.sptv-player[data-mode="radio"] { max-width: 380px; aspect-ratio: auto; height: 480px; background: transparent; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); border-radius: 20px; }
.sptv-hero-radio .sptv-player { margin-top: 28px; }

.sptv-now { margin: 14px auto 0; max-width: 1040px; font-size: 15px; color: var(--sptv-muted); }
.sptv-now b { color: var(--sptv-text); }
.sptv-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.sptv-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--sptv-accent); color: var(--sptv-on-accent, #fff); font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; }
.sptv-btn:hover { filter: brightness(1.1); }
.sptv-btn-ghost { background: rgba(255, 255, 255, .14); }
.sptv-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* Video + chat: lado a lado en pantallas anchas, uno bajo otro en el celular. */
.sptv-live { margin: 18px auto 0; max-width: 1040px; }
.sptv-live .sptv-player { margin-top: 0; }
.sptv-live.with-chat { max-width: 1400px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: stretch; }
.sptv-chat { min-height: 420px; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); background: #0f1420; }
.sptv-chat iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; }
@media (max-width: 1000px) {
  .sptv-live.with-chat { grid-template-columns: 1fr; }
  .sptv-chat { height: 440px; }
}

/* Compartir */
.sptv-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; }
.sptv-share-label { font-weight: 700; font-size: 14px; color: var(--sptv-muted); margin-right: 2px; }
.sptv-share-btn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: transform .1s, background .2s; }
.sptv-share-btn svg { width: 20px; height: 20px; fill: currentColor; }
.sptv-share-btn:hover { transform: translateY(-1px); background: var(--sptv-accent); color: var(--sptv-on-accent, #fff); }
.sptv-share-whatsapp:hover { background: #25d366; }
.sptv-share-facebook:hover { background: #1877f2; }
.sptv-share-x:hover { background: #000; }
.sptv-share-telegram:hover { background: #229ed9; }
.sptv-share-ok { font-size: 14px; font-weight: 700; }

/* Secciones */
.sptv-section { padding: 40px 0; border-bottom: 1px solid var(--sptv-line); }
.sptv-section h2 { margin: 0 0 18px; font-size: 24px; }
.sptv-schedule { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sptv-schedule li { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--sptv-line); }
.sptv-schedule time { font-variant-numeric: tabular-nums; color: var(--sptv-muted); font-size: 14px; }
.sptv-schedule strong { font-size: 17px; }
.sptv-schedule .live { border-color: var(--sptv-accent); background: color-mix(in srgb, var(--sptv-accent) 18%, transparent); }
.sptv-schedule .live time::after { content: " · AL AIRE"; color: #f87171; font-weight: 800; }
.sptv-schedule .past { opacity: .5; }
.sptv-schedule .event { border-color: rgba(248, 113, 113, .55); }
.sptv-schedule .tag { align-self: flex-start; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: rgba(220, 38, 38, .85); color: #fff; font-size: 12px; font-weight: 700; }
.sptv-events { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sptv-events li { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--sptv-line); border-left: 4px solid #ef4444; }
.sptv-events time { color: var(--sptv-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.sptv-events strong { font-size: 17px; }
.sptv-events p { margin: 4px 0 0; color: var(--sptv-muted); font-size: 14px; }
.sptv-events .live { background: rgba(220, 38, 38, .18); }
.sptv-events .live time::after { content: " · EN VIVO AHORA"; color: #f87171; font-weight: 800; }
.sptv-about, .sptv-content { max-width: 820px; }
.sptv-content a { color: color-mix(in srgb, var(--sptv-accent) 70%, white); }
.sptv-content iframe { max-width: 100%; }
.sptv-entry + .sptv-entry { margin-top: 24px; }

/* Pie */
.sptv-footer { padding: 28px 0 36px; text-align: center; color: var(--sptv-muted); font-size: 14px; }
.sptv-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; }
.sptv-social { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--sptv-text); transition: background .2s; }
.sptv-social:hover { background: var(--sptv-accent); color: var(--sptv-on-accent, #fff); }
.sptv-social svg { width: 22px; height: 22px; fill: currentColor; }

@media (max-width: 600px) {
  .sptv-hero { padding: 26px 0 34px; }
  .sptv-wrap { width: min(1120px, 100% - 24px); }
  .sptv-player { border-radius: 12px; }
  .sptv-menu a { padding: 7px 10px; font-size: 14px; }
  .sptv-logo { max-height: 36px; }
}
