/* ========== IMPORTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Sora:wght@400;500;600;700;800&display=swap');

/* ========== VARIABLES ========== */
:root {
  --accent: #F47521;
  --accent-dark: #c05d14;
  --accent-glow: rgba(244,117,33,0.25);
  --bg: #0b0c0f;
  --bg2: #111318;
  --bg3: #1a1c23;
  --bg4: #22252e;
  --border: rgba(255,255,255,0.07);
  --text: #f0f1f5;
  --text2: #9ca3af;
  --text3: #6b7280;
  --header-h: 64px;
  --footer-h: 60px;
  --radius: 8px;
  --radius-lg: 14px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --font-display: 'Sora', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.7);
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; outline: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; outline: none; border: none; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ========== LAYOUT ========== */
.xnx-container { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.xnx-page { padding-top: calc(var(--header-h) + 24px); padding-bottom: calc(var(--footer-h) + 32px); min-height: 100vh; }

/* ========== HEADER ========== */
.xnx-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(11,12,15,0.98) 0%, rgba(11,12,15,0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.xnx-header.scrolled { background: rgba(11,12,15,0.99); }
.xnx-header-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 24px;
  width: 100%;
  display: flex; align-items: center; gap: 32px;
}
.xnx-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
}
.xnx-logo span { color: var(--accent); }
.xnx-logo svg { flex-shrink: 0; }

.xnx-nav { display: flex; align-items: center; gap: 4px; }
.xnx-nav-link {
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
  white-space: nowrap;
}
.xnx-nav-link:hover, .xnx-nav-link.active { color: var(--text); background: var(--bg3); }
.xnx-nav-link.active { color: var(--accent); }

.xnx-header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.xnx-search-wrap { position: relative; }
.xnx-search-form {
  display: flex; align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  gap: 8px;
  transition: border-color var(--transition);
}
.xnx-search-form:focus-within { border-color: var(--accent); }
.xnx-search-form svg { color: var(--text3); flex-shrink: 0; }
#xnx-search-input {
  background: none; color: var(--text);
  font-size: 14px; padding: 9px 0;
  width: 200px;
}
#xnx-search-input::placeholder { color: var(--text3); }
#xnx-search-drop {
  display: none;
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  min-width: 320px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
}
.xnx-sr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  transition: background var(--transition);
}
.xnx-sr-item:hover { background: var(--bg4); }
.xnx-sr-item img { width: 46px; height: 69px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.xnx-sr-title { font-size: 14px; font-weight: 500; color: var(--text); line-height: 1.3; }
.xnx-sr-year { font-size: 12px; color: var(--text3); margin-top: 2px; }

.xnx-header-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.xnx-header-btn:hover { color: var(--text); border-color: var(--accent); }

/* ========== MOBILE NAV TOGGLE ========== */
.xnx-menu-toggle {
  display: none;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  background: var(--bg3); border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text2);
}

/* ========== BOTTOM NAV (mobile) ========== */
.xnx-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  background: rgba(11,12,15,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  justify-content: space-around; align-items: center;
}
.xnx-bn-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 16px;
  color: var(--text3);
  font-size: 10px; font-weight: 500;
  transition: color var(--transition);
  flex: 1;
}
.xnx-bn-item svg { width: 22px; height: 22px; }
.xnx-bn-item.active, .xnx-bn-item:hover { color: var(--accent); }

/* OLD HERO SLIDER CSS removed — new styles at bottom */
/* ========== BUTTONS ========== */
.xnx-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.xnx-btn-primary {
  background: var(--accent); color: #fff;
}
.xnx-btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 6px 20px var(--accent-glow); }
.xnx-btn-secondary {
  background: rgba(255,255,255,0.1); color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}
.xnx-btn-secondary:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.xnx-btn-ghost {
  background: none; color: var(--text2);
  border: 1px solid var(--border);
  padding: 10px 20px;
}
.xnx-btn-ghost:hover { color: var(--text); border-color: var(--text2); }
.xnx-btn svg { flex-shrink: 0; }

/* ========== SECTION ========== */
.xnx-section { margin: 40px 0; }
.xnx-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.xnx-section-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.xnx-section-title::before {
  content: '';
  display: block;
  width: 4px; height: 20px;
  background: var(--accent);
  border-radius: 2px;
}
.xnx-view-all {
  font-size: 13px; font-weight: 500; color: var(--accent);
  display: flex; align-items: center; gap: 4px;
  transition: gap var(--transition);
}
.xnx-view-all:hover { gap: 8px; }

/* ========== HORIZONTAL SCROLL ========== */
.xnx-scroll-wrap { position: relative; }
.xnx-scroll-row {
  display: flex; gap: 14px;
  overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.xnx-scroll-row::-webkit-scrollbar { display: none; }
.xnx-scroll-row .xnx-card { scroll-snap-align: start; flex-shrink: 0; }

/* ========== CARD ========== */
.xnx-card {
  display: block;
  width: 150px;
  transition: transform var(--transition);
}
.xnx-card:hover { transform: translateY(-4px); }
.xnx-card-poster {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg3);
}
.xnx-card-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.xnx-card:hover .xnx-card-poster img { transform: scale(1.05); }
.xnx-card-hover {
  position: absolute; inset: 0;
  background: rgba(11,12,15,0.65);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.xnx-card:hover .xnx-card-hover { opacity: 1; }
.xnx-card-play {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px var(--accent-glow);
}
.xnx-card-play svg { width: 22px; height: 22px; color: #fff; margin-left: 2px; }
.xnx-card-rating {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.75);
  border-radius: 4px; padding: 3px 7px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 3px;
  color: #fbbf24; backdrop-filter: blur(4px);
}
.xnx-card-meta { padding: 8px 2px 0; }
.xnx-card-title {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.xnx-card-year { font-size: 11px; color: var(--text3); margin-top: 3px; display: block; }

/* ========== GRID ========== */
.xnx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}
.xnx-grid .xnx-card { width: 100%; }

/* ========== GENRE CHIPS ========== */
.xnx-genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.xnx-genre-chip {
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 13px; font-weight: 500;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  transition: all var(--transition);
  cursor: pointer;
}
.xnx-genre-chip:hover, .xnx-genre-chip.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ========== PAGINATION ========== */
.xnx-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 40px;
}
.xnx-page-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  transition: all var(--transition);
}
.xnx-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.xnx-page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.xnx-page-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ========== DETAILS PAGE ========== */
.xnx-details-hero {
  position: relative;
  height: 55vh; min-height: 360px;
  margin-top: calc(-1 * var(--header-h));
  overflow: hidden;
}
.xnx-details-hero-bg { position: absolute; inset: 0; }
.xnx-details-hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.35); }
.xnx-details-hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 60%),
              linear-gradient(to right, rgba(11,12,15,0.8) 0%, transparent 60%);
}

.xnx-details-content {
  position: relative; z-index: 2;
  max-width: 1360px; margin: -180px auto 0;
  padding: 0 24px;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 36px; align-items: start;
}
.xnx-details-poster {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 2/3;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  position: sticky; top: calc(var(--header-h) + 16px);
}
.xnx-details-poster img { width: 100%; height: 100%; object-fit: cover; }
.xnx-details-info { padding-top: 60px; }
.xnx-details-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 14px;
}
.xnx-details-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.xnx-details-tag {
  font-size: 12px; font-weight: 600; padding: 5px 12px;
  border-radius: 4px; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2);
}
.xnx-details-tag.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.xnx-details-desc {
  font-size: 15px; color: var(--text2); line-height: 1.7;
  margin-bottom: 24px; max-width: 620px;
}
.xnx-details-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

.xnx-details-stat-row {
  display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 28px;
}
.xnx-stat { display: flex; flex-direction: column; gap: 2px; }
.xnx-stat-label { font-size: 11px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.xnx-stat-value { font-size: 16px; font-weight: 700; color: var(--text); }

/* ========== EPISODES ========== */
.xnx-eps-section { margin-top: 48px; }
.xnx-eps-section-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.xnx-season-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.xnx-season-tab {
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2);
  transition: all var(--transition);
}
.xnx-season-tab:hover, .xnx-season-tab.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.xnx-ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.xnx-ep-card {
  display: flex; gap: 14px; align-items: center;
  padding: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.xnx-ep-card:hover { border-color: var(--accent); background: var(--bg3); cursor: pointer; }
.xnx-ep-thumb {
  width: 100px; height: 56px;
  border-radius: 6px; overflow: hidden; flex-shrink: 0;
  background: var(--bg3);
  position: relative;
}
.xnx-ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xnx-ep-thumb-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity var(--transition);
}
.xnx-ep-card:hover .xnx-ep-thumb-play { opacity: 1; }
.xnx-ep-thumb-play svg { width: 24px; height: 24px; color: #fff; }
.xnx-ep-info { flex: 1; min-width: 0; }
.xnx-ep-num { font-size: 11px; color: var(--text3); font-weight: 600; margin-bottom: 3px; }
.xnx-ep-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.xnx-ep-runtime { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ========== WATCH PAGE ========== */
.xnx-watch-layout {
  display: grid; grid-template-columns: 1fr 340px;
  gap: 20px; max-width: 1360px; margin: 0 auto;
  padding: 0 24px; padding-top: calc(var(--header-h) + 16px);
  padding-bottom: calc(var(--footer-h) + 24px);
}
.xnx-player-wrap {
  position: sticky; top: calc(var(--header-h) + 8px);
}
.xnx-player-box {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}
.xnx-player-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.xnx-server-tabs { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.xnx-server-btn {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2);
  transition: all var(--transition);
}
.xnx-server-btn:hover, .xnx-server-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.xnx-watch-meta { margin-top: 20px; }
.xnx-watch-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; margin-bottom: 8px;
}
.xnx-watch-ep-info { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.xnx-watch-sidebar { display: flex; flex-direction: column; gap: 16px; }
.xnx-sidebar-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.xnx-ep-list { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.xnx-ep-list-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg2); border: 1px solid var(--border);
  transition: all var(--transition); cursor: pointer;
}
.xnx-ep-list-item:hover, .xnx-ep-list-item.active {
  border-color: var(--accent); background: var(--bg3);
}
.xnx-ep-list-item.active .xnx-ep-list-num { color: var(--accent); }
.xnx-ep-list-num { font-size: 13px; font-weight: 700; color: var(--text3); width: 28px; flex-shrink: 0; }
.xnx-ep-list-name { font-size: 13px; font-weight: 500; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ========== BROWSE ========== */
.xnx-browse-filters {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--bg2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.xnx-filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.xnx-filter-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }
.xnx-filter-select {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 9px 12px;
  color: var(--text); font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  padding-right: 32px;
  transition: border-color var(--transition);
}
.xnx-filter-select:focus { border-color: var(--accent); }

/* ========== LOADING ========== */
.xnx-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px; color: var(--text3);
  flex-direction: column; gap: 16px;
}
.xnx-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bg3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.xnx-error {
  text-align: center; padding: 60px 20px; color: var(--text3);
}
.xnx-error svg { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--text3); }
.xnx-error h3 { font-size: 18px; color: var(--text2); margin-bottom: 8px; }

/* ========== MY LIST ========== */
.xnx-mylist-empty {
  text-align: center; padding: 80px 20px;
  color: var(--text3);
}
.xnx-mylist-empty svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.3; }
.xnx-mylist-empty h2 { font-size: 20px; color: var(--text2); margin-bottom: 8px; }

/* ========== FOOTER ========== */
.xnx-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 40px 24px 80px;
  margin-top: 60px;
}
.xnx-footer-inner {
  max-width: 1360px; margin: 0 auto;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 48px;
}
.xnx-footer-brand .xnx-logo { margin-bottom: 12px; }
.xnx-footer-tagline { font-size: 14px; color: var(--text3); line-height: 1.6; max-width: 220px; }
.xnx-footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.xnx-footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text3); margin-bottom: 14px; }
.xnx-footer-col a { display: block; font-size: 14px; color: var(--text2); margin-bottom: 10px; transition: color var(--transition); }
.xnx-footer-col a:hover { color: var(--accent); }
.xnx-footer-bottom {
  max-width: 1360px; margin: 32px auto 0;
  padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--text3);
  flex-wrap: wrap; gap: 12px;
}

/* ========== ADMIN ========== */
.xnx-admin-layout {
  display: grid; grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.xnx-admin-sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; bottom: 0; left: 0; width: 260px;
  overflow-y: auto; z-index: 500;
  display: flex; flex-direction: column;
}
.xnx-admin-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
}
.xnx-admin-brand span { color: var(--accent); }
.xnx-admin-nav { padding: 16px 12px; flex: 1; }
.xnx-admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
  margin-bottom: 2px;
}
.xnx-admin-nav-item:hover { background: var(--bg3); color: var(--text); }
.xnx-admin-nav-item.active { background: rgba(244,117,33,0.12); color: var(--accent); }
.xnx-admin-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.xnx-admin-main { margin-left: 260px; padding: 32px; min-height: 100vh; }
.xnx-admin-page { display: none; }
.xnx-admin-page.active { display: block; }
.xnx-admin-page-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.xnx-admin-page-sub { font-size: 14px; color: var(--text3); margin-bottom: 32px; }

.xnx-admin-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px;
}
.xnx-admin-card-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }

.xnx-form-group { margin-bottom: 18px; }
.xnx-form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 7px; }
.xnx-form-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 11px 14px;
  color: var(--text); font-size: 14px;
  transition: border-color var(--transition);
}
.xnx-form-input:focus { border-color: var(--accent); }
.xnx-form-hint { font-size: 12px; color: var(--text3); margin-top: 5px; }

.xnx-server-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.xnx-server-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--bg3);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.xnx-server-row-name { font-size: 14px; font-weight: 600; flex: 0 0 120px; }
.xnx-server-row-url { font-size: 12px; color: var(--text3); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xnx-server-row-del {
  width: 32px; height: 32px;
  border-radius: var(--radius); background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  display: flex; align-items: center; justify-content: center;
  color: #ef4444; transition: all var(--transition); flex-shrink: 0;
}
.xnx-server-row-del:hover { background: #ef4444; color: #fff; }

.xnx-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.xnx-stat-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.xnx-stat-card-label { font-size: 12px; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.xnx-stat-card-value { font-size: 28px; font-weight: 800; font-family: var(--font-display); color: var(--text); }
.xnx-stat-card-value.accent { color: var(--accent); }

.xnx-alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.xnx-alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.xnx-alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.xnx-alert-info { background: rgba(244,117,33,0.1); border: 1px solid rgba(244,117,33,0.3); color: var(--accent); }

/* ========== LOGIN ========== */
.xnx-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, rgba(244,117,33,0.08) 0%, transparent 60%);
}
.xnx-login-box {
  width: 100%; max-width: 400px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-lg);
}
.xnx-login-logo { text-align: center; margin-bottom: 8px; }
.xnx-login-title { font-family: var(--font-display); font-size: 28px; font-weight: 800; text-align: center; }
.xnx-login-title span { color: var(--accent); }
.xnx-login-sub { font-size: 14px; color: var(--text3); text-align: center; margin-bottom: 32px; }

/* ========== CHARACTERS ========== */
.xnx-chars-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.xnx-chars-scroll::-webkit-scrollbar { display: none; }
.xnx-char-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex-shrink: 0; width: 84px; text-align: center;
}
.xnx-char-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  overflow: hidden; background: var(--bg3);
  border: 2px solid var(--border);
}
.xnx-char-avatar img { width: 100%; height: 100%; object-fit: cover; }
.xnx-char-name { font-size: 11px; font-weight: 600; color: var(--text2); line-height: 1.3; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .xnx-details-content { grid-template-columns: 200px 1fr; gap: 24px; }
  .xnx-watch-layout { grid-template-columns: 1fr; }
  .xnx-watch-sidebar { max-height: 400px; }
  .xnx-ep-list { max-height: 340px; }
}

@media (max-width: 768px) {
  .xnx-nav { display: none; }
  .xnx-menu-toggle { display: flex; }
  .xnx-bottom-nav { display: flex; }
  #xnx-search-input { width: 140px; }

  .xnx-details-content { grid-template-columns: 1fr; margin-top: -60px; }
  .xnx-details-poster { width: 140px; height: 210px; aspect-ratio: unset; position: static; }
  .xnx-details-info { padding-top: 0; display: flex; flex-direction: column; }

  .xnx-hero-content { bottom: 60px; }
  .xnx-hero-desc { display: none; }
  .xnx-hero-title { font-size: 24px; }

  .xnx-footer-inner { grid-template-columns: 1fr; }
  .xnx-footer-links { grid-template-columns: repeat(2, 1fr); }
  .xnx-footer { padding-bottom: calc(var(--footer-h) + 24px); }

  .xnx-admin-layout { grid-template-columns: 1fr; }
  .xnx-admin-sidebar { display: none; }
  .xnx-admin-main { margin-left: 0; padding: 20px; }

  .xnx-ep-grid { grid-template-columns: 1fr; }
  .xnx-browse-filters { flex-direction: column; }
  .xnx-watch-layout { padding: 0 16px; padding-top: calc(var(--header-h) + 12px); padding-bottom: calc(var(--footer-h) + 16px); }

  .xnx-details-hero { height: 38vh; min-height: 240px; }
  .xnx-page { padding-bottom: calc(var(--footer-h) + 16px); }
}

@media (max-width: 480px) {
  .xnx-container { padding: 0 16px; }
  .xnx-header-inner { padding: 0 16px; gap: 12px; }
  .xnx-logo { font-size: 18px; }
  #xnx-search-input { width: 100px; }
  .xnx-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .xnx-section { margin: 28px 0; }
  .xnx-details-stat-row { gap: 16px; }
  .xnx-footer-links { grid-template-columns: 1fr; }
}

/* ========== UTILITY ========== */
.hidden { display: none !important; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ========== LOGO UPDATE (no icon, text only) ========== */
.xnx-logo {
  display: flex; align-items: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  flex-shrink: 0;
}
.xnx-logo span { color: var(--accent); }

/* ========== HEADER AUTH BUTTON ========== */
.xnx-signin-btn {
  display: inline-flex; align-items: center;
  padding: 7px 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition);
}
.xnx-signin-btn:hover { background: var(--accent-dark); }

.xnx-avatar-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px; font-weight: 700;
  transition: opacity var(--transition);
}
.xnx-avatar-btn:hover { opacity: 0.85; }

/* ========== HERO SLIDER REWRITE ========== */
.xnx-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  max-height: 860px;
  overflow: hidden;
  background: var(--bg);
}

/* Skeleton loader */
.xnx-hero-skeleton {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 50%, var(--bg2) 100%);
  animation: xnx-shimmer 1.8s infinite;
}
@keyframes xnx-shimmer {
  0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; }
}

/* Slides container */
.xnx-hero-slides {
  position: absolute; inset: 0;
}

/* Individual slides */
.xnx-hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.xnx-hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.xnx-hero-slide-enter { opacity: 0; }
.xnx-hero-slide-active { opacity: 1; }
.xnx-hero-slide-exit { opacity: 0; }

/* Overlays */
.xnx-hero-overlay-left {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,12,15,0.85) 0%, rgba(11,12,15,0.4) 50%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}
.xnx-hero-overlay-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(to top, var(--bg) 0%, rgba(11,12,15,0.5) 50%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Content */
.xnx-hero-content-wrap {
  position: absolute; inset: 0;
  z-index: 3;
  display: flex; align-items: flex-end;
  padding: 0 5% 100px;
  pointer-events: none;
}

.xnx-hero-content {
  max-width: 560px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
  pointer-events: all;
}
.xnx-hero-content-enter { opacity: 0; transform: translateY(24px); }
.xnx-hero-content-active { opacity: 1; transform: translateY(0); }
.xnx-hero-content-exit { opacity: 0; transform: translateY(-16px); }

.xnx-hero-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.xnx-hero-badge {
  background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 4px;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.xnx-hero-year {
  color: var(--text2); font-size: 14px; font-weight: 500;
}
.xnx-hero-score {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 700; color: #fbbf24;
}

.xnx-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.xnx-hero-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 480px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xnx-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Larger hero buttons */
.xnx-btn-lg {
  padding: 13px 28px !important;
  font-size: 15px !important;
}

/* Glass button for hero */
.xnx-btn-glass {
  background: rgba(255,255,255,0.1) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: #fff !important;
  backdrop-filter: blur(8px);
}
.xnx-btn-glass:hover {
  background: rgba(255,255,255,0.18) !important;
}

/* Controls (dots + arrows) */
.xnx-hero-controls {
  position: absolute;
  bottom: 32px; left: 5%; right: 5%;
  z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
}

.xnx-hero-dots { display: flex; align-items: center; gap: 8px; }
.xnx-hero-dot {
  width: 8px; height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.35);
  border: none; padding: 0; cursor: pointer;
  transition: all 0.35s ease;
}
.xnx-hero-dot.active {
  background: var(--accent);
  width: 24px;
}
.xnx-hero-dot:hover:not(.active) { background: rgba(255,255,255,0.6); }

.xnx-hero-arrows { display: flex; gap: 8px; }
.xnx-hero-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  backdrop-filter: blur(8px);
}
.xnx-hero-arrow:hover { background: rgba(255,255,255,0.22); }

/* ========== DETAILS PAGE IMPROVEMENTS ========== */
.xnx-details-left { display: flex; flex-direction: column; gap: 0; }
.xnx-details-poster-wrap {
  position: relative; flex-shrink: 0;
}
.xnx-details-poster-score {
  position: absolute; top: 10px; left: 10px;
  display: flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,0.75); color: #fbbf24;
  font-size: 13px; font-weight: 700;
  padding: 4px 8px; border-radius: 6px;
  backdrop-filter: blur(4px);
}
.xnx-cast-section { margin-top: 20px; }
.xnx-cast-title {
  font-size: 13px; font-weight: 700; color: var(--text2);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.xnx-details-tag.type-tag { background: var(--accent); color: #fff; }
.xnx-stat .star-val { color: #fbbf24; }

/* ========== WATCH PAGE IMPROVEMENTS ========== */
.xnx-watch-nav-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.xnx-watch-back-link {
  display: flex; align-items: center; gap: 5px;
  color: var(--text3); font-size: 13px;
  transition: color 0.2s;
}
.xnx-watch-back-link:hover { color: var(--accent); }
.xnx-watch-season-tag {
  font-size: 12px; color: var(--text3);
  background: var(--bg3); padding: 3px 10px; border-radius: 99px;
}
.xnx-watch-info-row {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 14px;
}
.xnx-watch-poster {
  width: 52px; height: 78px;
  object-fit: cover; border-radius: 6px;
  flex-shrink: 0;
}
.xnx-watch-ep-desc {
  font-size: 13px; color: var(--text2);
  line-height: 1.6; max-width: 560px; margin-bottom: 12px;
}
.xnx-watch-ep-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.xnx-sidebar-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  height: 100%;
}
.xnx-ep-list-thumb {
  width: 52px; height: 36px; border-radius: 4px;
  overflow: hidden; background: var(--bg3); flex-shrink: 0;
}
.xnx-ep-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xnx-ep-thumb-placeholder { width: 100%; height: 100%; background: var(--bg4); }
.xnx-ep-list-item {
  display: flex; align-items: center; gap: 10px;
}

/* ========== PROFILE / AUTH PAGE ========== */
.xnx-auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.xnx-auth-logo {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  text-align: center; margin-bottom: 20px;
}
.xnx-auth-logo span { color: var(--accent); }
.xnx-auth-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800;
  text-align: center; margin-bottom: 6px;
}
.xnx-auth-sub {
  font-size: 13px; color: var(--text3);
  text-align: center; margin-bottom: 28px;
}
.xnx-auth-switch {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: var(--text3);
}
.xnx-auth-switch button {
  color: var(--accent); font-size: 13px;
  font-weight: 600; cursor: pointer;
  background: none; border: none; padding: 0;
}
.xnx-auth-switch button:hover { text-decoration: underline; }

.xnx-alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  margin-bottom: 16px;
}
.xnx-alert-error { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.xnx-alert-success { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.xnx-alert-info { background: rgba(59,130,246,0.1); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }

.xnx-profile-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  margin-bottom: 16px;
}
.xnx-profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.xnx-profile-email {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
  word-break: break-all;
}
.xnx-profile-since { font-size: 13px; color: var(--text3); }

.xnx-profile-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 20px;
}
.xnx-pstat {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  text-align: center;
}
.xnx-pstat-val { display: block; font-size: 28px; font-weight: 800; color: var(--accent); }
.xnx-pstat-label { font-size: 12px; color: var(--text3); margin-top: 4px; display: block; }
.xnx-profile-actions { display: flex; flex-direction: column; }

/* ========== RESPONSIVE: HERO ========== */
@media (max-width: 768px) {
  .xnx-hero { height: 85vw; min-height: 380px; max-height: 600px; }
  .xnx-hero-content-wrap { padding: 0 16px 80px; }
  .xnx-hero-content { max-width: 100%; }
  .xnx-hero-desc { display: none; }
  .xnx-hero-title { font-size: clamp(22px, 6vw, 34px); margin-bottom: 12px; }
  .xnx-hero-controls { bottom: 16px; left: 16px; right: 16px; }
  .xnx-hero-arrows { display: none; }
  .xnx-btn-lg { padding: 11px 20px !important; font-size: 14px !important; }
}

@media (max-width: 480px) {
  .xnx-hero { height: 90vw; }
  .xnx-hero-title { font-size: 22px; }
  .xnx-auth-card { padding: 28px 20px; }
}

/* ========== RESPONSIVE: WATCH ========== */
@media (max-width: 768px) {
  .xnx-watch-info-row { gap: 10px; }
  .xnx-watch-poster { width: 42px; height: 63px; }
}

/* ========== MOBILE DRAWER ========== */
.xnx-mobile-drawer {
  position: fixed;
  top: 0; right: -300px;
  width: 280px; height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 10000;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}
.xnx-mobile-drawer.open { right: 0; }

.xnx-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.xnx-drawer-overlay.open { opacity: 1; pointer-events: all; }

.xnx-mobile-drawer-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.xnx-mobile-drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--text2); padding: 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.xnx-mobile-drawer-close:hover { color: var(--text); background: var(--bg3); }

.xnx-mobile-drawer-nav {
  display: flex; flex-direction: column;
  padding: 16px 12px; gap: 4px;
}
.xnx-mobile-nav-link {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  color: var(--text2);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.xnx-mobile-nav-link:hover,
.xnx-mobile-nav-link.active {
  background: var(--bg3);
  color: var(--text);
}
