:root {
      --bg-main: #020617;
      --bg-elevated: #020817;
      --bg-card: #020617;
      --border-subtle: rgba(148, 163, 184, 0.18);
      --text-main: #e5e7eb;
      --text-muted: #9ca3af;
      --accent: #38bdf8;
      --accent-soft: rgba(56, 189, 248, 0.14);

      --accent-warm: #fb923c;
      --accent-warm-soft: rgba(251, 146, 60, 0.16);

      --danger: #f97373;
      --radius-lg: 16px;
      --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.75);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
      background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(circle at top right, rgba(129, 140, 248, 0.12), transparent 55%),
        var(--bg-main);
      color: var(--text-main);
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    /* No subrayes botones ni el logo */
    .logo:hover,
    .logo:focus,
    .btn-ghost:hover,
    .btn-ghost-primary:hover {
      text-decoration: none !important;
    }

    header {
      position: sticky;
      top: 0;
      z-index: 20;
      backdrop-filter: blur(20px);
      background: linear-gradient(
        to bottom,
        rgba(15, 23, 42, 0.96),
        rgba(15, 23, 42, 0.85),
        transparent
      );
      border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    }

    .nav {
      max-width: 1120px;
      margin: 0 auto;
      padding: 0.75rem 1.75rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }

    .nav-left {
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      text-decoration: none;
    }

    .logo-mark {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: radial-gradient(circle at 30% 0%, #38bdf8, #1d4ed8);
      box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.8),
        0 10px 30px rgba(15, 23, 42, 0.9);
      font-size: 0.9rem;
      font-weight: 700;
      color: white;
    }

    .logo-text {
      display: flex;
      flex-direction: column;
      gap: 0.05rem;
    }

    .logo-title {
      font-size: 1.3rem;
      font-weight: 700;
      letter-spacing: 0.01em;
      transition:
        color 0.2s ease,
        text-shadow 0.25s ease,
        transform 0.25s ease;
    }

    .logo-dot {
      color: #38bdf8;
    }

    .logo:hover .logo-title {
      color: #e5f2ff;
      text-shadow:
        0 0 6px rgba(56, 189, 248, 0.7),
        0 0 14px rgba(56, 189, 248, 0.9),
        0 0 28px rgba(56, 189, 248, 0.85);
      transform: translateY(-1px);
    }

    .logo-subtitle {
      font-size: 0.72rem;
      color: #9ca3af;
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-size: 0.8rem;
      color: #9ca3af;
    }

    .pill-small {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.8rem;
      padding: 0.2rem 0.75rem;
      border-radius: 999px;
      background: var(--accent-soft);
      border: 1px solid var(--accent);
      color: var(--accent);
      box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 0 12px rgba(56, 189, 248, 0.45);
      transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
    }

    .pill-small-dot {
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: var(--accent);
      box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.18);
    }

    .nav-right .pill-small:hover {
      transform: translateY(-1px);
      box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.95),
        0 0 16px rgba(56, 189, 248, 0.7);
    }

    .btn-ghost {
      border-radius: 999px;
      padding: 0.35rem 0.85rem;
      border: 1px solid rgba(148, 163, 184, 0.35);
      background: rgba(15, 23, 42, 0.8);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      color: #9ca3af;
      font-size: 0.78rem;
      font-weight: 500;
      text-decoration: none;
    }

    .btn-ghost:hover {
      border-color: var(--accent);
      color: var(--text-main);
      text-decoration: none;
    }

    .btn-ghost-primary {
      border-color: var(--accent);
      color: #e5f2ff;
      background: radial-gradient(circle at top left, #0ea5e9, #22c55e);
    }

    .btn-ghost-primary:hover {
      filter: brightness(1.05);
    }

    .btn-ghost-danger {
      border-color: rgba(248, 113, 113, 0.85);
      color: #fecaca;
    }

    .btn-ghost-danger:hover {
      background: rgba(127, 29, 29, 0.8);
      color: #fee2e2;
    }

    .layout {
      max-width: 1120px;
      margin: 0 auto;
      padding: 1.75rem 1.75rem 2.5rem;
    }

    @media (max-width: 768px) {
      .nav {
        padding-inline: 1rem;
      }
      .layout {
        padding-inline: 1rem;
      }
    }

    .page-card {
      background: radial-gradient(
        circle at top left,
        rgba(56, 189, 248, 0.12),
        rgba(15, 23, 42, 0.95)
      );
      border-radius: 24px;
      border: 1px solid rgba(148, 163, 184, 0.25);
      box-shadow: var(--shadow-soft);
      padding: 1.75rem 1.9rem 2rem;
      position: relative;
      overflow: hidden;
    }

    .page-card::after {
      content: "";
      position: absolute;
      right: -120px;
      top: 20%;
      width: 260px;
      height: 260px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(56, 189, 248, 0.10), transparent 65%);
      opacity: 0.8;
      pointer-events: none;
    }

    footer {
      max-width: 1120px;
      margin: 0 auto;
      padding: 0 1.75rem 1.7rem;
      font-size: 0.75rem;
      color: var(--text-muted);
      opacity: 0.65;
    }

    .lang-switcher {
      margin-right: 0.75rem;
    }

    .lang-switcher select {
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.5);
      background: rgba(15, 23, 42, 0.92);
      color: #e5e7eb;
      padding: 0.2rem 0.9rem;
      font-size: 0.8rem;
    }
    .user-menu {
      position: relative;
    }

    .user-menu-button {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      border-radius: 999px;
      padding: 0.25rem 0.7rem 0.25rem 0.3rem;
      border: 1px solid rgba(148, 163, 184, 0.45);
      background: rgba(15, 23, 42, 0.9);
      cursor: pointer;
      color: #e5e7eb;
      font-size: 0.78rem;
      font-weight: 500;
    }

    .user-menu-button:hover {
      border-color: var(--accent);
    }

    .user-avatar {
      width: 28px;
      height: 28px;
      border-radius: 999px;
      background: radial-gradient(circle at 30% 0%, #38bdf8, #1d4ed8);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.8rem;
      font-weight: 600;
      color: white;
      box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9);
    }

    .user-avatar-sm {
      width: 24px;
      height: 24px;
      font-size: 0.75rem;
    }

    .user-menu-label {
      display: none;
    }

    .user-menu-icon {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding-left: 2px;
    }

    .user-menu-icon span {
      width: 12px;
      height: 2px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.9);
    }

    .user-menu-dropdown {
      position: absolute;
      right: 0;
      top: calc(100% + 0.5rem);
      width: 230px;
      background: rgba(15, 23, 42, 0.98);
      border-radius: 14px;
      border: 1px solid rgba(148, 163, 184, 0.4);
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
      backdrop-filter: blur(14px);
      overflow: hidden;
      z-index: 50;
    }

    .user-menu-header {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.55rem 0.7rem 0.45rem;
      background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent);
    }

    .user-menu-info {
      min-width: 0;
    }

    .user-menu-name {
      font-size: 0.75rem;
      font-weight: 500;
      color: #e5e7eb;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .user-menu-role {
      font-size: 0.68rem;
      color: #9ca3af;
    }

    .user-menu-link {
      display: block;
      padding: 0.5rem 0.75rem;
      font-size: 0.78rem;
      color: #e5e7eb;
      text-decoration: none;
    }

    .user-menu-link:hover {
      background: rgba(30, 64, 175, 0.5);
    }

    .user-menu-logout {
      border-top: 1px solid rgba(148, 163, 184, 0.35);
      padding: 0.5rem 0.75rem 0.55rem;
      margin: 0;
    }

    .user-menu-logout button {
      width: 100%;
      border: none;
      border-radius: 9px;
      padding: 0.4rem 0.5rem;
      font-size: 0.78rem;
      font-weight: 500;
      background: rgba(239, 68, 68, 0.9);
      color: #fee2e2;
      cursor: pointer;
    }

    .user-menu-logout button:hover {
      background: rgba(248, 113, 113, 0.95);
    }

    @media (min-width: 900px) {
      .user-menu-label {
        display: inline-block;
      }
    }
  
/* ============================
   UI polish overrides (navbar + chips)
   ============================ */
:root{
  --nav-h: 68px;
  --control-h: 36px;
}

/* Navbar: consistent height, no surprise wrapping */
.nav{
  min-height: var(--nav-h);
  padding-top: 0;
  padding-bottom: 0;
  gap: 1rem;
}
.nav-left, .nav-right{ height: var(--nav-h); }
.nav-right{
  flex-wrap: nowrap;            /* this is what stops the “descolocado” jumps */
  gap: .6rem;
}

/* Make every control the same height so nothing looks like it’s from another website */
.lang-switcher select,
.btn-ghost,
.pill-small,
.user-menu-button{
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
}

/* Tighten paddings so the header feels “Netflix-ish”, not “admin panel 2009” */
.lang-switcher select{ padding-top: 0; padding-bottom: 0; }
.btn-ghost{ padding: 0 .9rem; }
.pill-small{ padding: 0 .85rem; }
.user-menu-button{ padding: 0 .7rem; }

/* Logo subtitle makes the navbar tall + busy. Keep it on desktop, hide on smaller screens */
.logo-subtitle{ display: none; }
@media (min-width: 1024px){
  .logo-subtitle{ display: block; }
}

/* Account button alignment */
.user-avatar{ width: 32px; height: 32px; }
.user-menu-icon{ padding-left: 0; }

/* Category chips (your “Todos / Comedia / …” row) should look clickable, not like a ransom note */
.filters{
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin: 1.25rem 0 1.5rem;
}
.chip{
  display: inline-flex;
  align-items: center;
  height: var(--control-h);
  padding: 0 .95rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(2,6,23,.35);
  color: rgba(226,232,240,.92);
  text-decoration: none;
  font-weight: 650;
  font-size: .92rem;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.chip:hover{
  border-color: rgba(34,211,238,.35);
  background: rgba(34,211,238,.08);
  transform: translateY(-1px);
}
.chip.active{
  border-color: rgba(34,211,238,.55);
  background: rgba(34,211,238,.12);
  color: #e6fbff;
}

/* Mobile sanity: if it gets tight, hide the “Beta privada” pill first */
@media (max-width: 820px){
  .pill-small{ display:none; }
}

/* ===== NAVBAR: compacto y alineado ===== */
:root{
  --nav-h: 64px;        /* altura del header */
  --control-h: 36px;    /* altura de botones/select/pills */
}

header{
  height: var(--nav-h);
}

.nav{
  max-width: 1120px;
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 1.5rem;          /* sin padding vertical */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left,
.nav-right{
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-right{
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: .6rem;
}

/* Todo control misma altura */
.lang-switcher select,
.btn-ghost,
.btn-ghost-primary,
.pill-small,
.user-menu-button{
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
}

/* Seguridad: aunque te olvides de btn-ghost */
.btn-ghost-primary{
  padding: 0 .9rem;
  border-radius: 999px;
}

/* Logo: una línea, sin empujar el header */
.logo-text{ line-height: 1; }
.logo-title{ font-size: 1.15rem; line-height: 1; }
.logo-subtitle{ display: none; } /* llévatelo al hero, no al navbar */

/* Navbar: menos carnaval, más Netflix */
.nav { padding: 0.75rem 1.5rem; }
.nav-right { gap: 0.75rem; flex-wrap: nowrap; }

.btn-ghost-primary{
  background: #e50914;
  border-color: #e50914;
  color: #fff;
  border-radius: 6px;
  font-weight: 700;
  padding: 0.55rem 1rem;
}
.btn-ghost-primary:hover{
  filter: brightness(1.05);
}
