/* ==========================================================================
   MOVWATCH - TMDB STREAMING & MEDIA APP STYLESHEET
   ========================================================================== */

:root {
  --bg-main: #0a0b10;
  --bg-surface: #12131c;
  --bg-card: #171926;
  --bg-card-hover: #1f2233;
  --bg-glass: rgba(18, 19, 28, 0.85);
  --bg-glass-heavy: rgba(10, 11, 16, 0.95);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(229, 9, 20, 0.5);

  --accent-red: #e50914;
  --accent-crimson: #ff1e42;
  --accent-gold: #ffb703;
  --accent-blue: #0084ff;
  --accent-green: #06d6a0;

  --text-main: #ffffff;
  --text-secondary: #a3a8be;
  --text-muted: #6c728e;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(229, 9, 20, 0.35);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-main);
  font-family: var(--font-sans);
  color: var(--text-main);
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: var(--bg-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #25283b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red);
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  z-index: 1000;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand-logo .logo-badge {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-crimson));
  color: #fff;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
  display: inline-block;
  line-height: 1.2;
}

.brand-logo .logo-text {
  color: #ffffff !important;
  display: inline-block !important;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.2;
  visibility: visible !important;
  opacity: 1 !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.52rem 1.15rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.tab-btn:hover .tab-icon {
  transform: scale(1.15);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #e50914 0%, #b80610 100%);
  border-color: rgba(255, 60, 70, 0.6);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.45), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tab-btn.active .tab-icon {
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Search Container & Form */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 280px;
  background: rgba(18, 19, 28, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  padding: 0.6rem 4.6rem 0.6rem 2.6rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.search-input:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(24, 26, 38, 0.95);
}

.search-input:focus {
  width: 380px;
  background: #10111a;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2), 0 8px 25px rgba(229, 9, 20, 0.35);
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.search-form:focus-within .search-icon {
  color: var(--accent-crimson);
}

.search-shortcut-badge {
  position: absolute;
  right: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.search-form.has-value .search-shortcut-badge {
  display: none;
}

.search-clear-btn {
  position: absolute;
  right: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-glass);
  color: #fff;
  cursor: pointer;
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.search-clear-btn:hover {
  background: var(--accent-crimson);
  transform: scale(1.1);
}

/* Instant Live Search Results Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 420px;
  max-height: 480px;
  background: rgba(14, 15, 23, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 25px rgba(229, 9, 20, 0.15);
  overflow-y: auto;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  animation: slide-dropdown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-dropdown {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-dropdown-header {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item.focused {
  background: rgba(229, 9, 20, 0.12);
}

.search-dropdown-thumb {
  width: 44px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #1c1e2d;
  flex-shrink: 0;
}

.search-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  overflow: hidden;
}

.search-dropdown-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-dropdown-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.68rem;
  color: #fff;
}

.search-dropdown-rating {
  color: var(--accent-gold);
  font-weight: 700;
}

.search-dropdown-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-glass);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-crimson);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-dropdown-footer:hover {
  background: rgba(229, 9, 20, 0.15);
}

/* ==========================================================================
   USER PROFILE & WATCHLIST PILL / DROPDOWN
   ========================================================================== */
.profile-container {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-pill-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  padding: 0.35rem 1rem 0.35rem 0.45rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.profile-pill-btn:hover {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.22) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-1.5px);
  box-shadow: 0 8px 25px rgba(229, 9, 20, 0.3), 0 2px 8px rgba(0, 0, 0, 0.6);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff2a3a 0%, #b8000a 60%, #400003 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.profile-pill-btn:hover .profile-avatar {
  transform: scale(1.08);
}

.profile-nav-name {
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.2px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f3f4f8;
}

.watchlist-badge-count {
  background: linear-gradient(135deg, #e50914 0%, #a40008 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
  line-height: 1.2;
}

.profile-caret {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-container.active .profile-caret {
  transform: rotate(180deg);
  color: var(--accent-crimson);
}

/* Profile & Watchlist Dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: 320px;
  background: rgba(11, 12, 18, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 35px rgba(229, 9, 20, 0.2);
  z-index: 3100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slide-dropdown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-dropdown-header {
  padding: 1.35rem 1.4rem;
  background: linear-gradient(180deg, rgba(229, 9, 20, 0.2) 0%, rgba(11, 12, 18, 0.05) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-dropdown-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff2a3a 0%, #b8000a 60%, #400003 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 22px rgba(229, 9, 20, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.profile-dropdown-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow: hidden;
}

.profile-dropdown-name {
  font-size: 1.1rem;
  font-weight: 850;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.profile-dropdown-status {
  font-size: 0.72rem;
  font-weight: 800;
  color: #00d26a;
  background: rgba(0, 210, 106, 0.12);
  border: 1px solid rgba(0, 210, 106, 0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
}

.profile-dropdown-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00d26a;
  box-shadow: 0 0 8px #00d26a;
}

.profile-dropdown-menu {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-menu-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.profile-menu-item.danger:hover {
  background: rgba(229, 9, 20, 0.16);
  border-color: rgba(229, 9, 20, 0.35);
  color: #ff3b47;
}

.menu-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item-icon svg {
  width: 19px;
  height: 19px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Watchlist Icon: Vibrant Crimson Neon */
.watchlist-icon-box {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.2) 0%, rgba(229, 9, 20, 0.05) 100%);
  border: 1px solid rgba(229, 9, 20, 0.35);
  color: #ff3b47;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.15);
}

.profile-menu-item:hover .watchlist-icon-box {
  background: linear-gradient(135deg, #e50914 0%, #a40008 100%);
  border-color: #ff3b47;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.6);
}

/* Edit Profile Icon: Electric Sapphire / Azure Glow */
.edit-icon-box {
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.2) 0%, rgba(0, 150, 255, 0.05) 100%);
  border: 1px solid rgba(0, 150, 255, 0.35);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(0, 150, 255, 0.15);
}

.profile-menu-item:hover .edit-icon-box {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #38bdf8;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
}

/* Switch Profile Icon: Radiant Amber / Coral Glow */
.switch-icon-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.profile-menu-item:hover .switch-icon-box {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #fbbf24;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.6);
}

.profile-menu-item:hover svg {
  transform: scale(1.12);
}

.menu-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  flex: 1;
  overflow: hidden;
}

.menu-item-title {
  font-size: 0.92rem;
  font-weight: 750;
  color: #f4f5f8;
}

.menu-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item-badge {
  background: linear-gradient(135deg, #e50914 0%, #a40008 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.6);
}

/* ==========================================================================
   FIRST-TIME PROFILE CREATION MODAL & ONBOARDING
   ========================================================================== */
#profile-modal {
  z-index: 3500;
}

body.onboarding-active .navbar,
body.onboarding-active #home-view,
body.onboarding-active #watch-view,
body.onboarding-active .footer {
  filter: blur(12px) brightness(0.6);
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s ease;
}

.profile-creation-card {
  position: relative;
  max-width: 530px;
  background: radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.18) 0%, rgba(12, 13, 20, 0.99) 65%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(229, 9, 20, 0.22);
  border-radius: 20px;
  padding: 2.75rem 2.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.profile-modal-close-btn:hover {
  background: rgba(229, 9, 20, 0.85);
  border-color: var(--accent-red);
  transform: rotate(90deg);
}

.profile-modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: center;
  align-items: center;
}

.profile-preview-avatar-wrap {
  position: relative;
  margin-bottom: 0.4rem;
}

.profile-preview-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff2a3a 0%, #b8000a 60%, #400003 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 28px rgba(229, 9, 20, 0.75), inset 0 2px 4px rgba(255, 255, 255, 0.5);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-welcome-badge {
  background: rgba(229, 9, 20, 0.16);
  border: 1px solid rgba(229, 9, 20, 0.45);
  color: #ff3b47;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 1.2px;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  display: inline-block;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.25);
}

.profile-modal-title {
  font-size: 1.95rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.profile-modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 420px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-form-label {
  font-size: 0.85rem;
  font-weight: 750;
  color: #d1d5e6;
  margin-bottom: 0.6rem;
  display: block;
  letter-spacing: 0.3px;
}

.avatar-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.avatar-opt-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 1.85rem;
  padding: 0.75rem 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.avatar-opt-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.avatar-opt-btn.active {
  background: radial-gradient(circle, rgba(229, 9, 20, 0.3) 0%, rgba(229, 9, 20, 0.1) 100%);
  border-color: var(--accent-red);
  box-shadow: 0 0 22px rgba(229, 9, 20, 0.6);
  transform: scale(1.1);
}

.profile-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-input-icon {
  position: absolute;
  left: 1.15rem;
  font-size: 1.15rem;
  color: #7b819b;
  pointer-events: none;
}

.profile-text-input {
  width: 100%;
  background: rgba(8, 9, 14, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1rem 1.1rem 1rem 3.1rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.profile-text-input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3.5px rgba(229, 9, 20, 0.25), 0 0 25px rgba(229, 9, 20, 0.25);
  background: #090a10;
}

.profile-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.profile-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0.4px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e50914 0%, #a40008 100%);
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.6);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-submit-btn:hover {
  background: linear-gradient(135deg, #ff1e2b 0%, #b80009 100%);
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(229, 9, 20, 0.8);
}

/* Card Watchlist Quick Action Button */
.card-watchlist-action-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.card-watchlist-action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.card-watchlist-action-btn.in-watchlist {
  background: var(--accent-red);
  border-color: var(--accent-crimson);
  color: #fff;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

/* ==========================================================================
   HERO / BANNER SECTION (DYNAMIC CAROUSEL)
   ========================================================================== */
.hero-showcase {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  background: #000;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.55;
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-bg.fade-in {
  animation: hero-fade 0.7s ease-in-out;
}

@keyframes hero-fade {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 0.55; transform: scale(1); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-main) 0%, rgba(10, 11, 16, 0.75) 45%, rgba(10, 11, 16, 0.2) 100%),
              linear-gradient(90deg, var(--bg-main) 0%, rgba(10, 11, 16, 0.85) 40%, rgba(10, 11, 16, 0) 100%);
}

.hero-body {
  position: absolute;
  bottom: 3.5rem;
  left: 3.5rem;
  max-width: 650px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Dynamic Hero Carousel Controls */
.hero-carousel-controls {
  position: absolute;
  bottom: 3.5rem;
  right: 3.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 20;
}

.hero-arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(18, 19, 28, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1;
}

.hero-arrow-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-crimson);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
}

.hero-dots-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  padding: 0;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
  width: 28px;
  background: var(--accent-crimson);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
}

.hero-tag-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-tag {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-tag.trending {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-crimson);
}

.hero-tag.rating {
  color: var(--accent-gold);
  border-color: rgba(255, 183, 3, 0.3);
}

.hero-title {
  font-size: clamp(1.35rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.5px;
}

.hero-overview {
  font-size: clamp(0.82rem, 1.3vw, 1rem);
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.45rem, 1.2vw, 1rem);
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #e50914 0%, #a40008 100%);
  color: #fff;
  border: none;
  padding: clamp(0.55rem, 1.1vw, 0.8rem) clamp(0.95rem, 1.8vw, 1.85rem);
  border-radius: var(--radius-md);
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  font-weight: 800;
  cursor: pointer;
  width: fit-content;
  transition: all var(--transition-fast);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.6);
  letter-spacing: 0.3px;
  line-height: 1;
}

.hero-btn:hover {
  background: linear-gradient(135deg, #ff1e2b 0%, #b80009 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(229, 9, 20, 0.85);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: clamp(0.55rem, 1.1vw, 0.8rem) clamp(0.85rem, 1.6vw, 1.6rem);
  border-radius: var(--radius-md);
  font-size: clamp(0.82rem, 1.1vw, 0.98rem);
  font-weight: 750;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  line-height: 1;
}

.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.hero-btn-secondary.active {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.3) 0%, rgba(229, 9, 20, 0.15) 100%);
  border-color: #ff3b47;
  color: #fff;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.5);
}

.hero-btn-svg {
  width: 19px;
  height: 19px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.hero-btn:hover .hero-btn-svg,
.hero-btn-secondary:hover .hero-btn-svg {
  transform: scale(1.15);
}

/* ==========================================================================
   TOP 10 NETFLIX-STYLE SHOWCASES
   ========================================================================== */
.top10-sections-wrapper {
  padding: 2.5rem 3.5rem 0.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.top10-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.top10-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top10-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.top10-flame-badge {
  background: linear-gradient(135deg, #e50914 0%, #9e030b 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.8px;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.top10-flame-badge.tv {
  background: linear-gradient(135deg, #0077ff 0%, #0044aa 100%);
  box-shadow: 0 0 15px rgba(0, 119, 255, 0.45);
}

.top10-heading {
  font-size: 1.6rem;
  font-weight: 850;
  color: #fff;
  letter-spacing: -0.4px;
}

/* Netflix Floating Carousel Wrapper & Edge Arrows */
.top10-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.top10-carousel-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto 0;
  z-index: 35;
  width: 50px;
  height: calc(100% - 1.5rem);
  max-height: 245px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 8, 13, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.top10-carousel-arrow.prev {
  left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: linear-gradient(to right, rgba(6, 7, 10, 0.96) 0%, rgba(6, 7, 10, 0.7) 70%, transparent 100%);
  border-left: none;
}

.top10-carousel-arrow.next {
  right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: linear-gradient(to left, rgba(6, 7, 10, 0.96) 0%, rgba(6, 7, 10, 0.7) 70%, transparent 100%);
  border-right: none;
}

.top10-carousel-wrapper:hover .top10-carousel-arrow {
  opacity: 1;
  pointer-events: auto;
}

.top10-carousel-arrow:hover {
  background: rgba(229, 9, 20, 0.9);
  border-color: var(--accent-red);
  color: #fff;
  width: 58px;
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.7), 0 12px 35px rgba(0, 0, 0, 0.95);
}

.top10-carousel-arrow svg {
  transition: transform 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.top10-carousel-arrow:hover svg {
  transform: scale(1.25);
}

.top10-scroll-track {
  display: flex;
  gap: 1.6rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.75rem 0.5rem 1.6rem 0.5rem;
  width: 100%;
}

.top10-scroll-track::-webkit-scrollbar {
  display: none;
}

.top10-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  scroll-snap-align: start;
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.top10-card:hover {
  transform: scale(1.06) translateY(-4px);
  z-index: 25;
}

/* Giant Netflix-style stylized ranking numbers */
.top10-rank-num {
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: clamp(4.2rem, 7.5vw, 8.2rem);
  font-weight: 900;
  line-height: 0.72;
  color: #07080d;
  -webkit-text-stroke: clamp(2.2px, 0.3vw, 4px) #4f5367;
  text-shadow: 4px 4px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 10px 25px rgba(0, 0, 0, 0.95);
  margin-right: clamp(-14px, -1.8vw, -24px);
  z-index: 1;
  flex-shrink: 0;
  letter-spacing: -5px;
  transition: all 0.3s ease;
}

.top10-card[data-rank="10"] .top10-rank-num {
  font-size: clamp(3.6rem, 6.5vw, 7.2rem);
  letter-spacing: -8px;
  margin-right: clamp(-18px, -2.4vw, -32px);
}

.top10-card:hover .top10-rank-num {
  -webkit-text-stroke: 4px #e50914;
  text-shadow: 0 0 20px rgba(229, 9, 20, 0.6), 4px 4px 0 #000;
}

.top10-poster-wrap {
  position: relative;
  width: 155px;
  height: 232px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #11121c;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75);
  z-index: 2;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.top10-card:hover .top10-poster-wrap {
  border-color: var(--accent-red);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 25px rgba(229, 9, 20, 0.45);
}

.top10-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.top10-card:hover .top10-poster-img {
  transform: scale(1.06);
}

.top10-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(229, 9, 20, 0.95);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.5px;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.top10-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(9, 10, 15, 0.96) 0%, rgba(9, 10, 15, 0.6) 65%, rgba(9, 10, 15, 0) 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
  transition: opacity 0.25s ease;
  z-index: 4;
  gap: 0.5rem;
}

.top10-card:hover .top10-hover-overlay {
  opacity: 1;
}

.top10-hover-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top10-hover-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--accent-gold);
  font-weight: 700;
}

/* ==========================================================================
   MAIN CONTENT & CONTROLS BAR
   ========================================================================== */
.main-container {
  padding: 2.5rem 3.5rem 5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-heading {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.results-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Genre Filter Bar */
.genre-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.genre-bar::-webkit-scrollbar {
  display: none;
}

.genre-pill {
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.genre-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.genre-pill.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-crimson);
}

/* ==========================================================================
   MEDIA GRID & CARDS
   ========================================================================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.media-card {
  position: relative;
  background: #0d0f17;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(229, 9, 20, 0.75);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(229, 9, 20, 0.35);
}

.poster-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #11121c;
}

.poster-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 22%, transparent 70%, rgba(0, 0, 0, 0.75) 100%);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
}

.media-card:hover .poster-img {
  transform: scale(1.07);
}

.badge-type {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(10, 11, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.badge-type::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 6px var(--accent-red);
}

.badge-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10, 11, 18, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 183, 3, 0.4);
  color: var(--accent-gold);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 183, 3, 0.15);
}

/* Card Hover Quick Play Overlay */
.card-hover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 9, 14, 0.98) 0%, rgba(8, 9, 14, 0.55) 60%, rgba(8, 9, 14, 0.1) 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 8;
}

.media-card:hover .card-hover-overlay {
  opacity: 1;
}

.card-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.card-play-action-btn {
  flex: 1;
  background: linear-gradient(135deg, #e50914 0%, #a40008 100%);
  color: #fff;
  border: none;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.6);
  letter-spacing: 0.3px;
}

.card-play-action-btn:hover {
  background: linear-gradient(135deg, #ff1e2b 0%, #b80009 100%);
  transform: scale(1.04);
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.85);
}

.card-watchlist-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.card-watchlist-action-btn:hover {
  background: rgba(229, 9, 20, 0.3);
  border-color: #ff3b47;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.6);
}

.card-watchlist-action-btn.in-watchlist {
  background: linear-gradient(135deg, #e50914 0%, #a40008 100%);
  border-color: #ff3b47;
  color: #fff;
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.7);
}

.card-info-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.card-info-action-btn:hover {
  background: rgba(0, 150, 255, 0.3);
  border-color: #38bdf8;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.6);
}

.card-btn-svg {
  width: 17px;
  height: 17px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.card-play-action-btn .card-btn-svg {
  width: 15px;
  height: 15px;
}

.card-play-action-btn:hover .card-btn-svg,
.card-watchlist-action-btn:hover .card-btn-svg,
.card-info-action-btn:hover .card-btn-svg {
  transform: scale(1.15);
}

.card-info {
  padding: 0.85rem 0.95rem 0.95rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(180deg, #10121b 0%, #07080d 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #f1f2f6;
  line-height: 1.35;
  letter-spacing: -0.2px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.media-card:hover .card-title {
  color: #ff2a3a;
  text-shadow: 0 0 12px rgba(229, 9, 20, 0.4);
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.card-meta-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
}

.card-year-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8f95af;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  letter-spacing: 0.2px;
  line-height: 1.2;
  flex-shrink: 0;
}

.card-genre-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #b0b5cc;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-quality-badge {
  font-size: 0.65rem;
  font-weight: 850;
  color: #00d26a;
  background: rgba(0, 210, 106, 0.1);
  border: 1px solid rgba(0, 210, 106, 0.35);
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(0, 210, 106, 0.15);
  line-height: 1.2;
  flex-shrink: 0;
}

.star-glyph {
  font-size: 0.75rem;
  line-height: 1;
}

/* Skeleton Loading Cards */
.skeleton-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  height: 380px;
  display: flex;
  flex-direction: column;
}

.skeleton-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(90deg, #171926 25%, #24273b 50%, #171926 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #171926 25%, #24273b 50%, #171926 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error & Empty States */
.error-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.error-state h3, .empty-state h3 {
  font-size: 1.4rem;
  color: #fff;
}

.error-state p, .empty-state p {
  color: var(--text-secondary);
  max-width: 450px;
}

.retry-btn {
  background: var(--accent-red);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.retry-btn:hover {
  background: var(--accent-crimson);
}

/* ==========================================================================
   PAGINATION CONTROLS
   ========================================================================== */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.page-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  background: var(--accent-red);
  border-color: var(--accent-crimson);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-indicator {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ==========================================================================
   DEDICATED WATCH VIEW & DUAL STREAMING SERVERS
   ========================================================================== */
#watch-view {
  width: 100%;
  min-height: calc(100vh - 72px);
  background: var(--bg-main);
  padding: 1.75rem 3.5rem 5rem 3.5rem;
}

.watch-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Watch Header with Back to Home Button */
.watch-header-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
}

.back-home-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.back-home-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-crimson);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
  transform: translateX(-3px);
}

.watch-title-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.player-live-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  flex-shrink: 0;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.watch-title {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.watch-episode-badge {
  background: rgba(229, 9, 20, 0.2);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: var(--accent-crimson);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Cinema Player Card & Viewport */
.cinema-player-card {
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cinema-player-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.cinema-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
  display: block;
}

/* Fourteen Server Buttons Below Video Player */
.watch-servers-bar {
  padding: clamp(0.85rem, 1.8vw, 1.25rem) clamp(1rem, 2.2vw, 1.75rem);
  background: #11121d;
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.servers-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.84rem, 1.2vw, 0.95rem);
  font-weight: 700;
  color: var(--text-secondary);
}

.servers-label-icon {
  color: var(--accent-gold);
}

.servers-btn-group {
  display: flex;
  align-items: center;
  gap: clamp(0.45rem, 1vw, 0.85rem);
  flex-wrap: wrap;
}

.server-choice-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: clamp(0.48rem, 1vw, 0.6rem) clamp(0.75rem, 1.5vw, 1.3rem);
  border-radius: var(--radius-md);
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  text-align: center;
}

.server-choice-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.server-choice-btn.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-crimson);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

/* TV Seasons & Episodes Section in Watch View */
.watch-tv-episodes-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.watch-section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

/* Movie/Show Info Section */
.watch-info-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.watch-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.watch-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.watch-genres {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.watch-overview-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.watch-overview-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.watch-overview-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Matching Videos ("More Like This") Section */
.watch-matching-section {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.watch-matching-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.watch-matching-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.watch-matching-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.watch-matching-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

@media (max-width: 1100px) {
  .watch-matching-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
  }
}

@media (max-width: 840px) {
  .watch-matching-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 560px) {
  .watch-matching-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

.matching-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.matching-card:hover {
  transform: translateY(-5px);
  border-color: rgba(229, 9, 20, 0.65);
  box-shadow: 0 10px 25px rgba(229, 9, 20, 0.25);
}

.matching-card-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #11121d;
}

.matching-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.matching-card:hover .matching-card-poster {
  transform: scale(1.06);
}

.matching-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 11, 16, 0.95) 0%, rgba(10, 11, 16, 0.3) 50%, rgba(10, 11, 16, 0.1) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.matching-card:hover .matching-card-overlay {
  opacity: 1;
}

.matching-play-badge {
  background: var(--accent-crimson);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 3px 10px rgba(229, 9, 20, 0.6);
  transform: translateY(4px);
  transition: transform var(--transition-fast);
}

.matching-card:hover .matching-play-badge {
  transform: translateY(0);
}

.matching-card-rating {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 183, 3, 0.4);
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(6px);
  z-index: 2;
}

.matching-card-type {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: rgba(229, 9, 20, 0.9);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  z-index: 2;
}

.matching-card-info {
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  justify-content: space-between;
  background: #0f1017;
}

.matching-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.matching-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.skeleton-matching-card {
  height: 240px;
  background: linear-gradient(90deg, #171926 25%, #24273b 50%, #171926 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.watch-footer-actions {
  display: flex;
  align-items: center;
  padding-top: 1rem;
}

/* ==========================================================================
   MEDIA DETAIL MODAL POPUP & SEASONS/EPISODES
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 950px;
  max-height: 90vh;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
}

.modal-backdrop-wrap {
  position: relative;
  width: 100%;
  height: 340px;
  background: #090a0f;
  overflow: hidden;
}

.modal-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-surface) 0%, rgba(18, 19, 28, 0.6) 60%, rgba(18, 19, 28, 0.2) 100%);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-glass);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-red);
  transform: rotate(90deg);
}

.modal-header-content {
  position: absolute;
  bottom: clamp(1rem, 2vw, 1.5rem);
  left: clamp(1rem, 2.5vw, 2rem);
  right: clamp(1rem, 2.5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modal-title {
  font-size: clamp(1.25rem, 3.2vw, 2.2rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.4px;
}

.modal-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.modal-tag {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-tag.rating {
  color: var(--accent-gold);
  border-color: rgba(255, 183, 3, 0.3);
}

.modal-tag.votes {
  color: var(--accent-green);
  border-color: rgba(6, 214, 160, 0.3);
}

.modal-tag.seasons-badge {
  background: rgba(229, 9, 20, 0.2);
  border-color: rgba(229, 9, 20, 0.4);
  color: var(--accent-crimson);
}

.modal-tag.episodes-badge {
  background: rgba(0, 132, 255, 0.15);
  border-color: rgba(0, 132, 255, 0.3);
  color: var(--accent-blue);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.modal-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Modal Tab Bar */
.modal-tabs-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
}

.modal-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-tab-btn:hover {
  color: #fff;
}

.modal-tab-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 2px solid var(--accent-red);
}

/* Season & Episode Browser */
.modal-seasons-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.season-selector-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
}

.season-selector-bar::-webkit-scrollbar {
  display: none;
}

.season-pill {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.season-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.season-pill.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-crimson);
  box-shadow: 0 0 15px rgba(229, 9, 20, 0.4);
}

.episodes-list-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.episode-item-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.episode-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-red);
  transform: translateX(4px);
}

.episode-still-wrap {
  position: relative;
  width: 140px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f1017;
}

.episode-still-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-play-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.episode-item-card:hover .episode-play-badge {
  opacity: 1;
}

.episode-details-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.episode-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.episode-code-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.episode-runtime-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.episode-synopsis-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-genres {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.genre-tag {
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.3);
  color: var(--accent-crimson);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.modal-overview-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.modal-overview-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 4000;
}

.toast {
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slide-toast 0.3s ease-out;
}

.toast.success {
  border-left: 4px solid var(--accent-green);
}

.toast.error {
  border-left: 4px solid var(--accent-crimson);
}

.toast.info {
  border-left: 4px solid var(--accent-blue);
}

@keyframes slide-toast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-glass);
  background: #06070a;
  padding: 3rem 3.5rem 2rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--accent-crimson);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TOP ANNOUNCEMENT / DOMAIN ALERT BAR
   ========================================================================== */
.top-announcement-bar {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.18) 0%, rgba(20, 22, 34, 0.95) 50%, rgba(0, 136, 204, 0.18) 100%);
  border-bottom: 1px solid rgba(229, 9, 20, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 2rem;
  position: relative;
  z-index: 1050;
}

.announcement-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.announcement-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.announcement-pulse-dot {
  width: 8px;
  height: 8px;
  background: #ff2a38;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff2a38;
  animation: pulseBeacon 1.8s infinite;
}

.announcement-badge {
  background: rgba(229, 9, 20, 0.25);
  border: 1px solid rgba(229, 9, 20, 0.6);
  color: #ff525e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.announcement-text {
  color: #d1d5db;
}

.announcement-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.announcement-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
  letter-spacing: 0.2px;
}

.announcement-pill-btn.whatsapp {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.45);
  color: #25d366;
}

.announcement-pill-btn.whatsapp:hover {
  background: #25d366;
  color: #0b0c10;
  box-shadow: 0 0 14px rgba(37, 211, 102, 0.5);
  transform: translateY(-1px);
}

.announcement-pill-btn.telegram {
  background: rgba(0, 136, 204, 0.15);
  border: 1px solid rgba(0, 136, 204, 0.45);
  color: #00b0ff;
}

.announcement-pill-btn.telegram:hover {
  background: #0088cc;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(0, 176, 255, 0.5);
  transform: translateY(-1px);
}

/* ==========================================================================
   JOIN US & COMMUNITY CHANNELS SHOWCASE SECTION
   ========================================================================== */
.join-community-section {
  position: relative;
  margin-top: 3.5rem;
  margin-bottom: 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(17, 19, 30, 0.92) 0%, rgba(13, 14, 22, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding: 3rem 2.5rem;
}

.community-backdrop-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.15) 0%, rgba(0, 136, 204, 0.08) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(60px);
}

.community-card-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.community-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.community-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #ff4b58;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}

.community-title {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.6px;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, #ffffff 30%, #ff4b58 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.community-subtitle {
  font-size: clamp(0.84rem, 1.3vw, 1rem);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Important Domain Notice Box */
.community-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.12) 0%, rgba(255, 140, 0, 0.08) 100%);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-left: 5px solid var(--accent-red);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.notice-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(229, 9, 20, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.notice-content {
  flex: 1;
}

.notice-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ff6b75;
  letter-spacing: 0.3px;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.notice-desc {
  font-size: 0.9rem;
  color: #d1d5db;
  line-height: 1.55;
  margin: 0;
}

.notice-desc strong {
  color: #ffffff;
}

/* Community Cards Grid */
.community-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.social-channel-card {
  text-decoration: none;
  display: block;
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.social-channel-card.whatsapp-card {
  background: linear-gradient(135deg, rgba(16, 28, 22, 0.85) 0%, rgba(11, 19, 15, 0.95) 100%);
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.social-channel-card.whatsapp-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 211, 102, 0.7);
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.22), 0 0 20px rgba(37, 211, 102, 0.15);
}

.social-channel-card.telegram-card {
  background: linear-gradient(135deg, rgba(13, 25, 36, 0.85) 0%, rgba(9, 17, 26, 0.95) 100%);
  border: 1px solid rgba(0, 136, 204, 0.3);
}

.social-channel-card.telegram-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 176, 255, 0.7);
  box-shadow: 0 16px 36px rgba(0, 136, 204, 0.22), 0 0 20px rgba(0, 176, 255, 0.15);
}

.social-card-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.social-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.social-channel-card:hover .social-icon-box {
  transform: scale(1.08);
}

.social-icon-box.whatsapp-box {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.social-icon-box.telegram-box {
  background: linear-gradient(135deg, #0088cc 0%, #00b0ff 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 136, 204, 0.4);
}

.social-svg {
  width: 32px;
  height: 32px;
}

.social-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.social-platform-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.social-platform-badge.whatsapp {
  color: #25d366;
}

.social-platform-badge.telegram {
  color: #00b0ff;
}

.social-card-heading {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.social-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.social-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 0.5rem;
  transition: all var(--transition-fast);
}

.social-action-btn.whatsapp-btn {
  background: #25d366;
  color: #0b0c10;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.social-channel-card.whatsapp-card:hover .social-action-btn.whatsapp-btn {
  background: #2ee672;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.55);
}

/* ==========================================================================
   UNIVERSAL MULTI-DEVICE RESPONSIVE SYSTEM
   Devices Supported:
   1. Smart TVs / 4K UHD Displays (1921px - 3840px+)
   2. Desktop & Ultrawide Laptops (1025px - 1920px)
   3. Tablets & iPads in Portrait/Landscape (601px - 1024px)
   4. Mobile Smartphones (320px - 600px)
   5. Compact Phones & Foldables (<= 360px)
   ========================================================================== */

/* --------------------------------------------------------------------------
   A. GLOBAL ACCESSIBILITY, FOCUS INDICATORS & REMOTE D-PAD NAVIGATION (TV)
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2.5px solid #ff2a3a !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.75) !important;
}

button, a, input, select, textarea, [tabindex="0"] {
  touch-action: manipulation;
}

/* --------------------------------------------------------------------------
   1. SMART TVS & 4K ULTRA HD SCREENS (1921px and up)
   -------------------------------------------------------------------------- */
@media (min-width: 1921px) {
  html {
    font-size: 18px;
  }

  .navbar {
    height: 84px;
    padding: 0 max(4rem, 5vw);
    max-width: 2400px;
    margin: 0 auto;
  }

  .brand-logo {
    font-size: 1.9rem;
  }

  .brand-logo .logo-badge {
    font-size: 1.3rem;
    padding: 0.2rem 0.7rem;
  }

  .tab-btn {
    font-size: 1.05rem;
    padding: 0.65rem 1.4rem;
  }

  .search-input {
    width: 380px;
    font-size: 1.05rem;
    padding: 0.75rem 5.5rem 0.75rem 3rem;
  }

  .search-input:focus {
    width: 500px;
  }

  .hero-showcase {
    height: 640px;
    max-width: 2400px;
    margin: 0 auto;
  }

  .hero-body {
    left: max(4rem, 5vw);
    bottom: 4.5rem;
    max-width: 850px;
    gap: 1.25rem;
  }

  .hero-title {
    font-size: 4rem;
    letter-spacing: -1.5px;
  }

  .hero-overview {
    font-size: 1.2rem;
    line-height: 1.65;
    -webkit-line-clamp: 4;
  }

  .hero-actions {
    gap: 1.25rem;
    margin-top: 0.75rem;
  }

  .hero-btn, .hero-btn-secondary {
    font-size: 1.15rem;
    padding: 1rem 2.2rem;
  }

  .top10-sections-wrapper {
    padding: 3rem max(4rem, 5vw) 1rem max(4rem, 5vw);
    max-width: 2400px;
    margin: 0 auto;
    gap: 3.5rem;
  }

  .top10-heading {
    font-size: 2rem;
  }

  .top10-poster-wrap {
    width: 190px;
    height: 285px;
  }

  .top10-rank-num {
    font-size: 10rem;
    margin-right: -30px;
  }

  .main-container {
    padding: 3rem max(4rem, 5vw) 6rem max(4rem, 5vw);
    max-width: 2400px;
    margin: 0 auto;
    gap: 2.5rem;
  }

  .section-heading {
    font-size: 2.2rem;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.85rem;
  }

  .card-title {
    font-size: 1.08rem;
  }

  .watch-container {
    max-width: 1800px;
    margin: 0 auto;
    gap: 2.25rem;
  }

  .watch-title {
    font-size: 2rem;
  }

  .watch-matching-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .modal-card {
    max-width: 1200px;
  }

  .modal-backdrop-wrap {
    height: 420px;
  }

  .modal-title {
    font-size: 3rem;
  }

  /* TV Remote D-Pad Navigation Luminous Focus Rings */
  .media-card:focus-visible,
  .top10-card:focus-visible,
  .server-choice-btn:focus-visible,
  .tab-btn:focus-visible,
  .hero-btn:focus-visible,
  .hero-btn-secondary:focus-visible,
  .episode-item-card:focus-visible {
    outline: 4px solid #ff2a3a !important;
    outline-offset: 5px !important;
    transform: scale(1.04) !important;
    box-shadow: 0 0 35px rgba(229, 9, 20, 0.95) !important;
    z-index: 50;
  }
}

/* --------------------------------------------------------------------------
   2. STANDARD DESKTOPS & LAPTOPS (1025px to 1920px)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1920px) {
  .navbar {
    padding: 0 clamp(2rem, 3.5vw, 3.5rem);
    max-width: 1720px;
    margin: 0 auto;
  }

  .top10-sections-wrapper {
    padding: 2.5rem clamp(2rem, 3.5vw, 3.5rem) 0.5rem clamp(2rem, 3.5vw, 3.5rem);
    max-width: 1720px;
    margin: 0 auto;
  }

  .main-container {
    padding: 2.5rem clamp(2rem, 3.5vw, 3.5rem) 5rem clamp(2rem, 3.5vw, 3.5rem);
    max-width: 1720px;
    margin: 0 auto;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.5rem;
  }

  .watch-container {
    max-width: 1440px;
    margin: 0 auto;
  }

  .watch-matching-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
  }

  .footer {
    padding: 3rem clamp(2rem, 3.5vw, 3.5rem) 2rem clamp(2rem, 3.5vw, 3.5rem);
    max-width: 1720px;
    margin: 0 auto;
  }
}

/* --------------------------------------------------------------------------
   3. TABLETS & IPADS (601px to 1024px - Portrait & Landscape)
   -------------------------------------------------------------------------- */
@media (min-width: 601px) and (max-width: 1024px) {
  .navbar {
    padding: 0 1.75rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-left {
    gap: 1.5rem;
    align-items: center;
  }

  .brand-logo {
    font-size: 1.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .brand-logo .logo-badge {
    font-size: 1rem;
    padding: 0.15rem 0.5rem;
    display: inline-block;
  }

  .brand-logo .logo-text {
    font-size: 1.45rem;
    display: inline-block !important;
    color: #ffffff;
    font-weight: 900;
  }

  .nav-tabs {
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.86rem;
    font-weight: 600;
    gap: 0.45rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
  }

  .tab-icon {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
  }

  .nav-right {
    gap: 0.85rem;
    align-items: center;
  }

  .search-input {
    width: 220px;
    font-size: 0.88rem;
    padding: 0.55rem 3.5rem 0.55rem 2.4rem;
  }

  .search-input:focus {
    width: 280px;
  }

  .search-dropdown {
    width: 360px;
  }

  .profile-pill-btn {
    padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    gap: 0.45rem;
    display: inline-flex;
    align-items: center;
  }

  .profile-avatar {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }

  .profile-nav-name {
    display: none;
  }

  .profile-dropdown {
    width: 290px;
    right: 0;
  }

  /* Hero Banner */
  .hero-showcase {
    height: 480px;
  }

  .hero-body {
    left: 2rem;
    bottom: 2.5rem;
    right: 2rem;
    max-width: 580px;
    gap: 0.85rem;
  }

  .hero-tag-group {
    gap: 0.45rem;
  }

  .hero-tag {
    font-size: 0.76rem;
    padding: 0.18rem 0.55rem;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.15;
    letter-spacing: -0.4px;
  }

  .hero-overview {
    font-size: 0.92rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
  }

  .hero-actions {
    gap: 0.75rem;
    display: flex;
    align-items: center;
  }

  .hero-btn, .hero-btn-secondary {
    padding: 0.65rem 1.35rem;
    font-size: 0.9rem;
    font-weight: 800;
    border-radius: 9px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .hero-btn-svg {
    width: 17px;
    height: 17px;
  }

  .hero-carousel-controls {
    right: 2rem;
    bottom: 2.5rem;
    gap: 0.6rem;
  }

  .hero-arrow-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  /* Top 10 Row */
  .top10-sections-wrapper {
    padding: 1.75rem 1.5rem 0.5rem 1.5rem;
    gap: 2.25rem;
  }

  .top10-heading {
    font-size: 1.4rem;
    font-weight: 850;
  }

  .top10-poster-wrap {
    width: 130px;
    height: 195px;
    border-radius: 10px;
  }

  .top10-rank-num {
    font-size: 5.8rem;
    margin-right: -16px;
    -webkit-text-stroke: 3px #4f5367;
  }

  .top10-card[data-rank="10"] .top10-rank-num {
    font-size: 5rem;
    margin-right: -22px;
    letter-spacing: -6px;
  }

  .top10-carousel-arrow {
    opacity: 0.9;
    pointer-events: auto;
    width: 40px;
    height: 75px;
  }

  /* Media Grid */
  .main-container {
    padding: 1.75rem 1.5rem 4rem 1.5rem;
    gap: 1.75rem;
  }

  .section-heading {
    font-size: 1.5rem;
    font-weight: 850;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 1.25rem;
  }

  .card-title {
    font-size: 0.92rem;
    font-weight: 800;
  }

  .card-year-badge, .card-genre-badge, .card-quality-badge {
    font-size: 0.68rem;
    padding: 0.12rem 0.4rem;
  }

  /* Watch View */
  #watch-view {
    padding: 1.5rem 1.5rem 4rem 1.5rem;
  }

  .watch-title {
    font-size: 1.35rem;
    font-weight: 800;
  }

  .watch-servers-bar {
    padding: 1.15rem 1.5rem;
  }

  .servers-btn-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.6rem;
    width: 100%;
  }

  .server-choice-btn {
    justify-content: center;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 750;
    border-radius: 8px;
  }

  .watch-matching-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .episode-still-wrap {
    width: 120px;
    height: 70px;
  }

  .episode-code-title {
    font-size: 0.9rem;
  }

  .episode-synopsis-text {
    font-size: 0.82rem;
  }

  /* Modal */
  .modal-card {
    max-width: 90%;
    max-height: 88vh;
    border-radius: 18px;
  }

  .modal-backdrop-wrap {
    height: 280px;
  }

  .modal-title {
    font-size: 1.85rem;
  }

  /* Community Section */
  .join-community-section {
    padding: 2.25rem 1.75rem;
  }

  .community-title {
    font-size: 2.1rem;
  }

  .community-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------------------
   4. MOBILE SMARTPHONES (320px to 600px - Phones & Handhelds)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  /* Top Announcement Bar */
  .top-announcement-bar {
    padding: 0.45rem 0.85rem;
  }

  .announcement-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
    text-align: center;
  }

  .announcement-left {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.35;
  }

  .announcement-pulse-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
  }

  .announcement-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
  }

  .announcement-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
  }

  .announcement-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1;
    max-width: 150px;
    padding: 0.32rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 9999px;
    line-height: 1;
  }

  .announcement-pill-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: block;
  }

  /* Navbar */
  .navbar {
    height: auto;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 11, 16, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
  }

  /* Row 1: Logo & Nav Tabs */
  .nav-left {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    min-width: 0;
  }

  .brand-logo {
    font-size: 1.25rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .brand-logo .logo-badge {
    font-size: 0.85rem;
    padding: 0.12rem 0.42rem;
    border-radius: 4px;
    display: inline-block !important;
    font-weight: 900;
    line-height: 1.2;
    flex-shrink: 0;
  }

  .brand-logo .logo-text {
    font-size: 1.25rem;
    display: inline-block !important;
    color: #ffffff !important;
    font-weight: 900;
    letter-spacing: -0.3px;
    line-height: 1.2;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0;
  }

  .nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    flex-shrink: 1;
    min-width: 0;
  }

  .tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.32rem 0.52rem;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 9999px;
    line-height: 1;
    white-space: nowrap;
  }

  .tab-icon {
    width: 12px;
    height: 12px;
    stroke-width: 2.2;
    flex-shrink: 0;
  }

  /* Row 2: Search Input & Profile Pill */
  .nav-right {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
  }

  .search-container {
    flex: 1;
    min-width: 0;
    width: 100%;
    position: relative;
  }

  .search-form {
    width: 100%;
  }

  .search-input {
    width: 100% !important;
    font-size: 0.84rem;
    padding: 0.52rem 2.2rem 0.52rem 2.2rem;
    border-radius: 9999px;
  }

  .search-icon {
    left: 0.75rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    line-height: 1;
  }

  .search-clear-btn {
    right: 0.65rem;
  }

  .search-shortcut-badge {
    display: none;
  }

  .search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(68dvh);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.98);
  }

  .profile-container {
    position: relative;
    flex-shrink: 0;
  }

  .profile-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.5rem 0.25rem 0.3rem;
    border-radius: 9999px;
  }

  .profile-nav-name {
    display: none;
  }

  .profile-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .watchlist-badge-count {
    font-size: 0.68rem;
    font-weight: 850;
    padding: 0.12rem 0.45rem;
    border-radius: 9999px;
  }

  .profile-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: min(300px, calc(100vw - 1.7rem));
    border-radius: var(--radius-md);
  }

  /* Hero Showcase */
  .hero-showcase {
    height: 420px;
    min-height: 380px;
  }

  .hero-body {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 3.6rem;
    gap: 0.55rem;
    max-width: 100%;
  }

  .hero-tag-group {
    gap: 0.35rem;
  }

  .hero-tag {
    font-size: 0.7rem;
    font-weight: 750;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
  }

  .hero-title {
    font-size: clamp(1.3rem, 5.5vw, 1.75rem);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.3px;
    -webkit-line-clamp: 2;
  }

  .hero-overview {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-secondary);
    -webkit-line-clamp: 2;
  }

  .hero-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
  }

  .hero-btn, .hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    border-radius: 8px;
    line-height: 1;
  }

  .hero-btn-svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
  }

  .hero-carousel-controls {
    right: 0.85rem;
    bottom: 0.85rem;
    gap: 0.35rem;
    display: flex;
    align-items: center;
  }

  .hero-arrow-btn {
    width: 30px;
    height: 30px;
    font-size: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-dot {
    width: 7px;
    height: 7px;
  }

  .hero-dot.active {
    width: 20px;
  }

  /* Top 10 Sections */
  .top10-sections-wrapper {
    padding: 1rem 0.85rem 0.25rem 0.85rem;
    gap: 1.6rem;
  }

  .top10-heading {
    font-size: 1.12rem;
    font-weight: 850;
  }

  .top10-flame-badge {
    font-size: 0.7rem;
    font-weight: 900;
    padding: 0.18rem 0.48rem;
  }

  .top10-card {
    display: flex;
    align-items: flex-end;
  }

  .top10-rank-num {
    font-size: 4.2rem;
    margin-right: -12px;
    -webkit-text-stroke: 2.2px #4f5367;
    letter-spacing: -3px;
  }

  .top10-card[data-rank="10"] .top10-rank-num {
    font-size: 3.6rem;
    margin-right: -16px;
    letter-spacing: -5px;
  }

  .top10-poster-wrap {
    width: 105px;
    height: 158px;
    border-radius: 8px;
  }

  .top10-badge {
    font-size: 0.62rem;
    font-weight: 900;
    padding: 0.12rem 0.4rem;
    border-radius: 3px;
  }

  .top10-carousel-arrow {
    opacity: 0.9;
    pointer-events: auto;
    width: 32px;
    height: 54px;
  }

  .top10-carousel-arrow svg {
    width: 18px;
    height: 18px;
  }

  .top10-scroll-track {
    gap: 0.85rem;
    padding: 0.4rem 0.2rem 1.2rem 0.2rem;
  }

  /* Main Container & Media Grid */
  .main-container {
    padding: 1.25rem 0.85rem 3.5rem 0.85rem;
    gap: 1.15rem;
  }

  .section-heading {
    font-size: 1.25rem;
    font-weight: 850;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .media-card {
    border-radius: 12px;
  }

  .badge-type, .badge-rating {
    top: 6px;
    padding: 0.15rem 0.4rem;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 4px;
  }

  .badge-type { left: 6px; }
  .badge-rating { right: 6px; }

  .card-info {
    padding: 0.6rem 0.65rem 0.7rem 0.65rem;
    gap: 0.35rem;
  }

  .card-title {
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.25;
  }

  .card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
  }

  .card-meta-left {
    display: flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
  }

  .card-year-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.1rem 0.32rem;
  }

  .card-genre-badge {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.32rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-quality-badge {
    font-size: 0.58rem;
    font-weight: 850;
    padding: 0.1rem 0.32rem;
    flex-shrink: 0;
  }

  .card-actions-bar {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .card-play-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 0.48rem 0.55rem;
    border-radius: 6px;
  }

  .card-watchlist-action-btn, .card-info-action-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Dedicated Watch View */
  #watch-view {
    padding: 0.75rem 0.75rem 3.5rem 0.75rem;
  }

  .watch-container {
    gap: 1.15rem;
  }

  .watch-header-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
  }

  .back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.42rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 750;
    border-radius: 9999px;
  }

  .watch-title-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .watch-title {
    font-size: 1.15rem;
    font-weight: 850;
  }

  .watch-episode-badge {
    font-size: 0.74rem;
    font-weight: 750;
    padding: 0.15rem 0.48rem;
    border-radius: 4px;
  }

  .cinema-player-card {
    border-radius: 12px;
  }

  .watch-servers-bar {
    padding: 0.85rem 0.85rem;
    gap: 0.65rem;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 0 0 12px 12px;
  }

  .servers-label-wrap {
    font-size: 0.84rem;
    font-weight: 750;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .servers-btn-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.42rem;
    width: 100%;
  }

  .server-choice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0.48rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 750;
    border-radius: 7px;
    width: 100%;
    text-align: center;
  }

  .server-dot {
    font-size: 0.9rem;
    line-height: 1;
    flex-shrink: 0;
  }

  .server-name {
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* TV Seasons & Episodes Browser */
  .watch-tv-episodes-section {
    padding: 1.15rem 0.85rem;
    border-radius: 12px;
    gap: 1rem;
  }

  .watch-section-title {
    font-size: 1rem;
    font-weight: 800;
  }

  .season-pill {
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
  }

  .episode-item-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem;
    border-radius: 8px;
  }

  .episode-still-wrap {
    width: 90px;
    height: 54px;
    border-radius: 5px;
  }

  .episode-details-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
  }

  .episode-code-title {
    font-size: 0.82rem;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .episode-runtime-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
  }

  .episode-synopsis-text {
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Storyline & Overview Section */
  .watch-info-section {
    padding: 1.15rem 0.85rem;
    gap: 0.95rem;
    border-radius: 12px;
  }

  .watch-tags {
    gap: 4px;
  }

  .modal-tag {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
  }

  .watch-overview-title {
    font-size: 0.95rem;
    font-weight: 800;
  }

  .watch-overview-text {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-secondary);
  }

  /* Matching Videos Row */
  .watch-matching-title {
    font-size: 1.05rem;
    font-weight: 800;
  }

  .watch-matching-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  /* Detail Popup Modal */
  .modal-overlay {
    padding: 0.55rem;
  }

  .modal-card {
    border-radius: 16px;
    max-height: 90dvh;
    width: 95%;
  }

  .modal-backdrop-wrap {
    height: 200px;
  }

  .modal-close-btn {
    top: 0.65rem;
    right: 0.65rem;
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }

  .modal-header-content {
    bottom: 0.75rem;
    left: 0.85rem;
    right: 0.85rem;
    gap: 0.4rem;
  }

  .modal-title {
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.18;
  }

  .modal-actions {
    gap: 0.45rem;
    flex-wrap: wrap;
  }

  .modal-body {
    padding: 1.15rem 0.85rem;
    gap: 1.1rem;
  }

  .modal-tab-btn {
    font-size: 0.84rem;
    padding: 0.35rem 0.65rem;
  }

  .modal-overview-text {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  /* Profile Creation Modal */
  .profile-creation-card {
    padding: 1.35rem 0.95rem;
    border-radius: 16px;
    gap: 1.15rem;
    width: min(94vw, 400px);
  }

  .profile-preview-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.85rem;
  }

  .profile-modal-title {
    font-size: 1.35rem;
  }

  .profile-modal-subtitle {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .avatar-options-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }

  .avatar-opt-btn {
    font-size: 1.45rem;
    padding: 0.5rem 0;
    border-radius: 10px;
  }

  .profile-text-input {
    font-size: 0.88rem;
    padding: 0.75rem 0.85rem 0.75rem 2.6rem;
    border-radius: 10px;
  }

  .profile-submit-btn {
    padding: 0.8rem;
    font-size: 0.9rem;
    font-weight: 850;
    border-radius: 10px;
  }

  /* Join Community Section */
  .join-community-section {
    padding: 1.35rem 0.85rem;
    margin-top: 1.75rem;
    border-radius: 16px;
  }

  .community-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.7rem;
  }

  .community-title {
    font-size: 1.55rem;
  }

  .community-subtitle {
    font-size: 0.82rem;
  }

  .community-notice-box {
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.85rem;
    border-radius: 10px;
  }

  .notice-icon-wrap {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    border-radius: 8px;
  }

  .notice-title {
    font-size: 0.82rem;
    font-weight: 800;
  }

  .notice-desc {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .community-cards-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .social-channel-card {
    padding: 1.15rem;
    border-radius: 14px;
  }

  .social-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .social-svg {
    width: 24px;
    height: 24px;
  }

  .social-card-heading {
    font-size: 1.15rem;
  }

  .social-card-desc {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .social-action-btn {
    padding: 0.65rem 1rem;
    font-size: 0.84rem;
    font-weight: 750;
    border-radius: 8px;
  }

  /* Toast Notifications */
  .toast-container {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
    align-items: center;
  }

  .toast {
    width: 100%;
    max-width: 360px;
    justify-content: center;
    font-size: 0.84rem;
    padding: 0.75rem 1rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 0.85rem 1.5rem 0.85rem;
    gap: 1.25rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   5. ULTRA-COMPACT SMARTPHONES & FOLDABLES (<= 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .brand-logo {
    font-size: 1.1rem;
    gap: 0.25rem;
    flex-shrink: 0;
  }

  .brand-logo .logo-badge {
    font-size: 0.8rem;
    padding: 0.1rem 0.38rem;
    display: inline-block;
  }

  .brand-logo .logo-text {
    font-size: 1.1rem;
    display: inline-block !important;
    color: #ffffff;
    font-weight: 900;
  }

  .tab-btn {
    padding: 0.3rem 0.42rem;
    font-size: 0.7rem;
    gap: 3px;
  }

  .tab-icon {
    width: 12px;
    height: 12px;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .media-grid {
    gap: 0.55rem;
  }

  .servers-btn-group {
    grid-template-columns: 1fr;
  }

  .watch-matching-grid {
    gap: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   6. TOUCH DEVICE INTERACTIONS & HOVER PROGRESSIVE ENHANCEMENT
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
  /* Ensure always-visible buttons or easy tap targets on mobile touchscreens */
  .card-hover-overlay {
    background: linear-gradient(0deg, rgba(8, 9, 14, 0.95) 0%, rgba(8, 9, 14, 0.4) 60%, transparent 100%);
  }

  .top10-carousel-arrow {
    opacity: 0.95 !important;
    pointer-events: auto !important;
  }

  .media-card:active {
    transform: scale(0.98);
  }
}

/* --------------------------------------------------------------------------
   7. PREFERS REDUCED MOTION SUPPORT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


