/* Estrategia JED — diseño propio */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0c0f14;
  --bg-elevated: #131820;
  --surface: #1a2130;
  --surface-hover: #222b3d;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f6fb;
  --muted: #8b95a8;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.15);
  --accent-2: #22d3a8;
  --accent-2-soft: rgba(34, 211, 168, 0.12);
  --danger: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: 'Outfit', system-ui, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.jed-app {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

body.jed-app::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(124, 92, 255, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(34, 211, 168, 0.1), transparent);
  pointer-events: none;
  z-index: 0;
}

.jed-shell { position: relative; z-index: 1; }

.jed-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.jed-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.jed-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.jed-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #5a3fd4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.jed-logo-text strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

.jed-logo-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.jed-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.jed-user-name {
  font-size: 0.85rem;
  color: var(--muted);
  display: none;
}

@media (min-width: 640px) {
  .jed-user-name { display: block; }
}

.jed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.jed-btn:active { transform: scale(0.98); }

.jed-btn-primary {
  background: linear-gradient(135deg, var(--accent), #6344e8);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.35);
}

.jed-btn-primary:hover {
  box-shadow: 0 6px 28px rgba(124, 92, 255, 0.45);
}

.jed-btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.jed-btn-ghost:hover {
  background: var(--surface-hover);
}

.jed-btn-danger {
  background: rgba(248, 113, 113, 0.15);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.jed-btn-danger:hover {
  background: rgba(248, 113, 113, 0.28);
  color: #fff;
}

.jed-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.jed-admin-delete-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.jed-admin-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

.jed-admin-link-muted { color: var(--muted); }

.jed-admin-link-danger,
button.jed-admin-link-danger {
  color: var(--danger);
}

.jed-admin-link:hover,
button.jed-admin-link:hover {
  text-decoration: underline;
}

.jed-admin-danger-zone {
  margin-top: 32px;
  padding: 20px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius);
}

.jed-admin-danger-zone h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--danger);
}

.jed-admin-danger-zone p {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

.jed-admin-strip {
  background: linear-gradient(90deg, #1e1638, #162a24);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 8px 16px;
  font-size: 0.8rem;
}

.jed-admin-strip a {
  color: var(--accent-2);
  margin: 0 10px;
  text-decoration: none;
  font-weight: 600;
}

.jed-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.jed-hero {
  margin-bottom: 32px;
}

.jed-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.jed-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.jed-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.jed-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}

.jed-stat i { color: var(--accent-2); }

.jed-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .jed-grid { grid-template-columns: 1fr; }
}

.jed-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.jed-panel h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
}

.jed-panel p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.jed-filter {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.jed-filter:hover { background: var(--surface-hover); }

.jed-filter.active {
  background: var(--accent-soft);
  color: #c4b5ff;
  font-weight: 600;
}

.jed-lessons { display: flex; flex-direction: column; gap: 16px; }

.jed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.jed-card:hover {
  border-color: rgba(124, 92, 255, 0.35);
  transform: translateY(-2px);
}

.jed-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

.jed-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.35s;
}

.jed-card:hover .jed-card-thumb img { transform: scale(1.03); }

.jed-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  font-size: 2.5rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}

.jed-card:hover .jed-card-play { opacity: 1; }

.jed-card-body { padding: 18px 20px; }

.jed-card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.jed-card-body h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
}

.jed-card-body p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.jed-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.jed-player {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.jed-player iframe,
.jed-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.jed-fs-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: rgba(12, 15, 20, 0.75);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s, transform 0.15s;
}

.jed-fs-btn:hover {
  background: rgba(124, 92, 255, 0.9);
  transform: scale(1.05);
}

.jed-player:fullscreen,
.jed-player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  aspect-ratio: unset;
}

.jed-player:fullscreen .jed-fs-btn,
.jed-player:-webkit-full-screen .jed-fs-btn {
  bottom: 20px;
  right: 20px;
}

.jed-article {
  max-width: 720px;
  margin: 0 auto;
}

.jed-article h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
}

.jed-article-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.jed-prose {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

.jed-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 24px;
}

/* Auth / gate */
.jed-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.jed-auth-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
}

.jed-auth-box.wide { max-width: 440px; }

.jed-auth-box h1 {
  margin: 16px 0 6px;
  text-align: center;
  font-size: 1.4rem;
}

.jed-auth-box .sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.jed-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.jed-form input,
.jed-form textarea,
.jed-form select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.jed-form input:focus,
.jed-form textarea:focus,
.jed-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.jed-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.jed-alert-err {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.jed-alert-ok {
  background: var(--accent-2-soft);
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 168, 0.25);
}

.jed-gate {
  max-width: 480px;
  text-align: center;
}

.jed-gate-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  text-align: left;
}

.jed-gate-features li {
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.jed-gate-features i {
  color: var(--accent-2);
  width: 24px;
}

.jed-footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
  font-size: 0.8rem;
}

.jed-compose-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.25);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.jed-compose-bar p {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.jed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.jed-table th,
.jed-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.jed-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.jed-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.jed-badge-pub {
  background: var(--accent-2-soft);
  color: var(--accent-2);
}

.jed-badge-draft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.jed-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  max-width: 320px;
  animation: jedToastIn 0.3s ease;
}

.jed-toast.ok { background: #14532d; color: #86efac; }
.jed-toast.err { background: #450a0a; color: #fca5a5; }

.jed-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.jed-auth-divider::before,
.jed-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.jed-btn-google {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
  gap: 10px;
}

.jed-btn-google:hover {
  background: #fff;
  color: #1f1f1f;
}

@keyframes jedToastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Feed layout & publicaciones */
.jed-main.jed-feed-layout {
  max-width: 800px;
}

.jed-feed-layout .jed-back {
  margin-bottom: 16px;
}

.jed-hero-compact {
  margin-bottom: 28px;
  padding-bottom: 0;
}

.jed-hero-compact h1 {
  font-size: 1.6rem;
}

.jed-panel-sticky {
  position: sticky;
  top: 88px;
}

.jed-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Feed compacto (inicio) */
.jed-publication-compact {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.jed-publication-compact .jed-pub-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 12px 14px;
}

.jed-publication-compact .jed-pub-thumb {
  display: block;
  position: relative;
  flex: 0 0 120px;
  width: 120px;
  min-height: 68px;
  border-radius: var(--radius-sm);
  background: #000;
  overflow: hidden;
  align-self: center;
}

.jed-publication-compact .jed-pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.jed-publication-compact .jed-pub-play {
  font-size: 1.25rem;
  background: rgba(0, 0, 0, 0.45);
}

.jed-publication-compact .jed-pub-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jed-publication-compact .jed-pub-header {
  padding: 0;
}

.jed-publication-compact .jed-pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.jed-publication-compact .jed-pub-date {
  font-size: 0.78rem;
  color: var(--muted);
}

.jed-publication-compact .jed-pub-cat {
  font-size: 0.68rem;
  padding: 2px 8px;
}

.jed-publication-compact .jed-pub-body {
  padding: 0;
}

.jed-publication-compact .jed-pub-body h2 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jed-publication-compact .jed-pub-body p {
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
}

.jed-publication-compact .jed-pub-footer {
  padding: 0;
  margin-top: auto;
  border-top: none;
  gap: 12px;
}

.jed-publication-compact .jed-pub-action {
  padding: 4px 0;
  font-size: 0.8rem;
}

.jed-publication-compact .jed-pub-action-primary {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 0.78rem;
  background: transparent;
}

@media (max-width: 520px) {
  .jed-publication-compact .jed-pub-thumb {
    flex: 0 0 96px;
    width: 96px;
  }

  .jed-publication-compact .jed-pub-body h2 {
    font-size: 0.92rem;
  }
}

.jed-publication {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.jed-publication-single {
  padding: 0 0 24px;
}

.jed-pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}

.jed-pub-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.jed-pub-author .jed-logo-mark {
  width: 40px;
  height: 40px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.jed-pub-author strong {
  display: block;
  font-size: 0.95rem;
}

.jed-pub-author span {
  font-size: 0.8rem;
  color: var(--muted);
}

.jed-pub-cat {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  padding: 4px 10px;
  background: var(--accent-2-soft);
  border-radius: 999px;
}

.jed-pub-media {
  display: block;
  position: relative;
  margin-top: 12px;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.jed-pub-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.jed-pub-media:hover img {
  transform: scale(1.02);
}

.jed-pub-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  font-size: 2.5rem;
  color: #fff;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.jed-pub-media:hover .jed-pub-play {
  opacity: 1;
}

.jed-pub-body {
  padding: 16px 20px 8px;
}

.jed-pub-body h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

.jed-pub-body h2 a {
  color: var(--text);
  text-decoration: none;
}

.jed-pub-body h2 a:hover {
  color: #c4b5ff;
}

.jed-pub-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.jed-pub-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.jed-pub-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.jed-pub-action:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.jed-pub-action-primary {
  margin-left: auto;
  background: var(--accent-soft);
  color: #c4b5ff;
}

.jed-pub-action-primary:hover {
  background: rgba(124, 92, 255, 0.28);
  color: #fff;
}

.jed-pub-title {
  margin: 12px 20px 8px;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
}

.jed-pub-excerpt {
  margin: 0 20px 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.jed-pub-content {
  margin: 0 20px 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

.jed-pub-content p:first-child {
  margin-top: 0;
}

.jed-pub-stats {
  display: flex;
  gap: 20px;
  padding: 0 20px 16px;
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.jed-pub-stats i {
  color: var(--accent-2);
  margin-right: 4px;
}

/* Reproductor mejorado */
.jed-player-lg {
  margin: 0 20px 12px;
}

.jed-player-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  z-index: 5;
  pointer-events: none;
}

.jed-player-action {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(12, 15, 20, 0.8);
  color: #fff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s;
}

.jed-player-action:hover {
  background: rgba(124, 92, 255, 0.9);
}

.jed-player-hint {
  margin: 0 20px 20px;
  font-size: 0.8rem;
  color: var(--muted);
}

.jed-player-hint i {
  color: var(--accent);
  margin-right: 6px;
}

/* Lightbox video */
body.jed-no-scroll {
  overflow: hidden;
}

.jed-video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: jedLbIn 0.2s ease;
}

.jed-video-lightbox-inner {
  position: relative;
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.jed-video-lightbox-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.jed-video-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.15s;
}

.jed-video-lightbox-close:hover {
  background: rgba(248, 113, 113, 0.8);
}

@keyframes jedLbIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Comentarios */
.jed-comments {
  padding: 20px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.jed-comments h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
}

.jed-comments h2 i {
  color: var(--accent);
  margin-right: 8px;
}

.jed-comment-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.jed-comment-box-label {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.jed-comment-form {
  margin: 0;
}

.jed-comment-compose {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.jed-user-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5a3fd4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.35);
}

.jed-comment-field {
  flex: 1;
  min-width: 0;
}

.jed-comment-field textarea,
.jed-comment-compose textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.jed-comment-field textarea::placeholder,
.jed-comment-compose textarea::placeholder {
  color: #6b7589;
}

.jed-comment-field textarea:focus,
.jed-comment-compose textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.jed-comment-actions {
  display: flex;
  justify-content: flex-end;
  padding-left: 58px;
}

.jed-comment-actions .jed-btn {
  min-width: 180px;
}

.jed-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.jed-comment-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jed-comment {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.jed-comment .jed-user-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  font-size: 0.9rem;
}

.jed-comment-body {
  flex: 1;
  min-width: 0;
}

.jed-comment-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.jed-comment-meta strong {
  color: var(--text);
}

.jed-comment-body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.jed-comment-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px;
}

.jed-comment-del {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.jed-comment-del:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.12);
}

@media (max-width: 600px) {
  .jed-comment-actions {
    padding-left: 0;
  }

  .jed-comment-actions .jed-btn {
    width: 100%;
    min-width: 0;
  }

  .jed-pub-footer {
    flex-wrap: wrap;
  }

  .jed-pub-action-primary {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

/* Media: PDF, imagen */
.jed-pdf-viewer {
  margin: 0 20px 12px;
  aspect-ratio: 4 / 3;
  min-height: 420px;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.jed-pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.jed-image-viewer {
  margin: 0 20px 20px;
}

.jed-image-viewer img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #000;
}

.jed-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 20px 20px;
}

.jed-pub-type {
  background: var(--accent-soft);
  color: #c4b5ff;
}

.jed-pub-cat-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.jed-pub-thumb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
}

.jed-pub-thumb-placeholder {
  font-size: 1.75rem;
  color: var(--accent);
}

.jed-pub-thumb-icon .jed-pub-play {
  font-size: 1rem;
}

/* Anuncios */
.jed-ads {
  margin-bottom: 16px;
}

.jed-ads-feed_top {
  text-align: center;
  padding: 12px 0 4px;
}

.jed-ads-feed_top .jed-ad,
.jed-ads-feed_top .jed-ad-html a {
  display: inline-block;
  max-width: 100%;
}

.jed-ads-feed_top img {
  max-width: 100%;
  width: 728px;
  height: auto;
  border-radius: var(--radius-sm);
}

.jed-ads-sidebar {
  margin-top: 16px;
}

.jed-ads-sidebar .jed-ad img {
  max-width: 100%;
  width: auto;
  margin: 0 auto;
}

.jed-ad {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.jed-ad img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.jed-ad-banner-link {
  display: block;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: var(--radius-sm);
  color: #c4b5ff;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.jed-ad-banner-link:hover {
  background: rgba(124, 92, 255, 0.25);
}

.jed-ad-html {
  font-size: 0.9rem;
}

.jed-form-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 0;
}

.jed-post-field {
  margin-bottom: 16px;
}

.jed-ad-field {
  margin-bottom: 16px;
}

/* Admin: crear publicación */
.jed-admin-post-edit {
  max-width: 640px;
}

.jed-admin-lead {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.jed-type-picker-wrap {
  border: none;
  margin: 0 0 20px;
  padding: 0;
}

.jed-type-picker-wrap legend {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.jed-type-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 520px) {
  .jed-type-picker {
    grid-template-columns: repeat(4, 1fr);
  }
}

.jed-type-opt {
  display: block;
  cursor: pointer;
}

.jed-type-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.jed-type-opt span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.jed-type-opt span i {
  font-size: 1.4rem;
  color: var(--accent);
}

.jed-type-opt input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #c4b5ff;
}

.jed-type-panel {
  margin-bottom: 18px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.jed-upload-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 10px !important;
}

.jed-upload-title i {
  color: var(--accent-2);
}

.jed-upload-box {
  padding: 20px;
  border: 2px dashed rgba(124, 92, 255, 0.45);
  border-radius: var(--radius-sm);
  text-align: center;
  background: rgba(124, 92, 255, 0.06);
}

.jed-upload-box p {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.jed-file-input {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 10px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.jed-type-note {
  margin: 0;
}

.jed-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* Notificaciones */
.jed-notif-wrap {
  position: relative;
}

.jed-notif-bell {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
}

.jed-notif-bell:hover {
  border-color: var(--accent);
  color: #c4b5ff;
}

.jed-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.jed-notif-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(340px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 100;
  overflow: hidden;
}

.jed-notif-panel.open {
  display: block;
}

.jed-notif-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.jed-notif-panel-head a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
}

.jed-notif-drop-list {
  max-height: 320px;
  overflow-y: auto;
}

.jed-notif-drop-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.jed-notif-drop-item:hover {
  background: var(--surface-hover);
}

.jed-notif-drop-item.unread {
  background: var(--accent-soft);
}

.jed-notif-drop-item strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.jed-notif-drop-item span {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.jed-notif-drop-item em {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
  font-style: normal;
}

.jed-notif-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.jed-notif-panel-foot {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-top: 1px solid var(--border);
}

.jed-notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jed-notif-item {
  border-bottom: 1px solid var(--border);
}

.jed-notif-item.unread {
  background: var(--accent-soft);
}

.jed-notif-link {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.jed-notif-link strong {
  display: block;
  margin-bottom: 4px;
}

.jed-notif-link span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.jed-notif-link em {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  font-style: normal;
}
