/* ============================================================
   TulaWatch – Main Stylesheet
   Cetacean Blue theme: #001440 bg, red highlights, white text
   ============================================================ */

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #e50914;
  --red-dark:   #b0060f;
  --red-hover:  #ff1a24;
  --black:      #000a28;
  --bg:         #001440;
  --bg2:        #001a50;
  --bg3:        #002060;
  --card-bg:    #001848;
  --text:       #ffffff;
  --text-muted: #b3b3b3;
  --text-dim:   #7a8aaa;
  --border:     #002878;
  --radius:     6px;
  --radius-lg:  12px;
  --shadow:     0 4px 20px rgba(0,0,0,.7);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; outline: none; }

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ─── Utility ───────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .85rem; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: .5px;
}
.badge-dark {
  background: var(--bg3);
  color: var(--text-muted);
}

/* ─── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn:active { transform: scale(.97); }
.btn-red    { background: var(--red);   color: #fff; }
.btn-red:hover { background: var(--red-hover); color: #fff; }
.btn-dark   { background: rgba(255,255,255,.1); color: #fff; }
.btn-dark:hover { background: rgba(255,255,255,.2); }
.btn-outline { background: transparent; border: 2px solid var(--red); color: var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1.1rem; }

/* ─── Navbar ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(0,20,64,.98) 0%, rgba(0,20,64,.8) 60%, transparent 100%);
  padding: 14px 0;
  transition: background var(--transition);
}
.navbar.scrolled { background: var(--black) !important; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -1px;
  text-transform: uppercase;
}
.nav-logo img { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.nav-logo span { color: #fff; }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  position: relative;
  transition: color var(--transition);
}
.nav-icon-btn:hover { color: #fff; }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red);
  color: #fff;
  font-size: .6rem;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.nav-profile img {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  transition: border-color var(--transition);
  cursor: pointer;
}
.nav-profile img:hover { border-color: var(--red); }
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 8px 0;
  box-shadow: var(--shadow);
  display: none;
}
/* profile dropdown is click-only; .open class handles display */
.nav-dropdown-menu.open { display: block; }

/* Guest avatar icon */
.nav-avatar-guest {
  font-size: 1.55rem;
  color: var(--text-muted);
  line-height: 1;
  transition: color .15s;
}
.nav-avatar-guest:hover { color: #fff; }
.nav-guest-menu { min-width: 200px; }
.nav-dropdown-menu a,
.nav-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: .9rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color var(--transition), background var(--transition);
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu button:hover {
  color: #fff;
  background: var(--bg3);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .3s;
}

/* ─── Hero / Carousel ──────────────────────────────────── */
.hero {
  position: relative;
  height: 90vh;
  min-height: 500px;
  overflow: hidden;
  margin-bottom: 32px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,20,64,.95) 0%,
    rgba(0,20,64,.55) 50%,
    transparent 100%
  ),
  linear-gradient(
    0deg,
    rgba(0,20,64,1) 0%,
    transparent 40%
  );
}
.hero-content {
  position: absolute;
  bottom: 80px;
  left: 0;
  padding: 0 60px;
  max-width: 50%;
}
.hero-badge { margin-bottom: 12px; }
.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 2px 2px 8px rgba(0,0,0,.8);
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; gap: 12px; }
.hero-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  border: none;
}
.hero-dot.active {
  background: var(--red);
  transform: scale(1.3);
}

/* ─── Content Rows ──────────────────────────────────────── */
.content-section { margin-bottom: 28px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 22px;
  background: var(--red);
  border-radius: 2px;
}
.see-all {
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.see-all:hover { color: var(--red); }

/* Horizontal scroll row */
.card-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.card-row::-webkit-scrollbar { display: none; }
.card-row .card { scroll-snap-align: start; flex-shrink: 0; }

/* Grid layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

/* ─── Movie / Series Card ───────────────────────────────── */
.card {
  position: relative;
  width: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
  flex-shrink: 0;
}
.card:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.8);
  z-index: 2;
}
.card-poster {
  position: relative;
  padding-top: 150%;
  overflow: hidden;
}
.card-poster img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card-poster img { transform: scale(1.08); }
.card-poster-placeholder {
  position: absolute;
  inset: 0;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-dim);
}
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,20,64,.95) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  gap: 8px;
}
.card:hover .card-overlay { opacity: 1; }
.card-play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.card-play-btn:hover { background: var(--red-hover); transform: scale(1.1); }
.card-actions-row { display: flex; gap: 8px; align-items: center; }
.card-action-btn {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.card-action-btn:hover { background: rgba(255,255,255,.3); }
.card-action-btn.liked { color: var(--red); }
.card-info {
  padding: 10px 10px 8px;
}
.card-title {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  color: var(--text-muted);
}
.card-meta span { display: flex; align-items: center; gap: 3px; }
.card-rank {
  position: absolute;
  bottom: -8px;
  left: -4px;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 3px rgba(255,255,255,.15);
  pointer-events: none;
  z-index: 1;
}

/* ─── Top 10 Cards ──────────────────────────────────────── */
.top10-row { display: flex; gap: 0; overflow-x: auto; padding-bottom: 12px; }
.top10-row::-webkit-scrollbar { display: none; }
.top10-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  width: 165px;
  cursor: pointer;
}
.top10-number {
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 3px rgba(255,255,255,.2);
  margin-right: -18px;
  z-index: 1;
  user-select: none;
  transition: -webkit-text-stroke-color .3s;
}
.top10-card:hover .top10-number { -webkit-text-stroke-color: var(--red); }
.top10-poster {
  width: 115px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.top10-poster img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  transition: transform .3s;
}
.top10-card:hover .top10-poster img { transform: scale(1.04); }

/* ─── Watch Page ────────────────────────────────────────── */
.watch-page { padding-top: 70px; }
.watch-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.player-wrapper {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}
.player-wrapper iframe,
.player-wrapper video {
  width: 100%; height: 100%;
  border: none;
}
.player-info { margin-top: 16px; }
.player-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.player-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: .9rem;
  flex-wrap: wrap;
}
.player-actions { display: flex; gap: 12px; margin: 16px 0; }
.like-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  font-size: .9rem;
  transition: all var(--transition);
}
.like-btn:hover, .like-btn.liked { color: var(--red); border-color: var(--red); }
.like-btn.liked { background: rgba(229,9,20,.1); }
.player-desc {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: .95rem;
  margin-top: 12px;
}
.watch-sidebar { position: sticky; top: 80px; }
.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.related-card {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition);
}
.related-card:hover { opacity: .8; }
.related-thumb {
  width: 100px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg3);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-info { flex: 1; }
.related-title { font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.related-meta { font-size: .75rem; color: var(--text-muted); }

/* Episodes list on watch page */
.episodes-list { margin-top: 24px; }
.episode-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid transparent;
}
.episode-item:hover { background: var(--bg3); }
.episode-item.current { background: rgba(229,9,20,.1); border-color: var(--red); }
.ep-thumb {
  width: 80px; height: 50px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg3);
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-num { font-size: .7rem; color: var(--red); font-weight: 700; }
.ep-title { font-size: .85rem; font-weight: 600; }

/* ─── Comments ──────────────────────────────────────────── */
.comments-section {
  margin-top: 32px;
  background: var(--bg2);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.comments-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.comment-form { display: flex; gap: 12px; margin-bottom: 24px; }
.comment-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg3);
  flex-shrink: 0;
  overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-input-wrap { flex: 1; }
.comment-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 10px 14px;
  font-size: .9rem;
  resize: none;
  transition: border-color var(--transition);
}
.comment-textarea:focus { border-color: var(--red); }
.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.comment-body { flex: 1; }
.comment-username { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.comment-username span { font-size: .75rem; color: var(--text-muted); font-weight: 400; margin-left: 8px; }
.comment-text { font-size: .9rem; color: var(--text-muted); line-height: 1.6; }
.comment-actions { display: flex; gap: 16px; margin-top: 8px; }
.comment-action-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}
.comment-action-btn:hover { color: var(--red); }
.replies-wrap { margin-left: 52px; margin-top: 8px; }
.load-more-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 16px;
  font-size: .9rem;
  transition: all var(--transition);
}
.load-more-btn:hover { background: var(--bg2); color: #fff; }

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--black) 0%, #001a50 100%);
  padding: 24px;
}
.auth-box {
  background: rgba(0,20,64,.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo a {
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -1px;
}
.auth-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 12px 14px;
  font-size: .95rem;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--red); }
.form-input::placeholder { color: var(--text-dim); }
.form-error {
  color: var(--red);
  font-size: .8rem;
  margin-top: 4px;
}
.form-success {
  color: #4caf50;
  font-size: .85rem;
  background: rgba(76,175,80,.1);
  border: 1px solid rgba(76,175,80,.3);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.form-select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 12px 14px;
  font-size: .95rem;
  appearance: none;
  cursor: pointer;
}
.form-select option { background: var(--bg3); }
.auth-footer { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--text-muted); }
.auth-footer a { color: var(--red); font-weight: 600; }

/* ─── Profile Page ──────────────────────────────────────── */
.profile-page { padding-top: 80px; min-height: 100vh; }
.profile-hero {
  background: linear-gradient(180deg, rgba(229,9,20,.12) 0%, var(--bg) 100%);
  padding: 48px 0 32px;
  margin-bottom: 40px;
}
.profile-hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red);
}

/* ─── Live TV ────────────────────────────────────────────── */
.live-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}
.live-card:hover { transform: scale(1.03); border-color: var(--red); }
.live-logo {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  font-size: 2rem;
}
.live-logo img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.live-info { padding: 8px 10px; }
.live-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-cat  { font-size: .72rem; color: var(--text-dim); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.live-dot  {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ─── Search Tabs ────────────────────────────────────────── */
.search-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.search-tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-muted);
  font-size: .88rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.search-tab:hover, .search-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ─── Filters Bar ────────────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.search-input-wrap { flex: 1; min-width: 200px; }
.filter-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 10px 14px;
  font-size: .88rem;
  cursor: pointer;
  appearance: none;
  min-width: 130px;
}
.filter-select option { background: var(--bg3); }

/* ─── Subscription Plans ─────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.plan-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
}
.plan-card:hover { transform: translateY(-4px); border-color: var(--red); }
.plan-card.popular { border-color: var(--red); }
.plan-popular-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
}
.plan-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 2.5rem; font-weight: 900; color: var(--red); margin-bottom: 4px; }
.plan-price small { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.plan-features { list-style: none; margin: 20px 0; text-align: left; }
.plan-features li {
  padding: 6px 0;
  color: var(--text-muted);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-features li::before { content: '✓'; color: var(--red); font-weight: 700; }

/* ─── Notifications Dropdown ────────────────────────────── */
.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 999;
  display: none;
}
.notif-panel.open { display: block; }
.notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.notif-item:hover { background: var(--bg3); }
.notif-item.unread { background: rgba(229,9,20,.05); }
.notif-item-title { font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.notif-item-body  { font-size: .8rem; color: var(--text-muted); }
.notif-item-time  { font-size: .72rem; color: var(--text-dim); margin-top: 4px; }

/* ─── Admin Panel ───────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #000a28;
}
.admin-sidebar {
  width: 260px;
  background: var(--black);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.admin-sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-sidebar-logo span {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--red);
}
.admin-sidebar-logo small { font-size: .7rem; color: var(--text-dim); }
.admin-nav { padding: 16px 0; flex: 1; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-muted);
  font-size: .9rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.admin-nav-item:hover, .admin-nav-item.active {
  color: #fff;
  background: rgba(229,9,20,.1);
  border-left-color: var(--red);
}
.admin-nav-item .icon { width: 18px; text-align: center; }
.admin-nav-section {
  padding: 8px 20px 4px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-top: 8px;
}
.admin-main { margin-left: 260px; flex: 1; padding: 24px; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-page-title { font-size: 1.5rem; font-weight: 700; }
.admin-page-sub   { font-size: .85rem; color: var(--text-muted); margin-top: 2px; }
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
}
.stat-num  { font-size: 2rem; font-weight: 900; color: #fff; margin-bottom: 4px; }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-icon {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  opacity: .1;
}

/* Admin Table */
.admin-table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.admin-table-title { font-weight: 700; }
.admin-search {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 8px 14px;
  font-size: .85rem;
  width: 250px;
}
.admin-search:focus { border-color: var(--red); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.admin-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg3);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.action-btns { display: flex; gap: 8px; }
.action-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: all var(--transition);
  text-decoration: none;
}
.action-btn-edit   { background: rgba(255,193,7,.15);  color: #ffc107; }
.action-btn-edit:hover   { background: #ffc107; color: #000; }
.action-btn-delete { background: rgba(229,9,20,.15);  color: var(--red); }
.action-btn-delete:hover { background: var(--red); color: #fff; }
.action-btn-view   { background: rgba(33,150,243,.15); color: #2196f3; }
.action-btn-view:hover   { background: #2196f3; color: #fff; }
.thumb-sm {
  width: 48px; height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg3);
}

/* Admin Form */
.admin-form-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 780px;
}
.admin-form-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.admin-form-group { margin-bottom: 18px; }
.admin-form-label {
  display: block;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.admin-form-input, .admin-form-select, .admin-form-textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: 10px 14px;
  font-size: .92rem;
  transition: border-color var(--transition);
}
.admin-form-input:focus,
.admin-form-select:focus,
.admin-form-textarea:focus { border-color: var(--red); }
.admin-form-textarea { resize: vertical; min-height: 100px; }
.admin-form-select option { background: var(--bg3); }
.poster-preview {
  margin-top: 10px;
  width: 100px; height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  display: none;
}
.poster-preview.show { display: block; }

/* Alert messages */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: .9rem;
}
.alert-success { background: rgba(76,175,80,.15); border: 1px solid rgba(76,175,80,.4); color: #4caf50; }
.alert-error   { background: rgba(229,9,20,.15);  border: 1px solid rgba(229,9,20,.4);  color: var(--red); }
.alert-info    { background: rgba(33,150,243,.15); border: 1px solid rgba(33,150,243,.4); color: #2196f3; }

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.3fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--red);
  margin-bottom: 12px;
}
.footer-brand-desc { font-size: .88rem; color: var(--text-muted); line-height: 1.7; }
.footer-col-title {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-weight: 700;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .88rem; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--red); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: .8rem;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── Pagination ────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ─── Loader ────────────────────────────────────────────── */
.loader {
  width: 40px; height: 40px;
  border: 3px solid var(--bg3);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty State ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; color: #fff; margin-bottom: 8px; }

/* ─── Toast ─────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg2);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 280px;
  box-shadow: var(--shadow);
  animation: slideIn .3s ease;
  font-size: .9rem;
}
.toast.success { border-left-color: #4caf50; }
.toast.error   { border-left-color: var(--red); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Mobile Responsive — see comprehensive section below ── */

/* ─── Mobile Nav ────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 16px;
  z-index: 999;
  flex-direction: column;
  gap: 8px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: .95rem;
  transition: all var(--transition);
}
.mobile-nav a:hover { background: var(--bg3); color: #fff; }

/* ─── Auto-play Next Overlay ─────────────────────────────────────────────── */
#apOverlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,20,64,.95) 0%, rgba(0,20,64,.7) 70%, transparent 100%);
  padding: 20px 20px 18px;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 50;
}
.ap-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,20,64,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 16px;
  max-width: 360px;
  width: 100%;
  backdrop-filter: blur(8px);
}
.ap-poster {
  width: 70px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.ap-info { flex: 1; min-width: 0; }
.ap-up {
  font-size: .7rem;
  color: #4fc3f7;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.ap-title {
  font-size: .88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.ap-timer {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
}
.ap-timer strong { color: #fff; }
.ap-btns { display: flex; gap: 8px; margin-top: 8px; }
.ap-cancel {
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.7);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s;
}
.ap-cancel:hover { border-color: #fff; color: #fff; }
.ap-play {
  background: var(--red);
  border: none;
  color: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: opacity .15s;
}
.ap-play:hover { opacity: .85; }
@media (max-width: 480px) {
  .ap-card { max-width: 100%; }
  .ap-poster { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE STYLES — Mobile-first improvements
   ═══════════════════════════════════════════════════════════════ */

/* ─── Plyr player theme overrides ───────────────────────────── */
.plyr {
  width: 100%;
  height: 100%;
  --plyr-color-main: var(--red);
  --plyr-video-background: #000;
  border-radius: 0;
}
.player-wrapper .plyr,
.player-wrapper .plyr--video,
.tv-player-wrap .plyr,
.tv-player-wrap .plyr--video {
  height: 100%;
  border-radius: var(--radius-lg);
}
.player-wrapper .plyr__video-wrapper,
.tv-player-wrap .plyr__video-wrapper {
  border-radius: var(--radius-lg);
}

/* ─── Plyr Settings / PiP / Speed controls ───────────────────── */
.plyr__menu__container {
  background: rgba(0, 10, 40, 0.95);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}
.plyr__menu__container .plyr__control {
  color: #fff;
}
.plyr__menu__container .plyr__control[role="menuitemradio"]:before {
  background: var(--red);
}
.plyr__menu__container label.plyr__control {
  color: rgba(255,255,255,.75);
}
.plyr__menu__container label.plyr__control:hover,
.plyr__menu__container .plyr__control:hover {
  background: rgba(255,255,255,.08);
}
/* PiP button — ensure visible where browser supports it */
.plyr__control[data-plyr="pip"] {
  display: inline-flex;
}
/* Hide PiP button on browsers that don't support it at all */
body:not(.pip-supported) .plyr__control[data-plyr="pip"] {
  display: none;
}
/* Settings menu icon highlight */
.plyr__control[data-plyr="settings"] svg {
  color: rgba(255,255,255,.8);
}
.plyr__control[data-plyr="settings"]:hover svg,
.plyr__control[data-plyr="settings"].plyr__tab-focus svg {
  color: #fff;
}

/* ─── Profile avatar upload button ──────────────────────────── */
.profile-avatar-wrap { position: relative; display: inline-block; }
.avatar-upload-btn {
  position: absolute;
  bottom: 2px; right: 2px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  cursor: pointer;
  border: 2px solid var(--bg);
  transition: background var(--transition);
  z-index: 2;
}
.avatar-upload-btn:hover { background: var(--red-hover); }
.avatar-upload-area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg3);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ─── Large screens (1280px+) ────────────────────────────────── */
@media (min-width: 1280px) {
  .container { max-width: 1400px; margin: 0 auto; padding: 0 32px; }
}

/* ─── Tablet landscape (1024px) ─────────────────────────────── */
@media (max-width: 1024px) {
  .watch-container {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }
  .watch-sidebar    { position: static; max-width: 100%; }
  .footer-grid      { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand-col { grid-column: 1 / -1; }
  .admin-sidebar    { width: 220px; }
  .admin-main       { margin-left: 220px; }
  .hero-content     { max-width: 60%; }
}

/* ─── Tablet portrait (768px) ───────────────────────────────── */
@media (max-width: 768px) {
  /* Nav */
  .nav-links   { display: none; }
  .hamburger   { display: flex; }
  .nav-inner   { padding: 0 16px; }

  /* Hero */
  .hero        { height: 60vh; min-height: 360px; }
  .hero-content {
    padding: 0 16px;
    max-width: 100%;
    bottom: 60px;
  }
  .hero-title  { font-size: 1.8rem; }
  .hero-desc   { font-size: .9rem; -webkit-line-clamp: 2; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 10px 18px; font-size: .88rem; }

  /* Cards */
  .card-grid   { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card        { width: 100%; }

  /* Watch page */
  .watch-container { padding: 8px; }
  .player-wrapper  { border-radius: var(--radius); }
  .player-title    { font-size: 1.2rem; }
  .player-meta     { font-size: .82rem; gap: 10px; }
  .comments-section { padding: 16px; }

  /* Profile */
  .profile-hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 0 16px;
  }
  .profile-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }
  .profile-tab { font-size: .82rem; padding: 8px 14px; }

  /* Settings grid → single column on mobile */
  .profile-page [style*="grid-template-columns:1fr 1fr"] {
    display: block !important;
  }
  .profile-page .admin-form-card + .admin-form-card {
    margin-top: 20px;
  }

  /* Live TV player page */
  .tv-layout { display: block !important; }
  .tv-sidebar { display: none; }
  .tv-main { width: 100%; }
  .tv-player-wrap { border-radius: var(--radius); }

  /* Admin */
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform .3s;
    width: 260px;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 16px; }
  .admin-form-row { grid-template-columns: 1fr; }
  .admin-table-wrap { overflow-x: auto; }

  /* Footer — 2-column on tablet so links group nicely */
  .footer-grid      { grid-template-columns: 1fr 1fr !important; gap: 20px; }
  .footer-brand-col { grid-column: 1 / -1 !important; }
  .footer-inner     { padding: 0 16px; }
  .footer           { padding: 32px 0 20px; }

  /* Auth */
  .auth-box { padding: 28px 20px; }

  /* Filters bar */
  .filters-bar { flex-direction: column; align-items: stretch; }
  .search-input-wrap { min-width: unset; }
  .filter-select { min-width: unset; width: 100%; }

  /* Plans */
  .plans-grid { grid-template-columns: 1fr; }
}

/* ─── Mobile portrait (480px) ───────────────────────────────── */
@media (max-width: 480px) {
  /* Base */
  body { font-size: 15px; }

  /* Nav */
  .nav-logo { font-size: 1.3rem; }
  .nav-right { gap: 10px; }
  .nav-icon-btn { font-size: 1.1rem; }
  .nav-profile img { width: 30px; height: 30px; }

  /* Hero */
  .hero        { height: 55vh; min-height: 300px; }
  .hero-title  { font-size: 1.4rem; line-height: 1.15; }
  .hero-desc   { display: none; }
  .hero-content { bottom: 48px; }
  .hero-actions .btn { padding: 9px 14px; font-size: .82rem; }

  /* Content sections */
  .content-section { margin-bottom: 28px; }
  .section-title   { font-size: 1.1rem; }

  /* Cards */
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card { width: 100%; }
  .card-info { padding: 8px; }
  .card-title { font-size: .78rem; }

  /* Top 10 */
  .top10-number { font-size: 5rem; }
  .top10-poster { width: 110px; }

  /* Watch page */
  .watch-page { padding-top: 60px; }
  .watch-container { padding: 0; gap: 0; }
  .player-wrapper { border-radius: 0; }
  .player-info { padding: 12px 12px 0; }
  .player-title { font-size: 1rem; }
  .player-actions { gap: 8px; flex-wrap: wrap; }
  .like-btn { padding: 7px 14px; font-size: .82rem; }
  .episodes-list { margin-top: 16px; }
  .episode-item { padding: 8px; gap: 8px; }
  .ep-thumb { width: 64px; height: 40px; }
  .comments-section { border-radius: 0; margin-top: 0; }

  /* Comments */
  .comment-avatar { width: 32px; height: 32px; font-size: .9rem; }
  .comment-text { font-size: .85rem; }
  .replies-wrap { margin-left: 38px; }

  /* Profile */
  .profile-hero { padding: 32px 0 24px; margin-bottom: 24px; }
  .profile-avatar { width: 80px; height: 80px; }
  .profile-hero-inner h1 { font-size: 1.3rem; }

  /* Live TV */
  .live-tv-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 8px !important;
  }
  .live-logo { height: 70px; }
  .tv-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tv-tab-btn { white-space: nowrap; padding: 8px 14px; font-size: .82rem; }
  .tv-channel-bar { padding: 10px 12px; }
  .tv-channel-name-lg { font-size: 1rem; }

  /* Notifications panel */
  .notif-panel { width: calc(100vw - 16px); right: -8px; }

  /* Toast */
  #toast-container { bottom: 16px; right: 8px; left: 8px; }
  .toast { min-width: unset; width: 100%; }

  /* Autoplay overlay */
  .ap-card { max-width: 100%; }
  .ap-poster { display: none; }

  /* Search */
  .search-tabs { gap: 6px; }
  .search-tab  { padding: 6px 14px; font-size: .82rem; }

  /* Mobile nav links */
  .mobile-nav a { font-size: .92rem; padding: 10px 14px; }

  /* Subscription */
  .plan-card { padding: 24px 16px; }
  .plan-price { font-size: 2rem; }
}

/* ─── Very small screens (360px) ───────────────────────────── */
@media (max-width: 360px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 1.2rem; }
  .nav-logo   { font-size: 1.1rem; }
  .card-row .card { width: 130px; }
}

/* ─── Touch / hover improvements ───────────────────────────── */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; }
  .card:active { transform: scale(.98); }
  .card:hover .card-overlay { opacity: 1; }
  .live-card:hover { transform: none; }
  .live-card:active { transform: scale(.97); }
}

/* ─── Safe area for notched phones ──────────────────────────── */
@supports (padding: max(0px)) {
  .mobile-nav { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .navbar { padding-top: max(14px, env(safe-area-inset-top)); }
}

/* ─── Verified badge (custom PNG icon) ──────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-left: 3px;
  position: relative;
  top: -1px;
}
.verified-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}
.verified-badge-lg {
  width: 28px;
  height: 28px;
}
/* Fallback for when img fails */
.verified-badge i { display: none; }

/* ─── Search overlay ─────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 40px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.search-overlay-inner {
  width: 100%;
  max-width: 700px;
  padding: 0 16px;
}
.search-overlay-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 0 20px;
  margin-bottom: 28px;
  transition: border-color .15s;
}
.search-overlay-bar:focus-within {
  border-color: var(--red);
  background: rgba(255,255,255,.12);
}
.search-overlay-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 14px 0;
}
.search-overlay-bar input::placeholder { color: rgba(255,255,255,.4); }
.search-overlay-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.search-overlay-close:hover { color: #fff; }
.search-overlay-section { margin-bottom: 24px; }
.search-overlay-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.search-results-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.search-result-card {
  background: var(--bg2);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform .15s, border-color .15s;
}
.search-result-card:hover {
  transform: translateY(-2px);
  border-color: var(--red);
}
.search-result-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}
.search-result-card .no-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 1.5rem;
}
.search-result-card-title {
  padding: 6px 8px;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.search-live-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-live-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  text-decoration: none;
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  transition: background .15s, border-color .15s;
}
.search-live-chip:hover { background: rgba(229,9,20,.15); border-color: rgba(229,9,20,.4); }
.search-live-chip img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }
.search-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.search-no-results { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: .95rem; }
@media (max-width: 600px) {
  .search-overlay { padding-top: 60px; }
  .search-results-row { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}

/* ─── Episode nav (Prev / Next) ─────────────────────────────── */
.ep-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.ep-nav-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.ep-nav-btn:hover { background: var(--red); border-color: var(--red); }

/* ─── Episode download button ───────────────────────────────── */
.ep-dl-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: .85rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.ep-dl-btn:hover { color: var(--red); background: rgba(229,9,20,.12); }

/* ─── New comment highlight ─────────────────────────────────── */
@keyframes commentSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.comment-new {
  animation: commentSlideIn .3s ease;
  border-left: 2px solid var(--red);
  padding-left: 8px;
  border-radius: 0 4px 4px 0;
}

/* ─── Additional responsive fixes ───────────────────────────── */

/* Watch container: stack on mobile */
@media (max-width: 900px) {
  .watch-container {
    grid-template-columns: 1fr !important;
  }
  .watch-sidebar {
    display: none !important;
  }
}

/* Player actions: better wrap on small screens */
@media (max-width: 500px) {
  .player-actions {
    gap: 6px !important;
  }
  .like-btn {
    padding: 6px 10px !important;
    font-size: .78rem !important;
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Profile hero responsive */
@media (max-width: 600px) {
  .profile-hero-inner {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
  }
  .profile-info { align-items: center !important; display: flex; flex-direction: column; }
  .profile-email { justify-content: center; }
  .profile-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; }
  .profile-tab { white-space: nowrap; }
}

/* Admin payment-notifications: smaller screens */
@media (max-width: 760px) {
  .pn-stats { grid-template-columns: 1fr 1fr !important; }
  .pn-msg { max-width: 180px !important; }
  .admin-table th:nth-child(7),
  .admin-table td:nth-child(7) { display: none; } /* Hide "Updated At" on small */
}
@media (max-width: 520px) {
  .pn-stats { grid-template-columns: 1fr !important; }
  .admin-table th:nth-child(6),
  .admin-table td:nth-child(6) { display: none; } /* Hide "Created At" on tiny */
}

/* Subscription plans: 2 col on tablet */
@media (max-width: 900px) and (min-width: 601px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .plans-grid { grid-template-columns: 1fr !important; }
  .plan-card { padding: 20px 14px !important; }
}

/* Sub-popup (TV trial overlay): mobile friendly */
@media (max-width: 520px) {
  .sub-popup {
    padding: 24px 18px !important;
    max-width: calc(100vw - 32px) !important;
  }
  .sub-popup-title { font-size: 1.1rem !important; }
  .sub-popup-btns { flex-direction: column !important; }
  .sub-popup-btn-primary,
  .sub-popup-btn-secondary { text-align: center !important; }
}

/* Live TV player: full width iframe on mobile */
@media (max-width: 700px) {
  .tv-layout {
    grid-template-columns: 1fr !important;
  }
  .tv-sidebar {
    display: none !important;
  }
  #player-wrap {
    border-radius: 0 !important;
  }
}

/* Admin sidebar: always-visible toggle on mobile */
@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed !important;
    left: -260px !important;
    z-index: 1000 !important;
    transition: left .25s ease !important;
  }
  .admin-sidebar.open {
    left: 0 !important;
  }
  .admin-main {
    margin-left: 0 !important;
    padding: 16px 12px !important;
  }
}

/* Hero banner: smaller on mobile */
@media (max-width: 480px) {
  .hero-title { font-size: 1.3rem !important; }
  .hero-desc  { display: none; }
  .hero-btns  { gap: 8px !important; }
  .hero-btn   { padding: 10px 18px !important; font-size: .85rem !important; }
}

/* General table: allow horizontal scroll */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { min-width: 600px; }

/* ─── VJ Translator Label ────────────────────────────────── */
.card-vj {
  font-size: .72rem;
  color: var(--red);
  margin-top: 2px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-vj i { margin-right: 3px; opacity: .8; }

/* ─── Continue Watching ──────────────────────────────────── */
.continue-card .card-poster { position: relative; }
.continue-progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,.15);
}
.continue-progress-bar {
  height: 100%;
  background: var(--red);
  border-radius: 0 2px 2px 0;
  min-width: 4px;
  transition: width .3s;
}
.continue-ep-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .02em;
}

/* ─── Subscription CTA Section ──────────────────────────── */
.sub-cta-section {
  margin: 8px 0 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, #001440 0%, #0a1a3e 50%, #1a0a1a 100%);
  border: 1px solid rgba(192,57,43,.3);
  overflow: hidden;
}
.sub-cta-inner {
  padding: 48px 32px;
  text-align: center;
}
.sub-cta-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.sub-cta-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
}
.sub-cta-desc {
  color: var(--text-muted);
  font-size: .95rem;
  margin: 0 0 24px;
}
@media (max-width: 600px) {
  .sub-cta-inner { padding: 32px 20px; }
  .sub-cta-title { font-size: 1.2rem; }
}

/* ══════════════════════════════════════════════════════════
   NEW: Hero arrows, Row-scroll arrows, VJ badge overlay,
        Section icons, Mobile nav icons
   ══════════════════════════════════════════════════════════ */

/* ─── Hero Prev/Next Arrows ─────────────────────────────── */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  width: 50px; height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
  transition: background .2s, border-color .2s;
  backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--red); border-color: var(--red); }
.hero-prev { left: 18px; }
.hero-next { right: 18px; }
@media (max-width: 900px) {
  .hero-arrow { display: none !important; }
}

/* ─── Section scroll row arrows ─────────────────────────── */
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.row-arrow {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  transition: background .18s, color .18s, border-color .18s;
  flex-shrink: 0;
}
.row-arrow:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
@media (max-width: 600px) {
  .row-arrow { width: 28px; height: 28px; font-size: .7rem; }
}

/* ─── VJ Badge Overlay on Top-10 poster ─────────────────── */
.vj-badge-overlay {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #2563eb;
  border: 1px solid rgba(37,99,235,.5);
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(2px);
  white-space: nowrap;
  pointer-events: none;
}

/* ─── Section icon style ─────────────────────────────────── */
.sec-icon {
  color: var(--red);
  margin-right: 8px;
  font-size: .85em;
}

/* ─── Modern Mobile Nav ──────────────────────────────────── */
.mobile-nav .mnav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: background .18s, color .18s;
  text-decoration: none;
}
.mobile-nav .mnav-link:hover,
.mobile-nav .mnav-link.mnav-active {
  background: rgba(229,9,20,.12);
  color: var(--red);
}
.mobile-nav .mnav-link.mnav-active .mnav-icon { color: var(--red); }
.mnav-icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  color: var(--text-dim);
  transition: color .18s;
  flex-shrink: 0;
}
.mobile-nav .mnav-link:hover .mnav-icon { color: var(--red); }

/* Override old mobile-nav a rules for the new mnav-link class */
.mobile-nav a.mnav-link { display: flex; }

/* ─── Auth page full-cover fix ───────────────────────────── */
.auth-page { min-height: 100vh; }

/* ─── Admin login responsive ─────────────────────────────── */
@media (max-width: 480px) {
  .auth-box {
    padding: 28px 18px;
    border-radius: 12px;
    margin: 0 4px;
  }
  .auth-title { font-size: 1.4rem; margin-bottom: 18px; }
}

/* ─── Live TV channels grid ─────────────────────────────── */
.ltv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
@media (max-width: 600px) {
  .ltv-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ─── Floating scroll-wrap arrows (like hero) ────────────── */
.scroll-wrap {
  position: relative;
}
.scroll-prev-btn,
.scroll-next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,.65);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.85);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: background .18s, color .18s, border-color .18s, opacity .2s;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.scroll-wrap:hover .scroll-prev-btn,
.scroll-wrap:hover .scroll-next-btn {
  opacity: 1;
  pointer-events: auto;
}
.scroll-prev-btn {
  left: -4px;
}
.scroll-next-btn {
  right: -4px;
}
.scroll-prev-btn:hover,
.scroll-next-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
@media (max-width: 900px) {
  .scroll-prev-btn,
  .scroll-next-btn { display: none !important; }
}

.comment-hidden { display: none; }
