/* ============================================================
   ZENER DEFAULT THEME — main.css
   Traslada el diseño del index3.html a clases reutilizables.
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --primary:   #ff007f;
  --primary2:  #cc0066;
  --secondary: #8b5cf6;
  --bg:        #06070b;
  --surface:   #0f1117;
  --card:      #13151e;
  --card2:     #1c1f2e;
  --border:    rgba(255,255,255,.07);
  --text:      #f1f1f1;
  --text2:     #9ca3af;
  --text3:     #6b7280;
  --glow:      0 0 20px rgba(255,0,127,.15);
  --radius:    16px;
  --sidebar-w: 220px;
  --sidebar-r: 300px;
  --topbar-h:  64px;
  --player-h:  72px;
  --transition:.2s ease;
}
[data-theme="light"] {
  --bg:      #f3f4f6;
  --surface: #ffffff;
  --card:    #ffffff;
  --card2:   #f9fafb;
  --border:  rgba(0,0,0,.08);
  --text:    #111827;
  --text2:   #4b5563;
  --text3:   #9ca3af;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:15px;-webkit-text-size-adjust:100%}
body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;overflow:hidden}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font-family:inherit;cursor:pointer;border:none;background:none}
input,textarea,select{font-family:inherit}

/* ── Scrollbars ocultos en desktop ──────────────────────────── */
@media(min-width:901px){
  *{scrollbar-width:none;-ms-overflow-style:none}
  *::-webkit-scrollbar{display:none}
}
@media(max-width:900px){
  ::-webkit-scrollbar{width:4px}
  ::-webkit-scrollbar-thumb{background:rgba(255,0,127,.3);border-radius:4px}
}

/* ── Layout desktop ─────────────────────────────────────────── */
@media(min-width:901px){
  body{overflow:hidden}

  .sidebar{
    position:fixed;
    top:12px; left:12px;
    bottom:calc(var(--player-h) + 24px);
    width:var(--sidebar-w);
    height:auto;
    background:var(--surface);
    border-radius:20px;
    outline:1px solid var(--border);
    display:flex;flex-direction:column;
    overflow-y:auto;overflow-x:hidden;
    z-index:100;
  }

  .main{
    margin-left:calc(var(--sidebar-w) + 24px);
    height:calc(100vh - var(--player-h) - 12px);
    display:flex;flex-direction:column;
    overflow:hidden;
  }

  .sidebar-right{
    position:fixed;
    top:12px; right:12px;
    bottom:calc(var(--player-h) + 24px);
    width:var(--sidebar-r);
    background:var(--surface);
    border-radius:20px;
    outline:1px solid var(--border);
    overflow-y:auto;overflow-x:hidden;
    z-index:100;
  }

  .feed{
    flex:1;
    overflow-y:auto;overflow-x:hidden;
    padding:20px 24px 20px 24px;
    /* Espacio para que el feed no quede detrás del sidebar derecho */
    margin-right:calc(var(--sidebar-r) + 24px);
  }

  .mini-player{
    position:fixed;
    left:12px;right:12px;bottom:12px;
    height:var(--player-h);
    background:var(--surface);
    border-radius:20px;
    display:flex;align-items:center;gap:16px;
    padding:0 20px;
    z-index:200;
    box-shadow:0 8px 40px rgba(0,0,0,.6),var(--glow);
    background-image:url('https://static.vecteezy.com/system/resources/thumbnails/050/508/060/small/professional-studio-microphone-with-pop-filter-and-laptop-in-background-photo.jpg');
    background-size:cover;background-position:center;
    isolation:isolate;
    overflow:hidden;
  }
  .mini-player::before{
    content:'';position:absolute;inset:0;border-radius:20px;
    background:rgba(6,7,11,.82);backdrop-filter:blur(2px);
    z-index:0;pointer-events:none;
  }
  .mini-player>*{position:relative;z-index:1}
}

/* ── Layout móvil ───────────────────────────────────────────── */
@media(max-width:900px){
  body{overflow-x:hidden;overflow-y:auto;padding-bottom:80px}

  .sidebar{
    position:fixed;top:0;left:-100%;width:260px;height:100vh;
    background:var(--surface);z-index:500;
    transition:left .3s ease;
    display:flex;flex-direction:column;
    overflow-y:auto;
  }
  .sidebar.open{left:0}

  .sidebar-right{display:none}

  .main{width:100%}
  .feed{padding:12px}

  .mini-player{
    position:fixed;left:0;right:0;bottom:0;
    height:64px;padding:0 12px;
    background:var(--surface);
    display:flex;align-items:center;gap:12px;
    border-top:1px solid var(--border);
    z-index:200;
  }
}

/* ── Sidebar: contenido ─────────────────────────────────────── */
.sidebar-logo{
  padding:20px 16px 12px;
  display:flex;align-items:center;gap:10px;
  border-bottom:1px solid var(--border);
}
.sidebar-logo img{width:32px;height:32px;object-fit:contain}
.logo-text{font-weight:700;font-size:.9rem;color:var(--primary)}

.sidebar-nav{flex:1;padding:8px 8px;display:flex;flex-direction:column;gap:2px}

.nav-item{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:12px;
  color:var(--text2);font-size:.85rem;font-weight:500;
  transition:background var(--transition),color var(--transition);
  white-space:nowrap;overflow:hidden;
}
.nav-item:hover{background:var(--card2);color:var(--text)}
.nav-item.active{background:var(--primary);color:#fff}
.nav-item svg{width:18px;height:18px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:2}

.sidebar-bottom{
  padding:8px;border-top:1px solid var(--border);
  display:flex;flex-direction:column;gap:2px;
}

.theme-toggle{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:12px;
  color:var(--text2);font-size:.85rem;font-weight:500;width:100%;
  transition:background var(--transition);
}
.theme-toggle:hover{background:var(--card2)}
.theme-toggle svg{width:18px;height:18px;flex-shrink:0}

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar{
  height:var(--topbar-h);padding:0 20px;
  display:flex;align-items:center;gap:12px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;background:var(--surface);
}
.sidebar-toggle{
  display:none;padding:8px;border-radius:10px;color:var(--text2);
}
@media(max-width:900px){.sidebar-toggle{display:flex;align-items:center;justify-content:center}}

.topbar-search{
  flex:1;max-width:480px;
  display:flex;align-items:center;gap:10px;
  background:var(--card2);border:1px solid var(--border);
  border-radius:12px;padding:0 14px;height:40px;
}
.topbar-search svg{width:16px;height:16px;color:var(--text3);flex-shrink:0;stroke:currentColor;fill:none;stroke-width:2}
.topbar-search input{
  flex:1;background:none;border:none;outline:none;
  color:var(--text);font-size:.85rem;
}
.topbar-search input::placeholder{color:var(--text3)}

.topbar-actions{
  display:flex;align-items:center;gap:8px;margin-left:auto;
}
.icon-btn{
  width:36px;height:36px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text2);transition:background var(--transition),color var(--transition);
  position:relative;
}
.icon-btn:hover{background:var(--card2);color:var(--text)}
.icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}
.notif-dot{
  position:absolute;top:6px;right:6px;width:8px;height:8px;
  background:var(--primary);border-radius:50%;
  border:2px solid var(--surface);
}
.topbar-user{display:flex;align-items:center;gap:10px;margin-left:4px}
.user-avatar{
  width:36px;height:36px;border-radius:50%;
  background:var(--primary);display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:.85rem;color:#fff;flex-shrink:0;
}
.user-name{display:block;font-size:.8rem;font-weight:600;line-height:1.2}
.user-badge{display:block;font-size:.7rem;color:var(--primary);font-weight:500}

/* ── Sidebar derecho ─────────────────────────────────────────── */
.sr-section{padding:16px;border-bottom:1px solid var(--border)}
.sr-live-badge{
  display:flex;align-items:center;gap:6px;
  font-size:.7rem;font-weight:700;letter-spacing:.08em;
  color:var(--primary);margin-bottom:4px;
}
.sr-freq{font-size:2rem;font-weight:800;line-height:1;margin-bottom:10px}
.sr-freq small{font-size:.8rem;font-weight:400;color:var(--text2)}
.sr-section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.sr-section-header h3{font-size:.85rem;font-weight:700}
.link-pink{font-size:.75rem;color:var(--primary);font-weight:600}
.link-pink:hover{text-decoration:underline}

.sr-program{
  display:flex;align-items:center;gap:10px;
  padding:8px 0;border-bottom:1px solid var(--border);
}
.sr-program:last-child{border-bottom:none}
.sr-prog-time{font-size:.7rem;color:var(--text3);width:44px;flex-shrink:0}
.sr-prog-cover{
  width:34px;height:34px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  font-size:.6rem;font-weight:700;overflow:hidden;flex-shrink:0;
  background:var(--card2);
}
.sr-prog-cover img{width:100%;height:100%;object-fit:cover}
.sr-prog-info{flex:1}
.sr-prog-info strong{display:block;font-size:.78rem;font-weight:600}
.badge-live{
  display:inline-block;font-size:.6rem;font-weight:700;
  background:var(--primary);color:#fff;
  padding:1px 5px;border-radius:4px;letter-spacing:.05em;margin-top:2px;
}
.sr-empty{color:var(--text3);font-size:.8rem}

/* ── Sección home ───────────────────────────────────────────── */
.home-section{margin-bottom:32px}
.section-title{font-size:1rem;font-weight:700;margin-bottom:16px}
.section-header-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.sub-title{font-size:.9rem;font-weight:700}

/* ── Hero TV ────────────────────────────────────────────────── */
.home-hero{margin-bottom:24px}
.hero-video-wrap{
  position:relative;width:100%;
  aspect-ratio:16/9;max-height:420px;
  background:#000;border-radius:var(--radius);overflow:hidden;
}
.hero-video{width:100%;height:100%;object-fit:cover}
.hero-live-badge{
  position:absolute;top:12px;left:12px;z-index:2;
  display:flex;align-items:center;gap:6px;
  background:rgba(0,0,0,.7);backdrop-filter:blur(4px);
  padding:4px 10px;border-radius:20px;
  font-size:.72rem;font-weight:700;color:#fff;
}
.hero-bar{
  position:absolute;bottom:0;left:0;right:0;
  background:linear-gradient(transparent,rgba(0,0,0,.85));
  padding:32px 16px 12px;
  display:flex;align-items:center;justify-content:space-between;
  z-index:2;
}
.hero-bar-left{display:flex;align-items:center;gap:10px}
.hero-channel-logo img{width:32px;height:32px;border-radius:6px}
.hero-channel-name{font-size:.85rem;font-weight:700}
.hero-channel-tag{font-size:.7rem;color:rgba(255,255,255,.7)}
.hero-bar-right{display:flex;gap:6px}
.hero-icon-btn{
  width:32px;height:32px;border-radius:8px;
  background:rgba(255,255,255,.15);backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;color:#fff;
  transition:background var(--transition);
}
.hero-icon-btn:hover{background:rgba(255,255,255,.3)}

/* ── Programas grid ─────────────────────────────────────────── */
.programs-grid{
  display:flex;gap:12px;overflow-x:auto;padding-bottom:4px;
}
.program-card{flex-shrink:0;width:160px}
.pc-cover{
  width:160px;height:100px;border-radius:12px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:var(--card2);position:relative;margin-bottom:8px;
}
.pc-cover img{width:100%;height:100%;object-fit:cover}
.pc-initials{font-size:.75rem;font-weight:800;color:rgba(255,255,255,.8);text-align:center;padding:4px}
.pc-live-badge{
  position:absolute;top:6px;left:6px;
  background:var(--primary);color:#fff;
  font-size:.6rem;font-weight:700;padding:2px 6px;border-radius:4px;
}
.pc-name{font-size:.8rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-time{font-size:.72rem;color:var(--text2);margin-top:2px}
/* Colores de tarjetas de programas */
.pc-default{background:var(--card2)}
.pc-tarde{background:linear-gradient(135deg,#7c3aed,#4c1d95)}
.pc-manana{background:linear-gradient(135deg,#047857,#064e3b)}
.pc-hits{background:linear-gradient(135deg,#b45309,#78350f)}
.pc-conexion{background:linear-gradient(135deg,#1d4ed8,#1e3a8a)}
.pc-enlace{background:linear-gradient(135deg,#0f766e,#134e4a)}

/* ── Filtros de categoría ───────────────────────────────────── */
.cat-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.cat-tab{
  padding:6px 16px;border-radius:20px;
  font-size:.8rem;font-weight:500;
  background:var(--card2);color:var(--text2);
  border:1px solid var(--border);
  transition:background var(--transition),color var(--transition);
}
.cat-tab:hover{background:var(--card);color:var(--text)}
.cat-tab.active{background:var(--primary);color:#fff;border-color:var(--primary)}

/* ── Posts grid ─────────────────────────────────────────────── */
.posts-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:16px;
}
.post-card{background:var(--card);border-radius:var(--radius);overflow:hidden;transition:transform var(--transition),box-shadow var(--transition)}
.post-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.3)}
.pc-img-wrap{display:block;aspect-ratio:16/9;overflow:hidden;position:relative;background:var(--card2)}
.pc-img-wrap img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.post-card:hover .pc-img-wrap img{transform:scale(1.04)}
.pc-img-placeholder{width:100%;height:100%;background:var(--card2)}
.pc-cat-badge{
  position:absolute;top:8px;left:8px;
  padding:2px 8px;border-radius:4px;font-size:.65rem;font-weight:700;color:#fff;
}
.pc-body{padding:12px}
.pc-title{font-size:.82rem;font-weight:600;line-height:1.35;margin-bottom:6px}
.pc-title a:hover{color:var(--primary)}
.pc-excerpt{font-size:.75rem;color:var(--text2);line-height:1.4;margin-bottom:8px}
.pc-meta{display:flex;justify-content:space-between;font-size:.7rem;color:var(--text3)}

/* ── Featured grid ──────────────────────────────────────────── */
.featured-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.featured-card{background:var(--card);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.featured-card img{aspect-ratio:16/9;object-fit:cover;width:100%}
.fc-body{padding:14px;flex:1}
.fc-cat{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.fc-body h3{font-size:.9rem;font-weight:700;margin:6px 0;line-height:1.35}
.fc-body h3 a:hover{color:var(--primary)}
.fc-body p{font-size:.78rem;color:var(--text2);line-height:1.4;margin-bottom:8px}
.fc-time{font-size:.7rem;color:var(--text3)}

/* ── Mini-player contenido ──────────────────────────────────── */
.mp-left{display:flex;align-items:center;gap:12px;flex-shrink:0}
.mp-play-btn{
  width:44px;height:44px;border-radius:50%;
  background:var(--primary);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-size:1.1rem;flex-shrink:0;
  transition:transform .15s,background .2s;
}
.mp-play-btn:hover{background:var(--primary2);transform:scale(1.05)}
.mp-live-dot{display:flex;align-items:center;gap:5px;font-size:.65rem;font-weight:700;color:var(--primary)}
.mp-title{font-size:.85rem;font-weight:700}
.mp-sub{font-size:.72rem;color:var(--text2)}
.mp-center{display:flex;align-items:center;gap:3px;flex:1;justify-content:center}
.mp-right{display:flex;align-items:center;gap:12px;margin-left:auto;flex-shrink:0}
.mp-type-switch{display:flex;background:var(--card2);border-radius:20px;padding:3px;gap:2px}
.mp-type-btn{
  padding:5px 14px;border-radius:16px;font-size:.75rem;font-weight:600;
  color:var(--text2);transition:background .2s,color .2s;
}
.mp-type-btn.active{background:var(--primary);color:#fff}

/* ── Volume control ─────────────────────────────────────────── */
.vol-ctrl{display:flex;align-items:center;gap:0;position:relative}
.vol-icon-btn{
  width:34px;height:34px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text2);transition:color .2s;flex-shrink:0;
}
.vol-icon-btn:hover{color:var(--primary)}
.vol-icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}
.vol-slider-wrap{
  overflow:hidden;width:0;max-width:0;opacity:0;padding:0;
  transition:width .25s ease,max-width .25s ease,opacity .2s ease,padding .25s ease;
  display:flex;align-items:center;pointer-events:none;
}
.vol-ctrl:hover .vol-slider-wrap,
.vol-ctrl.vol-open .vol-slider-wrap{
  width:90px;max-width:90px;opacity:1;padding:0 4px 0 6px;pointer-events:all;
}
.vol-slider{
  -webkit-appearance:none;appearance:none;
  width:80px;height:4px;background:var(--card2);border-radius:4px;outline:none;cursor:pointer;
}
.vol-slider::-webkit-slider-thumb{
  -webkit-appearance:none;width:14px;height:14px;
  background:var(--primary);border-radius:50%;cursor:pointer;
}
.vol-slider::-moz-range-thumb{
  width:14px;height:14px;background:var(--primary);border-radius:50%;border:none;cursor:pointer;
}
@media(max-width:900px){.vol-ctrl{display:none}}

/* ── Waveform animado ───────────────────────────────────────── */
.wave-bar{
  display:inline-block;width:3px;border-radius:2px;
  background:var(--primary);
  animation:wave 1.2s ease-in-out infinite alternate;
  height:18px;
}
@keyframes wave{
  0%{height:4px;opacity:.5}
  100%{height:22px;opacity:1}
}
.mp-center .wave-bar{height:12px}
@keyframes wave{
  0%{height:3px;opacity:.4}
  100%{height:20px;opacity:1}
}

/* ── Dot pulse ──────────────────────────────────────────────── */
.dot-pulse{
  display:inline-block;width:7px;height:7px;border-radius:50%;
  background:var(--primary);
  animation:pulse 1.5s ease-in-out infinite;
}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.7)}}

/* ── Botones ────────────────────────────────────────────────── */
.btn-primary{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 20px;border-radius:12px;
  background:var(--primary);color:#fff;font-weight:600;font-size:.85rem;
  transition:background .2s,transform .15s;
}
.btn-primary:hover{background:var(--primary2);transform:scale(1.02)}
.btn-block{width:100%;justify-content:center}

/* ── Error page ─────────────────────────────────────────────── */
.error-page{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  min-height:60vh;text-align:center;gap:12px;
}
.error-code{font-size:5rem;font-weight:800;color:var(--primary);line-height:1}

/* ── Admin login (si se ve desde este CSS) ──────────────────── */
.sr-waveform{display:flex;align-items:center;gap:3px;margin:10px 0}