/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:   #0099cc;   /* Mrpoo blue */
  --bg:       #141414;
  --bg-card:  #1a1a1a;
  --text:     #ffffff;
  --text-dim: #a3a3a3;
  --nav-h:    72px;
}

html { scroll-behavior: smooth; }

/* Hide scrollbar globally while keeping scroll functionality */
html::-webkit-scrollbar { display: none; }
html { -ms-overflow-style: none; scrollbar-width: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

body:not(.player-body):not(.profiles-page) {
  animation: mm-page-fade 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  padding: 0 4%;
  display: flex;
  align-items: center;
  gap: 32px;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0.6) 60%,
    transparent 100%);
  transition: background 0.4s;
}

.navbar.scrolled {
  background: rgba(18,18,18,0.98);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.navbar-logo .logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 1.7rem;
  font-weight: 800;
  color: #38b6ff;
  letter-spacing: -0.5px;
}

/* ── Nav links — Netflix-style clean flat text ── */
.navbar-nav {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
}

.navbar-nav a {
  position: relative;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  padding: 6px 14px;
  transition: color 0.15s;
  white-space: nowrap;
}

/* Red sliding underbar */
.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 3px;
  background: #4db8ff;
  border-radius: 999px;
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

.navbar-nav a:hover {
  color: rgba(255,255,255,0.9);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
  transform: scaleX(1);
}

.navbar-nav a.active {
  font-weight: 700;
  color: #ffffff;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

/* Search */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  color: #fff;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: opacity 0.2s;
}

.icon-btn:hover { opacity: 0.75; }

.search-bar {
  display: none;
  align-items: center;
  background: rgba(0,0,0,0.75);
  border: 1px solid #fff;
  padding: 4px 12px;
  border-radius: 20px;
  position: relative;
}

.search-bar.open { display: flex; }

.search-bar input {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  outline: none;
  width: 220px;
}

/* Profile avatar button */
.profile-wrap {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: opacity 0.2s;
}
.profile-btn:hover { opacity: 0.8; }

.profile-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.profile-chevron { transition: transform 0.2s; flex-shrink: 0; }
.profile-btn[aria-expanded="true"] .profile-chevron { transform: rotate(180deg); }

/* Profile dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: rgba(28,28,28,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.profile-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-dropdown-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.profile-dropdown-role {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}
.profile-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 4px 0;
}
.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.profile-dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.profile-upload-label { cursor: pointer; }
.profile-signout { color: #ff6b6b; }
.profile-signout:hover { background: rgba(255,107,107,0.1); color: #ff8585; }

/* ── Login page ───────────────────────────────────────────────────────────── */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141414;
}

.login-bg {
  position: fixed;
  inset: -20px; /* overshoot edges to hide blur bleed */
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.72) 100%),
    url('/images/the_netflix_login_background__canada__2024___by_logofeveryt_dh0w8qv-pre.jpg') center/cover no-repeat;
  z-index: 0;
  filter: blur(6px);
  -webkit-filter: blur(6px);
}
.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.00) 50%,
    rgba(255,255,255,0.03) 100%
  );
  pointer-events: none;
}

.login-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.login-logo { margin-bottom: 28px; }
.login-logo img { height: 44px; display: block; }

.login-card {
  width: 100%;
  background: rgba(0,0,0,0.78);
  border-radius: 10px;
  padding: 48px 44px 40px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.login-title { font-size: 2rem; font-weight: 700; margin-bottom: 28px; color: #fff; }

.login-error {
  background: rgba(56,182,255,0.15);
  border: 1px solid rgba(56,182,255,0.4);
  color: #ff6b6b;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.login-field { position: relative; }

.login-field input {
  width: 100%;
  background: #333;
  border: none;
  border-bottom: 2px solid #555;
  border-radius: 4px 4px 0 0;
  color: #fff;
  font-size: 1rem;
  padding: 24px 14px 8px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.login-field input:focus { border-bottom-color: var(--accent); }

.login-field label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 1rem;
  pointer-events: none;
  transition: top 0.15s, font-size 0.15s, color 0.15s;
}
.login-field input:focus + label,
.login-field input:not(:placeholder-shown) + label {
  top: 10px;
  font-size: 0.72rem;
  color: var(--accent);
  transform: none;
}

.login-btn {
  margin-top: 8px;
  background: #38b6ff;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.login-btn:hover { background: #c40812; }

@media (max-width: 500px) {
  .login-card { padding: 32px 24px 28px; }
}

/* ── Profile select ("Who's watching?") ─────────────────────────────────── */
.profiles-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}

.profiles-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 60px;
  width: 100%;
}

.profiles-heading {
  font-size: 3.4rem;
  font-weight: 400;
  color: #fff;
  margin: 28px 0 48px;
  letter-spacing: 0.01em;
}

.profiles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  max-width: 900px;
}

.profile-card-form { display: contents; }

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #808080;
  transition: color 0.15s;
}
.profile-card:hover { color: #fff; }

.profile-card-avatar {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 3px solid transparent;
  transition: border-color 0.15s;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-card:hover .profile-card-avatar {
  border-color: #fff;
}

.profile-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-card-initials {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0099cc 0%, #005f80 100%);
}

.profile-card-name {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.15s;
}

/* ── Manage-mode profile item (card + delete button together) ─────────── */
.profile-manage-item {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.profile-card--edit {
  text-decoration: none;
  color: #808080;
}
.profile-card--edit:hover { color: #fff; }

.profile-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 6px;
}
.profile-card--edit:hover .profile-edit-overlay { opacity: 1; }

.profile-delete-form { display: contents; }

.profile-delete-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #38b6ff;
  color: #fff;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s, transform 0.15s;
  line-height: 1;
}
.profile-delete-btn:hover { background: #ff2d3a; transform: scale(1.1); }

/* ── Add-profile card ─────────────────────────────────────────────────── */
.profile-card--add {
  text-decoration: none;
  color: #808080;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.profile-card--add:hover { color: #fff; }

.profile-card-avatar--add {
  background: rgba(255,255,255,0.08) !important;
  border: 3px dashed rgba(255,255,255,0.25) !important;
  transition: border-color 0.15s, background 0.15s;
  color: rgba(255,255,255,0.4);
}
.profile-card--add:hover .profile-card-avatar--add {
  border-color: #fff !important;
  background: rgba(255,255,255,0.15) !important;
  color: #fff;
}

/* ── "Manage Profiles" / "Done" button below the grid ────────────────── */
.profiles-actions {
  margin-top: 40px;
}
.profiles-manage-btn {
  display: inline-block;
  padding: 9px 28px;
  border: 2px solid rgba(255,255,255,0.5);
  color: rgba(255,255,255,0.7);
  background: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.profiles-manage-btn:hover {
  border-color: #fff;
  color: #fff;
}

/* ── Empty-state on profiles page ────────────────────────────────────── */
.profiles-empty {
  color: #808080;
  font-size: 1rem;
}
.profiles-empty a {
  color: var(--accent, #4db8ff);
  text-decoration: underline;
}

/* ── Profile add/edit form ────────────────────────────────────────────── */
.profile-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 360px;
}

.profile-form-avatar {
  cursor: pointer;
}

.profile-form-avatar-preview {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.2);
  transition: border-color 0.15s;
}
.profile-form-avatar:hover .profile-form-avatar-preview {
  border-color: #fff;
}
.profile-form-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-form-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.15s;
}
.profile-form-avatar:hover .profile-form-avatar-overlay { opacity: 1; }

.profile-form-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-form-label {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-form-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.profile-form-input:focus {
  border-color: var(--accent, #4db8ff);
}
.profile-form-input::placeholder { color: rgba(255,255,255,0.25); }

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.profile-form-save {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 700;
  padding: 11px 32px;
  cursor: pointer;
  transition: background 0.15s;
}
.profile-form-save:hover { background: #e0e0e0; }

.profile-form-cancel {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 11px 8px;
}
.profile-form-cancel:hover { color: #fff; }

.profile-form-delete-wrap { display: contents; }

.profile-form-delete {
  background: none;
  color: #38b6ff;
  border: 2px solid #38b6ff;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 18px;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.15s, color 0.15s;
}
.profile-form-delete:hover {
  background: #38b6ff;
  color: #fff;
}

@media (max-width: 600px) {
  .profiles-heading { font-size: 2.2rem; }
  .profile-card-avatar { width: 100px; height: 100px; }
  .profiles-grid { gap: 18px; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 120px;
  overflow: hidden;
}

/* ── Hero slide layers ───────────────────────────────────────────────────── */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }

/* Two-layer vignette matching Netflix */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, transparent 60%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, #141414 0%, rgba(20,20,20,0.6) 40%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 4%;
  max-width: 680px;
}

/* Content text fade on slide change */
.hero-title,
.hero-desc {
  transition: opacity 0.3s ease;
}
.hero-content-fade {
  opacity: 0 !important;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
  margin-bottom: 18px;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #ddd;
  margin-bottom: 26px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Slide indicator dots */
.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}
.hero-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* Play button */
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 30px;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-play:hover { background: rgba(255,255,255,0.78); }

/* More Info button */
.btn-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(109,109,110,0.65);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 30px;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-info:hover { background: rgba(109,109,110,0.4); }

/* ── Content rows ─────────────────────────────────────────────────────────── */
.content {
  padding-bottom: 60px;
  /* negative margin pulls rows up over the hero fade */
  margin-top: -80px;
  position: relative;
  z-index: 3;
}

.content-section {
  padding: 0 4% 32px;
}

.row-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 12px;
}

.row-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.row-scroll::-webkit-scrollbar { display: none; }

/* ── Card ─────────────────────────────────────────────────────────────────── */
.card {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-origin: center bottom;
}

.card:hover {
  transform: scale(1.16) translateY(-4px);
  z-index: 20;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-card);
}

.card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  height: auto;
  /* Skeleton shimmer while image loads */
  background: #1a1a1a;
  overflow: hidden;
}

.card-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  z-index: 0;
  pointer-events: none;
}

.card-img-wrap.img-loaded::before {
  display: none;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Player animations */
@keyframes vp-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes vp-dot-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(56,182,255,0.8), 0 2px 6px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 18px rgba(56,182,255,1),   0 0 30px rgba(56,182,255,0.5); }
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  /* Start invisible, fade in when loaded */
  opacity: 0;
  transition: opacity 0.4s ease;
  position: relative;
  z-index: 1;
}

.card-img-wrap img.img-loaded {
  opacity: 1;
}

.card-img-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  letter-spacing: -1px;
  user-select: none;
}

/* Card video preview on hover */
.card-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.card-video-wrap.visible { opacity: 1; }

.card-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
  pointer-events: none;
}
.card-video-preview.visible { opacity: 1; }

/* Transparent full-card link */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Hover overlay */
.card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
  padding: 10px 10px 8px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card:hover .card-overlay { opacity: 1; }

.card-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.card-play-btn {
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 3;
  position: relative;
}

.card-play-btn:hover { background: rgba(255,255,255,0.78); }

.card-like-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
  z-index: 3;
  position: relative;
}

.card-like-btn:hover { border-color: #fff; }

.card-title {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rating badge (e.g. PG-13, TV-MA) */
.card-rating-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 2px;
  padding: 0 4px;
  line-height: 1.5;
  color: rgba(255,255,255,0.8);
  vertical-align: middle;
  letter-spacing: 0.03em;
}

/* Resume % badge */
.card-resume-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(56,182,255,0.85);
  color: #fff;
  border-radius: 3px;
  padding: 0 6px;
  height: 22px;
  letter-spacing: 0.02em;
  z-index: 3;
  position: relative;
}

/* Overview snippet — shown in hover overlay */
.card-overview {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Watch progress bar at bottom of card thumbnail */
.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.18);
  z-index: 4;
}

.card-progress-fill {
  height: 100%;
  background: #38b6ff;
  border-radius: 0 2px 2px 0;
  min-width: 2px;
}

/* ── Browse page ──────────────────────────────────────────────────────────── */
.browse-page {
  padding-top: calc(var(--nav-h) + 24px);
  padding-bottom: 80px;
  min-height: 100vh;
  background: #141414;
}

.browse-title {
  font-size: 1.6rem;
  font-weight: 700;
  padding: 0 4% 18px;
  letter-spacing: 0.01em;
  color: #fff;
}

/* ── Browse grid — Netflix landscape cards ────────────────────────────────── */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 10px;
  padding: 0 4%;
}

/* Force landscape (16:9) image wrappers in the browse grid */
.browse-grid .card {
  width: 100%;
  transform-origin: center center;
}

.browse-grid .card .card-img-wrap {
  height: auto;
  aspect-ratio: 2 / 3;
}

.browse-grid .card .card-img-wrap img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  /* preserve fade-in from base rule */
}

.browse-grid .card .card-img-fallback {
  aspect-ratio: 2 / 3;
  height: auto;
  font-size: 2.2rem;
}

/* Browse card hover — bigger pop with bottom info */
.browse-grid .card:hover {
  transform: scale(1.08) translateY(-6px);
  z-index: 20;
  box-shadow: 0 16px 40px rgba(0,0,0,0.85);
}

.browse-grid .card .card-overlay {
  padding: 14px 10px 10px;
}

.browse-grid .card .card-title {
  font-size: 0.85rem;
}

.browse-grid .card .card-meta {
  font-size: 0.72rem;
}

/* Hide overview on very small cards; show on browse grid */
.browse-grid .card .card-overview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
}

/* Keep overview hidden on home-page row cards (too small) */
.card-row .card .card-overview {
  display: none;
}

/* ── A–Z filter bar ────────────────────────────────────────────────────────── */
.alpha-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 4% 18px;
  position: sticky;
  top: 60px;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95) 80%, transparent);
}

.alpha-btn {
  background: rgba(255,255,255,0.07);
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 4px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.04em;
}

.alpha-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.alpha-btn.active {
  background: var(--accent, #4db8ff);
  color: #000;
  border-color: var(--accent, #4db8ff);
}

.alpha-section {
  margin-bottom: 20px;
}

.alpha-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  padding: 6px 4% 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.empty-state {
  padding: 0 4%;
  color: var(--text-dim);
}

/* ── Player (fullscreen Netflix-style) ────────────────────────────────────── */
.player-body {
  background: #000;
  margin: 0;
  overflow: hidden;
}

.vp-root {
  position: fixed;
  inset: 0;
  background: #080808;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
}
.vp-root:hover { cursor: default; }

.vp-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity 0.42s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.vp-root.vp-ready .vp-video {
  opacity: 1;
  transform: scale(1);
}

/* ── Loading overlay ─────────────────────────────────────────────────────── */
.vp-loader {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: linear-gradient(to bottom, rgba(0,0,0,0.38), rgba(0,0,0,0.68));
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 0.45s ease;
}
.vp-loader.vp-loader-done {
  opacity: 0;
  transform: scale(1.02);
  backdrop-filter: blur(0px);
  pointer-events: none;
}

.vp-loader-inner {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vp-loader-ring {
  position: absolute;
  inset: 0;
  width: 140px;
  height: 140px;
  /* start arc from 12-o'clock */
  transform: rotate(-90deg);
}

/* circumference of r=54: 2π×54 ≈ 339.3 */
.vp-loader-track {
  fill: none;
  stroke: rgba(255,255,255,0.1);
  stroke-width: 6;
}

.vp-loader-arc {
  fill: none;
  stroke: #38b6ff;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 339.3;
  stroke-dashoffset: 339.3;   /* starts empty */
  transition: stroke-dashoffset 0.4s ease;
  filter: drop-shadow(0 0 6px rgba(56,182,255,0.8));
}

.vp-loader-pct {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.vp-loader-title {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  max-width: 80vw;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ── Controls overlay ─────────────────────────────────────────────────────── */
.vp-controls {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;          /* don't steal clicks when invisible */
  transition: opacity 0.25s ease;
  z-index: 10;
  background:
    linear-gradient(to bottom,  rgba(0,0,0,0.75) 0%,   transparent 22%),
    linear-gradient(to top,     rgba(0,0,0,0.85) 0%,   transparent 35%);
}
.vp-controls.visible {
  opacity: 1;
  pointer-events: auto;          /* re-enable when visible */
}

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.vp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
  transform: translateY(-10px);
  transition: transform 0.28s ease;
}
.vp-top-right { display: flex; gap: 8px; }

/* ── Icon button ──────────────────────────────────────────────────────────── */
.vp-icon-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  gap: 4px;
}
.vp-icon-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.08);
}
.vp-icon-btn:active {
  background: rgba(255,255,255,0.2);
  transform: scale(0.94);
}
.vp-icon-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* ── Centre zone ──────────────────────────────────────────────────────────── */
.vp-center-zone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.vp-tap-zone {
  flex: 1;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  /* pointer-events inherited from .vp-controls — enabled only when visible */
  -webkit-tap-highlight-color: transparent;
}
.vp-play-center {
  pointer-events: all;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.vp-play-center:hover {
  background: rgba(56,182,255,0.25);
  border-color: rgba(56,182,255,0.5);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(56,182,255,0.35), 0 4px 20px rgba(0,0,0,0.4);
}
.vp-play-center:active { transform: scale(0.95); }
.vp-play-center svg { width: 34px; height: 34px; fill: currentColor; }
/* initial icon states are set globally below */

/* ── Bottom bar ───────────────────────────────────────────────────────────── */
.vp-bottom {
  padding: 0 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(10px);
  transition: transform 0.28s ease;
}

.vp-controls.visible .vp-top,
.vp-controls.visible .vp-bottom {
  transform: translateY(0);
}

/* Progress row */
.vp-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative; /* needed to anchor the thumbnail preview */
}

/* ── Scrub thumbnail preview ──────────────────────────────────────────────── */
.vp-thumb-preview {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.7);
  border: 1.5px solid rgba(255,255,255,0.15);
  background: #000;
  z-index: 50;
}
.vp-thumb-preview.visible { opacity: 1; }

.vp-thumb-canvas {
  display: block;
  width: 192px;
  height: 108px;
}

.vp-thumb-time {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 4px 8px 5px;
  background: rgba(0,0,0,0.75);
  letter-spacing: 0.04em;
}
.vp-progress-bg {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.vp-progress-bg:hover { height: 9px; }
.vp-progress-buf {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(255,255,255,0.28);
  border-radius: 10px;
  width: 0;
  transition: width 0.4s ease;
}
.vp-progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #1a7fc4 0%, #38b6ff 55%, #6dceff 100%);
  border-radius: 10px;
  width: 0;
  box-shadow: 0 0 8px rgba(56,182,255,0.7), 0 0 18px rgba(56,182,255,0.3);
  overflow: hidden;
}
.vp-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: vp-shimmer 2.2s linear infinite;
}
.vp-progress-dot {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%) scale(0.5);
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2.5px solid #38b6ff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(56,182,255,0.8), 0 2px 6px rgba(0,0,0,0.5);
}
.vp-progress-bg:hover .vp-progress-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: vp-dot-pulse 1.8s ease-in-out infinite;
}

.vp-time-remain {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  min-width: 100px;
  text-align: right;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Control row */
.vp-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.vp-ctrl-left,
.vp-ctrl-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.vp-skip-btn svg text { font-family: sans-serif; font-weight: 700; }

/* ── Volume group (mute btn + slider) ───────────────────────────────────────── */
.vp-vol-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.vp-vol-slider {
  --vp-vol-pct: 100%;
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  max-width: 80px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #38b6ff var(--vp-vol-pct), rgba(255,255,255,0.3) var(--vp-vol-pct));
  outline: none;
  cursor: pointer;
  overflow: visible;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

/* Expand when hovering the whole group */
.vp-vol-group:hover .vp-vol-slider,
.vp-vol-group:focus-within .vp-vol-slider {
  width: 72px;
  opacity: 1;
  pointer-events: auto;
  margin-left: 4px;
}

/* Thumb — WebKit */
.vp-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.1s;
}
.vp-vol-slider::-webkit-slider-thumb:hover { transform: scale(1.25); }

/* Thumb — Firefox */
.vp-vol-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  cursor: pointer;
}

.vp-title-center {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 12px;
}

/* hide pause icon & exit-fullscreen icon initially */
.vp-pause-icon { display: none; }
.vp-fs-exit    { display: none; }

/* Skip button label */
.vp-skip-btn {
  position: relative;
  flex-direction: column;
  gap: 0;
  font-size: 9px;
  font-weight: 700;
}
.vp-skip-label {
  position: absolute;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  pointer-events: none;
  /* centre over the circular arrow icon */
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.vp-speed-label { font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }

.vp-speed-popup {
  position: absolute;
  bottom: 80px;
  right: 60px;
  background: rgba(28,28,28,0.97);
  border-radius: 6px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
  min-width: 80px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.vp-speed-popup[hidden] { display: none; }
.vp-speed-opt {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  padding: 9px 20px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.vp-speed-opt:hover  { background: rgba(255,255,255,0.1); color: #fff; }
.vp-speed-opt.active { color: #38b6ff; font-weight: 700; }

/* ── Generic side panel (Quality / Audio / Diagnostics) ──────────────────── */
.vp-panel {
  position: absolute;
  bottom: 80px;
  right: 16px;
  width: 300px;
  max-height: 420px;
  overflow-y: auto;
  background: rgba(18,18,18,0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  z-index: 25;
  box-shadow: 0 8px 30px rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
}
.vp-panel[hidden] { display: none; }

.vp-panel-header {
  padding: 10px 14px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.vp-panel-body {
  padding: 6px 0;
}

.vp-panel-loading {
  padding: 14px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.vp-panel-opt {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  gap: 2px;
}
.vp-panel-opt:hover  { background: rgba(255,255,255,0.08); color: #fff; }
.vp-panel-opt.active { color: #38b6ff; font-weight: 600; }
.vp-panel-opt.active::before {
  display: none; /* use font-weight + colour instead */
}

.vp-audio-title { font-size: 13px; }
.vp-audio-meta  { font-size: 11px; color: rgba(255,255,255,0.4); font-weight: 400; }

/* Audio boost row */
.vp-audio-boost-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
}
.vp-boost-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  min-width: 38px;
}
.vp-boost-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  outline: none;
  cursor: pointer;
}
.vp-boost-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #38b6ff;
  cursor: pointer;
}
.vp-boost-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #38b6ff;
  border: none;
  cursor: pointer;
}

/* Diagnostics table */
.vp-diag-panel { width: 320px; }
.vp-diag-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  padding: 6px 4px;
}
.vp-diag-table td {
  padding: 5px 14px;
  vertical-align: middle;
}
.vp-diag-table td:first-child {
  color: rgba(255,255,255,0.45);
  width: 42%;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vp-diag-table td:last-child {
  color: rgba(255,255,255,0.9);
  font-family: 'Courier New', monospace;
  font-size: 12px;
}
.vp-diag-table tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

/* Quality label on button */
.vp-quality-label {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
}

/* ── Fullscreen — keep all controls fully visible ─────────────────────────── */
/* Chrome/Edge/Firefox reset some inherited styles when entering fullscreen.   */
/* We explicitly re-assert colour, size, and opacity for every button so       */
/* nothing shrinks or goes transparent.                                        */

.vp-root:fullscreen           .vp-icon-btn,
.vp-root:-webkit-full-screen  .vp-icon-btn,
.vp-root:-ms-fullscreen       .vp-icon-btn {
  color: #fff !important;
  background: none;
  min-width: 44px;
  min-height: 44px;
  opacity: 1 !important;
  border-radius: 8px;
}
.vp-root:fullscreen           .vp-icon-btn:hover,
.vp-root:-webkit-full-screen  .vp-icon-btn:hover,
.vp-root:-ms-fullscreen       .vp-icon-btn:hover {
  background: rgba(255,255,255,0.12) !important;
  transform: scale(1.08) !important;
}
.vp-root:fullscreen           .vp-icon-btn svg,
.vp-root:-webkit-full-screen  .vp-icon-btn svg,
.vp-root:-ms-fullscreen       .vp-icon-btn svg {
  fill: #fff !important;
  width: 28px !important;
  height: 28px !important;
  opacity: 1 !important;
  color: #fff !important;
}
/* Ensure the controls overlay itself stays on top */
.vp-root:fullscreen           .vp-controls,
.vp-root:-webkit-full-screen  .vp-controls,
.vp-root:-ms-fullscreen       .vp-controls {
  z-index: 2147483647;
}

/* Hide cursor when player is idle */
.vp-root.vp-cursor-hidden,
.vp-root.vp-cursor-hidden * {
  cursor: none !important;
}

/* ── Error page ───────────────────────────────────────────────────────────── */
.error-page {
  padding-top: calc(var(--nav-h) + 100px);
  padding-bottom: 60px;
  min-height: 100vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.error-page h1 {
  font-size: 4rem;
  font-weight: 700;
}

.error-page p {
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 40px 4% 24px;
}

.footer-inner {
  max-width: 1200px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links a {
  color: #777;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-copy {
  color: #555;
  font-size: 0.78rem;
}

/* ── Contact modal ────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #1a1a1a;
  border-radius: 6px;
  padding: 36px 40px;
  width: 100%;
  max-width: 480px;
  position: relative;
}

.modal h2 {
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.modal-close {
  position: absolute;
  top: 14px; right: 18px;
  font-size: 1.6rem;
  color: #aaa;
  transition: color 0.2s;
}

.modal-close:hover { color: #fff; }

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#contactForm input,
#contactForm textarea {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #fff;
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

#contactForm input:focus,
#contactForm textarea:focus {
  border-color: var(--accent);
}

#contactForm textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 11px;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-submit:hover { background: #007aaa; }

.form-status {
  font-size: 0.85rem;
  min-height: 1.2em;
  color: var(--text-dim);
}

.form-status.success { color: #4caf50; }
.form-status.error   { color: #f44336; }

/* ── Info modal ───────────────────────────────────────────────────────────── */
.info-modal {
  max-width: 700px;
  padding: 0;
  overflow: hidden;
}

.info-modal-backdrop {
  width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center;
  background-color: #2a2a2a;
}

.info-modal-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-modal-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.info-modal-meta {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.info-modal-overview {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #ccc;
  max-height: 100px;
  overflow-y: auto;
}

.info-modal-play {
  align-self: flex-start;
  margin-top: 6px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .navbar-nav { display: none; }
  .hero        { height: 65vw; min-height: 300px; padding-bottom: 60px; }
  .hero-title  { font-size: 1.6rem; }
  .hero-desc   { display: none; }
  .card        { width: 140px; }
  .card img    { height: 90px; }
}


/* Player entry — fade up from slightly zoomed */
@keyframes vp-entry {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes mm-page-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.player-body):not(.profiles-page) {
    animation: none;
  }

  .vp-video,
  .vp-loader,
  .vp-controls,
  .vp-top,
  .vp-bottom {
    transition: none;
  }
}
/* ── Browse pagination ─────────────────────────────────────────────────────── */
.browse-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 32px 4% 48px;
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pg-btn:hover:not(.pg-disabled):not(.pg-active) {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.pg-btn.pg-active {
  background: var(--accent, #38b6ff);
  border-color: var(--accent, #38b6ff);
  color: #000;
  font-weight: 700;
  cursor: default;
}
.pg-btn.pg-disabled {
  opacity: 0.3;
  cursor: default;
}
.pg-ellipsis {
  color: rgba(255,255,255,0.35);
  font-size: 0.9rem;
  padding: 0 4px;
}

/* ── Header live-search dropdown ──────────────────────────────────────────── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  min-width: 360px;
  background: #141414;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  list-style: none;
  margin: 0;
  padding: 8px;
  z-index: 1000;
  box-shadow: 0 16px 48px rgba(0,0,0,0.9);
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}
.search-dropdown li { margin: 0; }
.sd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: background 0.12s;
}
.sd-item:hover { background: rgba(255,255,255,0.08); }
.sd-thumb {
  width: 40px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sd-thumb-fallback {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
}
.sd-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.sd-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.sd-see-all {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  transition: background 0.12s, color 0.12s;
}
.sd-see-all:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sd-see-all strong { color: rgba(255,255,255,0.8); font-weight: 500; }