/* ============================================
   LiveHot — Chamet-level Glassmorphism UI
   Deep purple + glass cards + gradient buttons
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: #0d0b1a !important;
  color: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* Ambient light orbs — real DOM div, not pseudo-elements (z-index reliable) */
.orbs {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.orbs::before,
.orbs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.orbs::before {
  /* Orange orb — top right */
  width: 55vw; height: 55vw;
  max-width: 650px; max-height: 650px;
  top: -8%; right: -5%;
  background: radial-gradient(circle, rgba(255, 100, 30, 0.45) 0%, rgba(255, 50, 70, 0.2) 45%, transparent 70%);
}
.orbs::after {
  /* Purple orb — bottom left */
  width: 60vw; height: 60vw;
  max-width: 700px; max-height: 700px;
  bottom: -8%; left: -8%;
  background: radial-gradient(circle, rgba(140, 50, 255, 0.4) 0%, rgba(80, 30, 200, 0.18) 45%, transparent 70%);
}
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: #0d0b1a; }
body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { border: none; outline: none; cursor: pointer; font-family: inherit; }

/* ── Header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13, 11, 26, 0.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  height: 52px;
  display: flex; align-items: center;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 480px) {
  .header-inner { padding: 0 12px; }
}
.header-logo {
  font-size: 20px; font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.header-logo .logo-accent,
.header-logo span.logo-accent {
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #ff2d55);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 1px;
}
.header-logo .logo-flame {
  width: 20px; height: 20px;
  margin-left: 2px;
  flex-shrink: 0;
}

/* ── Search ── */
.header-search {
  flex: 1;
  height: 34px;
  position: relative;
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.08) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.4) !important;
  backdrop-filter: blur(28px) saturate(1.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 0 6px 0 14px;
  gap: 4px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.header-search:focus-within {
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
  background: rgba(255, 255, 255, 0.1);
}
.search-input {
  flex: 1;
  background: none; border: none; outline: none;
  font-size: 13px; color: #fff;
  font-family: inherit;
  min-width: 0;
}
.search-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.search-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  border-radius: 50%; flex-shrink: 0;
  transition: background 0.3s ease;
}
.search-btn:active { background: rgba(255, 255, 255, 0.1); }
.search-btn svg { width: 16px; height: 16px; fill: rgba(255, 255, 255, 0.5); }

/* Search Suggestions Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: rgba(26, 16, 37, 0.95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 8px 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 110;
  display: none;
}
.search-dropdown.active { display: block; }
.search-dropdown-item {
  padding: 10px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.2s ease;
  cursor: pointer;
}
.search-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.header-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  min-width: 0;
}
.header-online {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0; white-space: nowrap;
}
.online-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(37, 211, 102, 0.5); }
  50% { opacity: 0.4; box-shadow: 0 0 4px rgba(37, 211, 102, 0.2); }
}

/* ── Category Tabs ── */
.cat-bar-wrap {
  position: fixed; top: 52px; left: 0; right: 0; z-index: 90;
  height: 42px;
}
.cat-bar {
  background: rgba(13, 11, 26, 0.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  height: 42px;
  display: flex; align-items: center;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cat-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-bar-inner::-webkit-scrollbar { display: none; }
@media (max-width: 480px) {
  .cat-bar-inner { padding: 0 8px; }
}
.cat-bar-fade {
  position: absolute;
  top: 0; right: 0; bottom: 1px;
  width: 50px;
  background: linear-gradient(to right, transparent, rgba(13, 11, 26, 0.95));
  pointer-events: none;
  z-index: 1;
}

.cat-tab {
  display: inline-flex; align-items: center;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer; flex-shrink: 0;
  border-radius: 20px;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.cat-tab:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
}
.cat-tab.active {
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b35, #ff2d55);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(255, 45, 85, 0.3);
}
/* Remove underline — pill style only */
.cat-tab.active::after { display: none; }

/* ── Main Content ── */
.main-content {
  padding-top: 98px;
  padding-bottom: calc(130px + env(safe-area-inset-bottom, 0));
  position: relative;
  z-index: 2;
}

/* ── Trending Bar ── */
.trending-bar {
  padding: 14px 0 4px;
}
.trending-bar-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  padding: 0 12px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trending-bar-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 12px 14px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.trending-bar-scroll::-webkit-scrollbar { display: none; }
.trending-card {
  flex-shrink: 0;
  width: 80vw;
  max-width: 220px;
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.trending-card:active { transform: scale(0.97); }
.trending-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.trending-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.trending-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}
.trending-card-title {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  line-height: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trending-card-rank {
  position: absolute;
  top: 8px; left: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35, #ff2d55);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 45, 85, 0.4);
}
.trending-card-duration {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
}

/* Trending dot indicators */
.trending-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0 8px;
}
.trending-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s, transform 0.3s;
}
.trending-dot.active {
  background: #ff6b35;
  transform: scale(1.3);
}

/* ── Video Grid ── */
.video-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 8px;
}

/* ── Video Card — glassmorphism ── */
.video-card {
  display: block;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  position: relative;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:active {
  transform: scale(0.98);
}
.video-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Thumbnail wrapper — 16:9 */
.card-thumb-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(13, 11, 26, 0.6);
}
/* Play button overlay */
.card-thumb-wrap::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  z-index: 4;
  border: 2px solid rgba(255,255,255,0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.85)' d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: 11px center;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.video-card:hover .card-thumb-wrap::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.card-thumb {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.video-card:hover .card-thumb {
  transform: scale(1.05);
}

/* Overlay on thumbnail — title + meta sit here */
.card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 36px 10px 8px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 2;
  pointer-events: none;
}
.card-overlay .card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 17px;
  max-height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.card-overlay .card-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-overlay .card-meta svg {
  width: 11px; height: 11px;
  fill: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

/* card-info below thumb — hidden on grid, shown in related/sidebar row layout */
.card-info {
  padding: 8px 10px 10px;
  display: none;
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 17px;
  max-height: 34px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 4px;
  transition: color 0.3s ease;
}
.video-card:hover .card-title { color: #fff; }
.card-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-meta svg {
  width: 12px; height: 12px;
  fill: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* Duration badge — glassmorphism bottom-right */
.card-duration {
  position: absolute;
  bottom: 6px; right: 6px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  line-height: 16px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* HD badge — gradient top-left */
/* Video badges — HD / NEW / HOT / 4K / EXCLUSIVE */
.card-badge {
  position: absolute;
  left: 6px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.card-badge-hd { background: linear-gradient(135deg, #ff6b35, #ff2d55); box-shadow: 0 2px 8px rgba(255, 45, 85, 0.3); }
.card-badge-new { background: linear-gradient(135deg, #25D366, #128C7E); box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3); }
.card-badge-hot { background: linear-gradient(135deg, #e53935, #d32f2f); box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3); }
.card-badge-4k { background: linear-gradient(135deg, #ffb300, #ff8f00); box-shadow: 0 2px 8px rgba(255, 179, 0, 0.3); }
.card-badge-excl { background: linear-gradient(135deg, #7c4dff, #651fff); box-shadow: 0 2px 8px rgba(124, 77, 255, 0.3); }
/* Legacy compat */
.card-hd { position: absolute; top: 6px; left: 6px; background: linear-gradient(135deg, #ff6b35, #ff2d55); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 8px; z-index: 3; }

/* ── Skeleton Loading ── */
.skeleton-card {
  display: block;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.skeleton-thumb {
  width: 100%;
  padding-bottom: 56.25%;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-info {
  padding: 10px;
}
.skeleton-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 6px;
}
.skeleton-line:last-child {
  width: 60%;
  margin-bottom: 0;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: 56px;
  background: rgba(13, 11, 26, 0.55) !important;
  -webkit-backdrop-filter: blur(32px) saturate(1.5) !important;
  backdrop-filter: blur(32px) saturate(1.5) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; cursor: pointer; padding: 6px 20px;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.bottom-nav-item:active { transform: scale(0.92); }
.bottom-nav-item .nav-icon {
  width: 22px; height: 22px; fill: rgba(255, 255, 255, 0.35);
  transition: fill 0.3s ease;
}
.bottom-nav-item .nav-label {
  font-size: 10px; color: rgba(255, 255, 255, 0.35); font-weight: 500;
  transition: color 0.3s ease;
}
.bottom-nav-item.active .nav-icon { fill: #ff6b35; }
.bottom-nav-item.active .nav-label { color: #ff6b35; font-weight: 600; }

/* ── Gradient Buttons ── */
.btn-gradient {
  background: linear-gradient(135deg, #ff6b35, #ff2d55);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 45, 85, 0.3);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-gradient:hover {
  box-shadow: 0 6px 24px rgba(255, 45, 85, 0.4);
}
.btn-gradient:active { transform: scale(0.97); opacity: 0.9; }

.btn-secondary {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-secondary:active { transform: scale(0.97); opacity: 0.9; }

/* ── Floating CTA ── */
.floating-cta {
  position: fixed;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: linear-gradient(135deg, #ff6b35, #ff2d55);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 28px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(255, 45, 85, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: ctaPulse 2s ease-in-out infinite;
}
.floating-cta:active {
  transform: translateX(-50%) scale(0.95);
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(255, 45, 85, 0.4); }
  50% { box-shadow: 0 6px 36px rgba(255, 45, 85, 0.6); }
}

/* ── Fake Notification Toast ── */
.fake-toast {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(26, 16, 37, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.fake-toast.show { top: 12px; }
.fake-toast-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.fake-toast-icon svg { width: 18px; height: 18px; fill: #fff; }
.fake-toast-body { flex: 1; min-width: 0; }
.fake-toast-title {
  font-size: 12px; font-weight: 700; color: #fff;
  margin-bottom: 2px;
}
.fake-toast-text {
  font-size: 11px; color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Premium Welcome Modal ── */
.premium-welcome {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.premium-welcome.active {
  opacity: 1;
  pointer-events: auto;
}
.premium-card {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
/* Gradient border glow effect */
.premium-card::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.3), rgba(255, 45, 85, 0.1), rgba(37, 211, 102, 0.2));
  z-index: -1;
  opacity: 0.5;
}
.premium-welcome.active .premium-card {
  transform: scale(1);
}
.premium-badge {
  font-size: 40px;
  margin-bottom: 12px;
}
.premium-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b35, #ff2d55);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.premium-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
  line-height: 20px;
}
.premium-features {
  text-align: left;
  margin-bottom: 20px;
}
.premium-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  padding: 5px 0;
}
.premium-feature-check {
  color: #25D366;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.premium-btn {
  width: 100%;
  height: 48px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ff6b35, #ff2d55);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 45, 85, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.premium-btn:active { transform: scale(0.97); }
.premium-btn:hover { box-shadow: 0 6px 28px rgba(255, 45, 85, 0.5); }

/* ── Daily Reward ── */
.daily-reward {
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin: 8px 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.daily-reward:active { transform: scale(0.98); }
.daily-reward:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
.daily-reward-icon { font-size: 28px; flex-shrink: 0; }
.daily-reward-body { flex: 1; }
.daily-reward-title {
  font-size: 13px; font-weight: 700; color: #ff6b35;
  margin-bottom: 2px;
}
.daily-reward-text {
  font-size: 11px; color: rgba(255, 255, 255, 0.45);
}
.daily-reward-btn {
  background: rgba(255, 107, 53, 0.15);
  color: #ff6b35;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.daily-reward-btn:hover { background: rgba(255, 107, 53, 0.25); }

/* ── Points Badge ── */
.points-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 107, 53, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #ff6b35;
  cursor: pointer;
  transition: background 0.3s ease;
}
.points-badge:hover { background: rgba(255, 107, 53, 0.18); }
.points-badge-icon { font-size: 12px; }

/* ── Preview Countdown ── */
.preview-countdown {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 15;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  pointer-events: none;
}

/* ── Video Loading / Error States ── */
.video-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 5;
  background: rgba(13, 11, 26, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ff6b35;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.video-error {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 5;
  background: rgba(13, 11, 26, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}
.video-error svg { width: 32px; height: 32px; fill: rgba(255, 255, 255, 0.2); }

/* ── Blur Transition ── */
.blur-transition {
  transition: -webkit-backdrop-filter 0.5s ease, backdrop-filter 0.5s ease, opacity 0.5s ease;
}

/* ── Categories Page ── */
.categories-page {
  padding-top: 64px;
  padding-bottom: 80px;
  min-height: 100vh;
}
.categories-page-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  padding: 16px 12px 12px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 12px;
}
.category-card {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:active { transform: scale(0.97); }
.category-card-thumb {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.category-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 10px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  z-index: 2;
}
.category-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.category-card-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

/* ── RTL Support ── */
[dir="rtl"] .card-duration { right: auto; left: 6px; }
[dir="rtl"] .card-hd, [dir="rtl"] .card-badge { left: auto; right: 6px; }
[dir="rtl"] .trending-card-rank { left: auto; right: 8px; }
[dir="rtl"] .trending-card-duration { right: auto; left: 8px; }
[dir="rtl"] .preview-countdown { right: auto; left: 8px; }

/* ════════════════════════════════════════════
   Desktop — wide layout with aligned containers
   ════════════════════════════════════════════ */

/* Desktop nav hidden — always use bottom nav */
.desktop-nav { display: none !important; }

/* Main content centered on desktop */
@media (min-width: 769px) {
  .main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ── Desktop grid: 4 columns ── */
@media (min-width: 769px) {
  .trending-card {
    /* Match grid column: (1400 - 24*2 - 16*3) / 4 ≈ 326px */
    width: calc((100% - 16px * 3) / 4);
    max-width: 340px;
  }
  .trending-bar-scroll {
    padding: 0 0 14px;
    gap: 16px;
  }
  .video-list {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px;
  }
  .cat-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px;
  }
  .categories-page {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
  }
  .category-card {
    aspect-ratio: 16 / 9;
  }
  .category-card-name {
    font-size: 18px;
  }
  .category-card-count {
    font-size: 13px;
  }
}

/* ── Tablet: 3 columns ── */
@media (min-width: 481px) and (max-width: 768px) {
  .video-list {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .cat-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ── Mobile: 2 columns (default, no change needed) ── */

/* Watch page: centered mobile layout */
.watch-desktop-layout {
  display: block !important;
  max-width: 480px;
  margin: 0 auto;
}
.watch-sidebar {
  width: 100% !important;
}
.watch-sidebar .video-card {
  display: block !important;
}
.watch-sidebar .card-thumb-wrap {
  width: 100% !important;
  min-width: 0 !important;
  padding-bottom: 56.25% !important;
  height: auto !important;
  border-radius: 12px 12px 0 0 !important;
}
