/* ══════════════════════════════════════════════════
   PODCAST CSS — Integrado con sistema de temas Gaboox
   Usa las mismas variables CSS de app.css + themes/
   Funciona en modo standalone (podcast.html) y 
   como módulo dentro de app.html (#podcast)
══════════════════════════════════════════════════ */

/* ── Variables base Podcast (override por tema) ── */
:root {
  --pod-accent:        var(--accent, #0ea5e9);
  --pod-accent2:       var(--accent-2, #38bdf8);
  --pod-bg:            var(--bg-app, #0f172a);
  --pod-bg-card:       var(--bg-card, #1e293b);
  --pod-bg-sidebar:    var(--bg-sidebar, #080c14);
  --pod-border:        var(--border, rgba(255,255,255,0.08));
  --pod-text:          var(--text-primary, #f1f5f9);
  --pod-text-2:        var(--text-secondary, #94a3b8);
  --pod-text-3:        var(--text-muted, #475569);
  --pod-hover:         var(--bg-hover, rgba(255,255,255,0.05));
  --pod-radius:        12px;
  --pod-player-h:      84px;
  --pod-sidebar-w:     240px;
}

/* ══════════════════════════════════════════════════
   LOADING SCREEN (modo standalone)
══════════════════════════════════════════════════ */
#pod-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--pod-bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  transition: opacity 0.45s ease;
}
#pod-loading.fade-out { opacity: 0; pointer-events: none; }
.pod-loading-rocket {
  width: 80px;
  animation: podRocket 1.1s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 18px rgba(14,165,233,0.35));
}
@keyframes podRocket {
  from { transform: translateY(0) rotate(-4deg); }
  to   { transform: translateY(-16px) rotate(4deg); }
}
.pod-loading-logo   { height: 40px; width: auto; max-width: 200px; }
.pod-loading-dots   { display: flex; gap: 6px; }
.pod-loading-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pod-accent);
  animation: podDot 0.8s ease infinite;
}
.pod-loading-dots span:nth-child(2) { animation-delay: .15s; }
.pod-loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes podDot {
  0%,100% { transform: translateY(0); opacity: .35; }
  50%     { transform: translateY(-6px); opacity: 1; }
}

/* ══════════════════════════════════════════════════
   MODO STANDALONE — Layout con sidebar + player
══════════════════════════════════════════════════ */
.pod-standalone-layout {
  display: grid;
  grid-template-columns: var(--pod-sidebar-w) 1fr;
  grid-template-rows: 1fr var(--pod-player-h);
  height: 100vh;
  overflow: hidden;
  background: var(--pod-bg);
  color: var(--pod-text);
}

/* Sidebar standalone */
.pod-sidebar {
  background: var(--pod-bg-sidebar);
  border-right: 1px solid var(--pod-border);
  grid-row: 1 / 3;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pod-sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--pod-border);
  flex-shrink: 0;
}
.pod-sidebar-logo img   { height: 28px; width: auto; }
.pod-sidebar-logo span  { font-size: 1rem; font-weight: 800; color: var(--pod-accent); }

/* Nav links */
.pod-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.pod-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--pod-radius);
  color: var(--pod-text-2); font-size: 0.87rem; font-weight: 500;
  cursor: pointer; transition: all 0.18s; user-select: none;
}
.pod-nav-item:hover { background: var(--pod-hover); color: var(--pod-text); }
.pod-nav-item.active { background: var(--pod-accent); color: #fff; font-weight: 600; }
.pod-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.pod-nav-sep { height: 1px; background: var(--pod-border); margin: 8px 12px; }

/* User widget standalone */
.pod-sidebar-user {
  padding: 12px;
  border-top: 1px solid var(--pod-border);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; border-radius: var(--pod-radius);
  transition: background 0.18s;
}
.pod-sidebar-user:hover { background: var(--pod-hover); }
.pod-sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--pod-accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #fff;
  flex-shrink: 0; object-fit: cover;
}
.pod-sidebar-user-info { flex: 1; min-width: 0; }
.pod-sidebar-user-name  { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-sidebar-user-role  { font-size: 0.7rem; color: var(--pod-text-2); }

/* Contenido principal */
.pod-main {
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--pod-bg);
}
@media (max-width: 768px) {
  .pod-standalone-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr var(--pod-player-h); }
  .pod-sidebar { grid-row: 1; grid-column: 1; flex-direction: row; height: 56px; border-right: none; border-bottom: 1px solid var(--pod-border); }
  .pod-nav { display: flex; flex-direction: row; padding: 4px; overflow-x: auto; }
  .pod-nav-item { white-space: nowrap; }
  .pod-sidebar-user { display: none; }
  .pod-main { padding: 16px; }
}

/* ══════════════════════════════════════════════════
   MÓDULO INTEGRADO EN GABOOX — adapta topbar
   El sidebar de gaboox se reemplaza por nav de podcast
══════════════════════════════════════════════════ */
.podcast-module-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Topbar podcast dentro de gaboox */
.podcast-topbar {
  display: flex; align-items: center; gap: 0;
  height: 52px; flex-shrink: 0;
  background: var(--pod-bg-card);
  border-bottom: 1px solid var(--pod-border);
  padding: 0 16px;
}
.podcast-topbar-back {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 50px;
  border: 1px solid var(--pod-border);
  background: none; color: var(--pod-text-2);
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
  font-family: inherit; margin-right: 16px;
  transition: all 0.15s;
}
.podcast-topbar-back:hover { color: var(--pod-text); background: var(--pod-hover); }
.podcast-topbar-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.podcast-topbar-nav::-webkit-scrollbar { height: 0; }
.podcast-topbar-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 50px;
  background: none; border: none; color: var(--pod-text-2);
  font-size: 0.82rem; font-weight: 500; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: all 0.15s;
}
.podcast-topbar-btn:hover  { background: var(--pod-hover); color: var(--pod-text); }
.podcast-topbar-btn.active { background: var(--pod-accent); color: #fff; font-weight: 600; }
.podcast-topbar-btn svg    { width: 15px; height: 15px; }
.podcast-topbar-search     { margin-left: auto; }
.podcast-topbar-search input {
  padding: 6px 14px 6px 34px; border-radius: 50px;
  border: 1px solid var(--pod-border); background: var(--pod-hover);
  color: var(--pod-text); font-size: 0.82rem; font-family: inherit;
  width: 200px; transition: width 0.2s;
}
.podcast-topbar-search input:focus { outline: none; width: 260px; border-color: var(--pod-accent); }
.podcast-topbar-search-wrap { position: relative; }
.podcast-topbar-search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--pod-text-3); width: 14px; height: 14px; }

/* Contenido del módulo */
.podcast-content {
  flex: 1; overflow-y: auto; padding: 24px 28px;
  background: var(--pod-bg);
}
@media (max-width: 900px) { .podcast-content { padding: 16px; } }

/* ══════════════════════════════════════════════════
   PÁGINA PÚBLICA
══════════════════════════════════════════════════ */
.pod-pub-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--pod-bg-card);
  border-bottom: 1px solid var(--pod-border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
}
.pod-pub-logo {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; text-decoration: none;
  color: var(--pod-text);
}
.pod-pub-logo img  { height: 30px; width: auto; }
.pod-pub-logo-name { font-size: 1.05rem; font-weight: 800; color: var(--pod-accent); }
.pod-pub-nav       { display: flex; gap: 8px; align-items: center; }
.pod-pub-nav a     { color: var(--pod-text-2); font-size: 0.87rem; text-decoration: none; padding: 6px 10px; border-radius: 8px; transition: all 0.15s; }
.pod-pub-nav a:hover { color: var(--pod-text); background: var(--pod-hover); }

.pub-btn-login, .pub-btn-registro {
  padding: 7px 16px; border-radius: 50px; font-size: 0.82rem;
  font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.18s;
}
.pub-btn-login    { background: none; border: 1px solid var(--pod-border); color: var(--pod-text-2); }
.pub-btn-login:hover { border-color: var(--pod-accent); color: var(--pod-accent); }
.pub-btn-registro { background: var(--pod-accent); border: none; color: #fff; }
.pub-btn-registro:hover { opacity: 0.88; }

/* ── Hero carrusel ── */
.pod-hero { position: relative; overflow: hidden; }
.pod-hero-track { display: flex; transition: transform 0.55s cubic-bezier(.4,0,.2,1); }
.pod-hero-slide {
  min-width: 100%; height: 420px;
  position: relative; flex-shrink: 0;
  overflow: hidden;
}
@media (max-width: 768px) { .pod-hero-slide { height: 240px; } }
.pod-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 6s ease;
}
.pod-hero-bg.zoom { transform: scale(1.06); }
.pod-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.75) 30%, rgba(0,0,0,.2));
  display: flex; align-items: center; padding: 40px;
}
.pod-hero-fallback {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--pod-bg-sidebar) 0%, color-mix(in srgb, var(--pod-accent) 20%, var(--pod-bg)) 100%);
  display: flex; align-items: center; justify-content: center; font-size: 4rem;
}
.pod-hero-text h1  { font-size: 2rem; font-weight: 800; color: #fff; margin: 0 0 8px; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.pod-hero-text p   { color: rgba(255,255,255,.8); font-size: 1rem; margin: 0 0 20px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.pod-hero-btn      { padding: 10px 24px; border-radius: 50px; background: var(--pod-accent); color: #fff; border: none; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 0.9rem; }
.pod-hero-dots     { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.pod-hero-dot      { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: all 0.2s; }
.pod-hero-dot.on   { background: #fff; width: 22px; border-radius: 4px; }
.pod-hero-prev, .pod-hero-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.2);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.18s; font-size: 1.1rem;
}
.pod-hero-prev { left: 14px; }
.pod-hero-next { right: 14px; }
.pod-hero-prev:hover, .pod-hero-next:hover { background: var(--pod-accent); border-color: var(--pod-accent); }

/* ── Sección contenido público ── */
.pod-pub-body   { padding: 32px 28px; max-width: 1200px; margin: 0 auto; }
.pod-section-h  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pod-section-h h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.pod-section-link { font-size: 0.82rem; color: var(--pod-accent); text-decoration: none; }
.pod-section-link:hover { text-decoration: underline; }

/* Footer público */
.pod-pub-footer { text-align: center; padding: 24px; color: var(--pod-text-3); font-size: 0.78rem; border-top: 1px solid var(--pod-border); }

/* ── Detalle lateral (público) ── */
.pod-pub-layout  { display: grid; grid-template-columns: 1fr 320px; flex: 1; overflow: hidden; min-height: 0; }
.pod-pub-main    { overflow-y: auto; padding: 28px; }
.pod-pub-side    { background: var(--pod-bg-card); border-left: 1px solid var(--pod-border); overflow-y: auto; padding: 24px; }
@media (max-width: 900px) { .pod-pub-layout { grid-template-columns: 1fr; } .pod-pub-side { border-left: none; border-top: 1px solid var(--pod-border); } }

/* ── Card de registro ── */
.pod-reg-card    { background: var(--pod-bg); border: 1px solid var(--pod-border); border-radius: var(--pod-radius); padding: 20px; margin-bottom: 20px; }
.pod-reg-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.pod-reg-card p  { margin: 0 0 12px; font-size: 0.82rem; color: var(--pod-text-2); line-height: 1.5; }
.pod-reg-free    { font-size: 0.78rem; color: #22c55e; margin-bottom: 14px; }

/* ══════════════════════════════════════════════════
   GRID DE CARDS
══════════════════════════════════════════════════ */
.pod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 16px;
}
.pod-card {
  background: var(--pod-bg-card);
  border: 1px solid var(--pod-border);
  border-radius: var(--pod-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.pod-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.35); border-color: var(--pod-accent); }
.pod-card-thumb {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; display: block;
  background: var(--pod-bg-sidebar);
}
.pod-card-thumb-placeholder {
  width: 100%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--pod-bg-sidebar), color-mix(in srgb, var(--pod-accent) 15%, var(--pod-bg-sidebar)));
}
.pod-card-body   { padding: 10px 12px 12px; }
.pod-card-title  { font-size: 0.85rem; font-weight: 700; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-card-sub    { font-size: 0.75rem; color: var(--pod-text-2); margin: 0; }
.pod-card-badge  { position: absolute; top: 8px; right: 8px; background: var(--pod-accent); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 50px; }
.pod-card-lock   { position: absolute; inset: 0; background: rgba(0,0,0,.65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.pod-card:hover .pod-card-lock { opacity: 1; }
.pod-card-lock span { font-size: 0.75rem; color: #ccc; font-weight: 600; }

/* ══════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════ */
.pod-tabs  { display: flex; gap: 4px; border-bottom: 1px solid var(--pod-border); margin-bottom: 20px; }
.pod-tab   { padding: 9px 16px; background: none; border: none; color: var(--pod-text-2); font-size: 0.85rem; font-weight: 500; cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent; transition: all 0.15s; }
.pod-tab:hover  { color: var(--pod-text); }
.pod-tab.active { color: var(--pod-accent); border-bottom-color: var(--pod-accent); font-weight: 600; }

/* ══════════════════════════════════════════════════
   SERIE HEADER
══════════════════════════════════════════════════ */
.pod-serie-header { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.pod-serie-cover  { width: 140px; height: 140px; border-radius: var(--pod-radius); object-fit: cover; border: 1px solid var(--pod-border); flex-shrink: 0; background: var(--pod-bg-card); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.pod-serie-info h2 { font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; }
.pod-serie-info p  { font-size: 0.87rem; color: var(--pod-text-2); margin: 0 0 12px; line-height: 1.5; }
.pod-back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 50px; background: none; border: 1px solid var(--pod-border); color: var(--pod-text-2); font-size: 0.8rem; cursor: pointer; font-family: inherit; transition: all 0.15s; margin-bottom: 16px; }
.pod-back-btn:hover { border-color: var(--pod-accent); color: var(--pod-accent); }

/* ══════════════════════════════════════════════════
   EPISODIO HEADER & LISTA
══════════════════════════════════════════════════ */
.pod-ep-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.pod-ep-cover  { width: 100px; height: 100px; border-radius: var(--pod-radius); object-fit: cover; border: 1px solid var(--pod-border); flex-shrink: 0; background: var(--pod-bg-card); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.pod-ep-info h2 { font-size: 1.2rem; font-weight: 800; margin: 0 0 4px; }
.pod-ep-info p  { font-size: 0.83rem; color: var(--pod-text-2); margin: 0 0 10px; line-height: 1.5; }
.pod-ep-meta    { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.pod-ep-meta span { font-size: 0.75rem; color: var(--pod-text-3); }

.pod-ep-list    { display: flex; flex-direction: column; gap: 6px; }
.pod-ep-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--pod-radius);
  border: 1px solid var(--pod-border);
  background: var(--pod-bg-card);
  cursor: pointer; transition: all 0.18s;
}
.pod-ep-row:hover { border-color: var(--pod-accent); background: color-mix(in srgb, var(--pod-accent) 8%, var(--pod-bg-card)); }
.pod-ep-row.playing { border-color: var(--pod-accent); background: color-mix(in srgb, var(--pod-accent) 12%, var(--pod-bg-card)); }
.pod-ep-num    { font-size: 0.75rem; color: var(--pod-text-3); font-weight: 600; min-width: 22px; text-align: center; }
.pod-ep-thumb  { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: var(--pod-bg); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.pod-ep-row-info { flex: 1; min-width: 0; }
.pod-ep-row-title { font-size: 0.87rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-ep-row-sub   { font-size: 0.75rem; color: var(--pod-text-2); margin-top: 2px; }
.pod-ep-dur    { font-size: 0.74rem; color: var(--pod-text-3); flex-shrink: 0; }
.pod-ep-progress { height: 3px; background: var(--pod-border); border-radius: 2px; margin-top: 5px; }
.pod-ep-progress-bar { height: 100%; background: var(--pod-accent); border-radius: 2px; transition: width 0.3s; }

/* ══════════════════════════════════════════════════
   ESTRELLAS
══════════════════════════════════════════════════ */
.pod-stars      { display: flex; gap: 3px; align-items: center; }
.pod-star       { font-size: 1.1rem; cursor: pointer; transition: transform 0.15s; color: var(--pod-text-3); }
.pod-star.on    { color: #fbbf24; }
.pod-star:hover { transform: scale(1.25); }
.pod-star-count { font-size: 0.75rem; color: var(--pod-text-2); margin-left: 6px; }

/* ══════════════════════════════════════════════════
   COMENTARIOS
══════════════════════════════════════════════════ */
.pod-comentarios { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.pod-comment {
  background: var(--pod-bg-card); border: 1px solid var(--pod-border);
  border-radius: var(--pod-radius); padding: 14px;
}
.pod-comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pod-comment-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--pod-accent); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: #fff; object-fit: cover; flex-shrink: 0; }
.pod-comment-name   { font-size: 0.82rem; font-weight: 600; }
.pod-comment-date   { font-size: 0.7rem; color: var(--pod-text-3); margin-left: auto; }
.pod-comment-text   { font-size: 0.85rem; line-height: 1.55; color: var(--pod-text-2); }
.pod-comment-actions { display: flex; gap: 8px; margin-top: 10px; }
.pod-react-btn { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 50px; background: none; border: 1px solid var(--pod-border); color: var(--pod-text-3); font-size: 0.73rem; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.pod-react-btn.active-like    { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.08); }
.pod-react-btn.active-dislike { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.08); }

.pod-comment-input-row { display: flex; gap: 10px; margin-top: 12px; }
.pod-comment-input { flex: 1; padding: 9px 14px; border-radius: 50px; background: var(--pod-hover); border: 1px solid var(--pod-border); color: var(--pod-text); font-size: 0.85rem; font-family: inherit; }
.pod-comment-input:focus { outline: none; border-color: var(--pod-accent); }
.pod-comment-send { padding: 9px 18px; border-radius: 50px; background: var(--pod-accent); border: none; color: #fff; font-weight: 600; font-size: 0.82rem; cursor: pointer; font-family: inherit; }

/* ══════════════════════════════════════════════════
   HISTORIAL
══════════════════════════════════════════════════ */
.pod-historial-list { display: flex; flex-direction: column; gap: 8px; }
.pod-hist-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--pod-radius);
  background: var(--pod-bg-card); border: 1px solid var(--pod-border);
  cursor: pointer; transition: border-color 0.18s;
}
.pod-hist-item:hover { border-color: var(--pod-accent); }
.pod-hist-cover { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--pod-bg); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.pod-hist-info  { flex: 1; min-width: 0; }
.pod-hist-title { font-size: 0.86rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-hist-sub   { font-size: 0.74rem; color: var(--pod-text-2); margin-top: 2px; }
.pod-hist-prog  { height: 3px; background: var(--pod-border); border-radius: 2px; margin-top: 5px; }
.pod-hist-prog-bar { height: 100%; background: var(--pod-accent); border-radius: 2px; }
.pod-hist-check { color: #22c55e; font-size: 0.78rem; white-space: nowrap; }

/* ══════════════════════════════════════════════════
   PERFIL
══════════════════════════════════════════════════ */
.pod-perfil-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.pod-perfil-foto-sec { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pod-perfil-foto { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pod-accent); }
.pod-perfil-foto-placeholder { width: 90px; height: 90px; border-radius: 50%; background: var(--pod-accent); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: #fff; font-weight: 700; border: 2px solid var(--pod-border); cursor: pointer; }

/* ══════════════════════════════════════════════════
   FORMULARIO CARD (admin)
══════════════════════════════════════════════════ */
.pod-form-card {
  background: var(--pod-bg-card); border: 1px solid var(--pod-border);
  border-radius: 14px; padding: 24px; margin-bottom: 20px;
}
.pod-form-card h3 { margin: 0 0 18px; font-size: 1.05rem; font-weight: 700; }
.pod-form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.pod-campo { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 200px; }
.pod-campo label { font-size: 0.78rem; font-weight: 600; color: var(--pod-text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.pod-campo input, .pod-campo select, .pod-campo textarea {
  padding: 9px 13px; border-radius: 9px;
  background: var(--pod-hover); border: 1px solid var(--pod-border);
  color: var(--pod-text); font-size: 0.87rem; font-family: inherit;
}
.pod-campo input:focus, .pod-campo select:focus, .pod-campo textarea:focus { outline: none; border-color: var(--pod-accent); }
.pod-campo textarea { min-height: 80px; resize: vertical; }

/* ══════════════════════════════════════════════════
   TABLA ADMIN USUARIOS
══════════════════════════════════════════════════ */
.pod-table-wrap { overflow-x: auto; }
.pod-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.pod-table th { text-align: left; padding: 9px 12px; color: var(--pod-text-3); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--pod-border); }
.pod-table td { padding: 10px 12px; border-bottom: 1px solid var(--pod-border); vertical-align: middle; }
.pod-table tr:hover td { background: var(--pod-hover); }
.pod-badge { display: inline-flex; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; }
.pod-badge-admin    { background: rgba(99,102,241,.15); color: #818cf8; }
.pod-badge-empleado { background: rgba(14,165,233,.15); color: #38bdf8; }
.pod-badge-cliente  { background: rgba(34,197,94,.15);  color: #4ade80; }
.pod-badge-inactivo { background: rgba(239,68,68,.12);  color: #f87171; }

/* ══════════════════════════════════════════════════
   REPRODUCTOR — grid-row 2
══════════════════════════════════════════════════ */
#pod-player {
  grid-column: 2;
  background: var(--pod-bg-card);
  border-top: 1px solid var(--pod-border);
  display: flex; align-items: center;
  padding: 0 18px; gap: 14px;
  height: var(--pod-player-h);
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
}
#pod-player.oculto { display: none; }
/* En el módulo integrado el reproductor va abajo del podcast-content */
.podcast-module-wrap #pod-player {
  grid-column: unset;
  border-top: 1px solid var(--pod-border);
}

.pod-rep-info { display: flex; align-items: center; gap: 12px; min-width: 180px; max-width: 220px; }
#pod-rep-img  { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid var(--pod-border); flex-shrink: 0; background: var(--pod-bg); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.pod-rep-titulo { font-size: 0.84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.pod-rep-autor  { font-size: 0.73rem; color: var(--pod-text-2); margin-top: 2px; }
.pod-rep-controles { flex: 1; display: flex; align-items: center; gap: 12px; }
.pod-rep-btn { background: var(--pod-accent); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; box-shadow: 0 2px 8px color-mix(in srgb, var(--pod-accent) 40%, transparent); }
.pod-rep-btn:hover { filter: brightness(1.1); transform: scale(1.08); }
.pod-rep-progress-wrap { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--pod-text-3); font-weight: 500; }
#pod-rep-progress { flex: 1; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--pod-border); cursor: pointer; accent-color: var(--pod-accent); }
.pod-rep-vol { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--pod-text-3); }
#pod-rep-vol { width: 70px; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--pod-border); cursor: pointer; accent-color: var(--pod-accent); }
.pod-rep-close { background: none; border: none; color: var(--pod-text-3); font-size: 1rem; cursor: pointer; padding: 5px; border-radius: 6px; transition: all 0.15s; }
.pod-rep-close:hover { color: var(--pod-text); background: var(--pod-hover); }

/* ══════════════════════════════════════════════════
   MODAL AUTH (standalone)
══════════════════════════════════════════════════ */
.pod-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); }
.pod-modal-overlay.oculto { display: none; }
.pod-modal-box { background: var(--pod-bg-card); border: 1px solid var(--pod-border); border-radius: 16px; padding: 36px; width: 100%; max-width: 380px; position: relative; text-align: center; box-shadow: 0 24px 64px rgba(0,0,0,.6); }
.pod-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--pod-text-3); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.pod-modal-close:hover { background: var(--pod-hover); color: var(--pod-text); }
.pod-modal-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; }
.pod-modal-sub   { font-size: 0.82rem; color: var(--pod-text-2); margin: 0 0 18px; }

/* ══════════════════════════════════════════════════
   BOTONES GLOBALES
══════════════════════════════════════════════════ */
.pod-btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 50px;
  background: var(--pod-accent); border: none; color: #fff;
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  font-family: inherit; transition: all 0.18s;
}
.pod-btn-primary:hover { filter: brightness(1.1); }
.pod-btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 50px;
  background: none; border: 1px solid var(--pod-border); color: var(--pod-text-2);
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  font-family: inherit; transition: all 0.18s;
}
.pod-btn-secondary:hover { border-color: var(--pod-accent); color: var(--pod-accent); }
.pod-btn-danger { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #f87171; }
.pod-btn-danger:hover { background: rgba(239,68,68,.25); }

/* Mensaje de estado */
.pod-msg { padding: 9px 14px; border-radius: 9px; font-size: 0.83rem; margin-top: 8px; }
.pod-msg.ok    { background: rgba(34,197,94,.12);  color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
.pod-msg.error { background: rgba(239,68,68,.12);  color: #f87171; border: 1px solid rgba(239,68,68,.25); }
.pod-msg.oculto { display: none; }

/* Scrollbar */
.pod-main::-webkit-scrollbar, .podcast-content::-webkit-scrollbar { width: 5px; }
.pod-main::-webkit-scrollbar-track, .podcast-content::-webkit-scrollbar-track { background: transparent; }
.pod-main::-webkit-scrollbar-thumb, .podcast-content::-webkit-scrollbar-thumb { background: var(--pod-border); border-radius: 3px; }

/* ── Barra de búsqueda integrada en módulo ── */
.pod-search-bar {
  padding: 12px 20px 0;
}
.pod-search-bar .podcast-topbar-search-wrap {
  max-width: 420px;
}

/* ══ FIX: Buscador con estilo ══════════════════════════════ */
.pod-search-bar {
  padding: 14px 20px 4px;
}
.pod-search-bar .podcast-topbar-search-wrap,
.podcast-topbar-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--pod-bg-card);
  border: 1.5px solid var(--pod-border);
  border-radius: 50px;
  padding: 0 16px;
  max-width: 420px;
  transition: border-color .18s;
}
.podcast-topbar-search-wrap:focus-within {
  border-color: var(--pod-accent);
}
.podcast-topbar-search-wrap svg {
  color: var(--pod-text-3);
  flex-shrink: 0;
}
.podcast-topbar-search-wrap input {
  flex: 1;
  padding: 10px 10px 10px 8px;
  background: none;
  border: none;
  color: var(--pod-text);
  font-size: .88rem;
  font-family: inherit;
  outline: none;
}
.podcast-topbar-search-wrap input::placeholder {
  color: var(--pod-text-3);
}

/* ══ Serie — banner con imagen de fondo desenfocada ════════ */
.pod-serie-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 180px;
  display: flex;
  align-items: flex-end;
}
.pod-serie-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.45) saturate(1.4);
  transform: scale(1.08);
  z-index: 0;
}
.pod-serie-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  align-items: flex-end;
  padding: 28px 24px;
  width: 100%;
}
.pod-serie-banner-cover {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.25);
  flex-shrink: 0;
  background: var(--pod-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.pod-serie-banner-info { flex: 1; min-width: 0; }
.pod-serie-banner-info h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.pod-serie-banner-info p {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pod-serie-banner-meta {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
}

/* ══ Mini Player persistente (sidebar derecho) ══════════════ */
#mini-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 500;
  overflow: hidden;
  display: none;
  flex-direction: column;
  transition: all .25s ease;
}
#mini-player.visible { display: flex; }
#mini-player.expanded { width: 380px; }
.mini-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--bg-card, #fff);
}
.mini-player-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-hover);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.mini-player-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-player-info { flex: 1; min-width: 0; }
.mini-player-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-player-autor {
  font-size: .72rem;
  color: var(--text-secondary);
}
.mini-player-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mini-ctrl-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: .85rem;
  transition: all .15s;
  padding: 0;
}
.mini-ctrl-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.mini-ctrl-btn.play-btn {
  background: var(--accent, #0ea5e9);
  color: #fff;
  width: 32px;
  height: 32px;
}
.mini-ctrl-btn.play-btn:hover { opacity: .85; }
.mini-player-expanded {
  display: none;
  padding: 0 14px 14px;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}
#mini-player.expanded .mini-player-expanded { display: flex; }
.mini-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  color: var(--text-secondary);
}
.mini-progress-row input[type=range] {
  flex: 1;
  accent-color: var(--accent, #0ea5e9);
  height: 3px;
  cursor: pointer;
}
.mini-vol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--text-secondary);
}
.mini-vol-row input[type=range] {
  flex: 1;
  accent-color: var(--accent, #0ea5e9);
  height: 3px;
  cursor: pointer;
}
.mini-expand-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: .75rem;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all .15s;
}
.mini-expand-btn:hover { background: var(--bg-hover); }
.mini-goto-podcast {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  color: var(--accent, #0ea5e9);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.mini-goto-podcast:hover { text-decoration: underline; }

/* ══ Prev/Next buttons in player ══ */
.pod-rep-prev, .pod-rep-next {
  font-size: .75rem;
  opacity: .7;
  transition: opacity .15s;
}
.pod-rep-prev:hover, .pod-rep-next:hover { opacity: 1; }

/* ── Enlace "Gaboox" en header público del podcast ── */
.pod-pub-nav-gaboox {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--pod-accent);
  color: #fff !important;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: opacity .18s;
}
.pod-pub-nav-gaboox:hover { opacity: .85; }
