:root {
  --bg-primary: var(--tenant-dark-background, var(--tenant-background, #080809));
  --bg-secondary: var(--tenant-dark-surface, var(--tenant-surface, #0f0f12));
  --bg-card: var(--tenant-dark-surface-elevated, var(--tenant-surface, #141418));
  --bg-card-hover: var(--tenant-dark-surface-hover, #1e1e24);
  --border-color: var(--tenant-dark-border, rgba(255, 255, 255, 0.06));
  --border-focus: rgba(var(--primary-rgb), 0.4);

  --primary: var(--tenant-primary, #ff4c00);
  --primary-light: var(--tenant-secondary, #ff8400);
  --primary-rgb: var(--tenant-primary-rgb, 255, 76, 0);
  --primary-gradient: var(--tenant-primary-gradient, linear-gradient(135deg, #ff4c00, #ff8400));
  --secondary: var(--tenant-secondary, #ff6b00);
  --purple: var(--primary);
  --purple-gradient: var(--primary-gradient);
  --accent: var(--tenant-accent, #00d4ff);
  --on-primary: var(--tenant-on-primary, #000000);

  --text-primary: var(--tenant-dark-text, var(--tenant-text, #ffffff));
  --text-secondary: var(--tenant-dark-text-secondary, #9aa2ae);
  --text-muted: var(--tenant-dark-text-muted, #7c8491);
  --header-action-background: rgba(255, 255, 255, 0.03);
  --header-action-border: rgba(255, 255, 255, 0.08);
  --header-action-foreground: rgba(255, 255, 255, 0.85);
  --header-action-menu-background: transparent;
  --header-action-menu-border: none;
  --header-action-menu-hover-background: rgba(255, 255, 255, 0.05);
  --header-action-menu-hover-foreground: #ffffff;
  --header-profile-pill-background: rgba(255, 255, 255, 0.04);
  --header-profile-pill-border: 1px solid rgba(255, 255, 255, 0.08);
  --header-profile-foreground: #ffffff;
  --sidebar-premium-text: #ff9f43;

  --font-display: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  --sidebar-width: 260px;
  --header-height: 70px;
  --player-height: 80px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.9);

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

select, .form-select, .filter-select, .admin-select, .studio-select {
  color-scheme: dark;
}

select option, .form-select option, .filter-select option, .admin-select option, .studio-select option {
  background-color: #121624 !important;
  color: #ffffff !important;
  padding: 0.5rem 0.75rem;
}


[data-theme="light"] {
  --bg-primary: var(--tenant-light-background, #f5f6f8);
  --bg-secondary: var(--tenant-light-surface, #ffffff);
  --bg-card: var(--tenant-light-surface-elevated, #ffffff);
  --bg-card-hover: var(--tenant-light-surface-hover, #f1f3f5);
  --border-color: var(--tenant-light-border, rgba(0, 0, 0, 0.08));
  --border-focus: rgba(var(--primary-rgb), 0.5);

  --text-primary: var(--tenant-light-text, #0f172a);
  --text-secondary: var(--tenant-light-text-secondary, #475569);
  --text-muted: var(--tenant-light-text-muted, #596270);
  --wcag-light-control-foreground: #1e293b;
  --wcag-light-control-background: #e2e8f0;
  --wcag-light-control-background-hover: #cbd5e1;
  --wcag-light-control-border: #64748b;
  --wcag-light-navigation-text: #1f2937;
  --wcag-light-navigation-active-text: #111827;
  --header-action-background: var(--wcag-light-control-background);
  --header-action-border: var(--wcag-light-control-border);
  --header-action-foreground: var(--wcag-light-control-foreground);
  --header-action-menu-background: var(--wcag-light-control-background);
  --header-action-menu-border: 1px solid var(--wcag-light-control-border);
  --header-action-menu-hover-background: var(--wcag-light-control-background-hover);
  --header-action-menu-hover-foreground: var(--text-primary);
  --header-profile-pill-background: var(--wcag-light-control-background);
  --header-profile-pill-border: 1px solid var(--wcag-light-control-border);
  --header-profile-foreground: var(--wcag-light-control-foreground);
  --sidebar-premium-text: #92400e;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] select,
[data-theme="light"] .form-select,
[data-theme="light"] .filter-select,
[data-theme="light"] .admin-select,
[data-theme="light"] .studio-select {
  color-scheme: light;
}

[data-theme="light"] select option,
[data-theme="light"] .form-select option,
[data-theme="light"] .filter-select option,
[data-theme="light"] .admin-select option,
[data-theme="light"] .studio-select option {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .form-label,
[data-theme="light"] .user-name,
[data-theme="light"] .logo-text,
[data-theme="light"] .sidebar-user-card .user-info-text div {
  color: var(--text-primary) !important;
}

[data-theme="light"] .nav-link:hover {
  background-color: var(--bg-card-hover) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .card-title {
  color: var(--text-primary) !important;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select,
[data-theme="light"] .admin-input {
  background-color: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .lang-dropdown,
[data-theme="light"] .notification-dropdown {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .lang-option {
  color: var(--text-primary) !important;
  border-top-color: var(--border-color) !important;
}

[data-theme="light"] .lang-option:hover {
  background-color: var(--bg-card-hover) !important;
}

[data-theme="light"] .notification-item {
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .notification-item div,
[data-theme="light"] .notification-item span,
[data-theme="light"] .notification-item p {
  color: var(--text-primary) !important;
}

[data-theme="light"] .notification-item span[style*="font-size: 0.62rem"] {
  color: var(--text-muted) !important;
}

[data-theme="light"] #cart-drawer {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-left-color: var(--border-color) !important;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.08) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] #cart-drawer h3,
[data-theme="light"] #cart-drawer [style*="color: white"],
[data-theme="light"] #cart-drawer [style*="color:white"],
[data-theme="light"] #cart-drawer h4,
[data-theme="light"] #cart-drawer #cart-drawer-total {
  color: var(--text-primary) !important;
}

[data-theme="light"] #cart-drawer-footer {
  border-top-color: var(--border-color) !important;
}

/* Cart Drawer base styles */
#cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(25px) saturate(190%);
  -webkit-backdrop-filter: blur(25px) saturate(190%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 9999;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem;
  box-sizing: border-box;
}

#cart-drawer.open {
  right: 0 !important;
}

#cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#cart-drawer-overlay.open {
  opacity: 1 !important;
  visibility: visible !important;
}

[data-theme="light"] .admin-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f5f6f8 100%) !important;
  border-right: 1px solid var(--border-color) !important;
}

[data-theme="light"] .admin-card,
[data-theme="light"] .admin-kpi-card {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-theme="light"] #content-form-modal > div,
[data-theme="light"] #ai-assistant-modal > div,
[data-theme="light"] .modal-content {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] #content-form-modal > div div,
[data-theme="light"] #ai-assistant-modal > div div,
[data-theme="light"] #content-form-modal > div h2,
[data-theme="light"] #ai-assistant-modal > div h2 {
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

/* Theme overrides for hardcoded inline styles in admin pages */
[data-theme="light"] .admin-container [style*="background: #0f0f12"],
[data-theme="light"] .admin-container [style*="background:#0f0f12"],
[data-theme="light"] .admin-container [style*="background: #141414"],
[data-theme="light"] .admin-container [style*="background:#141414"],
[data-theme="light"] .admin-container [style*="background: rgba(255,255,255,0.02)"],
[data-theme="light"] .admin-container [style*="background:rgba(255,255,255,0.02)"],
[data-theme="light"] #content-form-modal [style*="background: #0f0f12"],
[data-theme="light"] #content-form-modal [style*="background:#0f0f12"],
[data-theme="light"] #content-form-modal [style*="background: #141414"],
[data-theme="light"] #content-form-modal [style*="background:#141414"],
[data-theme="light"] #ai-assistant-modal [style*="background: #0f0f12"],
[data-theme="light"] #ai-assistant-modal [style*="background:#0f0f12"] {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container [style*="color: white"],
[data-theme="light"] .admin-container [style*="color:white"],
[data-theme="light"] #content-form-modal [style*="color: white"],
[data-theme="light"] #content-form-modal [style*="color:white"],
[data-theme="light"] #ai-assistant-modal [style*="color: white"],
[data-theme="light"] #ai-assistant-modal [style*="color:white"] {
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container [style*="border: 1.5px solid white"],
[data-theme="light"] .admin-container [style*="border:1.5px solid white"],
[data-theme="light"] .admin-container [style*="border-top: 1px solid rgba(255,255,255"],
[data-theme="light"] .admin-container [style*="border-bottom: 1px solid rgba(255,255,255"] {
  border-color: var(--border-color) !important;
}

/* Unified styles for AdminSeries (removing purple backgrounds & syncing with active theme) */
.admin-container [style*="background:rgba(20,15,40"],
.admin-container [style*="background: rgba(20, 15, 45"],
.admin-container [style*="background:rgba(20,15,45"],
.admin-container [style*="background: rgba(10, 8, 20"],
.admin-container [style*="background:rgba(10,8,20"],
.admin-container [style*="background: #0f0b21"],
.admin-container [style*="background:#0f0b21"],
.modal [style*="background: #0f0b21"],
.modal [style*="background:#0f0b21"] {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

.admin-container [style*="background: radial-gradient(circle at center, #1b1435"],
.admin-container [style*="background:radial-gradient(circle at center, #1b1435"] {
  background: var(--bg-primary) !important;
}

/* Light mode text & background adjustments for AdminSeries purple overrides */
[data-theme="light"] .admin-container [style*="background:rgba(10, 8, 20"],
[data-theme="light"] .admin-container [style*="background:rgba(10,8,20"],
[data-theme="light"] .admin-container [style*="background: rgba(10, 8, 20"],
[data-theme="light"] .admin-container [style*="background: rgba(10,8,20"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container [style*="background:rgba(20,15,40"],
[data-theme="light"] .admin-container [style*="background:rgba(20, 15, 40"],
[data-theme="light"] .admin-container [style*="background: rgba(20, 15, 40"],
[data-theme="light"] .admin-container [style*="background: rgba(20,15,40"],
[data-theme="light"] .admin-container [style*="background: rgba(20, 15, 45"],
[data-theme="light"] .admin-container [style*="background:rgba(20,15,45"],
[data-theme="light"] .admin-container [style*="background: #0f0b21"],
[data-theme="light"] .admin-container [style*="background:#0f0b21"],
[data-theme="light"] .modal [style*="background: #0f0b21"],
[data-theme="light"] .modal [style*="background:#0f0b21"] {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container [style*="color: white"]:not(.btn-primary):not(.page-btn):not(.wizard-step-num),
[data-theme="light"] .admin-container [style*="color:white"]:not(.btn-primary):not(.page-btn):not(.wizard-step-num),
[data-theme="light"] .modal [style*="color: white"]:not(.btn-primary),
[data-theme="light"] .modal [style*="color:white"]:not(.btn-primary) {
  color: var(--text-primary) !important;
}
[data-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.75) !important;
  border-color: rgba(255, 76, 0, 0.15) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: blur(25px) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .glass-card h3,
[data-theme="light"] .glass-card p {
  color: var(--text-primary) !important;
}

/* Home page / Light theme overrides for correct readability */
[data-theme="light"] .row-title {
  color: var(--text-primary) !important;
}

[data-theme="light"] .hero-title {
  color: white !important;
}

[data-theme="light"] .hero-synopsis {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="light"] .card-content-overlay .card-title {
  color: white !important;
}

[data-theme="light"] .card-content-overlay .card-subtext {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .category-badge:hover {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}


[data-theme="light"] .admin-header-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 246, 248, 0.9) 100%) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
}

[data-theme="light"] .admin-filter-link:hover {
  background-color: var(--bg-card-hover) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-filter-link.active {
  background-color: rgba(255, 76, 0, 0.1) !important;
  color: var(--primary) !important;
}

[data-theme="light"] .bottom-player {
  background-color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] button.btn-outline {
  background: var(--wcag-light-control-background);
  border-color: var(--wcag-light-control-border);
  color: var(--wcag-light-control-foreground);
}

[data-theme="light"] button.btn-outline:hover {
  background: var(--wcag-light-control-background-hover);
  border-color: var(--wcag-light-control-foreground);
  color: var(--text-primary);
}

[data-theme="light"] .sidebar-toggle,
[data-theme="light"] .notification-btn {
  background: var(--header-action-background);
  border: 1px solid var(--header-action-border);
  color: var(--header-action-foreground);
}

[data-theme="light"] .sidebar-toggle:hover,
[data-theme="light"] .sidebar-toggle:focus-visible,
[data-theme="light"] .notification-btn:hover,
[data-theme="light"] .notification-btn:focus-visible {
  background: var(--header-action-menu-hover-background);
  color: var(--header-action-menu-hover-foreground);
}

[data-theme="light"] .sidebar .link-text {
  color: var(--wcag-light-navigation-text);
}

[data-theme="light"] .sidebar .nav-link.active .link-text {
  color: var(--wcag-light-navigation-active-text);
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* App Layout */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
  text-decoration: none;
}

.logo-icon {
  width: 2.2rem;
  height: 2.2rem;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 76, 0, 0.3);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: white;
}

.logo-text span {
  color: var(--primary);
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  padding-left: 1rem;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: white;
}

.nav-link.active {
  background-color: rgba(255, 76, 0, 0.1);
  color: var(--primary);
  font-weight: 600;
}

.nav-link svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

/* Premium Card in Sidebar */
.premium-card {
  background: linear-gradient(135deg, #1b132c, #0f0b18);
  border: 1px solid rgba(255, 76, 0, 0.2);
  border-radius: 16px;
  padding: 1.25rem;
  margin-top: auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.premium-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 76, 0, 0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.premium-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: white;
}

.premium-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.btn-premium {
  display: block;
  width: 100%;
  padding: 0.6rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 76, 0, 0.4);
}

.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  transition: padding-bottom 0.3s ease;
  position: relative;
}

.main-content.has-player .page-content-injector {
  padding-bottom: calc(var(--player-height) + 2rem) !important;
}

.page-content-injector {
  flex-grow: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Prevent double scrollbar/layout shift on discover page */
.page-content-injector:has(.discover-page-wrapper) {
  overflow: hidden !important;
}

.user-layout .page-content-injector {
  padding-top: 0;
}

.admin-layout .page-content-injector {
  padding-bottom: 5rem !important;
}

.user-layout .page-content-injector:has(.article-layout) {
  padding-top: 0.5rem !important;
}

.user-layout .user-container,
.user-layout .marketplace-wrapper,
.user-layout .watch-layout-container,
.user-layout .community-dashboard-container,
.user-layout .admin-container {
  padding-top: 1rem !important;
}

/* Home page content area overrides to align category pills with floating capsules */
.user-layout #home-content-area.user-container {
  padding-top: 0.5rem !important;
}

/* Harmonize marketplace container width to 1440px */
.user-layout .marketplace-wrapper {
  max-width: 1440px !important;
}

/* ================================================================
   MARKETPLACE — RESPONSIVE LAYOUT
   ================================================================ */

.marketplace-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  box-sizing: border-box;
}

.marketplace-hero {
  display: grid;
  grid-template-columns: 1.15fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 2.5rem;
  border-radius: 16px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.marketplace-hero-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0;
  color: white;
}

.marketplace-hero-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 1.25rem;
  width: 100%;
  max-width: 390px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: marketplaceSlideIn 0.4s ease;
}

@keyframes marketplaceSlideIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.marketplace-category-tabs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.marketplace-category-tabs::-webkit-scrollbar {
  display: none;
}

.marketplace-main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  position: relative;
}

.marketplace-filters-backdrop {
  display: none;
}

.marketplace-filters-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.marketplace-filters-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(var(--primary-rgb), 0.35);
}

.marketplace-results-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.marketplace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.marketplace-toolbar-sort,
.marketplace-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.marketplace-toolbar-actions {
  gap: 1rem;
}

.marketplace-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.marketplace-products-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.product-card--list {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(12, 12, 20, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: stretch;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.product-card-list-media {
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.product-card-list-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
}

.product-card-list-actions {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 160px;
}

.marketplace-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

body.marketplace-filters-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .user-layout .marketplace-wrapper {
    padding: 1rem 1.25rem !important;
  }

  .marketplace-hero {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
    min-height: auto;
  }

  .marketplace-hero-title {
    font-size: 1.85rem;
  }

  .marketplace-main-layout {
    grid-template-columns: 1fr;
  }

  .marketplace-filters-toggle {
    display: inline-flex;
  }

  .marketplace-filters-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 1100;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-secondary);
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.55);
  }

  .marketplace-filters-panel.is-open {
    transform: translateX(0);
  }

  .marketplace-filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .marketplace-filters-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .marketplace-hero-carousel-wrap {
    padding-bottom: 2rem;
  }

  .marketplace-hero-card {
    max-width: 100%;
  }

  #carousel-prev {
    left: 0.25rem !important;
  }

  #carousel-next {
    right: 0.25rem !important;
  }
}

@media (max-width: 768px) {
  .marketplace-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .marketplace-toolbar-sort,
  .marketplace-toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .marketplace-hero-search {
    flex-wrap: wrap;
  }

  .marketplace-hero-search .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .marketplace-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .product-card--list {
    grid-template-columns: 110px 1fr;
  }

  .product-card-list-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
  }

  .product-card-list-actions > div:last-child {
    display: flex;
    gap: 0.4rem;
    width: auto;
  }
}

@media (max-width: 480px) {
  .user-layout .marketplace-wrapper {
    padding: 0.75rem 1rem !important;
    gap: 1.25rem;
  }

  .marketplace-hero {
    padding: 1.15rem;
  }

  .marketplace-hero-title {
    font-size: 1.45rem;
  }

  .marketplace-hero-card {
    grid-template-columns: 1fr;
  }

  .marketplace-products-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-collections-grid {
    grid-template-columns: 1fr;
  }

  .product-card--list {
    grid-template-columns: 1fr;
  }

  .product-card-list-media {
    min-height: 180px;
  }

  .product-card-list-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card-list-actions > div:last-child {
    width: 100%;
  }
}

[data-theme="light"] .marketplace-filters-toggle {
  background: var(--bg-primary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="light"] .marketplace-filters-panel {
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
}

/* Layout Utilities for Consistency */
.user-container {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem 2rem 6rem 2rem;
  animation: fadeIn 0.4s ease-out;
}

.admin-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.5rem 2rem 6rem 2rem;
  animation: fadeIn 0.3s ease-out;
}

.static-page-reading {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 3rem 1.5rem 6rem 1.5rem;
  animation: fadeIn 0.4s ease-out;
}

.static-page-wide {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 1.5rem 6rem 1.5rem;
  animation: fadeIn 0.4s ease-out;
}


.top-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  transition: color 0.2s;
}
.top-nav-link.active {
  color: var(--primary) !important;
}
.top-nav-link:hover {
  color: white;
}
[data-theme="light"] .top-nav-link:hover {
  color: var(--text-primary);
}

[data-theme="light"] .top-header {
  background-color: rgba(255, 255, 255, 0.8) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

/* Header / Search bar */
.top-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  background-color: rgba(8, 8, 9, 0.8);
  backdrop-filter: blur(16px);
  z-index: 99;
  border-bottom: 1px solid var(--border-color);
}

/* User Floating Header Layout */
.user-layout .top-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: transparent !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 99;
  pointer-events: none;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .top-header {
  left: 80px;
}

.user-layout .top-header-left-pill {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: auto;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-layout .header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-layout .header-actions:not(:hover):not(:focus-within):not(.menu-open) {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  gap: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
}

.user-layout .header-actions:not(:hover):not(:focus-within):not(.menu-open) .user-profile {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.user-layout .header-actions:hover,
.user-layout .header-actions:focus-within,
.user-layout .header-actions.menu-open {
  box-shadow: 0 0 0 3px rgba(255, 76, 0, 0.15), 0 8px 32px 0 rgba(255, 76, 0, 0.25);
  border-color: rgba(255, 76, 0, 0.4);
  overflow: visible;
}

/* Collapsed state for actions group inside the pill */
.user-layout .header-actions:not(:hover):not(:focus-within):not(.menu-open) .header-actions-group {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  pointer-events: none;
  transform: scale(0.9);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expanded state for actions group on hover */
.user-layout .header-actions .header-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 500px;
  opacity: 1;
  transform: scale(1);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-layout .header-actions .user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--header-profile-foreground);
}

.user-layout .header-actions .user-profile .user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.user-layout .avatar-circle {
  width: 34px !important;
  height: 34px !important;
}

/* Light mode overrides for user floating header */
[data-theme="light"] .user-layout .header-actions {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08) !important;
}

/* ── LATEST POSTS & FILTERED CONTENT GRID (3-COLUMN YOUTUBE STYLE) ── */
.latest-posts-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  margin-top: 1.25rem !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  .latest-posts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 550px) {
  .latest-posts-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* User Floating Search Bar (Bubble expanding on hover/focus/filled) */
.user-layout .search-bar-container {
  position: relative;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  overflow: hidden;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  max-width: none !important;
}

.user-layout .search-bar-container:hover,
.user-layout .search-bar-container:focus-within,
.user-layout .search-bar-container:has(.search-input:not(:placeholder-shown)) {
  width: 240px;
  background: var(--bg-hover);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 76, 0, 0.15), 0 8px 24px rgba(255, 76, 0, 0.25);
}

.user-layout .search-input {
  width: 100%;
  height: 100%;
  background: transparent !important;
  border: none !important;
  padding: 0 0.75rem 0 2.5rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  opacity: 0;
  transition: opacity 0.2s ease 0.1s;
  pointer-events: none;
  box-shadow: none !important;
}

.user-layout .search-bar-container:hover .search-input,
.user-layout .search-bar-container:focus-within .search-input,
.user-layout .search-bar-container:has(.search-input:not(:placeholder-shown)) .search-input {
  opacity: 1;
  pointer-events: auto;
}

.user-layout .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: color 0.3s;
}

.user-layout .search-bar-container:hover .search-icon,
.user-layout .search-bar-container:focus-within .search-icon,
.user-layout .search-bar-container:has(.search-input:not(:placeholder-shown)) .search-icon {
  color: var(--primary);
}

/* Theme Toggle Button Rotation */
.user-layout .theme-toggle-btn svg {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-layout .theme-toggle-btn:hover svg {
  transform: rotate(45deg) scale(1.15);
}

.user-layout .theme-toggle-btn:active svg {
  transform: rotate(90deg) scale(0.95);
}

/* Pulsing Notification Badge Radar Wave */
.user-layout .badge-count {
  position: relative;
}

.user-layout .badge-count::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid #ff4c00;
  animation: badge-radar-pulse 1.8s infinite ease-out;
  pointer-events: none;
  opacity: 0;
}

@keyframes badge-radar-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Pulsing radar on header-actions when collapsed and has unread notifications */
.user-layout .header-actions.has-unread:not(:hover):not(:focus-within):not(.menu-open) {
  box-shadow: 0 0 0 0 rgba(255, 76, 0, 0.7), 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  animation: header-radar-pulse 1.8s infinite ease-out;
}

@keyframes header-radar-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 76, 0, 0.8), 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(255, 76, 0, 0), 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  }
}

/* Glassmorphism Dropdowns (Language & Notifications) */
.lang-dropdown,
.notification-dropdown {
  background: rgba(20, 20, 20, 0.75) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
  border-radius: var(--radius-md) !important;
}

.lang-option {
  color: var(--text-primary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-option:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: var(--primary) !important;
}

/* Light mode overrides for dropdowns */
[data-theme="light"] .lang-dropdown,
[data-theme="light"] .notification-dropdown {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .lang-option:hover {
  background-color: rgba(0, 0, 0, 0.04) !important;
  color: var(--primary) !important;
}

[data-theme="light"] .notif-item-row:hover {
  background: rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .notif-item-row.unread {
  background: rgba(255, 76, 0, 0.05) !important;
}

[data-theme="light"] .notif-item-row.unread:hover {
  background: rgba(255, 76, 0, 0.09) !important;
}

.search-bar-container {
  position: relative;
  width: 400px;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: 99px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 76, 0, 0.15);
  width: 450px;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mobile-more-btn {
  display: none;
}

.notification-btn,
.theme-toggle-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: var(--transition-fast);
  position: relative;
}

.notification-btn:hover,
.theme-toggle-btn:hover {
  background-color: var(--bg-card);
  color: white;
}

.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff4c00, #ff7e38);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  width: auto;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  border: 2px solid var(--bg-secondary, #0e0e12);
  line-height: 1;
  letter-spacing: -0.02em;
  z-index: 2;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.avatar-circle {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--purple-gradient);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: white;
  font-size: 0.9rem;
  border: 2px solid var(--border-color);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Category Badge Row */
.category-badges-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 2rem 0.5rem 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.category-badge {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
  scroll-snap-align: start;
}

.category-badge:hover {
  border-color: var(--primary);
  color: white;
}

.category-badge.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--bg-primary);
}

/* Hero Widescreen Carousel Slider */
/* ============================================================
   HERO SLIDER — Premium Netflix-inspired redesign
   ============================================================ */
.hero-slider {
  margin: 1.5rem 2rem;
  height: clamp(560px, 82vh, 760px);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.04);
  background-color: #0a0a0d;
  cursor: pointer;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  position: absolute;
  inset: 0;
  transform: scale(1.06);
  transition: transform 9s cubic-bezier(0.25, 1, 0.5, 1);
  filter: brightness(0.9);
}

.hero-slide.active .hero-img {
  transform: scale(1);
}

/* Multi-layer Netflix-style gradient: dark at bottom + left vignette */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(10, 10, 14, 0.98) 0%,
      rgba(10, 10, 14, 0.55) 45%,
      rgba(10, 10, 14, 0.1) 80%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      rgba(10, 10, 14, 0.65) 0%,
      rgba(10, 10, 14, 0.15) 50%,
      transparent 100%
    );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem 3.5rem;
  z-index: 3;
}

/* Meta row: genre • duration • rating */
.hero-meta-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  transform: translateY(25px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.05s,
              opacity 0.55s ease 0.05s;
}

.hero-slide.active .hero-meta-row {
  transform: translateY(0);
  opacity: 1;
}

.hero-meta-badge {
  background: rgba(255, 76, 0, 0.18);
  color: var(--primary-light);
  border: 1px solid rgba(255, 76, 0, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.hero-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  flex-shrink: 0;
}

.hero-meta-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

.hero-meta-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: rgba(255, 210, 0, 0.9);
  font-weight: 700;
}

/* Title */
.hero-title {
  font-family: var(--font-display);
  font-size: 3.8rem;
  font-weight: 900;
  margin-bottom: 0.85rem;
  line-height: 1.05;
  max-width: 620px;
  color: white;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6), 0 0 60px rgba(0,0,0,0.3);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.15s,
              opacity 0.65s ease 0.15s;
  letter-spacing: -0.02em;
}

.hero-slide.active .hero-title {
  transform: translateY(0);
  opacity: 1;
}

/* Synopsis */
.hero-synopsis {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 500px;
  margin-bottom: 1.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transform: translateY(25px);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.25s,
              opacity 0.65s ease 0.25s;
}

.hero-slide.active .hero-synopsis {
  transform: translateY(0);
  opacity: 1;
}

/* Action buttons row */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transform: translateY(25px);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.35s,
              opacity 0.65s ease 0.35s;
  flex-wrap: wrap;
}

.hero-slide.active .hero-actions {
  transform: translateY(0);
  opacity: 1;
}

/* Play button: solid white like Netflix */
.hero-btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #ffffff;
  color: #0a0a0d;
  border: none;
  padding: 0.8rem 1.9rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.hero-btn-play:hover {
  background: rgba(255,255,255,0.88);
  transform: scale(1.04);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

.hero-btn-play svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

/* My List button: glassmorphism */
.hero-btn-list {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.hero-btn-list:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.45);
  transform: scale(1.03);
}

.hero-btn-list.in-list {
  background: rgba(255, 76, 0, 0.18);
  border-color: rgba(255, 76, 0, 0.5);
  color: var(--primary-light);
}

.hero-btn-list svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* More info button */
.hero-btn-info {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.hero-btn-info:hover {
  color: white;
}

.hero-btn-info svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* ============================================================
   Navigation arrows
   ============================================================ */
.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 10, 13, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  opacity: 0;
}

.hero-slider:hover .slider-nav-btn {
  opacity: 1;
}

.slider-nav-btn:hover {
  background: rgba(255, 76, 0, 0.85);
  border-color: transparent;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 16px rgba(255, 76, 0, 0.4);
}

.slider-nav-btn.prev { left: 1.25rem; }
.slider-nav-btn.next { right: 1.25rem; }

/* ============================================================
   Progress-bar style indicator (replaces simple dots)
   ============================================================ */
.slider-dots {
  position: absolute;
  bottom: 2rem;
  left: 3.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  transform: none;
}

.slider-dot {
  height: 3px;
  width: 28px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slider-dot.active {
  width: 52px;
  background: rgba(255,255,255,0.25);
  border-radius: 99px;
}

.slider-dot.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-light);
  border-radius: 99px;
  animation: dot-progress var(--slide-duration, 5s) linear forwards;
}

@keyframes dot-progress {
  from { width: 0%; }
  to   { width: 100%; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.8rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(255, 76, 0, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

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


.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-left: 1rem;
  transition: var(--transition-fast);
}

.btn-link:hover {
  color: white;
}

.btn-link svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Row Carousel Containers */
.row-section {
  padding: 1rem 2rem;
}

/* On mobile, row-section and grid-two-columns padding must match user-container (1rem) */
@media (max-width: 1024px) {
  .row-section {
    padding: 0.75rem 1rem !important;
  }
  .grid-two-columns {
    padding: 0.75rem 1rem !important;
  }
}

.row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  max-width: 100%;
}

.row-title-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}

.row-title-container svg {
  color: var(--primary);
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.row-title {
  font-size: 1.25rem;
  color: white;
  margin: 0;
}

.row-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

.row-view-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.row-view-all:hover {
  text-decoration: underline;
}

.carousel-viewport {
  position: relative;
}

.carousel-row {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Card Styling */
.card-item {
  flex: 0 0 280px;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  aspect-ratio: 2/2.5;
  cursor: pointer;
  transition: var(--transition-smooth);
  scroll-snap-align: start;
}

.card-item:hover {
  transform: scale(1.03);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.card-rank {
  position: absolute;
  top: -10px;
  left: 5px;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  line-height: 1;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.card-content-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 1rem 1rem 1rem;
  background: linear-gradient(
    to top,
    rgba(8, 8, 9, 0.95) 40%,
    rgba(8, 8, 9, 0.7) 70%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-meta {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: white;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtext {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Card Progress bar */
.card-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background-color: var(--primary);
  border-radius: 0 2px 2px 0;
}

.percentage-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

/* Play Hover Overlay */
.card-play-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 8, 9, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

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

.play-hover-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--primary);
  display: grid;
  place-items: center;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 76, 0, 0.4);
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.card-item:hover .play-hover-btn {
  transform: scale(1);
}

/* Netflix Style Trending Cards */
.trending-card-container {
  display: flex;
  align-items: flex-end;
  position: relative;
  height: 290px;
  width: 250px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin-right: 1.5rem;
}

.trending-rank-number {
  font-family: var(--font-display);
  font-size: 11rem;
  font-weight: 900;
  line-height: 0.8;
  color: #080809;
  -webkit-text-stroke: 2.5px rgba(255, 255, 255, 0.22);
  position: absolute;
  left: -15px;
  bottom: -15px;
  z-index: 1;
  user-select: none;
  transition: all 0.3s ease;
}

.trending-card-container:hover .trending-rank-number {
  color: var(--primary);
  -webkit-text-stroke: 2.5px var(--primary-light);
  text-shadow: 0 0 20px rgba(255, 76, 0, 0.4);
}

.trending-card-item {
  width: 170px;
  height: 255px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-left: 75px;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  position: relative;
}

.trending-card-container:hover .trending-card-item {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--primary);
  box-shadow: 0 18px 36px rgba(255, 76, 0, 0.28);
}

.trending-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.trending-card-container:hover .trending-card-img {
  transform: scale(1.06);
}

.trending-play-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 8, 9, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.trending-card-container:hover .trending-play-hover {
  opacity: 1;
}

.trending-content-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0.85rem 0.85rem 0.85rem;
  background: linear-gradient(
    to top,
    rgba(8, 8, 9, 0.98) 40%,
    rgba(8, 8, 9, 0.7) 70%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Widescreen Landscape Cards */
.carousel-row.landscape .card-item {
  flex: 0 0 350px;
  aspect-ratio: 16/9;
}

/* Grid Layout for Double Sections */
.grid-two-columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 1rem 2rem;

  &.home {
    grid-template-columns: 1fr 1fr;
  }

  /* Prevent grid children from expanding horizontally (enables text ellipsis) */
  & > div {
    min-width: 0;
  }
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}


/* Watch Page Layout & Theater Mode */
.watch-layout-container {
  display: grid;
  grid-template-areas: 
    "player sidebar"
    "content sidebar";
  grid-template-columns: 2.2fr 1fr;
  gap: 1rem 2.5rem;
  padding: 0.75rem 2rem 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  transition: max-width 0.3s ease, padding 0.3s ease;
}

.watch-layout-container.audio-page {
  grid-template-areas: 
    "content sidebar" !important;
}

.watch-player-outer {
  grid-area: player;
  width: 100%;
}

.watch-left-column {
  grid-area: content;
  min-width: 0;
}

.watch-right-column {
  grid-area: sidebar;
  min-width: 0;
}

/* Theater mode styles */
.watch-layout-container.theater {
  grid-template-areas: 
    "player player"
    "content sidebar";
  grid-template-columns: 2.2fr 1fr;
  max-width: 100%;
  padding: 0 0 2rem 0;
}

.watch-layout-container.theater .watch-player-outer {
  margin-bottom: 1.5rem;
}

.watch-layout-container.theater .modal-player-section {
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  height: 68vh;
  aspect-ratio: auto;
}

.watch-layout-container.theater .watch-left-column {
  padding-left: 2rem;
}

.watch-layout-container.theater .watch-right-column {
  padding-right: 2rem;
}

/* Active buttons states inside custom video player */
#mx-video-theater-btn.active,
#mx-video-pip-btn.active {
  color: #ff4c00; /* violet */
  text-shadow: 0 0 8px rgba(255, 76, 0, 0.6);
}

.watch-layout-container.theater #mx-video-theater-btn {
  color: #8b5cf6;
}

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

.ranking-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  overflow: hidden; /* empêche tout débordement */
  min-width: 0;
}

.ranking-item:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.ranking-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  width: 35px;
  flex-shrink: 0;
}

.ranking-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.ranking-info {
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
}

.ranking-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-category {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ranking-views {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Premium Magazine grid */
.magazine-featured-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: auto;         /* plus de hauteur fixe */
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.magazine-featured-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
}

.magazine-featured-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0; /* l'image ne se compresse pas */
}

.magazine-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.magazine-badge {
  background-color: rgba(255, 76, 0, 0.15);
  color: var(--purple);
  border: 1px solid rgba(255, 76, 0, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  align-self: flex-start;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.magazine-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: white;
}

.magazine-excerpt {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: auto;
}

.magazine-author {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Horizontal Article Cards */
.article-row-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-row-item {
  display: flex;
  gap: 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.article-row-item:hover {
  border-color: var(--purple);
  transform: translateX(4px);
}

.article-row-thumb {
  width: 100px;
  height: 65px;
  border-radius: 6px;
  object-fit: cover;
}

.article-row-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-row-category {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.article-row-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.article-row-reading {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Audio Podcast Cards with Waveforms */
.audio-card {
  flex: 0 0 250px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
  scroll-snap-align: start;
}

.audio-card:hover {
  border-color: var(--primary);
}

.audio-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-card-thumb {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

.audio-card-info {
  overflow: hidden;
}

.audio-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-card-artist {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.audio-card-wave {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wave-bar {
  flex-grow: 1;
  background-color: var(--bg-card-hover);
  height: 50%;
  border-radius: 2px;
}

.audio-card:hover .wave-bar {
  background-color: var(--primary);
  animation: wavePulse 1s ease-in-out infinite alternate;
}

.audio-card:hover .wave-bar:nth-child(2n) {
  animation-delay: 0.2s;
}
.audio-card:hover .wave-bar:nth-child(3n) {
  animation-delay: 0.4s;
}

@keyframes wavePulse {
  0% {
    height: 20%;
  }
  100% {
    height: 100%;
  }
}

/* Floating Bottom Player Bar */
/* Floating Bottom Player Bar */
.bottom-player {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  width: 55%;
  min-width: 480px;
  max-width: 800px;
  height: 75px;
  background-color: rgba(15, 15, 18, 0.92);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

/* Expanded state for floating player card */
.bottom-player.expanded {
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  width: 620px;
  height: 370px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(15, 15, 18, 0.94);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 76, 0, 0.12);
  padding: 1.25rem 1.5rem;
  display: block;
}

@media (max-width: 768px) {
  .bottom-player {
    width: calc(100% - 2rem);
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    transform: none;
    padding: 0 1rem;
    min-width: 0;
  }
  .bottom-player.expanded {
    width: calc(100% - 2rem);
    height: 400px;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    transform: none;
  }
}

/* Views display toggling */
.bottom-player .player-minimized-view {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.bottom-player .player-expanded-view {
  display: none;
}

.bottom-player.expanded .player-minimized-view {
  display: none;
}

.bottom-player.expanded .player-expanded-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  justify-content: space-between;
}

/* Minimized sub-elements */
.player-track-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 38%;
  min-width: 0;
}

.player-track-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.player-track-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-track-meta {
  font-size: 0.65rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 48%;
}

.player-buttons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.player-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  display: grid;
  place-items: center;
  transition: var(--transition-fast);
}

.player-btn:hover {
  color: white;
}

.player-btn.play-pause-btn {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background-color: white;
  color: black;
  box-shadow: var(--shadow-sm);
}

.player-btn.play-pause-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: scale(1.06);
}

.player-progress-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.player-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.progress-slider-bar {
  flex-grow: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
}

.progress-slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: var(--primary);
  border-radius: 99px;
  width: 0%;
}

.progress-slider-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: white;
  box-shadow: var(--shadow-sm);
  left: 0%;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.progress-slider-bar:hover .progress-slider-handle {
  opacity: 1;
}

.player-audio-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  width: 28%;
}

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

.volume-slider-bar {
  width: 75px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
}

.volume-slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: white;
  border-radius: 99px;
  width: 70%;
}

/* Expanded player view custom layouts */
.player-expanded-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  cursor: grab;
  user-select: none;
}

.player-expanded-tabs {
  display: flex;
  gap: 1.25rem;
}

.player-expanded-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0;
  position: relative;
  transition: color 0.2s;
}

.player-expanded-tab.active {
  color: white;
}

.player-expanded-tab.active::after {
  content: '';
  position: absolute;
  bottom: -0.55rem;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

.player-expanded-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  transition: color 0.2s;
  padding: 0.25rem;
}

.player-expanded-close-btn:hover {
  color: white;
}

.player-expanded-main {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-grow: 1;
  margin-bottom: 0.75rem;
}

.player-expanded-cover-container {
  width: 105px;
  height: 105px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.player-expanded-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-expanded-meta-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
  flex-grow: 1;
}

.player-expanded-category {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.player-expanded-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-expanded-artist {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-expanded-info-badges {
  display: flex;
  gap: 0.5rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

/* Waveform seeker container */
.player-waveform-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.player-waveform-canvas {
  width: 100%;
  height: 40px;
  cursor: pointer;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.01);
}

.player-waveform-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

/* Expanded controls */
.player-expanded-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.player-expanded-btn-circle {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(255, 76, 0, 0.3);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.player-expanded-btn-circle:hover {
  background-color: var(--primary-light);
  transform: scale(1.05);
}

.player-expanded-side-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Queue List Container */
.player-queue-panel {
  display: flex;
  flex-direction: column;
  height: 160px;
  flex-grow: 1;
  padding-right: 0.25rem;
}

.player-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
}

.player-queue-clear-btn {
  background: none;
  border: none;
  color: var(--primary-light);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.player-queue-clear-btn:hover {
  opacity: 0.8;
}

.player-queue-scrollable {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
  flex-grow: 1;
  max-height: 120px;
}

.player-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.player-queue-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.player-queue-item.active {
  background: rgba(255, 76, 0, 0.08);
  border-left: 2px solid var(--primary);
}

.player-queue-item-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.player-queue-item-artist {
  font-size: 0.62rem;
  color: var(--text-secondary);
}

.player-queue-item-remove-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.player-queue-item-remove-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Modals & Media Detail View */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(8, 8, 9, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: min(100%, 960px);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background-color: var(--primary);
  transform: scale(1.05);
}

.modal-player-section {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: black;
  position: relative;
}

.modal-player-section iframe,
.modal-player-section video {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-info-section {
  padding: 2.5rem;
}

/* Series Detail and Seasons Grid */
.season-selector-wrapper {
  margin-bottom: 2rem;
}

.season-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.season-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  position: relative;
}

.season-tab.active {
  color: var(--primary);
}

.season-tab.active::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

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

.episode-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.episode-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.episode-thumb-container {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: black;
  position: relative;
}

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

.episode-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(255, 76, 0, 0.9);
  display: grid;
  place-items: center;
  color: white;
  opacity: 0;
  transition: var(--transition-smooth);
}

.episode-card:hover .episode-play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.episode-info {
  padding: 1rem;
}

.episode-num-duration {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.episode-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

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

/* Audio Player Section in Details */
.audio-player-detail-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.audio-detail-disk {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary-gradient);
  box-shadow: var(--shadow-md);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-detail-disk::after {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 2px solid white;
}

.audio-detail-disk.playing {
  animation: rotateDisk 10s linear infinite;
}

@keyframes rotateDisk {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Auth Modal/Overlay */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 2rem;
}

.auth-form-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: white;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
}

.auth-toggle-link {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
}

.auth-toggle-link span {
  color: var(--primary);
  font-weight: 600;
}

.auth-toggle-link:hover {
  text-decoration: underline;
}

.sidebar-backdrop {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-container,
  .app-container.sidebar-collapsed {
    grid-template-columns: 1fr !important;
  }

  /* Mobile Sidebar Drawer styling */
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px !important;
    transform: translateX(-340px) !important; /* Pushes both sidebar and its 60px shadow off-screen */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s !important;
    z-index: 1000 !important;
    background-color: var(--bg-secondary);
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.6);
    display: flex !important; /* Override display: none */
    visibility: hidden;
  }

  .sidebar.mobile-active {
    transform: translateX(0) !important;
    visibility: visible;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .mobile-menu-toggle {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .search-bar-container {
    width: 36px !important;
    height: 36px !important;
    max-width: none !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 99px !important;
    overflow: hidden !important;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }
  .search-input {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 0.75rem 0 2.5rem !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease 0.1s !important;
    box-shadow: none !important;
  }
  .search-bar-container:hover,
  .search-bar-container:focus-within,
  .search-bar-container:has(.search-input:not(:placeholder-shown)) {
    width: 180px !important;
    background: rgba(20, 20, 20, 0.85) !important;
    border-color: var(--primary) !important;
  }
  .search-bar-container:hover .search-input,
  .search-bar-container:focus-within .search-input,
  .search-bar-container:has(.search-input:not(:placeholder-shown)) .search-input {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .search-bar-container:not(:hover):not(:focus-within):not(:has(.search-input:not(:placeholder-shown))) .search-icon {
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Reset Top Header left offset and apply premium compact blurred dark background on mobile */
  .top-header,
  .user-layout .top-header,
  .admin-layout .top-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3.75rem !important;
    z-index: 999 !important;
    padding: 0.4rem 1rem !important;
    background: rgba(15, 15, 20, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    pointer-events: auto;
  }

  /* Compact topbar actions pill on mobile to prevent overflow when expanded */
  .header-actions {
    gap: 0.35rem !important;
    padding: 0.25rem 0.45rem !important;
    height: 36px !important;
  }
  .user-layout .header-actions:not(:hover):not(:focus-within):not(.menu-open) {
    max-width: 36px !important;
    height: 36px !important;
    padding: 5px !important;
    gap: 0 !important;
    background: var(--header-profile-pill-background) !important;
    border: var(--header-profile-pill-border) !important;
  }
  .header-actions .user-profile .user-name {
    display: none !important;
  }
  .header-actions .notification-btn,
  .header-actions .theme-toggle-btn,
  .header-actions .lang-btn {
    width: 30px !important;
    height: 30px !important;
  }
  .header-actions .notification-btn svg,
  .header-actions .theme-toggle-btn svg {
    width: 0.9rem !important;
    height: 0.9rem !important;
  }
  .header-actions .lang-btn {
    font-size: 0.62rem !important;
  }
  .header-actions .avatar-circle {
    width: 36px !important;
    height: 36px !important;
    border-width: 1px !important;
  }
  .header-actions .user-profile {
    gap: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  .top-header-left-pill {
    gap: 0.75rem !important;
  }

  /* Mobile actions dropdown trigger and panel styling */
  .header-actions .notification-btn.mobile-more-btn {
    display: inline-flex !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
  }
  .header-actions .notification-btn.mobile-more-btn svg {
    width: 1.1rem !important;
    height: 1.1rem !important;
  }
  .header-actions-group {
    display: none !important;
    flex-direction: column !important;
    position: absolute !important;
    right: 1rem !important;
    top: calc(100% + 0.5rem) !important;
    width: 240px !important;
    background: rgba(14, 14, 18, 0.94) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 0.5rem !important;
    box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 76, 0, 0.1) inset !important;
    z-index: 1000 !important;
    gap: 2px !important;
    align-items: stretch !important;
  }
  .header-actions-group.show {
    display: flex !important;
    animation: dropdownFadeIn 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  @keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  
  /* Reset direct children wrappers in the dropdown */
  .header-actions-group > button,
  .header-actions-group > div {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  /* Style all action buttons uniformly inside the dropdown */
  .header-actions-group button.notification-btn,
  .header-actions-group button.lang-btn,
  .header-actions-group button.theme-toggle-btn {
    width: 100% !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 0.85rem !important;
    background: var(--header-action-menu-background) !important;
    border: var(--header-action-menu-border) !important;
    border-radius: 10px !important;
    color: var(--header-action-foreground) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    position: relative !important;
  }
  .header-actions-group button.notification-btn:hover,
  .header-actions-group button.lang-btn:hover,
  .header-actions-group button.theme-toggle-btn:hover {
    background: var(--header-action-menu-hover-background) !important;
    color: var(--header-action-menu-hover-foreground) !important;
    transform: none !important;
  }
  
  /* Ensure SVG icons have consistent dimensions and alignment */
  .header-actions-group button.notification-btn svg,
  .header-actions-group button.theme-toggle-btn svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem !important;
    min-height: 1.25rem !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    color: inherit !important;
  }
  
  /* Style language text icon to match SVGs */
  .header-actions-group .lang-txt-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem !important;
    min-height: 1.25rem !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    letter-spacing: 0 !important;
    flex-shrink: 0 !important;
  }

  .header-actions-group .mobile-action-label {
    display: inline-block !important;
    margin-left: 0.75rem !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    pointer-events: none !important;
  }
  .header-actions-group .badge-count {
    position: static !important;
    margin-left: auto !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  /* Compact Language dropdown as an inline accordion on mobile */
  .header-actions-group .lang-dropdown {
    position: static !important;
    display: none;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    margin-top: 0.25rem !important;
    padding: 0 !important;
  }
  .header-actions-group .lang-dropdown[style*="display: block"] {
    display: block !important;
  }
  .header-actions-group .lang-option {
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  /* Suspend notification dropdown as a centered dialog modal on mobile */
  #notification-dropdown-menu {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 2rem) !important;
    max-width: 360px !important;
    height: auto !important;
    max-height: 80vh !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 76, 0, 0.15) inset !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 2001 !important;
    pointer-events: auto !important;
    transform-origin: center !important;
    transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1), transform 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  #notification-dropdown-menu[style*="opacity: 1"] {
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1) !important;
  }

  /* Responsive Cart Drawer */
  #cart-drawer {
    width: 100% !important;
    max-width: 400px !important;
    right: -100% !important;
    border-left: none !important;
  }
  @media (max-width: 480px) {
    #cart-drawer {
      width: 100% !important;
      max-width: 100% !important;
      padding: 1.25rem 1rem !important;
    }
  }

  /* Push content down below the compact fixed header */
  .page-content-injector,
  .user-layout .page-content-injector,
  .admin-layout .page-content-injector {
    padding-top: 3.75rem !important; /* Pushes content down to clear the compact header */
    overflow-x: hidden !important;
  }

  /* Ensure all direct children of page-content-injector don't expand beyond viewport */
  .admin-layout .page-content-injector > * {
    min-width: 0;
    max-width: 100%;
  }

  /* Reduce container padding on mobile/tablet to maximize space */
  .user-container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .category-badges-row {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Remove homepage overrides that override padding-top */
  .user-layout #home-content-area.user-container {
    padding-top: 0 !important;
  }

  .grid-two-columns,
  .grid-two-columns.home {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Tablet Hero Carousel */
  .hero-slider {
    height: 520px !important;
    margin: 0.75rem 0 !important;
  }
  .hero-overlay {
    padding: 2rem 2.25rem !important;
  }
  .hero-title {
    font-size: 2.6rem !important;
    max-width: 90% !important;
  }
  .hero-synopsis {
    font-size: 0.85rem !important;
    margin-bottom: 1.25rem !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-actions {
    gap: 0.75rem !important;
  }
  .slider-dots {
    left: 2.5rem !important;
    bottom: 1.25rem !important;
  }
  .carousel-row:not(.landscape) .card-item {
    flex: 0 0 210px !important;
    aspect-ratio: 2/2.5 !important;
  }
  .carousel-row.landscape .card-item {
    flex: 0 0 260px !important;
    aspect-ratio: 16/9 !important;
  }
  .audio-card {
    flex: 0 0 220px !important;
  }
}

/* Mobile Hero Carousel styling */
@media (max-width: 768px) {
  .grid-two-columns {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .row-title-container {
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }
  .row-subtitle {
    display: block !important;
    width: 100% !important;
    margin-left: 1.75rem !important;
    margin-top: 0.1rem !important;
  }
  .hero-slider {
    height: 500px !important;
    margin: 0.5rem 0 !important;
    border-radius: var(--radius-md) !important;
  }
  .hero-img {
    object-position: center 20% !important;
  }
  .hero-overlay {
    padding: 1.5rem 1.25rem !important;
  }
  .hero-title {
    font-size: 1.55rem !important;
    max-width: 100% !important;
    /* Limit to 2 lines max */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .hero-synopsis {
    font-size: 0.78rem !important;
    margin-bottom: 1rem !important;
    -webkit-line-clamp: 2 !important;
  }
  .hero-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.6rem !important;
    width: 100% !important;
    margin-bottom: 1.25rem !important;
  }
  .hero-btn-play,
  .hero-btn-list {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 0.82rem !important;
    padding: 0.65rem 0.8rem !important;
    white-space: nowrap !important;
  }
  .slider-dots {
    left: 1.5rem !important;
    bottom: 1rem !important;
  }
  .carousel-row {
    gap: 0.85rem !important;
  }
  .carousel-row:not(.landscape) .card-item {
    flex: 0 0 160px !important;
    aspect-ratio: 2/2.7 !important;
  }
  .carousel-row.landscape .card-item {
    flex: 0 0 220px !important;
    aspect-ratio: 16/9 !important;
  }
  .audio-card {
    flex: 0 0 185px !important;
    padding: 0.75rem !important;
  }
  .card-content-overlay {
    padding: 0.85rem 0.65rem 0.65rem 0.65rem !important;
  }
  .magazine-featured-card {
    height: auto !important;
    min-height: 250px !important;
  }
  .magazine-featured-img {
    height: 140px !important;
  }
  .magazine-content {
    min-width: 0 !important;
  }
  .trending-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }
}

/* ============================================================
   Very Small Mobile (≤ 480px) — iPhone SE, narrow phones
   ============================================================ */
@media (max-width: 480px) {
  /* Hero: taller cinematic height and text */
  .hero-slider {
    height: 460px !important;
    margin: 0.25rem 0 !important;
    border-radius: var(--radius-sm, 8px) !important;
  }
  .hero-img {
    object-position: center 20% !important;
  }
  .hero-overlay {
    padding: 1.25rem 1rem !important;
  }
  .hero-title {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
  }
  .hero-synopsis {
    font-size: 0.72rem !important;
    -webkit-line-clamp: 2 !important;
    margin-bottom: 0.75rem !important;
  }
  .hero-meta-row {
    margin-bottom: 0.5rem !important;
  }
  .hero-meta-badge,
  .hero-meta-text,
  .hero-meta-rating {
    font-size: 0.62rem !important;
  }
  .hero-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
  }
  .hero-btn-play,
  .hero-btn-list {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 0.78rem !important;
    padding: 0.6rem 0.5rem !important;
    white-space: nowrap !important;
  }
  .hero-btn-info {
    display: none !important;
  }
  .slider-dots {
    left: 1rem !important;
    bottom: 0.75rem !important;
  }
  .slider-dot {
    width: 18px !important;
  }
  .slider-dot.active {
    width: 36px !important;
  }

  /* Carousel Cards for narrow mobile screens */
  .carousel-row {
    gap: 0.65rem !important;
  }
  .carousel-row:not(.landscape) .card-item {
    flex: 0 0 145px !important;
    aspect-ratio: 2/2.8 !important;
  }
  .carousel-row.landscape .card-item {
    flex: 0 0 180px !important;
    aspect-ratio: 16/9 !important;
  }
  .audio-card {
    flex: 0 0 165px !important;
    padding: 0.6rem !important;
  }
  .card-content-overlay {
    padding: 0.75rem 0.5rem 0.5rem 0.5rem !important;
  }
  .article-row-thumb {
    width: 80px !important;
    height: 55px !important;
  }

  /* Sections: tighter padding */
  .row-section {
    padding: 0.6rem 0.75rem !important;
  }
  .grid-two-columns {
    padding: 0.6rem 0.75rem !important;
  }
  .user-container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Row title smaller */
  .row-title {
    font-size: 1rem !important;
  }
  .row-subtitle {
    display: none !important;
  }

  /* Category badges scrollable row tighter */
  .category-badges-row {
    gap: 0.4rem !important;
    padding: 0.5rem 0 !important;
  }
  .category-badge {
    font-size: 0.72rem !important;
    padding: 0.3rem 0.7rem !important;
  }

  /* Ranking list tighter */
  .ranking-item {
    gap: 0.5rem !important;
    padding: 0.5rem !important;
  }
  .ranking-number {
    font-size: 1.6rem !important;
    width: 25px !important;
  }
  .ranking-title {
    font-size: 0.8rem !important;
  }
  .ranking-thumb {
    width: 44px !important;
    height: 44px !important;
  }
  .trending-grid {
    gap: 0.65rem !important;
  }
}

/* Responsive Floating Bottom Player Overrides */
@media (max-width: 600px) {
  .volume-slider-bar {
    display: none !important;
  }
  .player-expanded-controls {
    gap: 0.5rem !important;
  }
  .player-expanded-side-controls {
    gap: 0.5rem !important;
  }
  .bottom-player.expanded {
    padding: 1.25rem 1rem !important;
  }
}

/* ============================================================
   Touch devices — always show slider nav buttons (no hover)
   ============================================================ */
@media (hover: none) {
  .slider-nav-btn {
    opacity: 0.75 !important;
  }
  .slider-nav-btn:active {
    opacity: 1 !important;
    background: rgba(255, 76, 0, 0.8) !important;
  }
}


/* Article detail 3-column layout */
.article-layout {
  display: grid;
  grid-template-columns: auto 1fr 320px;
  gap: 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  position: relative;
}

.article-left-col {
  width: 240px;
  opacity: 1;
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.article-left-col.collapsed {
  width: 0;
  margin-right: -2.5rem;
  opacity: 0;
  pointer-events: none;
}

.article-main-col {
  min-width: 0;
  font-size: var(--article-font-size, 1rem);
  line-height: 1.6;
}

.article-main-title {
  font-size: 2.5rem !important;
  line-height: 1.22 !important;
  margin-top: 0.5rem !important;
  margin-bottom: 1rem !important;
  letter-spacing: -0.015em !important;
}

.article-right-col {
  flex-shrink: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Sticky top progress bar */
.sticky-progress-bar {
  position: sticky;
  top: 4.25rem;
  max-width: 1440px;
  margin: 0 auto 1.25rem auto;
  width: 100%;
  z-index: 98;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 42px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  overflow: visible;
}

.sticky-progress-bar button {
  padding: 0.2rem 0.6rem !important;
  font-size: 0.7rem !important;
}

.progress-text-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-btn-toggle {
  background: rgba(255, 76, 0, 0.1);
  border: 1px solid rgba(255, 76, 0, 0.3);
  color: var(--purple);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.progress-btn-toggle:hover {
  background: var(--purple-gradient);
  color: white;
  border-color: transparent;
}

.progress-text-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.progress-line-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.04);
}

.progress-line-fill {
  height: 100%;
  background: var(--purple-gradient);
  width: 0%;
  transition: width 0.1s ease;
}

/* Timeline Sommaire */
.sommaire-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  padding-left: 1.25rem;
  margin-top: 1rem;
}

.sommaire-timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: var(--transition-fast);
  padding-left: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-muted);
  border: 2px solid var(--bg-primary);
  box-sizing: content-box;
  transition: var(--transition-smooth);
}

.timeline-item:hover {
  color: white;
}

.timeline-item.active {
  color: var(--purple);
  font-weight: 600;
}

.timeline-item.active::before {
  background-color: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 8px var(--purple);
}

/* Stat Box Middle Column */
.stat-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  flex: 1;
  transition: var(--transition-smooth);
}

.stat-box:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 76, 0, 0.1);
}

/* Checklist Grid */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.checklist-icon {
  color: var(--purple);
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

/* AI Assistant beta card */
.ai-assistant-card {
  background: linear-gradient(
    135deg,
    rgba(255, 76, 0, 0.04) 0%,
    rgba(15, 15, 18, 0.6) 100%
  );
  border: 1px solid rgba(255, 76, 0, 0.18);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.ai-option-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.85rem;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: white;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-bottom: 0.5rem;
}

.ai-option-btn:hover {
  background-color: rgba(255, 76, 0, 0.08);
  border-color: rgba(255, 76, 0, 0.4);
  color: white;
}

.ai-response-box {
  background-color: rgba(8, 8, 9, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.75rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.ai-response-text {
  position: relative;
}

.ai-response-text.typing::after {
  content: "▋";
  animation: blink 0.6s infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Audio Player embedded in Article */
.article-audio-player {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.article-audio-wave-container {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-grow: 1;
  height: 24px;
}

.audio-wave-bar {
  flex-grow: 1;
  background-color: var(--text-muted);
  height: 60%;
  border-radius: 2px;
  transition:
    height 0.15s ease,
    background-color 0.15s ease;
}

.article-audio-player.playing .audio-wave-bar {
  background-color: var(--purple);
  animation: wavePulse 1.2s infinite ease-in-out;
}

.article-audio-player.playing .audio-wave-bar:nth-child(2n) {
  animation-delay: 0.2s;
}
.article-audio-player.playing .audio-wave-bar:nth-child(3n) {
  animation-delay: 0.4s;
}
.article-audio-player.playing .audio-wave-bar:nth-child(4n) {
  animation-delay: 0.1s;
}
.article-audio-player.playing .audio-wave-bar:nth-child(5n) {
  animation-delay: 0.3s;
}

@keyframes wavePulse {
  0%,
  100% {
    height: 30%;
  }
  50% {
    height: 95%;
  }
}

/* In-place Video Card */
.article-video-card {
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  cursor: pointer;
  margin: 1.5rem 0;
}

.article-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(8, 8, 9, 0.9) 0%,
    rgba(8, 8, 9, 0.3) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

.article-video-card:hover .article-video-overlay {
  background: linear-gradient(
    to top,
    rgba(8, 8, 9, 0.95) 0%,
    rgba(8, 8, 9, 0.4) 100%
  );
}

.article-video-play-btn {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  color: white;
  margin-bottom: 0.75rem;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease;
}

.article-video-card:hover .article-video-play-btn {
  transform: scale(1.1);
  background-color: var(--purple);
  border-color: transparent;
  box-shadow: 0 0 16px rgba(255, 76, 0, 0.5);
}

.article-video-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: white;
}

.article-video-subtitle {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ============================================================
   SEARCH DROPDOWN OVERLAY (GLASSMORPHISM PREMIUM STYLE)
   ============================================================ */
.search-bar-container {
  position: relative; /* ensure dropdown panel places relative to container */
}

.search-results-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 0.5rem;
  background: rgba(15, 15, 18, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  padding: 1rem;
}

.search-results-dropdown-panel.show {
  display: block;
}

/* Custom Scrollbar for Dropdown */
.search-results-dropdown-panel::-webkit-scrollbar {
  width: 6px;
}
.search-results-dropdown-panel::-webkit-scrollbar-track {
  background: transparent;
}
.search-results-dropdown-panel::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.search-result-group {
  margin-bottom: 1.25rem;
}

.search-result-group:last-child {
  margin-bottom: 0;
}

.search-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.search-result-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.search-result-thumb {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-info {
  flex: 1;
  min-width: 0; /* truncate text overflows properly */
}

.search-result-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-excerpt {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

/* ============================================================
   COLLAPSIBLE SIDEBAR & USER CARD IMPROVEMENTS
   ============================================================ */

.app-container {
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.app-container.sidebar-collapsed {
  grid-template-columns: 80px 1fr !important;
}

.sidebar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow-x: hidden !important;
}

.sidebar.collapsed {
  width: 80px !important;
  padding: 1.5rem 0.5rem !important;
  align-items: center !important;
}

/* Sidebar Toggle button styling */
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

/* Collapsed layout elements hiding */
.sidebar.collapsed .logo-text,
.sidebar.collapsed .link-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed #sidebar-resume-section,
.sidebar.collapsed .user-info-text,
.sidebar.collapsed .user-card-actions a:not(.logout) {
  display: none !important;
}

.sidebar.collapsed .sidebar-header {
  flex-direction: column !important;
  gap: 0.75rem !important;
  width: 100% !important;
  align-items: center !important;
}

.sidebar.collapsed .sidebar-logo {
  padding: 0 !important;
  margin-bottom: 0 !important;
}

.sidebar.collapsed .sidebar-toggle {
  margin-left: 0 !important;
  margin-top: 0.25rem !important;
}

/* Link hover animation */
.nav-link {
  position: relative;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease !important;
}

.nav-link:hover {
  transform: translateX(4px);
  background-color: rgba(255, 255, 255, 0.04);
  color: white !important;
}

.sidebar.collapsed .nav-link:hover {
  transform: scale(1.05) !important;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}

/* Premium Profile Card */
.sidebar-user-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-user-card:hover {
  border-color: rgba(255, 76, 0, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar.collapsed .sidebar-user-card {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  align-items: center !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.sidebar.collapsed .sidebar-user-card .avatar-circle {
  width: 42px !important;
  height: 42px !important;
  box-shadow: 0 0 15px rgba(255, 76, 0, 0.35) !important;
  border-color: var(--primary) !important;
}

.sidebar.collapsed .user-card-actions {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0.5rem !important;
  align-items: center !important;
  width: 100% !important;
}

.sidebar.collapsed .user-card-actions a.logout {
  font-size: 0 !important; /* Hide text */
  padding: 0.6rem !important;
  border-radius: 50% !important;
  background: rgba(255, 76, 0, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(255, 76, 0, 0.2) !important;
  width: auto !important;
  margin-top: 0 !important;
}

.sidebar.collapsed .user-card-actions a.logout:hover {
  background: rgba(255, 76, 0, 0.2) !important;
}

.sidebar.collapsed .user-card-actions a.logout svg {
  width: 1.15rem !important;
  height: 1.15rem !important;
  margin: 0 !important;
}

/* User card links styling */
.user-card-link {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.user-card-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: white;
}

.user-card-link.logout {
  transition: all 0.2s;
}

.user-card-link.logout:hover {
  background: rgba(255, 76, 0, 0.1) !important;
  color: var(--primary-light) !important;
}

/* ==========================================
   UNIFIED ADMINISTRATION AREA DESIGN SYSTEM
   ========================================== */

/* Layout & Containers */
.admin-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.5rem 2rem 6rem 2rem;
  animation: fadeIn 0.3s ease-out;
}

/* Header & Banner Cards */
.admin-header-card {
  background: linear-gradient(135deg, rgba(30, 20, 60, 0.45) 0%, rgba(15, 10, 30, 0.45) 100%);
  border: 1px solid rgba(255, 76, 0, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Cards & KPI elements */
.admin-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.admin-card:hover {
  border-color: rgba(255, 76, 0, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.admin-kpi-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  position: relative;
}

.admin-kpi-card:hover {
  border-color: rgba(255, 76, 0, 0.25);
  transform: translateY(-2px);
}

/* Badges & Labels (Consistent Semantic Colors) */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-badge-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.admin-badge-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.admin-badge-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.admin-badge-neutral {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* Buttons */
.admin-btn-primary {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--purple-gradient);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  transition: var(--transition-fast);
}

.admin-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 76, 0, 0.25);
}

.admin-btn-outline {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.admin-btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 76, 0, 0.3);
}

/* Sidebar navigation links in Admin pages */
.admin-filter-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 100%;
  transition: var(--transition-fast);
}

.admin-filter-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: white;
}

.admin-filter-link.active {
  background: rgba(255, 76, 0, 0.15) !important;
  color: white !important;
  border-left: 3px solid var(--purple);
  padding-left: calc(0.75rem - 3px);
}

/* ==========================================================================
   DESIGN SYSTEM : CUSTOM EDITOR PREMIUM BLOCKS
   ========================================================================== */

/* 1. Alert / Callout Block */
.editor-callout {
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-left: 4px solid rgba(255,255,255,0.2);
}
.editor-callout.callout-info {
  border-left-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}
.editor-callout.callout-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.editor-callout.callout-success {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}
.editor-callout.callout-tip {
  border-left-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

/* 2. Timeline Block */
.editor-timeline {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.editor-timeline .timeline-step {
  position: relative;
}
.editor-timeline .timeline-step::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 6px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4c00;
  border: 2px solid #0f0d1a;
}

/* 3. Pricing Grid Block */
.editor-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.editor-pricing-grid .pricing-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
}
.editor-pricing-grid .pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.12);
}
.editor-pricing-grid .pricing-card.active {
  background: rgba(255, 76, 0, 0.05);
  border: 1px solid #ff4c00;
  position: relative;
}
.editor-pricing-grid .pricing-card.active .badge-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff4c00;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* 4. Action Button Block */
.editor-custom-btn-wrapper {
  margin: 1.5rem 0;
  text-align: left;
}
.editor-custom-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  color: white !important;
  font-size: 0.8rem;
  background: #ff4c00;
  border: 1px solid #ff4c00;
  transition: all 0.2s ease;
}
.editor-custom-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 5. Accordion FAQ Block */
.editor-faq-item {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 1rem;
}
.editor-faq-question {
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}
.editor-faq-answer {
  color: #94a3b8;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 6. Custom Table Block */
.editor-custom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  text-align: left;
}
.editor-custom-table th {
  padding: 0.75rem;
  border-bottom: 2px solid rgba(255,255,255,0.15);
  color: white;
  font-weight: 700;
}
.editor-custom-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
}

/* Premium Dropdown Select Custom styling */
.studio-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba%28255,255,255,0.6%29'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
  background-position: right 0.75rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1rem !important;
  padding-right: 2.5rem !important;
  cursor: pointer !important;
}

.studio-select option {
  background-color: #121214 !important;
  color: white !important;
  padding: 0.5rem !important;
}

/* Premium Textarea dimension management */
.studio-textarea {
  min-height: 80px !important;
  max-height: 200px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
}

/* ================================================================
   LIGHT MODE OVERRIDES — MARKETPLACE PAGE
   ================================================================ */

/* Hero section container */
[data-theme="light"] .marketplace-hero {
  background: linear-gradient(135deg, rgba(255,76,0,0.05) 0%, var(--bg-secondary) 100%) !important;
  border-color: rgba(255,76,0,0.12) !important;
}

/* Search bar inside hero */
[data-theme="light"] .marketplace-hero [style*="background:rgba(0,0,0,0.4)"],
[data-theme="light"] .marketplace-hero [style*="background: rgba(0,0,0,0.4)"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .marketplace-hero input {
  color: var(--text-primary) !important;
}

/* Trend tags */
[data-theme="light"] .trend-tag {
  background: var(--bg-card-hover) !important;
  color: var(--text-secondary) !important;
}

/* All glass-panel inside marketplace */
[data-theme="light"] .marketplace-wrapper .glass-panel {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
}

[data-theme="light"] .marketplace-wrapper .glass-panel h4,
[data-theme="light"] .marketplace-wrapper .glass-panel h5 {
  color: var(--text-primary) !important;
}

/* Carousel nav buttons */
[data-theme="light"] #carousel-prev,
[data-theme="light"] #carousel-next {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Category tabs */
[data-theme="light"] .category-tab-btn {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .category-tab-btn:hover {
  background: var(--bg-card-hover) !important;
  border-color: rgba(255,76,0,0.2) !important;
}

[data-theme="light"] .category-tab-btn.active {
  background: rgba(255,76,0,0.08) !important;
  border-color: rgba(255,76,0,0.4) !important;
  color: var(--primary) !important;
}

[data-theme="light"] .category-tab-btn.active .tab-name {
  color: var(--primary) !important;
}

/* Sidebar custom checkboxes & radios */
[data-theme="light"] .glass-panel input[type="checkbox"] {
  border-color: #94a3b8 !important;
  background: var(--bg-primary) !important;
}

[data-theme="light"] .glass-panel input[type="checkbox"]:checked {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 6px rgba(255,76,0,0.35) !important;
}

[data-theme="light"] .glass-panel input[type="radio"] {
  border-color: #94a3b8 !important;
  background: var(--bg-primary) !important;
}

[data-theme="light"] .glass-panel input[type="radio"]:checked {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 6px rgba(255,76,0,0.35) !important;
}

/* Range slider track */
[data-theme="light"] input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(0,0,0,0.12) !important;
}

/* Sort select & page size selector */
[data-theme="light"] #sort-selector,
[data-theme="light"] #page-size-selector {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Product cards */
[data-theme="light"] .product-card {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
}

[data-theme="light"] .product-card:hover {
  border-color: rgba(255,76,0,0.3) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
  transform: translateY(-4px);
}

[data-theme="light"] .product-card h4 {
  color: var(--text-primary) !important;
}

/* Card hover actions panel */
[data-theme="light"] .card-hover-actions {
  background: rgba(245,245,245,0.97) !important;
  border-top-color: var(--border-color) !important;
}

[data-theme="light"] .card-hover-actions .btn-outline {
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Favorite heart button */
[data-theme="light"] .favorite-heart-btn {
  background: rgba(255,255,255,0.92) !important;
  border-color: var(--border-color) !important;
}

/* Pagination buttons */
[data-theme="light"] .pag-btn,
[data-theme="light"] .pag-number-btn {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .pag-number-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}

/* Collection & discover buttons */
[data-theme="light"] .collection-btn {
  color: var(--primary) !important;
  border-color: rgba(255,76,0,0.3) !important;
  background: transparent !important;
}

[data-theme="light"] .carousel-discover-btn {
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
}

/* Empty placeholder panels */
[data-theme="light"] .empty-placeholder-panel {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

/* ================================================================
   LIGHT MODE OVERRIDES — ADMIN STUDIO PAGE & BLOCKS
   ================================================================ */

[data-theme="light"] .studio-container {
  color: var(--text-primary) !important;
}

[data-theme="light"] .studio-card {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
  color: var(--text-primary) !important;
}

/* Force all white texts inside studio wrapper to adapt */
[data-theme="light"] .studio-container [style*="color:white"]:not(.btn-primary):not(.btn-secondary):not(.btn-link),
[data-theme="light"] .studio-container [style*="color: white"]:not(.btn-primary):not(.btn-secondary):not(.btn-link),
[data-theme="light"] .studio-container span[style*="color:white"],
[data-theme="light"] .studio-container span[style*="color: white"],
[data-theme="light"] .studio-container div[style*="color:white"],
[data-theme="light"] .studio-container div[style*="color: white"] {
  color: var(--text-primary) !important;
}

/* Inputs & select lists */
[data-theme="light"] .studio-input,
[data-theme="light"] .studio-select,
[data-theme="light"] .studio-textarea {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .studio-input:focus,
[data-theme="light"] .studio-select:focus,
[data-theme="light"] .studio-textarea:focus {
  background: var(--bg-primary) !important;
  border-color: var(--primary) !important;
}

/* Editor toolbar and headers */
[data-theme="light"] .editor-toolbar {
  background: var(--bg-secondary) !important;
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .editor-toolbar select {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .editor-tool-btn:hover {
  color: var(--text-primary) !important;
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .studio-editor-mode-btn {
  color: var(--text-secondary) !important;
}

[data-theme="light"] .studio-editor-mode-btn.active {
  color: var(--primary) !important;
  background: rgba(255, 76, 0, 0.08) !important;
}

/* Block templates sidebar buttons */
[data-theme="light"] .btn-block-insert {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .btn-block-insert:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--primary) !important;
  color: var(--text-primary) !important;
}

/* Active tab indicators */
[data-theme="light"] .studio-tab-btn.active {
  color: var(--text-primary) !important;
}

/* Editor canvas frame */
[data-theme="light"] .editor-canvas-container {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] #studio-rich-editor,
[data-theme="light"] .editor-body {
  color: var(--text-primary) !important;
  background: var(--bg-primary) !important;
}

/* Editor HTML blocks overrides in light mode */
[data-theme="light"] .editor-pricing-grid .pricing-card {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .editor-pricing-grid .pricing-card:hover {
  border-color: var(--primary) !important;
}

[data-theme="light"] .editor-pricing-grid .pricing-card h3,
[data-theme="light"] .editor-pricing-grid .pricing-card div {
  color: var(--text-primary) !important;
}

[data-theme="light"] .editor-faq-question {
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .editor-custom-table th {
  color: var(--text-primary) !important;
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .editor-custom-table td {
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .editor-timeline {
  border-left-color: var(--border-color) !important;
}

[data-theme="light"] .editor-timeline .timeline-step::before {
  border-color: var(--bg-primary) !important;
}

[data-theme="light"] .studio-title-h1 {
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--primary) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] #seo-score-number {
  color: var(--text-primary) !important;
}

/* Studio Header Bar */
[data-theme="light"] .studio-header {
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

[data-theme="light"] .studio-header .nav-link {
  color: var(--text-secondary) !important;
}

[data-theme="light"] .studio-header .nav-link:hover {
  color: var(--text-primary) !important;
}

/* Vertical Separator */
[data-theme="light"] .studio-header span[style*="background:rgba(255,255,255,0.15)"],
[data-theme="light"] .studio-header span[style*="background: rgba(255, 255, 255, 0.15)"] {
  background: var(--border-color) !important;
}

/* Undo/Redo button wrapper */
[data-theme="light"] .studio-header [style*="background:rgba(255,255,255,0.04)"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .studio-header [style*="background:rgba(255,255,255,0.08)"] {
  background: var(--border-color) !important;
}

/* Saved badge */
[data-theme="light"] .saved-badge {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

/* Global Secondary Button Light Mode Overrides */
[data-theme="light"] .btn-secondary {
  background-color: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .btn-secondary:hover {
  background-color: var(--bg-card-hover) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

/* AI Assistant Chatbot Box Overrides */
[data-theme="light"] .ai-chat-body {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .ai-bubble.ai {
  background: rgba(255, 76, 0, 0.08) !important;
  border-color: rgba(255, 76, 0, 0.18) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .ai-bubble.user {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Admin Series KPI Stat Cards & Tables */
[data-theme="light"] .stat-card {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-theme="light"] .stat-val:not([style*="color"]) {
  color: var(--text-primary) !important;
}

[data-theme="light"] .series-table th {
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .series-table td {
  border-bottom-color: var(--border-color) !important;
}

/* Global Admin Container Light Theme Direct Override */
[data-theme="light"] .admin-container {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* Admin Library - Tabs & Search Bar & Advanced Filters */
[data-theme="light"] .admin-container [style*="background: rgba(0,0,0,0.25)"],
[data-theme="light"] .admin-container [style*="background:rgba(0,0,0,0.25)"],
[data-theme="light"] .admin-container [style*="background: rgba(0,0,0,0.2)"],
[data-theme="light"] .admin-container [style*="background:rgba(0,0,0,0.2)"],
[data-theme="light"] .admin-container [style*="background:rgba(0,0,0,.2)"],
[data-theme="light"] .admin-container [style*="background: rgba(0,0,0,.2)"],
[data-theme="light"] .admin-container [style*="background:rgba(0,0,0,.25)"],
[data-theme="light"] .admin-container [style*="background: rgba(0,0,0,.25)"] {
  background: var(--bg-primary) !important;
}

[data-theme="light"] .lib-tab {
  color: var(--text-secondary) !important;
}

[data-theme="light"] .lib-tab:hover {
  color: var(--text-primary) !important;
  background: var(--bg-card-hover) !important;
}

[data-theme="light"] .lib-tab.active {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--primary) !important;
}

[data-theme="light"] .view-switch-btn:not(.active) {
  color: var(--text-secondary) !important;
}

[data-theme="light"] #lib-search-bar {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] #adv-filter-btn {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] #lib-adv-filters-panel {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] #lib-adv-filters-panel select,
[data-theme="light"] #lib-adv-filters-panel input {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Pagination Buttons */
[data-theme="light"] .lib-page-num:not(.active),
[data-theme="light"] .lib-page-prev,
[data-theme="light"] .lib-page-next {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .lib-page-num:not(.active):hover,
[data-theme="light"] .lib-page-prev:hover,
[data-theme="light"] .lib-page-next:hover {
  background: var(--bg-card-hover) !important;
  color: var(--primary) !important;
}

/* Library Grid Card */
[data-theme="light"] .lib-grid-card {
  border-color: var(--border-color) !important;
  background: var(--bg-secondary) !important;
}

[data-theme="light"] .lib-grid-card:hover {
  border-color: rgba(0, 0, 0, 0.15) !important;
  background: var(--bg-card-hover) !important;
}

[data-theme="light"] .lib-grid-card.active {
  border-color: var(--primary) !important;
  background: rgba(255, 76, 0, 0.05) !important;
}

[data-theme="light"] .lib-grid-card [style*="color: white"],
[data-theme="light"] .lib-grid-card [style*="color:white"] {
  color: var(--text-primary) !important;
}

/* Library List View Row Item */
[data-theme="light"] .lib-row-item {
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] .lib-row-item [style*="color: white"],
[data-theme="light"] .lib-row-item [style*="color:white"] {
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container [style*="background: rgba(0,0,0,0.15)"],
[data-theme="light"] .admin-container [style*="background:rgba(0,0,0,0.15)"] {
  background: var(--bg-primary) !important;
}

[data-theme="light"] .admin-container [style*="border-bottom: 1px solid rgba(255,255,255,0.06)"],
[data-theme="light"] .admin-container [style*="border-bottom:1px solid rgba(255,255,255,0.06)"] {
  border-bottom-color: var(--border-color) !important;
}

/* Detail Sidebar */
[data-theme="light"] #lib-sidebar-details {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] #lib-sidebar-details [style*="color: white"],
[data-theme="light"] #lib-sidebar-details [style*="color:white"] {
  color: var(--text-primary) !important;
}

[data-theme="light"] #lib-sidebar-details [style*="background: rgba(255,255,255,0.05)"],
[data-theme="light"] #lib-sidebar-details [style*="background:rgba(255,255,255,0.05)"],
[data-theme="light"] #lib-sidebar-details [style*="background: rgba(255,255,255,0.02)"],
[data-theme="light"] #lib-sidebar-details [style*="background:rgba(255,255,255,0.02)"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] #lib-sidebar-details [style*="border-top: 1px solid rgba(255,255,255,0.05)"],
[data-theme="light"] #lib-sidebar-details [style*="border-top:1px solid rgba(255,255,255,0.05)"] {
  border-top-color: var(--border-color) !important;
}

[data-theme="light"] #lib-sidebar-details [style*="border-bottom: 1px solid rgba(255,255,255,0.08)"],
[data-theme="light"] #lib-sidebar-details [style*="border-bottom:1px solid rgba(255,255,255,0.08)"],
[data-theme="light"] #lib-sidebar-details [style*="border-bottom: 1px solid rgba(255,255,255,0.03)"],
[data-theme="light"] #lib-sidebar-details [style*="border-bottom:1px solid rgba(255,255,255,0.03)"] {
  border-bottom-color: var(--border-color) !important;
}

[data-theme="light"] #lib-empty-explorer {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

/* Admin Analytics Light Theme Overrides */
[data-theme="light"] #an-root {
  color: var(--text-primary) !important;
}

[data-theme="light"] .an-card {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-theme="light"] .an-kpi {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .an-kpi:hover {
  box-shadow: var(--shadow-md) !important;
  border-color: rgba(255, 76, 0, 0.3) !important;
}

[data-theme="light"] .an-tab {
  color: var(--text-secondary) !important;
}

[data-theme="light"] .an-tab:hover {
  color: var(--text-primary) !important;
  background: var(--bg-card-hover) !important;
}

[data-theme="light"] .an-tab.active {
  background: rgba(255, 76, 0, 0.1) !important;
  color: var(--primary) !important;
}

[data-theme="light"] .an-content-row,
[data-theme="light"] .an-rt-item {
  border-bottom-color: var(--border-color) !important;
}

/* Charts SVG Light theme overrides */
[data-theme="light"] #an-root svg line[stroke*="rgba(255,255,255"],
[data-theme="light"] #an-root svg circle[stroke*="rgba(255,255,255"] {
  stroke: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] #an-root svg text[fill*="rgba(255,255,255"],
[data-theme="light"] #an-root svg text[fill="white"] {
  fill: var(--text-primary) !important;
}

[data-theme="light"] #an-chart-tooltip {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--text-primary) !important;
}

/* Modals & Inputs within Modals */
[data-theme="light"] #an-root [style*="background:rgba(255,255,255"],
[data-theme="light"] #an-root [style*="background: rgba(255,255,255"],
[data-theme="light"] .modal [style*="background:rgba(255,255,255"],
[data-theme="light"] .modal [style*="background: rgba(255,255,255"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] #an-root [style*="color:white"],
[data-theme="light"] #an-root [style*="color: white"],
[data-theme="light"] .modal [style*="color:white"],
[data-theme="light"] .modal [style*="color: white"] {
  color: var(--text-primary) !important;
}

[data-theme="light"] .modal tr[style*="border-bottom"],
[data-theme="light"] .modal td[style*="border-bottom"] {
  border-bottom-color: var(--border-color) !important;
}

/* Admin Subscribers Light Theme Overrides */
[data-theme="light"] .admin-container [style*="background: rgba(0,0,0,0.15)"],
[data-theme="light"] .admin-container [style*="background:rgba(0,0,0,0.15)"],
[data-theme="light"] .admin-container [style*="border-color: rgba(255,255,255,0.06)"],
[data-theme="light"] .admin-container [style*="border-color:rgba(255,255,255,0.06)"] {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .glass-panel svg pattern path[stroke*="rgba(255,255,255"],
[data-theme="light"] .glass-panel svg pattern path[stroke*="rgba(255, 255, 255"] {
  stroke: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .glass-panel svg g[style*="fill: rgba(255,255,255"],
[data-theme="light"] .glass-panel svg g[style*="fill:rgba(255,255,255"] {
  fill: var(--text-secondary) !important;
}

[data-theme="light"] .modal [style*="background: #09090b"],
[data-theme="light"] .modal [style*="background:#09090b"] {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .admin-container [style*="background: rgba(255,255,255,0.03)"],
[data-theme="light"] .admin-container [style*="background:rgba(255,255,255,0.03)"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] #dashboard-period-select,
[data-theme="light"] #dashboard-period-select option {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* Direct class-based glass-panel overrides for all admin sub-pages (subscribers, products, playlists) */
[data-theme="light"] .admin-container .glass-panel {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: 12px !important;
}

[data-theme="light"] .admin-container div:has(> #dashboard-period-select) {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Admin Channel Light Theme Overrides */
[data-theme="light"] .admin-container .channel-form-input,
[data-theme="light"] .admin-container select.channel-form-input {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container .btn-outline[style*="border-color:rgba(255,255,255"],
[data-theme="light"] .admin-container .btn-outline[style*="border-color: rgba(255,255,255"] {
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] [style*="background:#0f0926"],
[data-theme="light"] [style*="background: #0f0926"],
[data-theme="light"] [style*="background:#0c091f"],
[data-theme="light"] [style*="background: #0c091f"] {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] [style*="background:rgba(0,0,0,0.2)"],
[data-theme="light"] [style*="background: rgba(0,0,0,0.2)"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

/* Admin Playlists Light Theme Overrides */
[data-theme="light"] .admin-container[style*="color: white"],
[data-theme="light"] .admin-container[style*="color:white"] {
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container .admin-input,
[data-theme="light"] .admin-container .admin-select,
[data-theme="light"] .admin-container .admin-textarea {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container .admin-input:focus,
[data-theme="light"] .admin-container .admin-select:focus,
[data-theme="light"] .admin-container .admin-textarea:focus {
  background: var(--bg-primary) !important;
  border-color: var(--primary) !important;
}

[data-theme="light"] .admin-container .btn-outline {
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  background: none !important;
}

[data-theme="light"] .admin-container .btn-outline:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .admin-container [style*="background:rgba(255,255,255"],
[data-theme="light"] .admin-container [style*="background: rgba(255,255,255"],
[data-theme="light"] .admin-container [style*="background:rgba(0,0,0,0.3)"],
[data-theme="light"] .admin-container [style*="background: rgba(0,0,0,0.3)"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container [style*="border-color:rgba(255,255,255"],
[data-theme="light"] .admin-container [style*="border-color: rgba(255,255,255"],
[data-theme="light"] .admin-container [style*="border: 1px solid rgba(255,255,255"],
[data-theme="light"] .admin-container [style*="border:1px solid rgba(255,255,255"] {
  border-color: var(--border-color) !important;
}

[data-theme="light"] .admin-container h1[style*="-webkit-text-fill-color: transparent"],
[data-theme="light"] .admin-container h1[style*="-webkit-text-fill-color:transparent"] {
  background: none !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  color: var(--text-primary) !important;
}

/* Admin Products Light Theme Overrides */
[data-theme="light"] .admin-container .pill-filter-btn {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .admin-container .pill-filter-btn:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container .pill-filter-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-theme="light"] .admin-container div[style*="background:rgba(0,0,0,0.5)"],
[data-theme="light"] .admin-container div[style*="background: rgba(0,0,0,0.5)"] {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] [style*="background:#0f0f13"],
[data-theme="light"] [style*="background: #0f0f13"] {
  background: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

/* Admin Table Light Theme Overrides */
[data-theme="light"] .admin-container .admin-table th {
  background: var(--bg-secondary) !important;
  border-bottom-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .admin-container .admin-table td {
  border-bottom-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .admin-container .admin-table tr:hover td {
  background: rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .admin-container select.order-fulfillment-select {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* Profile Page Light Theme Overrides */
[data-theme="light"] .user-container .profile-wizard-card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
}

[data-theme="light"] .user-container .form-input,
[data-theme="light"] .user-container .form-textarea,
[data-theme="light"] .user-container .form-select {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .user-container .form-input:focus,
[data-theme="light"] .user-container .form-textarea:focus,
[data-theme="light"] .user-container .form-select:focus {
  background: var(--bg-primary) !important;
  border-color: var(--primary) !important;
}

[data-theme="light"] .user-container .profile-tab-btn {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .user-container .profile-tab-btn:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .user-container .profile-tab-btn.active {
  background: var(--primary-gradient) !important;
  color: white !important;
  border-color: transparent !important;
}

[data-theme="light"] .user-container .avatar-uploader {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .user-container .theme-option-card {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
}

[data-theme="light"] .user-container .theme-option-card:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .user-container .theme-option-card.active {
  background: rgba(255, 76, 0, 0.08) !important;
  border-color: var(--primary) !important;
}

[data-theme="light"] .user-container .theme-option-card .theme-name {
  color: var(--text-primary) !important;
}

[data-theme="light"] .user-container .category-pill {
  background: var(--bg-primary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .user-container .category-pill:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .user-container .category-pill.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}

[data-theme="light"] .user-container h2,
[data-theme="light"] .user-container h3,
[data-theme="light"] .user-container label,
[data-theme="light"] .user-container [style*="color: white"],
[data-theme="light"] .user-container [style*="color:white"] {
  color: var(--text-primary) !important;
}

/* Admin Dashboard Donut Chart Inner Hole Overri/* ==========================================================================
   MODULE DÉCOUVRIR (MEDIAX DISCOVER - LECTEUR HERO & SCORECARD GAUCHE)
   ========================================================================== */

.discover-page-wrapper {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #09090b;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
  font-family: var(--font-sans, 'Inter', sans-serif);
}

.discover-ambient-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(180px);
  opacity: 0.05;
  transition: background-image 0.8s ease-in-out;
  z-index: 0;
  pointer-events: none;
}

.discover-container-layout {
  width: 100%;
  max-width: 1440px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 2rem 1rem 2rem;
  box-sizing: border-box;
  flex: 1;
}

@media (max-width: 1024px) {
  .discover-container-layout {
    padding: 0.5rem 1rem !important;
    height: 100% !important;
    position: relative !important;
  }
  .discover-header-bar {
    position: absolute !important;
    top: 0.5rem !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    padding: 0 1rem !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    border: none !important;
    pointer-events: none !important;
  }
  .discover-tabs-pills-container {
    pointer-events: auto !important;
  }
  .discover-tabs-pills-container::after {
    display: none !important;
  }
  .discover-tabs-pills {
    padding-right: 0 !important;
  }
}

@media (max-width: 768px) {
  .discover-container-layout {
    padding: 0 !important;
  }
}

.discover-header-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.discover-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.discover-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-display, 'Outfit', sans-serif);
}

/* Category Filter Pills */
.discover-tabs-pills-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  padding: 0.65rem 0;
}

/* Fade gradient on the right to indicate more pills */
.discover-tabs-pills-container::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(to left, #09090b 20%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

.discover-tabs-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  width: 100%;
  padding: 0.25rem 0.1rem;
  padding-right: 60px;
  align-items: center;
}

.discover-tabs-pills::-webkit-scrollbar {
  display: none;
}

.discover-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #a1a1aa;
  padding: 0.5rem 1.1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.discover-tab-btn .pill-icon {
  font-size: 0.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.discover-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.discover-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 76, 0, 0.75), rgba(255, 122, 0, 0.75)) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: white;
  box-shadow: 0 0 20px rgba(255, 76, 0, 0.35), 0 4px 12px rgba(255, 76, 0, 0.2);
  transform: translateY(-1px);
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.discover-tab-btn.active .pill-icon {
  filter: brightness(1.2);
}

.pills-scroll-next-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.pills-scroll-next-btn:hover {
  background: rgba(255, 76, 0, 0.25);
  border-color: #ff4c00;
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 12px rgba(255, 76, 0, 0.4);
}

/* Split Layout */
.discover-split-layout {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  width: 100%;
}

@media (max-width: 1024px) {
  .discover-split-layout {
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0 !important;
    overflow: hidden !important;
    flex: 1 !important;
    min-height: 0 !important;
    width: 100% !important;
  }
}

.discover-left-scorecard {
  position: absolute;
  right: calc(100% + 2.5rem);
  left: auto;
  top: 0;
  width: 320px;
  max-height: calc(100% - 16px);
  background: rgba(15, 15, 19, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.25rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 20;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.discover-left-scorecard::-webkit-scrollbar {
  display: none;
}

.discover-left-scorecard.collapsed {
  height: 50px;
  overflow: hidden;
  background: rgba(15, 15, 19, 0.95);
}

@media (max-width: 1024px) {
  .discover-left-scorecard {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: 70% !important;
    max-height: 80% !important;
    z-index: 200 !important;
    border-radius: 20px 20px 0 0 !important;
    background: rgba(15, 15, 19, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    transform: translateY(100%) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin: 0 !important;
    padding: 1.25rem 1rem !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto !important;
  }
  
  .discover-left-scorecard.active-drawer {
    transform: translateY(0) !important;
  }
}

.scorecard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.scorecard-title-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scorecard-title-text {
  font-weight: 800;
  font-size: 0.9rem;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scorecard-collapse-btn {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  transition: transform 0.3s;
}

.scorecard-collapse-btn:hover {
  color: white;
}

/* Views Block */
.scorecard-views-block {
  display: flex;
  flex-direction: column;
}

.scorecard-views-block .views-lbl {
  font-size: 0.72rem;
  color: #71717a;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.scorecard-views-block .views-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-top: 2px;
}

/* Timeline Tabs */
.scorecard-timeline-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 2px;
}

.timeline-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: #71717a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.timeline-tab-btn.active {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Chart */
.scorecard-chart-container {
  width: 100%;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
  padding: 0.5rem;
  box-sizing: border-box;
}

.scorecard-svg-chart {
  width: 100%;
  height: 80px;
}

.chart-line-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
  animation: chart-draw 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chart-draw {
  from { stroke-dashoffset: 600; }
  to { stroke-dashoffset: 0; }
}

/* Metadata List */
.scorecard-metadata-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.75rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.meta-row .meta-lbl {
  color: #71717a;
}

.meta-row .meta-val {
  color: white;
  font-weight: 700;
}

/* Creator details */
.scorecard-creator-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}

.scorecard-creator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-size: cover;
}

.scorecard-creator-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.scorecard-creator-info .creator-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: white;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.scorecard-creator-info .creator-subs {
  font-size: 0.7rem;
  color: #71717a;
  margin-top: 1px;
}

.scorecard-follow-btn {
  background: #ff4c00;
  border: none;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.scorecard-follow-btn:hover {
  background: #e03e00;
}

/* Collapsible Resources & Tags */
.scorecard-resources-box,
.scorecard-keywords-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resources-box-header,
.keywords-header {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #71717a;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.details-resources-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resource-cta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: #a1a1aa;
  text-decoration: none;
  transition: all 0.2s;
}

.resource-cta-item:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}

.cta-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-icon-circle.bg-video { background: rgba(255, 76, 0, 0.15); color: #ff4c00; }
.cta-icon-circle.bg-article { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.cta-icon-circle.bg-community { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.cta-icon-circle.bg-premium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.cta-icon-circle.bg-audio { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.cta-texts {
  display: flex;
  flex-direction: column;
}

.cta-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.cta-sub {
  font-size: 0.65rem;
  color: #71717a;
}

.premium-cta {
  background: linear-gradient(135deg, rgba(245,158,11,0.05) 0%, rgba(245,158,11,0.02) 100%);
  border: 1px solid rgba(245,158,11,0.15);
}

.keywords-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.keyword-pill-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  color: #a1a1aa;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.keyword-pill-btn:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

/* Center Feed Wrapper & Nav Chevrons */
.discover-feed-center-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
  min-height: 0;
}

@media (max-width: 1024px) {
  .discover-feed-center-wrapper {
    width: 100% !important;
    height: 100% !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
  }
}

.discover-nav-chevrons {
  position: absolute;
  left: calc(100% + 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 20;
}

@media (max-width: 1024px) {
  .discover-nav-chevrons {
    display: none;
  }
}

.discover-chevron-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 15, 19, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.discover-chevron-btn:hover {
  background: rgba(255, 76, 0, 0.2);
  border-color: #ff4c00;
  color: white;
  box-shadow: 0 0 15px rgba(255, 76, 0, 0.4);
  transform: scale(1.12);
}

.discover-chevron-btn:hover svg {
  animation: chevron-bounce-up 0.6s ease-in-out infinite alternate;
}

@keyframes chevron-bounce-up {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

#discover-btn-chevron-next:hover svg {
  animation: chevron-bounce-down 0.6s ease-in-out infinite alternate;
}

@keyframes chevron-bounce-down {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

.discover-vertical-feed {
  justify-self: center;
  height: 100%;
  width: auto;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  border-radius: 20px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.discover-vertical-feed::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1024px) {
  .discover-vertical-feed {
    width: 100%;
    max-width: 420px;
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: 640px;
    border-radius: 20px;
  }
}

@media (max-width: 768px) {
  .discover-vertical-feed {
    width: 100vw !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }
  .discovery-controls-row {
    display: none !important;
  }
  .discovery-progress-bar-container {
    margin-bottom: 0 !important;
    height: 3px !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 12 !important;
  }
}

/* Discovery Card Item inside feed */
.discovery-card-item {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}

.discovery-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.discovery-media-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.discovery-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bottom info Overlay inside video */
.discovery-video-overlay-bottom {
  position: absolute;
  left: 0;
  right: 60px; /* Space for actions sidebar */
  bottom: 0;
  z-index: 10;
  padding: 1.5rem 1rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  color: white;
}

.discovery-video-overlay-bottom .discovery-creator-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.discovery-video-overlay-bottom .creator-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
}

.discovery-video-overlay-bottom .creator-name {
  font-weight: 700;
  font-size: 0.85rem;
}

.discovery-video-overlay-bottom .verified-badge {
  color: #3b82f6;
  font-size: 0.8rem;
}

.discovery-video-overlay-bottom .follow-badge-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
}

.discovery-video-overlay-bottom .follow-badge-btn:hover {
  background: white;
  color: black;
}

.discovery-caption-overlay {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.25rem 0;
}

.discovery-hashtags-overlay {
  font-size: 0.75rem;
  color: #ff9f66;
  margin-bottom: 0.75rem;
}

/* Progress bar inside overlay */
.discovery-progress-bar-container {
  width: 100%;
  height: 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  transition: height 0.15s ease;
}

.discovery-progress-bar-container:hover .progress-bar-bg {
  height: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: #ff4c00;
}

/* Control Row */
.discovery-controls-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  display: flex;
  align-items: center;
}

.control-btn:hover {
  opacity: 1;
}

.control-time {
  font-size: 0.75rem;
  color: #ccc;
}

/* Sidebar Actions inside card */
.discovery-actions-sidebar {
  position: absolute;
  right: 0.75rem;
  bottom: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.creator-avatar-container {
  position: relative;
  margin-bottom: 0.5rem;
}

.creator-avatar-bubble {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #ff4c00;
  background-size: cover;
}

.creator-avatar-container .plus-btn {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff4c00;
  color: white;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 76, 0, 0.4);
  transition: all 0.3s ease;
}

.creator-avatar-container:hover .plus-btn {
  transform: translateX(-50%) rotate(90deg) scale(1.15);
  background: #e03e00;
}

.discovery-sidebar-action {
  background: none;
  border: none;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.sidebar-icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(18, 18, 22, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e5e5ea;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.discovery-sidebar-action:hover .sidebar-icon-circle {
  transform: scale(1.12);
  background: rgba(18, 18, 22, 0.8);
}

.discovery-sidebar-action.btn-like:hover .sidebar-icon-circle {
  border-color: #ff4c00;
  color: #ff4c00;
  box-shadow: 0 0 15px rgba(255, 76, 0, 0.45);
  animation: heart-pulse 0.8s infinite alternate;
}

@keyframes heart-pulse {
  0% { transform: scale(1.12); }
  100% { transform: scale(1.22); }
}

.discovery-sidebar-action.btn-save:hover .sidebar-icon-circle {
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.45);
}

.discovery-sidebar-action.btn-share:hover .sidebar-icon-circle {
  border-color: #6366f1;
  color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.45);
}

.discovery-sidebar-action.liked .sidebar-icon-circle {
  background: rgba(255, 76, 0, 0.15);
  border-color: #ff4c00;
  color: #ff4c00;
}

.discovery-sidebar-action.saved .sidebar-icon-circle {
  background: rgba(251, 191, 36, 0.15);
  border-color: #f59e0b;
  color: #f59e0b;
}

.discovery-sidebar-action .action-count {
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  font-family: var(--font-sans, 'Inter', sans-serif);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 0.8);
}

/* Audio Player Waveform Animation */
.discovery-audio-backdrop {
  width: 100%;
  height: 100%;
  background-size: cover;
  position: relative;
}

.discovery-audio-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 76, 0, 0.2) 0%, rgba(9,9,11,0.98) 85%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* Audio Player Play Button & Waveform */
.discovery-audio-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5e00 0%, #ff4c00 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 76, 0, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.discovery-audio-play-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 30px rgba(255, 76, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
}

.discovery-audio-play-btn:active {
  transform: scale(0.95);
}

.discovery-audio-play-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.discovery-waveform-anim {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40px;
}

.discovery-waveform-anim .bar {
  width: 5px;
  height: 12px;
  background: #ff4c00;
  border-radius: 3px;
}

.discovery-waveform-anim.playing .bar {
  animation: waveform-bounce 1s infinite ease-in-out alternate;
}

.discovery-waveform-anim.playing .bar:nth-child(1) { animation-delay: 0.1s; }
.discovery-waveform-anim.playing .bar:nth-child(2) { animation-delay: 0.3s; }
.discovery-waveform-anim.playing .bar:nth-child(3) { animation-delay: 0.2s; }
.discovery-waveform-anim.playing .bar:nth-child(4) { animation-delay: 0.4s; }
.discovery-waveform-anim.playing .bar:nth-child(5) { animation-delay: 0.15s; }

@keyframes waveform-bounce {
  0% { height: 10px; }
  100% { height: 45px; }
}

.discover-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
  gap: 1rem;
}

.discover-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
}

/* Scorecard content transition */
.scorecard-content-animated-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: scorecard-fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scorecard-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Heart pop animation for double click to like */
.heart-pop-animation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: #ff4c00;
  filter: drop-shadow(0 0 20px rgba(255, 76, 0, 0.7));
  pointer-events: none;
  z-index: 10;
  animation: heart-pop-fade 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes heart-pop-fade {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  30% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }
}

/* Center play/pause state indicator overlay */
.video-play-state-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  background: rgba(18, 18, 22, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
}

.video-play-state-overlay.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.video-play-state-overlay svg {
  margin-left: 4px; /* Align play triangle visually in the circle */
  color: #ff4c00;
}

/* Modern Empty State inside Video Feed */
.discover-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 2.5rem;
  background: rgba(18, 18, 22, 0.4);
  box-sizing: border-box;
}

.empty-state-icon-container {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.empty-state-pulse-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 76, 0, 0.3);
  animation: radar-pulse 3s linear infinite;
}

@keyframes radar-pulse {
  0% { transform: rotate(0deg) scale(0.9); opacity: 0.4; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 0.8; }
  100% { transform: rotate(360deg) scale(0.9); opacity: 0.4; }
}

.empty-state-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 76, 0, 0.1);
  border: 1px solid rgba(255, 76, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff4c00;
  box-shadow: 0 0 20px rgba(255, 76, 0, 0.15);
}

.discover-empty-state h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.5rem 0;
  font-family: var(--font-display, sans-serif);
}

.discover-empty-state p {
  font-size: 0.8rem;
  color: #71717a;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
  max-width: 280px;
}

.empty-state-reset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.empty-state-reset-btn:hover {
  background: #ff4c00;
  border-color: #ff4c00;
  box-shadow: 0 4px 12px rgba(255, 76, 0, 0.25);
  transform: translateY(-1px);
}

/* Modern Scorecard Placeholder */
.scorecard-placeholder-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  height: 100%;
  min-height: 350px;
  box-sizing: border-box;
}

.scorecard-placeholder-modern .placeholder-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #52525b;
  margin-bottom: 1.25rem;
}

.scorecard-placeholder-modern h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e4e4e7;
  margin: 0 0 0.5rem 0;
}

.scorecard-placeholder-modern p {
  font-size: 0.75rem;
  color: #71717a;
  margin: 0;
  line-height: 1.5;
  max-width: 240px;
}

/* ============================================================
   SHORTS STUDIO & EXTRACTS PUBLISHER MODAL
   ============================================================ */

.shorts-studio-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  height: 100%;
  overflow: hidden;
}

.shorts-studio-left {
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-sizing: border-box;
}

.shorts-studio-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Stepper progress bar */
.shorts-stepper {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.shorts-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.45;
  transition: opacity 0.3s;
}

.shorts-step.active {
  opacity: 1;
}

.shorts-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.shorts-step.active .shorts-step-num {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

.shorts-step-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

.shorts-step-desc {
  font-size: 0.65rem;
  color: #71717a;
  display: block;
}

/* Custom interactive files display */
.short-media-preview-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.short-media-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.btn-clear-media, .btn-clear-thumbnail {
  flex-shrink: 0 !important;
  transition: transform 0.2s;
}

.btn-clear-media:hover, .btn-clear-thumbnail:hover {
  transform: scale(1.1);
  color: #ef4444 !important;
}

/* Timeline Trimmer bar */
.short-timeline-trimmer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(8, 8, 10, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 0.5rem;
}

.trimmer-play-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.trimmer-play-btn:hover {
  background: #ff4c00;
  border-color: #ff4c00;
  transform: scale(1.05);
}

.trimmer-track-container {
  flex: 1;
  position: relative;
  height: 36px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.05);
}

.trimmer-frames-strip {
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 15px, transparent 15px, transparent 30px);
  border-radius: 6px;
  opacity: 0.4;
}

.trimmer-selected-range {
  position: absolute;
  height: 100%;
  top: 0;
  border-left: 4px solid #ff4c00;
  border-right: 4px solid #ff4c00;
  background: rgba(255, 76, 0, 0.16);
  border-radius: 2px;
  cursor: grab;
}

.trimmer-timestamp-badge {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff4c00;
  color: white;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(255, 76, 0, 0.3);
}

/* Smartphone Live Mockup */
.phone-preview-mock {
  width: 100%;
  max-width: 290px;
  height: 480px;
  background: #000;
  border-radius: 32px;
  border: 8px solid #1a1a22;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  align-self: center;
}

.phone-screen-content {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-image 0.3s ease;
}

.phone-overlay-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 45%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.phone-header-logo {
  position: absolute;
  top: 14px;
  left: 14px;
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 2;
}

.phone-sidebar-actions {
  position: absolute;
  right: 12px;
  bottom: 95px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
  z-index: 2;
}

.phone-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-action-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.phone-action-count {
  font-size: 0.6rem;
  font-weight: 700;
  color: #d1d5db;
  margin-top: 1px;
}

.phone-bottom-details {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
}

.phone-creator-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.phone-creator-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4c00, #ff9f43);
  border: 1px solid white;
}

.phone-creator-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: white;
}

.phone-creator-badge {
  background: #0095f6;
  color: white;
  font-size: 0.5rem;
  padding: 0 4px;
  border-radius: 10px;
  font-weight: 800;
}

.phone-caption {
  font-size: 0.68rem;
  line-height: 1.35;
  color: #f3f4f6;
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phone-tags {
  font-size: 0.62rem;
  color: #38bdf8;
  font-weight: 700;
}

.phone-cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  border-radius: 6px;
  padding: 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  margin-top: 6px;
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.35);
  transition: all 0.2s;
  box-sizing: border-box;
}

.phone-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.5);
}

/* Duplication focus glow */
.shorts-proposal-card {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.shorts-proposal-card.active-focus {
  border-color: #ff4c00 !important;
  box-shadow: 0 0 20px rgba(255, 76, 0, 0.15);
}

/* Premium Shorts Editor Form Inputs Styles */
.studio-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a1a1aa !important;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.studio-input, .studio-select, .studio-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 0.65rem 0.75rem !important;
  color: white !important;
  font-size: 0.85rem !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  margin-bottom: 1rem !important;
  box-sizing: border-box !important;
  outline: none !important;
}

.studio-input::placeholder, .studio-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.studio-input:focus, .studio-select:focus, .studio-textarea:focus {
  border-color: #ff4c00 !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 0 10px rgba(255, 76, 0, 0.2) !important;
}

/* Premium File Selection Box UI */
.short-media-preview-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px dashed rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  margin-bottom: 1.15rem !important;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0;
}

/* Force flex children to respect container width so ellipsis works */
.short-media-preview-box > div {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.short-media-preview-box > div > div {
  min-width: 0;
  overflow: hidden;
}

.short-media-preview-box span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.short-media-preview-box:hover {
  background: rgba(255, 76, 0, 0.04) !important;
  border-color: rgba(255, 76, 0, 0.4) !important;
  box-shadow: 0 0 12px rgba(255, 76, 0, 0.05);
}

.short-media-thumb {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Phone Live Mockup refinement */
.phone-preview-mock {
  border: 12px solid #1c192c !important;
  border-radius: 40px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 30px rgba(124, 88, 255, 0.15) !important;
}

.phone-header-logo {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ff4c00, #ff9f43);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Timeline trimmer styling enhancement */
.short-timeline-trimmer {
  background: rgba(15, 12, 28, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 0.85rem 1.15rem !important;
}

.trimmer-track-container {
  background: rgba(0, 0, 0, 0.35) !important;
  border-radius: 8px !important;
}

.trimmer-selected-range {
  border-left: 5px solid #ff4c00 !important;
  border-right: 5px solid #ff4c00 !important;
  background: rgba(255, 76, 0, 0.22) !important;
  border-radius: 4px !important;
}

/* Annulation du margin-bottom des inputs dans la ligne de boutons d'action de Shorts */
.resource-row-item .studio-input,
.resource-row-item .studio-select {
  margin-bottom: 0 !important;
}

/* Shorts admin page — view modes */
.shorts-view-grid {
  /* default: grid rendering is done inline */
}

.shorts-view-list .short-card-item {
  /* list mode items are inline too */
}

/* Card hover glow effect */
.short-card-item {
  will-change: transform;
}

/* ==========================================================================
   PREMIUM GLASSMORPHIC MAKEOVER FOR /discover VIDEO CLIPS
   ========================================================================== */

/* 1. Immersive Bottom Overlay and legibility gradient shadow */
.discovery-video-overlay-bottom {
  position: absolute;
  left: 0;
  right: 60px !important; /* Space for the right actions sidebar */
  bottom: 0;
  z-index: 10;
  padding: 1.75rem 1.25rem 1.25rem 1.25rem !important;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%) !important;
  color: white;
  display: flex;
  flex-direction: column;
}

/* 2. Creator Info, Caption & Frosted Tags Box */
.discovery-card-info-box {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
  text-align: left;
}

.discovery-creator-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.discovery-creator-row .creator-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: #ffffff;
  font-family: var(--font-display, 'Outfit', sans-serif);
  letter-spacing: 0.01em;
}

.discovery-creator-row .follow-badge-btn {
  background: linear-gradient(135deg, #ff4c00, #ff6b00);
  border: none;
  color: white;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(255, 76, 0, 0.35);
}

.discovery-creator-row .follow-badge-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(255, 76, 0, 0.5);
  filter: brightness(1.1);
}

.discovery-caption-overlay {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  font-family: var(--font-sans, 'Inter', sans-serif);
}

.discovery-description-overlay {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-sans, 'Inter', sans-serif);
}

.discovery-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.discovery-tag-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ff8e53;
  background: rgba(255, 76, 0, 0.1);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 76, 0, 0.15);
  letter-spacing: 0.02em;
}

/* 3. Progress Bar & Circular Premium Controls */
.discovery-progress-bar-container {
  width: 100%;
  margin-bottom: 0.85rem !important;
  cursor: pointer;
  padding: 4px 0;
}

.progress-bar-bg {
  width: 100%;
  height: 2px !important; /* Thinner background line */
  background: rgba(255, 255, 255, 0.12) !important; /* More subtle translucent white */
  border-radius: 2px;
  overflow: hidden;
  transition: height 0.15s ease;
}

.discovery-progress-bar-container:hover .progress-bar-bg {
  height: 4px !important;
}

.control-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0 !important;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.08);
}

.control-btn svg {
  width: 12px !important;
  height: 12px !important;
}

.control-time {
  font-size: 0.68rem !important; /* Elegant 11px font size */
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.6) !important; /* Premium muted white */
  font-family: var(--font-mono, 'Courier New', monospace) !important; /* Monospace for stable seconds ticking */
  font-variant-numeric: tabular-nums !important; /* Prevent layout shifting as numbers change */
  margin-left: 0.4rem;
}

/* 4. Action Sidebar refinement (Frosted Glass icons & Typography) */
.discovery-actions-sidebar {
  gap: 0.55rem !important; /* Decreased vertical spacing */
  bottom: 1.5rem !important; /* Slightly elevated to clear controls */
}

.sidebar-icon-circle {
  width: 38px !important; /* Shrunk circle size to 38px */
  height: 38px !important;
  background: rgba(9, 9, 11, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e5e5ea;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar-icon-circle svg {
  width: 18px !important; /* Scaled down SVGs inside circles */
  height: 18px !important;
}

.discovery-sidebar-action:hover .sidebar-icon-circle {
  transform: scale(1.1) !important;
  background: rgba(9, 9, 11, 0.75) !important;
}

.discovery-sidebar-action .action-count {
  font-size: 9px !important; /* Smaller text size for labels */
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: rgba(255, 255, 255, 0.78) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9) !important;
  margin-top: 0.12rem !important;
}

.discovery-sidebar-action.btn-like:hover .sidebar-icon-circle {
  background: rgba(255, 76, 0, 0.1) !important;
}

.discovery-sidebar-action.btn-comment:hover .sidebar-icon-circle {
  border-color: #3b82f6 !important;
  color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.1) !important;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4) !important;
}

.discovery-sidebar-action.liked .sidebar-icon-circle {
  background: rgba(255, 76, 0, 0.2) !important;
  border-color: #ff4c00 !important;
  color: #ff4c00 !important;
  box-shadow: 0 0 15px rgba(255, 76, 0, 0.3) !important;
}

.discovery-sidebar-action.btn-save:hover .sidebar-icon-circle {
  background: rgba(245, 158, 11, 0.1) !important;
}

.discovery-sidebar-action.saved .sidebar-icon-circle {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3) !important;
}

.discovery-sidebar-action.btn-stats:hover .sidebar-icon-circle {
  border-color: #10b981 !important;
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4) !important;
}

.discovery-sidebar-action.btn-share:hover .sidebar-icon-circle {
  border-color: #6366f1 !important;
  color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.1) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4) !important;
}

/* 5. Creator Avatar Border glow update */
.creator-avatar-bubble {
  width: 38px !important; /* Shrunk creator avatar to 38px */
  height: 38px !important;
  border: 2px solid transparent !important;
  box-shadow: 0 0 10px rgba(255, 76, 0, 0.4) !important;
  outline: 2px solid #ff4c00 !important;
  outline-offset: -2px;
}

.creator-avatar-container .plus-btn {
  width: 14px !important; /* Scaled down add button */
  height: 14px !important;
  font-size: 0.65rem !important;
  bottom: -2px !important;
}

/* 6. Premium Category Pills Header Bar */
@media (min-width: 1025px) {
  .discover-header-bar {
    background: rgba(9, 9, 11, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem !important;
  }
}

.discover-tab-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: #a1a1aa !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.discover-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  transform: translateY(-1px) !important;
}

.discover-tab-btn.active {
  background: linear-gradient(135deg, rgba(255, 76, 0, 0.75), rgba(255, 122, 0, 0.75)) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 0 15px rgba(255, 76, 0, 0.25) !important;
}

/* ── RESPONSIVE STYLES FOR COMMUNITIES PAGE ── */

.explore-grid-layout {
  display: grid;
  grid-template-columns: 3fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .explore-grid-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.community-hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  min-height: 220px;
}

@media (max-width: 768px) {
  .community-hero-panel {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center;
    padding: 1.5rem 1.5rem !important;
    min-height: auto !important;
  }

  .community-hero-panel .hero-graphic-container {
    display: none !important;
  }
  
  .community-hero-panel h1 {
    justify-content: center;
    font-size: 1.6rem !important;
  }

  .community-hero-panel p {
    margin-left: auto;
    margin-right: auto;
  }

  .community-hero-panel div[style*="flex-wrap: wrap"] {
    justify-content: center;
  }

  /* Series Hero Banner Responsive Layout */
  .series-hero-banner {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: auto !important;
    margin-bottom: 1.25rem !important;
  }
  
  .series-hero-banner > img {
    height: 220px !important;
    width: 100% !important;
  }

  .series-hero-content {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    padding: 1.5rem !important;
    margin-top: -60px !important;
    background: linear-gradient(180deg, rgba(8,8,9,0.75) 0%, rgba(8,8,9,0.99) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    gap: 0.85rem !important;
  }

  .series-hero-title {
    font-size: clamp(1.65rem, 7vw, 2.25rem) !important;
    text-shadow: none !important;
  }

  .series-hero-desc {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    -webkit-line-clamp: 4 !important;
  }

  .series-hero-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .series-hero-actions > button:first-child,
  .series-hero-actions > a:first-child {
    flex-grow: 1 !important;
    width: auto !important;
    justify-content: center !important;
    padding: 0.75rem 0.75rem !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;
  }

  #series-fav-text {
    display: none !important;
  }

  #series-fav-toggle-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 12px !important;
  }
}

.trending-tags-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 600px;
}

/* Watch page: responsive player, metadata and sidebar */
@media (max-width: 1100px) {
  .watch-layout-container {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1rem 1.25rem;
    padding-inline: 1.25rem;
  }

  .watch-layout-container.theater {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

@media (max-width: 820px) {
  .watch-layout-container,
  .watch-layout-container.theater,
  .watch-layout-container.audio-page {
    grid-template-areas:
      "player"
      "content"
      "sidebar" !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem;
    padding: 0.75rem 1rem 2rem;
  }

  .watch-layout-container.audio-page {
    grid-template-areas:
      "content"
      "sidebar" !important;
  }

  .watch-layout-container.theater {
    padding: 0 1rem 2rem;
  }

  .watch-layout-container.theater .watch-left-column,
  .watch-layout-container.theater .watch-right-column {
    padding-inline: 0;
  }

  .watch-layout-container.theater .modal-player-section {
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg) !important;
    border-inline: 1px solid var(--border-color) !important;
  }

  .watch-right-column > div {
    gap: 1rem !important;
  }

  .watch-left-column [style*="justify-content:space-between"] {
    flex-wrap: wrap;
    row-gap: .75rem;
  }

  .watch-left-column [style*="margin-top: 4rem"] {
    margin-top: 2.25rem !important;
  }
}

@media (max-width: 560px) {
  .watch-layout-container,
  .watch-layout-container.audio-page,
  .watch-layout-container.theater {
    padding-inline: .75rem;
    gap: 1rem;
  }

  /* Hide reaction text labels on mobile to prevent overflow */
  .reaction-btn-label {
    display: none !important;
  }
  .btn-reaction {
    padding: 0.35rem 0.55rem !important;
    gap: 0.2rem !important;
  }

  /* Make season/details tabs scrollable horizontally on mobile */
  .season-tabs {
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    display: flex !important;
    gap: 1rem !important;
  }
  .season-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .season-tab {
    flex-shrink: 0 !important;
  }

  /* Stack watch details layout on mobile */
  .watch-about-layout {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .watch-about-layout img {
    max-width: 180px !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* Stack reviews global stats box on mobile */
  .review-stats-box {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }
  .review-stats-box > div:first-child {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding-right: 0 !important;
    padding-bottom: 1rem !important;
  }

  /* Episodes grid: 1 column on small mobile screens */
  .episodes-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Audio page watch layout responsive */
  .audio-info-row {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.85rem !important;
    margin-bottom: 1rem !important;
  }
  .audio-info-row .audio-cover-container {
    margin-right: 0 !important;
    width: 120px !important;
    height: 120px !important;
  }
  #music-cover-image {
    width: 120px !important;
    height: 120px !important;
  }
  #music-vinyl-disc {
    width: 108px !important;
    height: 108px !important;
    top: 6px !important;
    left: 6px !important;
  }
  #music-cover-glow {
    width: 110px !important;
    height: 110px !important;
  }
  .audio-details-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .audio-details-container h1 {
    font-size: 1.35rem !important;
    margin: 0.25rem 0 0.15rem 0 !important;
  }
  .audio-details-container div[style*="margin-bottom: 1.25rem"] {
    margin-bottom: 0.75rem !important;
  }
  
  .audio-actions-row {
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 0.6rem !important;
  }
  .audio-actions-row button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .audio-actions-row button svg {
    margin: 0 !important;
    width: 1.05rem !important;
    height: 1.05rem !important;
  }
  .audio-actions-row .btn-label-text {
    display: none !important;
  }

  .music-volume-container,
  .music-quality-container {
    display: none !important;
  }
  .music-controls-row {
    justify-content: center !important;
    padding: 0.75rem !important;
  }

  .watch-player-outer .modal-player-section,
  #watch-player-container,
  .mx-video-container {
    border-radius: 10px !important;
    max-width: 100%;
  }

  /* Keep the in-video controls from covering the player on small screens. */
  .mx-video-controls-overlay {
    bottom: .5rem !important;
    width: calc(100% - 1rem) !important;
    padding: .5rem .65rem !important;
    gap: .35rem !important;
    border-radius: 12px !important;
  }

  .mx-video-progress-container {
    height: 12px !important;
  }

  .mx-video-buttons-row,
  .mx-video-left-controls,
  .mx-video-right-controls {
    gap: .35rem !important;
  }

  .mx-video-control-btn {
    min-width: 32px;
    min-height: 32px;
    padding: .25rem !important;
  }

  .mx-video-time-display {
    font-size: .72rem !important;
    white-space: nowrap;
  }

  .mx-video-volume-box {
    gap: 0 !important;
  }

  #mx-video-back-btn,
  #mx-video-forward-btn,
  #mx-video-pip-btn,
  #mx-video-theater-btn {
    display: none !important;
  }

  .watch-left-column h1 {
    font-size: clamp(1.25rem, 6vw, 1.65rem) !important;
    line-height: 1.25 !important;
  }

  .watch-left-column [style*="display: flex"] > .avatar-circle {
    flex-shrink: 0;
  }

  .watch-left-column textarea#comment-input {
    min-height: 88px;
    font-size: .9rem !important;
  }

  .watch-left-column #btn-submit-comment {
    width: 100%;
    float: none !important;
    min-height: 42px;
  }

  .watch-left-column #watch-actions-menu {
    position: fixed !important;
    top: auto !important;
    right: .75rem !important;
    left: .75rem !important;
    bottom: .75rem;
    min-width: 0 !important;
    z-index: 1002 !important;
  }

  .watch-right-column .glass-panel,
  .watch-right-column [id$="wrapper"] > div {
    border-radius: 12px;
  }

  .watch-right-column img {
    max-width: 100%;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding: 1rem .75rem 2rem;
  }

  .article-left-col {
    display: none;
  }

  .article-right-col {
    width: auto;
  }

  .sticky-progress-bar {
    border-radius: 0;
    top: 0;
    height: auto;
    min-height: 38px;
    padding-inline: .75rem;
  }

  .article-main-title {
    font-size: clamp(1.45rem, 6vw, 2.3rem) !important;
    line-height: 1.22 !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    letter-spacing: -0.015em !important;
  }

  .article-feedback-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    gap: 1rem !important;
  }
  
  .article-feedback-bar > div {
    justify-content: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .progress-category-badge {
    transition: display 0.2s ease;
  }

  @media (max-width: 480px) {
    .progress-category-badge {
      display: none !important;
    }
  }

  @media (max-width: 400px) {
    .listen-text {
      display: none !important;
    }
    #btn-play-article-audio {
      padding: 0.3rem !important;
      border-radius: 50% !important;
      width: 28px !important;
      height: 28px !important;
      justify-content: center !important;
      align-items: center !important;
    }
  }
}

@media (max-width: 576px) {
  .trending-tags-grid {
    grid-template-columns: 1fr;
  }

  .explore-event-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .explore-event-card .btn-event-register {
    width: 100%;
    text-align: center;
  }
}
.explore-event-card {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   MY ORDERS PAGE STYLES
   ========================================================================== */
.my-orders-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.my-orders-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1rem;
}

.my-orders-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.my-orders-status-tabs {
  display: flex;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.my-orders-search-sort-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
  min-width: 280px;
}

.my-orders-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 320px;
}

/* Order item card */
.my-orders-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.my-orders-card:hover {
  border-color: rgba(255, 76, 0, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.02);
}

.my-orders-card-left {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.my-orders-card-center {
  text-align: center;
  min-width: 120px;
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0 1rem;
}

.my-orders-card-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .my-orders-header-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .my-orders-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .my-orders-status-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .my-orders-status-tabs .order-tab-btn {
    padding: 0.55rem 0.5rem !important;
    font-size: 0.7rem !important;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .my-orders-search-sort-group {
    justify-content: stretch;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    gap: 0.75rem;
  }
  
  .my-orders-search-wrapper {
    max-width: none;
    width: 100%;
  }
  
  .my-orders-search-sort-group select.admin-input {
    max-width: none;
    width: 100%;
  }

  .my-orders-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1rem;
  }
  
  .my-orders-card-center {
    text-align: left;
    border-left: none;
    border-right: none;
    padding: 0.5rem 0;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }
  
  .my-orders-card-center > div {
    font-size: 1.15rem !important;
  }
  
  .my-orders-card-right {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }
  
  .my-orders-card-right button,
  .my-orders-card-right .btn-primary {
    flex: 1;
    justify-content: center;
    padding: 0.6rem !important;
    font-size: 0.78rem !important;
  }
}

/* ============================================================
   RESPONSIVE SHORTS STUDIO & SHORTS MANAGEMENT OVERRIDES
   ============================================================ */

.shorts-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .shorts-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .shorts-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* Keep KPIs on 2 columns on mobile */
    gap: 0.6rem !important;
  }
}

.shorts-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.shorts-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
.shorts-form-grid-5 {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1.2fr 0.6fr auto;
  gap: 1rem;
}

@media (max-width: 640px) {
  /* Only grid-3 and grid-5 collapse to 1 column on mobile. grid-2 stays 2 columns */
  .shorts-form-grid-3,
  .shorts-form-grid-5 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

/* Shorts Grid View: 2 Columns on Mobile */
@media (max-width: 600px) {
  .shorts-view-grid > div {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }
  
  .shorts-view-grid .short-card-item {
    border-radius: 12px !important;
  }
  
  .shorts-view-grid .short-card-item > div:first-child {
    height: 140px !important; /* Slightly shorter cover for mobile aspect ratio */
  }

  .shorts-view-grid .short-card-item > div:last-child {
    padding: 0.6rem !important;
    gap: 0.5rem !important;
  }

  .shorts-view-grid .short-card-item h4 {
    font-size: 0.76rem !important;
  }

  .shorts-view-grid .short-card-item p {
    display: none !important; /* Hide description on 2-col card on mobile to save space */
  }
  
  .shorts-view-grid .short-card-item .creator-handle {
    display: none !important; /* Hide creator @handle on mobile */
  }
  
  /* Compact engagement svg/badge */
  .shorts-view-grid .short-card-item > div:last-child > div:nth-of-type(2) {
    height: 36px !important;
    padding: 0.25rem 0.4rem !important;
  }
  .shorts-view-grid .short-card-item > div:last-child > div:nth-of-type(2) div:first-child div:last-child {
    font-size: 0.8rem !important;
  }

  .shorts-view-grid .short-card-item .stats-row {
    gap: 0.4rem !important;
    justify-content: space-between !important;
  }

  /* Hide button text to keep it cleanly icon-only square */
  .shorts-view-grid .short-card-item .btn-edit-short .btn-text,
  .shorts-view-grid .short-card-item .btn-delete-short .btn-text {
    display: none !important;
  }
  
  .shorts-view-grid .short-card-item .btn-edit-short,
  .shorts-view-grid .short-card-item .btn-delete-short {
    padding: 0.4rem 0 !important;
    font-size: 0.85rem !important;
    min-height: 28px !important;
  }
}

/* Shorts List View Mobile Reflow */
@media (max-width: 768px) {
  .shorts-view-list > div > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    position: relative;
    padding: 1rem !important;
  }
  
  .shorts-view-list > div > div > span:nth-of-type(1) {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .shorts-view-list > div > div > div:nth-of-type(2) {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    justify-content: space-between;
    width: 100%;
  }

  .shorts-view-list > div > div > div:nth-of-type(3) {
    width: 100%;
    margin-top: 0.25rem;
  }
  .shorts-view-list > div > div > div:nth-of-type(3) button {
    flex: 1;
    justify-content: center;
  }
}

/* Shorts Publisher split layout */
@media (max-width: 820px) {
  .shorts-studio-layout {
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }
  
  .shorts-studio-right {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    align-items: center;
  }
  
  .shorts-studio-left {
    overflow-y: visible !important;
  }
}

/* Fullscreen modal style for Shorts Publisher on small screens */
@media (max-width: 600px) {
  #shorts-publisher-modal {
    padding: 0 !important;
  }
  
  #shorts-publisher-modal > div {
    width: 100% !important;
    height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }
  
  #shorts-publisher-modal > div > div:first-child {
    padding: 0.75rem 1rem !important;
  }
  
  #shorts-publisher-modal > div > div:first-child p {
    display: none !important; /* Hide popup subtitle to save screen height */
  }

  #shorts-publisher-modal > div > div:nth-of-type(2) {
    padding: 0.75rem !important; /* Reduce inner container padding */
  }
}

/* ==========================================================================
   ADMIN PAGES RESPONSIVE OVERRIDES (Robust fallback for cached JS)
   ========================================================================== */

/* ── Dashboard Grid ── */
@media (max-width: 1024px) {
  .pages-dashboard-grid {
    grid-template-columns: 1fr !important;
    padding: 1rem 0.75rem !important;
    gap: 1.25rem !important;
  }
}

/* ── Header Row (Fallback & Direct Class) ── */
@media (max-width: 768px) {
  .pages-header-row,
  .pages-dashboard-grid > div > div[style*="display:flex"]:first-of-type {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  .pages-header-row > div:nth-child(2),
  .pages-dashboard-grid > div > div[style*="display:flex"]:first-of-type > div[style*="display:flex"] {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .pages-header-row button,
  .pages-dashboard-grid > div > div[style*="display:flex"]:first-of-type button {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-width: 110px !important;
  }

  /* Quick Toolbar Search & Filters (Fallback & Direct Class) */
  .pages-quick-toolbar,
  .pages-dashboard-grid > div > div[style*="background:rgba(255,255,255,0.02)"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
  }
  .pages-search-box,
  .pages-dashboard-grid > div > div[style*="background:rgba(255,255,255,0.02)"] > div[style*="flex:1"] {
    max-width: 100% !important;
    width: 100% !important;
  }
  .pages-filter-controls,
  .pages-dashboard-grid > div > div[style*="background:rgba(255,255,255,0.02)"] > div[style*="gap:0.75rem"] {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .pages-filter-controls .custom-glass-select,
  .pages-dashboard-grid > div > div[style*="background:rgba(255,255,255,0.02)"] select {
    flex: 1 1 calc(50% - 0.5rem) !important;
    min-width: 0 !important;
  }

  /* Table Horizontal Scroll */
  .pages-table-wrapper {
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .pages-table {
    min-width: 900px !important;
  }
}

/* ── KPIs 2-col, Floating Bar, Pagination ── */
@media (max-width: 600px) {
  .pages-kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
    margin-bottom: 1.25rem !important;
  }
  .pages-kpi-card {
    padding: 0.85rem 0.75rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.3rem !important;
    position: relative !important;
    overflow: hidden !important;
  }
  .pages-kpi-circle {
    position: absolute !important;
    right: 0.6rem !important;
    bottom: 0.6rem !important;
    width: 32px !important;
    height: 32px !important;
    opacity: 0.3 !important;
    font-size: 1.1rem !important;
  }

  /* Floating Bottom Bar */
  #pages-bottom-action-bar {
    width: 92vw !important;
    left: 4% !important;
    transform: none !important;
    border-radius: 12px !important;
    padding: 0.6rem 0.85rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    bottom: 10px !important;
  }
  #pages-bottom-action-bar > div {
    display: none !important;
  }
  #pages-bottom-action-bar button {
    font-size: 0.7rem !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: 15px !important;
    flex: 1 1 auto !important;
    text-align: center;
  }
  #pages-selected-count {
    font-size: 0.72rem !important;
    width: 100% !important;
    text-align: center;
    margin-bottom: 0.25rem;
  }

  /* Pagination Bar */
  .pages-pagination-bar {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: center !important;
    text-align: center !important;
    padding: 0.85rem 0.5rem !important;
  }
  .pages-pagination-bar > div[style*="display:flex"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
  }
}

/* ==========================================================================
   ADMIN LIBRARY RESPONSIVE OVERRIDES
   ========================================================================== */

/* ── Workspace 1-column stack ── */
@media (max-width: 1024px) {
  .lib-workspace-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .lib-details-sidebar {
    width: 100% !important;
    order: 2 !important;
    min-height: auto !important;
  }
}

/* ── Header and Quick Actions ── */
@media (max-width: 768px) {
  .lib-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  .lib-header-actions {
    width: 100% !important;
  }
  .lib-header-actions button {
    flex: 1 1 auto !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    padding: 0.5rem 0.85rem !important;
  }

  /* Filters Toolbar */
  .lib-filter-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
  }
  #filter-tabs-container {
    width: 100% !important;
  }
  .lib-tab {
    flex: 1 1 auto !important;
    text-align: center !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
  .lib-toolbar-right {
    width: 100% !important;
    justify-content: space-between !important;
  }
  #lib-search-bar {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Explorer Table Scroll wrapper */
  .lib-table-wrapper {
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .lib-table {
    min-width: 600px !important;
  }
}

/* ── Storage Cards Grid, Pagination & Floating Bottom Bar ── */
@media (max-width: 600px) {
  /* Storage stats grid 2 columns */
  #media-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  #media-stats-grid > div {
    min-width: 0 !important; /* Fix storage card 190px min-width issue */
    padding: 0.75rem !important;
  }
  #media-stats-grid h3 {
    font-size: 1.1rem !important;
  }
  #media-stats-grid p {
    font-size: 0.65rem !important;
  }

  /* Explorer Grid items */
  #media-explorer-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 0.5rem !important;
  }
  .lib-grid-card {
    padding: 0.45rem !important;
  }

  /* Floating selection bar */
  #lib-bottom-action-bar {
    width: 92vw !important;
    left: 4% !important;
    transform: none !important;
    border-radius: 12px !important;
    padding: 0.6rem 0.85rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    bottom: 10px !important;
    justify-content: center !important;
  }
  #lib-bottom-action-bar > div {
    display: none !important; /* Hide separator vertical line */
  }
  #lib-bottom-action-bar button {
    font-size: 0.7rem !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: 15px !important;
    flex: 1 1 auto !important;
    text-align: center !important;
  }
  #pages-selected-count,
  #lib-bottom-action-bar > span {
    font-size: 0.75rem !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 0.2rem !important;
  }

  /* Crop and Lightbox Modal adaptation */
  .crop-modal-footer,
  .lightbox-toolbar {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: center !important;
  }
}

/* ==========================================
   PRINT STYLES - ARTICLE PDF / PRINT EXPORT
   ========================================== */
@media print {
  /* Hide site navigation, sidebars, headers, comments and ads */
  .top-header,
  .sidebar,
  .sidebar-backdrop,
  .article-left-col,
  .article-right-col,
  .article-feedback-bar,
  #comments-section,
  #ad-article-top-container,
  #ad-article-middle-container,
  #ad-article-bottom-container,
  .reading-tools-widget,
  .toast,
  .mobile-menu-toggle {
    display: none !important;
  }

  /* Expand main content to 100% paper width */
  body,
  .app-container,
  .main-content,
  .article-layout,
  .article-main-col {
    background: #ffffff !important;
    color: #111111 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* Clean high-contrast typography for paper/PDF */
  .article-main-title {
    font-size: 24pt !important;
    color: #000000 !important;
    margin-bottom: 12pt !important;
  }

  .article-body-content,
  #article-body-wrapper,
  #article-body-wrapper p {
    color: #111111 !important;
    font-size: 12pt !important;
    line-height: 1.6 !important;
  }

  /* Avoid page breaks inside images and titles */
  img,
  blockquote,
  h1, h2, h3, h4 {
    page-break-inside: avoid;
  }
}

/* ================================================================
   ADMIN STUDIO & CMS PAGES UI DESIGN POLISH
   ================================================================ */

/* Page Creation & Editor Form Cards */
.studio-card,
.pages-sidebar-box,
.pages-kpi-card,
.ai-assistant-card {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  box-shadow: var(--shadow-md) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.pages-kpi-card:hover,
.pages-card:hover {
  border-color: rgba(var(--primary-rgb), 0.35) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 48px rgba(var(--primary-rgb), 0.12), var(--shadow-md) !important;
}

/* Form Inputs & Textareas */
.studio-input,
.studio-select,
.studio-textarea {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.88rem !important;
  color: var(--text-primary) !important;
  transition: all 0.2s ease !important;
}

.studio-input:focus,
.studio-select:focus,
.studio-textarea:focus {
  border-color: var(--primary) !important;
  background: rgba(var(--primary-rgb), 0.04) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2) !important;
}

/* Studio Editor Tab Bar */
.studio-tab-btn,
.pages-tab-btn {
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  transition: all 0.25s ease !important;
  border-radius: 8px 8px 0 0 !important;
}

.studio-tab-btn.active,
.pages-tab-btn.active {
  color: var(--primary) !important;
  border-bottom: 2px solid var(--primary) !important;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-rgb), 0) 100%) !important;
}

/* Visual Template Cards */
.template-option-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.25s ease;
}

.template-option-card:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  background: rgba(var(--primary-rgb), 0.05);
}

.template-option-card.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.2);
}

/* AI Assistant Prompt Options */
.ai-option-btn {
  background: rgba(var(--primary-rgb), 0.08) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.25) !important;
  border-radius: 10px !important;
  padding: 0.6rem 0.85rem !important;
  color: var(--text-primary) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  margin-bottom: 0.5rem !important;
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.ai-option-btn:hover {
  background: rgba(var(--primary-rgb), 0.16) !important;
  border-color: rgba(var(--primary-rgb), 0.5) !important;
  color: var(--text-primary) !important;
  transform: translateX(3px) !important;
}

/* Custom Block Format Dropdown Selector */
.editor-format-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba%28255,255,255,0.7%29'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 0.6rem center / 0.85rem !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  color: var(--text-primary) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  height: 34px !important;
  line-height: 1.2 !important;
  padding: 0.35rem 2.2rem 0.35rem 0.75rem !important;
  margin: 0 !important;
  cursor: pointer !important;
  outline: none !important;
  box-sizing: border-box !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.editor-format-select:focus {
  border-color: var(--primary) !important;
  background-color: var(--bg-card-hover) !important;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25) !important;
}

.editor-format-select option {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  padding: 0.6rem 0.8rem !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

/* Rich Text Editor Toolbar & Controls */
.editor-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.65rem 0.85rem !important;
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  border-radius: 8px 8px 0 0 !important;
}

.editor-toolbar-group {
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  padding: 0.2rem 0.35rem !important;
  border-radius: 6px !important;
}

.editor-tool-btn {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.editor-tool-btn svg {
  width: 14px !important;
  height: 14px !important;
  fill: currentColor !important;
  color: currentColor !important;
}

.editor-tool-btn:hover,
.editor-tool-btn.active {
  background: rgba(var(--primary-rgb), 0.25) !important;
  border-color: var(--primary) !important;
  color: var(--text-primary) !important;
  transform: scale(1.05) !important;
}

.editor-tool-btn:hover svg,
.editor-tool-btn.active svg {
  fill: #ffffff !important;
  color: #ffffff !important;
}

/* Rich Text Content Canvas */
#studio-rich-editor,
.editor-body {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
  padding: 1.25rem !important;
  min-height: 340px !important;
  outline: none !important;
  border-radius: 0 0 8px 8px !important;
}

#studio-rich-editor:focus {
  background: var(--bg-primary) !important;
}

/* Block Catalog Insert Buttons */
.btn-block-insert {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 10px !important;
  padding: 0.75rem 0.5rem !important;
  color: var(--text-primary) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
}

.btn-block-insert span:last-child {
  color: var(--text-primary) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

.btn-block-insert:hover {
  background: rgba(var(--primary-rgb), 0.15) !important;
  border-color: rgba(var(--primary-rgb), 0.45) !important;
  color: var(--text-primary) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.15) !important;
}

.btn-block-insert:hover span:last-child {
  color: var(--text-primary) !important;
}

.btn-primary {
  color: var(--on-primary) !important;
}

[data-theme="light"] .ai-option-btn,
[data-theme="light"] .btn-block-insert,
[data-theme="light"] .editor-tool-btn,
[data-theme="light"] .editor-toolbar-group {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .btn-block-insert span:last-child,
[data-theme="light"] .editor-tool-btn svg {
  color: currentColor !important;
  fill: currentColor !important;
}

[data-theme="light"] .ai-option-btn:hover,
[data-theme="light"] .btn-block-insert:hover,
[data-theme="light"] .editor-tool-btn:hover,
[data-theme="light"] .editor-tool-btn.active {
  background: rgba(var(--primary-rgb), 0.12) !important;
  border-color: var(--primary) !important;
  color: var(--text-primary) !important;
}





/* Accessibility and bidirectional layout safeguards */
:where(
  a[href],
  button,
  input,
  select,
  textarea,
  summary,
  [role="button"],
  [role="link"],
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 3px solid var(--primary) !important;
  outline-offset: 3px !important;
}

[data-keyboard-control="true"] {
  cursor: pointer;
}

.search-input {
  padding-inline: 2.5rem 1rem;
}

.search-icon {
  inset-inline-start: 0.9rem;
  left: auto;
}

.modal-close-btn {
  inset-inline-end: 1rem;
  right: auto;
}

.slider-nav-btn.prev {
  inset-inline-start: 1.25rem;
  left: auto;
}

.slider-nav-btn.next {
  inset-inline-end: 1.25rem;
  right: auto;
}

[dir="rtl"] .row-see-all-link svg,
[dir="rtl"] .breadcrumb-back svg {
  transform: scaleX(-1);
}

@media (max-width: 600px) {
  .pages-table,
  .lib-table {
    width: 100% !important;
    table-layout: auto;
  }

  .pages-table :is(th, td),
  .lib-table :is(th, td) {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* Stable global advertising hosts: reserve space before config and consent resolve. */
.global-ad-host {
  box-sizing: border-box;
  contain: layout paint;
  display: block;
  inline-size: 100%;
  min-height: max(160px, var(--mediax-ad-leaderboard-reserve, 160px));
  overflow: hidden;
}

/* Live and premiere surfaces */
.live-page { min-height: 70vh; max-width: 1280px; margin-inline: auto; padding: clamp(1rem, 3vw, 2.5rem); color: var(--text-primary); }
.live-hero { margin-block-end: 1.5rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--border-color); border-radius: 20px; background: radial-gradient(circle at 90% 0, rgba(var(--primary-rgb), .18), transparent 36%), var(--bg-card); }
.live-hero > span,.live-badge { color: var(--primary); font-size: .75rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.live-hero h1 { margin-block: .35rem; font: 900 clamp(1.6rem, 4vw, 3rem)/1.1 var(--font-display); }
.live-hero p,.live-muted { color: var(--text-secondary); }
.live-back { display: inline-flex; margin-block-end: 1rem; color: var(--text-secondary); }
.live-wizard,.live-card,.live-stage,.live-chat { border: 1px solid var(--border-color); border-radius: 18px; background: var(--bg-card); box-shadow: var(--shadow-sm); }
.live-wizard { padding: clamp(1rem, 3vw, 2rem); }
.live-wizard section { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; padding-block: 1.5rem; }
.live-wizard section[hidden] { display: none; }
.live-wizard label { display: grid; gap: .45rem; color: var(--text-secondary); font-weight: 700; }
.live-wizard textarea,.live-wizard input,.live-wizard select,.live-chat input { inline-size: 100%; box-sizing: border-box; padding: .75rem; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-primary); color: var(--text-primary); }
.live-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: .5rem; }
.live-steps span { padding: .55rem; border-radius: 999px; background: var(--bg-secondary); color: var(--text-muted); text-align: center; font-size: .72rem; }
.live-steps span.active { background: rgba(var(--primary-rgb),.16); color: var(--primary); }
[data-theme="light"] .live-hero > span,
[data-theme="light"] .live-steps span.active { color: #bb3800; }
.live-wizard footer,.live-actions { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }
.live-wizard button,.live-card button,.live-chat button { min-block-size: 44px; padding-inline: 1rem; border: 1px solid var(--border-color); border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 800; cursor: pointer; }
.live-wizard button:disabled,.live-card button:disabled { opacity: .55; cursor: not-allowed; }
.live-form-error { min-block-size: 1.5rem; color: #ef4444; }
.live-control-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.live-card { padding: 1.25rem; }
.live-readiness .pass { color: #166534; }
.live-readiness .fail { color: #991b1b; }
[data-theme="dark"] .live-readiness .pass { color: #86efac; }
[data-theme="dark"] .live-readiness .fail { color: #fca5a5; }
.live-secret { display: block; margin-block-start: .75rem; padding: .75rem; border-radius: 8px; background: var(--bg-primary); overflow-wrap: anywhere; font-family: monospace; }
.live-watch-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,360px); gap: 1rem; }
.live-stage { position: relative; min-inline-size: 0; min-block-size: 420px; overflow: hidden; background: #000; }
.live-player-host { aspect-ratio: 16/9; min-block-size: 240px; }
.live-waiting { position: absolute; inset: 0; display: grid; place-content: center; gap: .75rem; padding: 2rem; background: radial-gradient(circle,rgba(var(--primary-rgb),.2),transparent 55%),#080809; color: #fff; text-align: center; }
.live-countdown { font: 900 clamp(2rem,7vw,5rem)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.live-connection { position: absolute; inset-block-start: 1rem; inset-inline: 1rem; z-index: 9; color: #fff; }
.live-chat { display: grid; grid-template-rows: auto 1fr auto; min-block-size: 420px; max-block-size: 70vh; overflow: hidden; }
.live-chat header,.live-chat-form { display: flex; gap: .5rem; align-items: center; padding: .85rem; border-block-end: 1px solid var(--border-color); }
.live-chat-messages { overflow-y: auto; padding: .75rem; }
.live-chat-message { padding: .6rem; border-block-end: 1px solid var(--border-color); overflow-wrap: anywhere; }
.live-chat-message p { margin: .25rem 0; color: var(--text-secondary); }
.live-chat-form { border-block-start: 1px solid var(--border-color); border-block-end: 0; }
.live-unavailable,.live-loading { display: grid; place-content: center; min-block-size: 55vh; text-align: center; }
@media (max-width: 820px) { .live-watch-grid,.live-control-grid { grid-template-columns: 1fr; }.live-wizard section { grid-template-columns: 1fr; }.live-steps { grid-template-columns: repeat(2,1fr); }.live-stage { min-block-size: 280px; }.live-chat { min-block-size: 320px; max-block-size: 60vh; } }
[dir="rtl"] .live-wizard footer { justify-content: flex-start; }
@media (prefers-reduced-motion: reduce) { .live-countdown { transition: none; } }

.mx-channel-live-rails { display: grid; gap: 1.5rem; margin-block: 2rem; }
.mx-live-rail__heading { display: flex; align-items: center; justify-content: space-between; margin-block-end: .75rem; }
.mx-live-rail__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem,22rem); gap: 1rem; overflow-x: auto; padding-block-end: .5rem; scroll-snap-type: inline mandatory; }
.mx-live-rail__card { display: grid; gap: .5rem; min-block-size: 9rem; padding: 1rem; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1rem; text-decoration: none; scroll-snap-align: start; }
.mx-live-rail__state { inline-size: fit-content; color: var(--text-secondary); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.mx-live-rail__state[data-status="live"] { color: var(--error-color, #b42318); }
.mx-live-caption-field { display: inline-flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
.mx-live-caption-select { min-block-size: 44px; padding-inline: .75rem; color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: .5rem; }
[dir="rtl"] .mx-live-rail__track { direction: rtl; }
@media (max-width: 640px) { .mx-live-rail__track { grid-auto-columns: minmax(78vw,18rem); } }

@media (max-width: 767px) {
  .global-ad-host {
    inline-size: min(100%, 100vw);
    min-height: max(160px, var(--mediax-ad-leaderboard-reserve, 160px));
  }
}
