/* ===================== ORION PLAYER — GLOBAL RESET + VARIABLES ===================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ORION PLAYER Palette — Netflix Reference */
  --nx-black: #000000;
  --nx-dark: #0a0a0a;
  --nx-surface: #111111;
  --nx-surface2: #1a1a1a;
  --nx-surface3: #222222;
  --nx-border: rgba(255, 255, 255, 0.07);
  --nx-red: #e50914;
  --nx-red-dim: rgba(229, 9, 20, 0.15);
  --nx-red-glow: rgba(229, 9, 20, 0.7);
  --nx-red-bright: #ff2525;
  --nx-silver: #e0e0e0;
  --nx-silver-dim: #8c8c8c;
  --nx-text: #ffffff;
  --nx-text-secondary: #b3b3b3;
  --nx-text-muted: #666666;
  --nx-gold: #ffd700;
  --nx-glass: rgba(17, 17, 17, 0.85);
  --nx-glass-border: rgba(255, 255, 255, 0.08);

  /* Sizing */
  --sidebar-width: 80px;
  --sidebar-expanded: 220px;
  --sub-sidebar-width: 240px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-card: 12px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--nx-text);
  background: var(--nx-black);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body, #root {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--nx-black);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 26, 26, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 26, 26, 0.5);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 26, 26, 0.3) transparent;
}

/* ===================== SPINNER ===================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 26, 26, 0.15);
  border-top-color: var(--nx-red);
  border-radius: 50%;
  animation: nx-spin 0.8s linear infinite;
}

@keyframes nx-spin {
  to { transform: rotate(360deg); }
}

/* ===================== FOCUS SYSTEM (TV NAV) ===================== */
[data-focusable]:focus-visible,
.nx-focusable:focus-visible {
  outline: 2px solid var(--nx-red);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--nx-red-dim), 0 0 20px var(--nx-red-glow);
  z-index: 50;
}

/* ===================== CURSOR AUTO-HIDE ===================== */
body.cursor-hidden {
  cursor: none !important;
}

body.cursor-hidden * {
  cursor: none !important;
}

/* ===================== SELECTION ===================== */
::selection {
  background: rgba(255, 26, 26, 0.3);
  color: #fff;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.intro-transition-bg {
  position: fixed;
  z-index: 9999;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.3s;
  cursor: pointer;
  user-select: none;
}

.intro-x-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 18px #e50914) blur(1.5px);
  will-change: transform, opacity, filter;
  position: relative;
}

.intro-x-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.intro-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e50914;
  opacity: 0.7;
  pointer-events: none;
  box-shadow: 0 0 8px 2px #e5091499;
  z-index: 2;
}

.intro-skip-hint {
  color: #fff;
  font-size: 13px;
  opacity: 0.45;
  margin-top: 32px;
  letter-spacing: 0.5px;
  user-select: none;
}

@media (max-width: 600px) {
  .intro-x-logo {
    max-width: 120px;
    max-height: 120px;
  }
  .intro-skip-hint {
    font-size: 12px;
    margin-top: 18px;
  }
}
/* ===================== ORION PLAYER SIDEBAR — DASHBOARD ===================== */
.sb {
  width: var(--sidebar-expanded);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sb::-webkit-scrollbar { display: none; }

/* Logo */
.sb-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 20px;
}

.sb-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.sb-logo {
  width: 100%;
  max-width: 160px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px var(--nx-red-glow));
}

.sb-brand {
  display: none;
}

.sb-mobile-close { display: none; }

/* Section titles */
.sb-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--nx-silver-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 18px 18px 6px;
  opacity: 0.6;
}

/* Nav */
.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 0 10px;
}

.sb-nav-section { margin-bottom: 2px; }

.sb-item {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--nx-silver-dim);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}

.sb-item:hover {
  color: var(--nx-text);
  background: rgba(255, 255, 255, 0.04);
}

.sb-item.active {
  color: var(--nx-text);
  background: rgba(229, 9, 20, 0.15);
  box-shadow: inset 3px 0 0 var(--nx-red);
}

/* Kids item — special colorful highlight */
.sb-item.sb-item-kids {
  color: #ffd93d;
}

.sb-item.sb-item-kids:hover {
  background: rgba(255, 217, 61, 0.08);
  color: #ffe566;
}

.sb-item.sb-item-kids.active {
  background: rgba(255, 107, 107, 0.15);
  box-shadow: inset 3px 0 0 #ff6b6b;
  color: #ffd93d;
}

.sb-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sb-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.sb-badge {
  margin-left: auto;
  background: var(--nx-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 0 8px var(--nx-red-glow);
}

/* Premium badge */
.sb-premium {
  margin-top: auto;
  padding: 14px 16px;
  margin: auto 10px 6px;
  background: rgba(229, 9, 20, 0.08);
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.sb-premium:hover {
  background: rgba(229, 9, 20, 0.14);
  border-color: rgba(229, 9, 20, 0.35);
}

.sb-premium-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.sb-premium-text {
  display: flex;
  flex-direction: column;
}

.sb-premium-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--nx-text);
  letter-spacing: 0.3px;
}

.sb-premium-sub {
  font-size: 10px;
  color: var(--nx-red);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Mobile trigger */
.sb-mobile-trigger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--nx-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--nx-glass-border);
  color: var(--nx-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.sb-mobile-trigger svg { width: 22px; height: 22px; }

.sb-backdrop { display: none; }

/* ===================== COLLAPSED STATE (Live TV page) ===================== */
.sb.collapsed {
  width: 64px;
  transition: width 0.3s ease;
}

.sb.collapsed .sb-brand,
.sb.collapsed .sb-brand-name,
.sb.collapsed .sb-label,
.sb.collapsed .sb-section-title,
.sb.collapsed .sb-premium-text,
.sb.collapsed .sb-expiry,
.sb.collapsed .sb-badge {
  display: none;
}

.sb.collapsed .sb-logo {
  max-width: 44px;
}

.sb.collapsed .sb-logo-wrap {
  justify-content: center;
}

.sb.collapsed .sb-item {
  justify-content: center;
  padding: 0;
}

.sb.collapsed .sb-icon {
  margin: 0;
}

.sb.collapsed .sb-premium {
  justify-content: center;
  padding: 10px 0;
  margin: auto 4px 6px;
}

.sb.collapsed .sb-nav {
  padding: 0 4px;
}

.sb.collapsed .sb-top {
  justify-content: center;
  padding: 0 4px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  /* Hide the mobile hamburger trigger — replaced by bottom nav */
  .sb-mobile-trigger { display: none; }
  .sb-backdrop { display: none; }

  /* Hide traditional sidebar on mobile */
  .sb {
    display: none !important;
  }

  .sb.mobile-open {
    display: none !important;
  }

  .sb-mobile-close { display: none; }
}

/* ===================== MOBILE BOTTOM NAVIGATION ===================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    height: 64px;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
  }

  /* Hide bottom nav ONLY when fullscreen player is open */
  body.player-open .mobile-bottom-nav {
    display: none !important;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    position: relative;
  }

  .mobile-nav-item.active {
    color: var(--nx-red, #e50914);
  }

  .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--nx-red, #e50914);
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.5);
  }

  .mobile-nav-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
  }

  .mobile-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1;
  }
}
.dns-blocked-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dnsBlockFadeIn 0.4s ease;
}

@keyframes dnsBlockFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dns-blocked-card {
  background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
  border: 1px solid rgba(229, 9, 20, 0.3);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 460px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(229, 9, 20, 0.1);
  animation: dnsCardSlide 0.4s ease;
  position: relative;
}

.dns-blocked-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.dns-blocked-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

@keyframes dnsCardSlide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.dns-blocked-icon {
  font-size: 56px;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.dns-blocked-title {
  font-size: 22px;
  font-weight: 800;
  color: #e50914;
  margin: 0 0 12px;
  letter-spacing: 0.5px;
}

.dns-blocked-dns {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-family: monospace;
  word-break: break-all;
  display: inline-block;
}

.dns-blocked-msg {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 28px;
  line-height: 1.7;
  white-space: pre-line;
}

.dns-blocked-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.dns-blocked-btn {
  padding: 12px 36px;
  background: linear-gradient(135deg, #e50914, #b20710);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.5px;
  width: 100%;
  max-width: 280px;
}

.dns-blocked-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.dns-blocked-btn-secondary {
  padding: 10px 36px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  max-width: 280px;
}

.dns-blocked-btn-secondary:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}
/* ===================== PROFILE SELECTOR — NETFLIX PREMIUM ===================== */
.psel-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.97);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pselFadeIn 0.35s ease;
}

@keyframes pselFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.psel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  padding: 40px 16px;
  max-width: 900px;
}

/* ===== HEADER ===== */
.psel-header {
  text-align: center;
}

.psel-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.psel-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

/* ===== CAROUSEL ===== */
.psel-carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 700px;
  overflow: visible;
}

.psel-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  position: relative;
  overflow: visible;
}

/* ===== CARD ===== */
.psel-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  will-change: transform, opacity;
  user-select: none;
}

.psel-card.center {
  cursor: pointer;
  border-color: rgba(229, 9, 20, 0.4);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 50px rgba(229, 9, 20, 0.2), 0 20px 60px rgba(0,0,0,0.5);
}

.psel-card-avatar-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #2d1b69, #11998e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.psel-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.psel-avatar-emoji {
  line-height: 1;
  user-select: none;
}

.psel-card-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid #e50914;
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
  pointer-events: none;
  animation: pselRingPulse 2s ease-in-out infinite;
}

@keyframes pselRingPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(229, 9, 20, 0.5); }
  50%       { box-shadow: 0 0 35px rgba(229, 9, 20, 0.8); }
}

/* ===== STATUS DOT ===== */
.psel-status-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #000;
  z-index: 5;
}

.psel-status--active { background: #22c55e; }
.psel-status--free   { background: #ef4444; }

.psel-card-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.psel-card-hint {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.3px;
}

/* ===== ADD CARD ===== */
.psel-card-add .psel-add-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px dashed rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.5);
  transition: border-color 0.2s, color 0.2s;
}

.psel-card-add.center .psel-add-circle {
  border-color: rgba(229, 9, 20, 0.5);
  color: #e50914;
}

/* ===== ARROWS ===== */
.psel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(8px);
}

.psel-arrow:hover {
  background: rgba(229, 9, 20, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.psel-arrow-left  { left: -22px; }
.psel-arrow-right { right: -22px; }

/* ===== DOTS ===== */
.psel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.psel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.psel-dot.active {
  background: #e50914;
  transform: scale(1.4);
}

/* ===== ADD FORM ===== */
.psel-add-form {
  background: rgba(18,18,18,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 540px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 90vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(229,9,20,0.3) transparent;
  animation: pselFadeIn 0.25s ease;
}

.psel-add-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-align: center;
}

.psel-add-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.psel-add-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #2d1b69, #11998e);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(229,9,20,0.4);
}

.psel-add-name-preview {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.psel-name-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.psel-name-input:focus {
  border-color: rgba(229,9,20,0.6);
}

.psel-name-input::placeholder { color: rgba(255,255,255,0.35); }

/* ===== AVATAR PICKER ===== */
.psel-avatar-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.psel-picker-tabs {
  display: flex;
  gap: 8px;
}

.psel-picker-tab {
  flex: 1;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.psel-picker-tab.active {
  background: rgba(229,9,20,0.2);
  border-color: rgba(229,9,20,0.4);
  color: #fff;
}

.psel-dicebear-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.psel-style-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.psel-style-row::-webkit-scrollbar { display: none; }

.psel-style-btn {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
  transition: border-color 0.2s;
}

.psel-style-btn.active {
  border-color: #e50914;
  background: rgba(229,9,20,0.1);
}

.psel-style-btn img { width: 100%; height: 100%; object-fit: cover; }

.psel-avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.psel-avatar-opt {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  overflow: hidden;
  padding: 3px;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.psel-avatar-opt:hover { transform: scale(1.08); border-color: rgba(255,255,255,0.3); }

.psel-avatar-opt.selected { border-color: #e50914; background: rgba(229,9,20,0.12); }

.psel-avatar-opt img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.psel-regen-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-family: inherit;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.psel-regen-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.psel-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.psel-emoji-opt {
  aspect-ratio: 1;
  font-size: 1.6rem;
  border-radius: 10px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.psel-emoji-opt:hover { background: rgba(255,255,255,0.1); transform: scale(1.1); }
.psel-emoji-opt.selected { border-color: #e50914; background: rgba(229,9,20,0.12); }

/* ===== FORM ACTIONS ===== */
.psel-add-actions {
  display: flex;
  gap: 12px;
}

.psel-btn-cancel,
.psel-btn-confirm {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.psel-btn-cancel {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.12);
}

.psel-btn-cancel:hover { background: rgba(255,255,255,0.14); color: #fff; }

.psel-btn-confirm {
  background: #e50914;
  color: #fff;
  box-shadow: 0 4px 20px rgba(229,9,20,0.4);
}

.psel-btn-confirm:hover:not(:disabled) { background: #ff1a1a; transform: translateY(-1px); }
.psel-btn-confirm:disabled { opacity: 0.45; cursor: not-allowed; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .psel-carousel { height: 200px; }
  .psel-arrow-left  { left: 0; }
  .psel-arrow-right { right: 0; }
  .psel-add-form { padding: 24px 16px; border-radius: 16px; }
  .psel-avatar-grid { grid-template-columns: repeat(4, 1fr); }
  .psel-emoji-grid { grid-template-columns: repeat(6, 1fr); }
}
/* ============================================================
   LOGIN PAGE — Netflix desktop + HBO Max mobile
   ============================================================ */

/* ---------- Keyframes ---------- */
@keyframes lp-screen-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lp-slide-down {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lp-slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lp-spin {
  to { transform: rotate(360deg); }
}
@keyframes lp-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}
@keyframes tmdb-zoom {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1.0); }
}
@keyframes tmdb-info-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Screen ---------- */
.lp-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: row;
  background: #000;
  animation: lp-screen-in 0.5s ease both;
  z-index: 9999;
}

/* ---------- Left panel ---------- */
.lp-left {
  width: 45%;
  min-width: 340px;
  max-width: 560px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 3.5vh, 48px) clamp(28px, 3.5vw, 56px);
  position: relative;
  z-index: 2;
  overflow-y: auto;
}

/* ---------- Right panel (TMDB) ---------- */
.lp-right {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.lp-right-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #000 0%, rgba(0,0,0,0.55) 28%, transparent 65%);
  z-index: 3;
  pointer-events: none;
}

/* ---------- Side-left inner ---------- */
.lp-side-left {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---------- Brand ---------- */
.lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  animation: lp-slide-down 0.55s ease 0.1s both;
}
.lp-brand-logo {
  height: clamp(32px, 4vh, 48px);
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.lp-brand-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #e50914;
  text-transform: uppercase;
}

/* ---------- Headings ---------- */
.lp-headings {
  margin-bottom: 32px;
  animation: lp-slide-up 0.55s ease 0.2s both;
}
.lp-title {
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 8px;
}
.lp-title--mb { display: none; }
.lp-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

/* ---------- Form ---------- */
.lp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ---------- Fields ---------- */
.lp-field {
  position: relative;
  opacity: 0;
}
.lp-f1 { animation: lp-slide-up 0.5s ease 0.30s forwards; }
.lp-f2 { animation: lp-slide-up 0.5s ease 0.38s forwards; }
.lp-f3 { animation: lp-slide-up 0.5s ease 0.46s forwards; }

.lp-input {
  width: 100%;
  height: clamp(46px, 4.2vh, 56px);
  padding: 22px 16px 8px;
  background: #1c1c1c;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  color: #fff;
  font-size: clamp(13px, 1.1vw, 15px);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lp-input:focus {
  border-color: #e50914;
  box-shadow: 0 0 0 3px rgba(229,9,20,0.18);
}
.lp-input--err {
  border-color: #e50914 !important;
  animation: lp-shake 0.35s ease;
}

/* Floating label */
.lp-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  pointer-events: none;
  transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease;
}
.lp-input:focus ~ .lp-label,
.lp-input:not(:placeholder-shown) ~ .lp-label {
  top: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  transform: none;
}

/* Password wrap */
.lp-pass-wrap {
  position: relative;
}
.lp-pass-wrap .lp-input {
  padding-right: 48px;
}
.lp-pass-wrap .lp-label {
  top: 50%;
}
.lp-pass-wrap .lp-input:focus ~ .lp-label,
.lp-pass-wrap .lp-input:not(:placeholder-shown) ~ .lp-label {
  top: 10px;
  font-size: 11px;
  transform: none;
}
.lp-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.lp-eye:hover { color: #fff; }
.lp-eye svg { width: 18px; height: 18px; }

/* ---------- Error ---------- */
.lp-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff6b6b;
  font-size: 13px;
  background: rgba(229,9,20,0.1);
  border: 1px solid rgba(229,9,20,0.25);
  border-radius: 6px;
  padding: 10px 14px;
  animation: lp-shake 0.35s ease;
}
.lp-error svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.lp-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  opacity: 0;
  animation: lp-slide-up 0.5s ease 0.54s forwards;
}
.lp-btn {
  width: 100%;
  height: clamp(42px, 3.8vh, 50px);
  border: none;
  border-radius: 6px;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.lp-btn:active { transform: scale(0.98); }
.lp-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.lp-btn--enter {
  background: linear-gradient(135deg, #e50914 0%, #b0060f 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(229,9,20,0.35);
}
.lp-btn--enter:hover:not(:disabled) {
  box-shadow: 0 6px 28px rgba(229,9,20,0.55);
  transform: translateY(-1px);
}
.lp-btn--test {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.2);
}
.lp-btn--test:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

/* Spinner */
.lp-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lp-spin 0.7s linear infinite;
  vertical-align: middle;
}

/* ---------- Chips ---------- */
.lp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  opacity: 0;
  animation: lp-slide-up 0.5s ease 0.66s forwards;
}
.lp-chip {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 4px 12px;
}

/* ---------- Copyright ---------- */
.lp-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  margin-top: 20px;
  opacity: 0;
  animation: lp-slide-up 0.5s ease 0.74s forwards;
}

/* ============================================================
   TMDB Background classes
   ============================================================ */
.tmdb-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
}
.tmdb-bg--ready { opacity: 1; }

.tmdb-bg__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  will-change: transform, opacity;
}
.tmdb-bg__layer--prev {
  z-index: 1;
  opacity: 1;
}
.tmdb-bg__layer--active {
  z-index: 2;
  animation: tmdb-zoom 1.2s ease both;
}

.tmdb-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 5;
}
.tmdb-bg__gradient-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, transparent 50%);
  z-index: 6;
}
.tmdb-bg__gradient-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 45%);
  z-index: 6;
}
.tmdb-bg__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.4;
  z-index: 7;
  pointer-events: none;
}

.tmdb-bg__info {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 8;
  text-align: right;
  animation: tmdb-info-in 0.6s ease 1s both;
}
.tmdb-bg__title {
  display: block;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  max-width: 220px;
}
.tmdb-bg__rating {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  color: rgba(255,215,0,0.85);
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ============================================================
   RESPONSIVE — 1280px (medium desktop)
   ============================================================ */
@media (max-width: 1280px) {
  .lp-left {
    width: 48%;
    padding: 36px 40px;
  }
  .lp-title {
    font-size: 26px;
  }
  .lp-input {
    height: 50px;
    font-size: 14px;
  }
  .lp-btn {
    height: 46px;
    font-size: 14px;
  }
}

/* ============================================================
   RESPONSIVE — 1100px (wider left panel)
   ============================================================ */
@media (max-width: 1100px) {
  .lp-left {
    width: 50%;
    padding: 32px 36px;
  }
  .lp-title {
    font-size: 24px;
  }
}

/* ============================================================
   RESPONSIVE — 899px (mobile stack: TMDB top, form bottom)
   ============================================================ */
@media (max-width: 899px) {
  .lp-screen {
    flex-direction: column;
  }
  .lp-right {
    order: -1;
    height: 42vh;
    min-height: 200px;
    flex: none;
    width: 100%;
  }
  .lp-right-veil {
    background: linear-gradient(to top, #000 0%, rgba(0,0,0,0.45) 40%, transparent 70%);
  }
  .lp-left {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex: 1;
    border-radius: 20px 20px 0 0;
    margin-top: -20px;
    padding: 32px 28px 40px;
    overflow-y: auto;
    align-items: flex-start;
  }
  .lp-title--dk { display: none; }
  .lp-title--mb { display: block; }
}

/* ============================================================
   RESPONSIVE — 480px (compact mobile)
   ============================================================ */
@media (max-width: 480px) {
  .lp-right {
    height: 36vh;
  }
  .lp-left {
    padding: 24px 20px 36px;
  }
  .lp-title {
    font-size: 26px;
  }
  .lp-brand-name {
    font-size: 22px;
  }
  .lp-btn {
    height: 46px;
    font-size: 14px;
  }
}/* ===================== ORION PLAYER â€” CINEMATIC LOADING SCREEN ===================== */
.orion-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--nx-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  animation: nx-loadFadeOut 0.6s ease 2.2s forwards;
}

.orion-loading-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 0 40px var(--nx-red-glow));
  animation: nx-logoPulse 1.5s ease-in-out infinite;
}

@keyframes nx-logoPulse {
  0%, 100% { filter: drop-shadow(0 0 30px var(--nx-red-glow)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 60px rgba(255, 26, 26, 0.6)); transform: scale(1.03); }
}

.orion-loading-brand {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--nx-red), #ff6b6b, var(--nx-red));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: nx-brandShimmer 2s ease infinite;
}

@keyframes nx-brandShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.orion-loading-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.orion-loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--nx-red), transparent);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--nx-red-glow);
  animation: nx-loadBarSweep 1.2s ease-in-out infinite;
}

@keyframes nx-loadBarSweep {
  0% { left: -40%; }
  100% { left: 100%; }
}

@keyframes nx-loadFadeOut {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}

/* ===================== LAYOUT BASE ===================== */
.layout {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
  background: var(--nx-black);
  opacity: 0;
  animation: nx-appReveal 0.6s var(--ease-out) 2.4s forwards;
}

@keyframes nx-appReveal {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* Main content area */
.content {
  flex: 1;
  margin-left: var(--sidebar-expanded);
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: clip;
  background: var(--nx-black);
  width: calc(100% - var(--sidebar-expanded));
  transition: margin-left 0.3s var(--ease-smooth);
}

/* Admin route: no player sidebar */
.no-sidebar .content {
  margin-left: 0;
  width: 100%;
}

.sidebar-collapsed .content {
  margin-left: 64px;
  width: calc(100% - 64px);
}

@media (max-width: 768px) {
  .content {
    margin-left: 0;
    width: 100%;
    padding-top: 0;
    padding-bottom: 90px;
  }
  .sidebar-collapsed .content {
    margin-left: 0;
    width: 100%;
  }
}

/* ===================== GLOBAL MESSAGE BANNER ===================== */
.global-msg-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(229,9,20,0.15), rgba(229,9,20,0.05));
  border-bottom: 1px solid rgba(229,9,20,0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  z-index: 50;
  animation: gm-slide 0.3s ease;
}
@keyframes gm-slide { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }
.global-msg-text { flex: 1; text-align: center; line-height: 1.5; }
.global-msg-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}
.global-msg-close:hover { color: #fff; }


/* ===================== PAGE FALLBACK ===================== */
.page-loading {
  text-align: center;
  padding: 120px 40px;
  color: var(--nx-silver-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  font-size: 15px;
}

.page-error {
  margin: 40px;
  background: var(--nx-red-dim);
  border: 1px solid rgba(255, 26, 26, 0.3);
  color: #ff8080;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
}

.page-empty {
  text-align: center;
  padding: 120px 40px;
  color: var(--nx-text-muted);
  font-size: 16px;
}

/* ===================== SETTINGS ===================== */
.settings-panel {
  padding: 40px;
}

.settings-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--nx-text);
  margin-bottom: 32px;
}

.settings-section {
  margin-bottom: 36px;
}

.settings-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: var(--nx-silver-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--nx-border);
}

.epg-input-group {
  display: flex;
  gap: 10px;
}

.settings-input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--nx-text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.settings-input:focus {
  border-color: var(--nx-red);
  box-shadow: 0 0 0 3px var(--nx-red-dim);
}

.settings-btn {
  padding: 12px 22px;
  background: var(--nx-red);
  color: var(--nx-text);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.settings-btn:hover {
  background: #ff3333;
  transform: scale(1.03);
}

.epg-status {
  color: #4caf50;
  font-size: 13px;
  margin-top: 10px;
  font-weight: 500;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .settings-panel {
    padding: 20px 16px;
  }
}

/* ===================== REFRESH LOADING OVERLAY ===================== */
.refresh-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 90000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.refresh-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: var(--nx-card, #1a1a2e);
  border: 1px solid var(--nx-border, rgba(255,255,255,0.1));
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  max-width: 360px;
}

.refresh-loading-card p {
  color: var(--nx-text, #fff);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* ===================== PROFILE SELECTOR OVERLAY ===================== */
.profile-selector-overlay {
  position: fixed;
  inset: 0;
  z-index: 80000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-selector-card {
  background: var(--nx-card, #1a1a2e);
  border: 1px solid var(--nx-border, rgba(255,255,255,0.1));
  border-radius: 20px;
  padding: 40px 32px;
  width: min(90vw, 540px);
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.profile-selector-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--nx-text, #fff);
  margin: 0;
}

.profile-selector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.profile-selector-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 20px 18px;
  min-width: 100px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  color: var(--nx-text, #fff);
}

.profile-selector-item:hover,
.profile-selector-item:focus {
  border-color: var(--nx-red, #e50914);
  background: rgba(229, 9, 20, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.profile-add-btn {
  border-style: dashed;
  border-color: rgba(255,255,255,0.2);
}

.profile-item-avatar {
  font-size: 36px;
  line-height: 1;
}

.profile-item-name {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Profile add form */
.profile-add-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 320px;
  padding-top: 4px;
  border-top: 1px solid var(--nx-border, rgba(255,255,255,0.1));
}

.profile-add-avatars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.profile-avatar-btn {
  font-size: 24px;
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  line-height: 1;
}

.profile-avatar-btn.selected {
  border-color: var(--nx-red, #e50914);
  background: rgba(229, 9, 20, 0.12);
}

.profile-avatar-btn:hover {
  transform: scale(1.1);
}

.profile-name-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--nx-text, #fff);
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.profile-name-input:focus {
  border-color: var(--nx-red, #e50914);
}

.profile-add-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.profile-add-cancel {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--nx-text, #fff);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-add-cancel:hover { background: rgba(255,255,255,0.12); }

.profile-add-confirm {
  flex: 1;
  padding: 10px;
  background: var(--nx-red, #e50914);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.profile-add-confirm:disabled { opacity: 0.45; cursor: not-allowed; }
.profile-add-confirm:not(:disabled):hover { background: #ff1f2b; }

/* ===================== PROFILE CONFLICT MODAL ===================== */
.profile-conflict-overlay {
  position: fixed;
  inset: 0;
  z-index: 95000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-conflict-card {
  background: var(--nx-card, #1a1a2e);
  border: 1px solid var(--nx-border, rgba(255,255,255,0.1));
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 340px;
  width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.profile-conflict-icon { font-size: 40px; }

.profile-conflict-card p {
  color: var(--nx-text, #fff);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

.profile-conflict-ok {
  padding: 11px 32px;
  background: var(--nx-red, #e50914);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-conflict-ok:hover { background: #ff1f2b; }

