/* ============================================
   GLOBAL.CSS - Denis Casian Movie App
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}
/* ── Variables ── */
:root {
  --primary: #8b5cf6;
  --primary-light: #c084fc;
  --primary-dark: #7c3aed;
  --accent: #6366f1;
  --bg: #000000;
  --bg-1: #0a0a0f;
  --bg-2: #0f0f1a;
  --bg-3: #1a1a2e;
  --surface: rgba(255,255,255,0.05);
  --surface-2: rgba(255,255,255,0.08);
  --border: rgba(139,92,246,0.2);
  --border-hover: rgba(192,132,252,0.5);
  --text: #f5f5f7;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --gold: #fbbf24;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-purple: 0 8px 30px rgba(139,92,246,0.3);
  --ease: cubic-bezier(0.16,1,0.3,1);
  --ease-in: cubic-bezier(0.4,0,1,1);
  --ease-out: cubic-bezier(0,0,0.2,1);
  --header-h: 64px;
  --sidebar-w: 280px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: var(--font);
  border: none;
  cursor: pointer;
  background: none;
}

input, select, textarea {
  font-family: var(--font);
}

ul, ol {
  list-style: none;
}

/* ── Selection ── */
::selection {
  background: rgba(139,92,246,0.4);
  color: #fff;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-1);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Elimină scrollbar pentru cast row */
.cast-row::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.cast-row {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* ── Background System ── */
.bg-ambient {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    #1e1b4b 0%,
    #0f0f1a 40%,
    #000000 100%
  );
  z-index: -3;
  pointer-events: none;
}

.bg-ambient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(139,92,246,0.1) 0%,
    transparent 50%
  );
  animation: rotateGradient 30s linear infinite;
}

.mesh-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(at 15% 20%, rgba(139,92,246,0.2) 0px, transparent 50%),
    radial-gradient(at 85% 80%, rgba(192,132,252,0.15) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(99,102,241,0.1) 0px, transparent 60%);
}

.floating-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: floatOrb 20s infinite ease-in-out;
}

.orb:nth-child(1) {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.5), transparent 70%);
  top: -15%;
  left: -5%;
}

.orb:nth-child(2) {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(192,132,252,0.4), transparent 70%);
  top: 40%;
  right: -10%;
  animation-delay: -7s;
}

.orb:nth-child(3) {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.35), transparent 70%);
  bottom: -10%;
  left: 30%;
  animation-delay: -14s;
}

/* ── Keyframes ── */
@keyframes rotateGradient {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%       { transform: translate(30px,-50px) scale(1.05); }
  66%       { transform: translate(-20px,30px) scale(0.95); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes scaleIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Custom Cursor (Desktop only) ── */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%,-50%);
  transition: opacity 0.3s;
  mix-blend-mode: difference;
  opacity: 0;
}

.cursor-outline {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(139,92,246,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%,-50%);
  transition:
    width 0.3s var(--ease),
    height 0.3s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    opacity 0.3s;
  opacity: 0;
}

.cursor-outline.hover {
  width: 60px;
  height: 60px;
  border-color: var(--primary-light);
  background: rgba(139,92,246,0.1);
}

.cursor-outline.clicking {
  transform: translate(-50%,-50%) scale(0.85);
}

@media (min-width: 769px) {
  * { cursor: none !important; }
}

/* ── Header / Navigation ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}

.site-header.scrolled {
  background: rgba(0,0,0,0.95);
  border-bottom-color: var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav Links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.nav-link.active {
  color: var(--primary-light);
  background: rgba(139,92,246,0.15);
}

/* Search Bar in Header */
.header-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.header-search-input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s var(--ease);
  -webkit-user-select: text;
  user-select: text;
}

.header-search-input::placeholder {
  color: var(--text-3);
}

.header-search-input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.header-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.header-search-btn:hover {
  color: var(--primary-light);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Language Switch */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.lang-btn:hover {
  background: rgba(139,92,246,0.2);
  border-color: rgba(139,92,246,0.4);
  color: var(--primary-light);
}

.lang-flag {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
}

/* User Avatar Button */
.user-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color 0.3s;
  flex-shrink: 0;
}

.user-btn:hover {
  border-color: var(--primary-light);
}

.user-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-btn-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.user-btn-placeholder:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-purple);
}

/* Login Button */
.btn-login-header {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  white-space: nowrap;
}

.btn-login-header:hover {
  box-shadow: var(--shadow-purple);
  transform: translateY(-1px);
}

/* Mobile Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.hamburger:hover {
  background: var(--surface);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  z-index: 999;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.3s;
  pointer-events: none;
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(139,92,246,0.15);
  color: var(--primary-light);
}

.mobile-nav-search {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1rem;
  width: 100%;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.mobile-nav-search::placeholder {
  color: var(--text-3);
}

/* ── Page Wrapper ── */
.page-wrapper {
  min-height: 100vh;
  padding-top: var(--header-h);
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Text Utilities ── */
.text-gradient {
  background: linear-gradient(135deg, #fff, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted   { color: var(--text-2); }
.text-faint   { color: var(--text-3); }
.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error   { color: var(--error); }
.text-gold    { color: var(--gold); }

/* ── Section Title ── */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-title .title-line {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, rgba(139,92,246,0.5), transparent);
  border-radius: 2px;
}

.section-title .view-all {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius-full);
  transition: all 0.2s;
  white-space: nowrap;
}

.section-title .view-all:hover {
  background: rgba(139,92,246,0.2);
}

/* ── Loading States ── */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(139,92,246,0.3);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.page-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text-2);
}

.page-loader p {
  font-size: 0.95rem;
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  max-width: 90vw;
  text-align: center;
  pointer-events: all;
  animation: toastIn 0.4s var(--ease) forwards;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.hiding {
  animation: toastOut 0.3s var(--ease) forwards;
}

.toast-default { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.toast-success { background: linear-gradient(135deg, #059669, var(--success)); }
.toast-error   { background: linear-gradient(135deg, #dc2626, var(--error)); }
.toast-warning { background: linear-gradient(135deg, #d97706, var(--warning)); }
.toast-info    { background: linear-gradient(135deg, #2563eb, var(--info)); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(10px) scale(0.95); }
}

/* ── Context Menu ── */
.context-menu {
  position: fixed;
  background: rgba(15,15,30,0.98);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 200px;
  z-index: 100003;
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s var(--ease);
}

.context-menu.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: all;
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}

.ctx-item:hover {
  background: rgba(139,92,246,0.25);
  color: #fff;
}

.ctx-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.ctx-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── User Dropdown ── */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(10,10,20,0.98);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 220px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s var(--ease);
}

.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.user-dropdown-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.user-dropdown-email {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}

.dropdown-item:hover {
  background: rgba(139,92,246,0.2);
  color: #fff;
}

.dropdown-item.danger:hover {
  background: rgba(239,68,68,0.2);
  color: var(--error);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.header-user-wrapper {
  position: relative;
}

/* ── Footer ── */
.site-footer {
  background: rgba(0,0,0,0.8);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-top: 12px;
  line-height: 1.7;
  max-width: 260px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-link {
  font-size: 0.88rem;
  color: var(--text-2);
  transition: color 0.2s;
}

.footer-col-link:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-3);
}

.footer-bottom a {
  color: var(--primary-light);
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 8px;
  line-height: 1.6;
}

/* ── Overlay / Backdrop ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Animations Helper Classes ── */
.animate-fadeIn    { animation: fadeIn 0.5s var(--ease) forwards; }
.animate-fadeInUp  { animation: fadeInUp 0.5s var(--ease) forwards; }
.animate-scaleIn   { animation: scaleIn 0.3s var(--ease) forwards; }
.animate-slideRight { animation: slideInRight 0.4s var(--ease) forwards; }
.animate-slideLeft  { animation: slideInLeft 0.4s var(--ease) forwards; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 960px) {
  .header-nav { display: none; }
  .header-search { display: none; }
  .hamburger { display: flex; }

  .header-inner {
    padding: 0 16px;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }

  .cursor-dot,
  .cursor-outline { display: none !important; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .container { padding: 0 16px; }
  .container-sm { padding: 0 16px; }

  .toast-container {
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .lang-btn span:not(.lang-flag) {
    display: none;
  }

  .logo-text { display: none; }
}

/* ══════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ══════════════════════════════════════════ */

.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: rgba(139, 92, 246, 0.5);
  border-color: rgba(139, 92, 246, 0.7);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.scroll-to-top:active {
  transform: translateY(0) scale(0.95);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* ══════════════════════════════════════════
   SCROLL PROGRESS BAR
   ══════════════════════════════════════════ */

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
}

.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* ══════════════════════════════════════════
   SEARCH AUTOCOMPLETE
   ══════════════════════════════════════════ */

.search-autocomplete {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 350px;
  max-height: 480px;
  overflow-y: auto;
  background: rgba(20, 20, 30, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  z-index: 1000;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}

.search-autocomplete.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-autocomplete::-webkit-scrollbar {
  width: 4px;
}

.search-autocomplete::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.autocomplete-item:first-child {
  border-radius: 16px 16px 0 0;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: rgba(139, 92, 246, 0.15);
}

.autocomplete-thumb {
  flex: 0 0 45px;
  width: 45px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.autocomplete-item[data-type="person"] .autocomplete-thumb {
  height: 45px;
  border-radius: 50%;
}

.autocomplete-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.autocomplete-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-3);
}

.autocomplete-info {
  flex: 1;
  min-width: 0;
}

.autocomplete-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-3);
  margin-top: 3px;
}

.autocomplete-type {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary-light);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.autocomplete-viewall {
  display: block;
  padding: 12px 16px;
  text-align: center;
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s;
  border-radius: 0 0 16px 16px;
}

.autocomplete-viewall:hover {
  background: rgba(139, 92, 246, 0.1);
}

.autocomplete-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .search-autocomplete {
    min-width: unset;
    left: -20px;
    right: -20px;
    border-radius: 12px;
    max-height: 60vh;
  }
}

/* ══════════════════════════════════════════
   CARD HOVER PREVIEW
   ══════════════════════════════════════════ */

.card-preview {
  position: absolute;
  z-index: 9000;
  width: 280px;
  background: rgba(20, 20, 30, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 14px;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.card-preview.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.card-preview-backdrop {
  width: 100%;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.card-preview-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-preview-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.card-preview-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 8px;
}

.card-preview-genres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
}

.card-preview-genre {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  color: var(--primary-light);
}

.card-preview-overview {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  text-align: center;
}

.card-preview-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(124, 58, 237, 0.5));
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  text-decoration: none;
}

.card-preview-play:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.7), rgba(124, 58, 237, 0.7));
  transform: translateY(-1px);
}

@media (max-width: 1024px) {
  .card-preview {
    display: none !important;
  }
}