/* ==========================================
   OTAKU TV - PREMIUM ANIME WEBSITE
   Stylesheet: Main
   ========================================== */

:root {
  --bg-primary: #08060f;
  --bg-secondary: #0f0b1a;
  --bg-tertiary: #16112a;
  --bg-card: #150f26;
  --bg-card-hover: #1c1435;

  --purple-300: #d8b4fe;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;
  --purple-deep: #4c1d95;
  --purple-neon: #c084fc;
  --purple-glow: #8b5cf6;
  --purple-light: #a78bfa;

  --pink-accent: #d946ef;
  --pink-light: #f0abfc;
  --cyan-accent: #22d3ee;
  --gold-accent: #fbbf24;
  --green-success: #22c55e;
  --red-danger: #ef4444;

  --text-primary: #f0ecff;
  --text-secondary: #a8a0c8;
  --text-tertiary: #8079a8;
  --text-muted: #6b5f8a;

  --border-color: rgba(139, 92, 246, 0.12);
  --border-glow: rgba(139, 92, 246, 0.4);

  --gradient-main: linear-gradient(135deg, #7c3aed 0%, #d946ef 100%);
  --gradient-glass: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(217, 70, 239, 0.05));
  --gradient-overlay: linear-gradient(to top, rgba(8, 6, 15, 0.97) 0%, rgba(8, 6, 15, 0.5) 35%, transparent 100%);

  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-glow-md: 0 0 40px rgba(139, 92, 246, 0.25);
  --shadow-purple: 0 4px 25px rgba(124, 58, 237, 0.4);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --transition-base: 0.3s ease;
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--purple-700); color: var(--text-primary); }

html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--purple-700) var(--bg-secondary); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--purple-700), var(--pink-accent)); border-radius: var(--radius-full); }

body {
  font-family: 'Vazirmatn', sans-serif;
  background:
    radial-gradient(ellipse at top right, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at center, rgba(59, 130, 246, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, #08060f 0%, #050410 50%, #03020a 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
img { max-width: 100%; height: auto; display: block; }

/* ═══════════════════════════════════════════ */
/* 🌌 Background Effects - Aurora & Stars */
/* ═══════════════════════════════════════════ */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Make sure all main containers stay above bg-effects */
.navbar, .container, main, footer, .profile-banner, .profile-info-section,
section, .modal, .toast-container, .footer {
  position: relative;
  z-index: 2;
}

/* Aurora Orbs - با حرکت آرام */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 30s ease-in-out infinite;
  will-change: transform;
}
.bg-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.7), rgba(109, 40, 217, 0.3) 50%, transparent 75%);
  top: -10%; right: -10%;
  opacity: 0.85;
}
.bg-orb-2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.6), rgba(190, 24, 93, 0.25) 50%, transparent 75%);
  bottom: -10%; left: -10%;
  opacity: 0.75;
  animation-delay: -10s;
}
.bg-orb-3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.55), transparent 70%);
  top: 35%; left: 25%;
  opacity: 0.6;
  animation-delay: -20s;
}

/* Aurora ribbons - مث شفق قطبی */
.bg-effects::before {
  content: '';
  position: absolute;
  top: 10%;
  left: -10%;
  right: -10%;
  height: 40%;
  background:
    linear-gradient(110deg,
      transparent 0%,
      rgba(139, 92, 246, 0.06) 30%,
      rgba(236, 72, 153, 0.05) 50%,
      rgba(59, 130, 246, 0.04) 70%,
      transparent 100%);
  filter: blur(60px);
  transform: rotate(-8deg);
  animation: auroraDrift 20s ease-in-out infinite alternate;
  will-change: transform;
}

.bg-effects::after {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -10%;
  right: -10%;
  height: 30%;
  background:
    linear-gradient(80deg,
      transparent 0%,
      rgba(236, 72, 153, 0.04) 30%,
      rgba(139, 92, 246, 0.05) 60%,
      transparent 100%);
  filter: blur(60px);
  transform: rotate(6deg);
  animation: auroraDrift 25s ease-in-out infinite alternate-reverse;
  animation-delay: -8s;
  will-change: transform;
}

@keyframes auroraDrift {
  0% { transform: rotate(-8deg) translateX(-5%); opacity: 0.7; }
  50% { opacity: 1; }
  100% { transform: rotate(-12deg) translateX(8%); opacity: 0.6; }
}

/* Grid noise - subtle */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ⭐ Stars - ستاره‌های ریز چشمک‌زن */
.bg-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 25% 15%, white 100%, transparent),
    radial-gradient(1px 1px at 50% 25%, rgba(255,255,255,0.85) 100%, transparent),
    radial-gradient(1.5px 1.5px at 80% 35%, white 100%, transparent),
    radial-gradient(1px 1px at 15% 50%, rgba(255,255,255,0.7) 100%, transparent),
    radial-gradient(1px 1px at 65% 65%, white 100%, transparent),
    radial-gradient(1.5px 1.5px at 35% 80%, rgba(167,139,250,0.9) 100%, transparent),
    radial-gradient(1px 1px at 90% 90%, white 100%, transparent),
    radial-gradient(1px 1px at 5% 30%, rgba(244,114,182,0.8) 100%, transparent),
    radial-gradient(1px 1px at 70% 10%, white 100%, transparent),
    radial-gradient(1px 1px at 45% 55%, rgba(255,255,255,0.6) 100%, transparent),
    radial-gradient(1.5px 1.5px at 95% 45%, rgba(167,139,250,0.7) 100%, transparent),
    radial-gradient(1px 1px at 20% 75%, white 100%, transparent);
  background-size: 100% 100%;
  animation: starsTwinkle 4s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes starsTwinkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

/* 🌠 Shooting Stars - شهاب گاه‌گاه */
.bg-shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(167, 139, 250, 0.8);
  animation: shootingStar 6s linear infinite;
  opacity: 0;
}
.bg-shooting-star::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, white, rgba(167, 139, 250, 0.6), transparent);
  transform: translateX(-78px);
}

.bg-shooting-star:nth-of-type(1) {
  top: 15%; left: 80%;
  animation-delay: 0s;
}
.bg-shooting-star:nth-of-type(2) {
  top: 35%; left: 60%;
  animation-delay: 3s;
}

@keyframes shootingStar {
  0% { transform: translate(0, 0) rotate(15deg); opacity: 0; }
  3% { opacity: 1; }
  20% { transform: translate(-300px, 80px) rotate(15deg); opacity: 0; }
  100% { opacity: 0; }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.08); }
  50% { transform: translate(20px, 30px) scale(0.92); }
  75% { transform: translate(-40px, 15px) scale(1.05); }
}

/* Particles */
.particles-container { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.particle { position: absolute; background: var(--purple-light); border-radius: 50%; animation: particleRise linear infinite; opacity: 0; will-change: transform, opacity; box-shadow: 0 0 6px var(--purple-glow); }
@keyframes particleRise {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.8; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1) rotate(360deg); }
}

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  padding: 0 40px; height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(8, 6, 15, 0.6);
  backdrop-filter: blur(28px) saturate(1.8);
  -webkit-backdrop-filter: blur(28px) saturate(1.8);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-base);
}
.navbar::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-700), transparent);
  transition: width 0.6s ease;
}
.navbar.scrolled {
  background: rgba(8, 6, 15, 0.95);
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
  height: 66px;
}
.navbar.scrolled::before { width: 80%; }

.nav-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; transition: transform var(--transition-base); }
.nav-logo:hover { transform: scale(1.02); }
.nav-logo-img { width: 44px; height: 44px; border-radius: var(--radius-md); object-fit: cover; box-shadow: var(--shadow-glow-md), 0 4px 12px rgba(0,0,0,0.4); border: 2px solid rgba(139,92,246,0.3); transition: all var(--transition-base); }
.nav-logo:hover .nav-logo-img { border-color: var(--purple-400); }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-text-fa { font-size: 19px; font-weight: 900; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.3px; }
.nav-logo-text-en { font-family: 'Audiowide', sans-serif; font-size: 9px; color: var(--text-tertiary); letter-spacing: 2px; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.nav-links li a {
  color: var(--text-secondary); padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; transition: all var(--transition-base);
  position: relative; display: flex; align-items: center; gap: 6px;
}
.nav-links li a::before { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--gradient-main); border-radius: var(--radius-full); transition: width var(--transition-base); }
.nav-links li a:hover, .nav-links li a.active { color: var(--purple-neon); background: rgba(139,92,246,0.08); }
.nav-links li a.active::before { width: 50%; }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-search { position: relative; }
.nav-search input { background: rgba(139,92,246,0.06); border: 1px solid var(--border-color); border-radius: var(--radius-full); padding: 9px 40px 9px 16px; color: var(--text-primary); font-size: 13px; width: 220px; transition: all var(--transition-base); direction: rtl; }
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search input:focus { width: 300px; border-color: var(--purple-700); background: rgba(139,92,246,0.1); box-shadow: 0 0 25px rgba(124,58,237,0.15); }
.nav-search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }

.btn-admin { background: var(--gradient-main); color: #fff; padding: 9px 20px; border-radius: var(--radius-full); font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; box-shadow: var(--shadow-purple); transition: all var(--transition-base); position: relative; overflow: hidden; }
.btn-admin::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%); transform: translateX(-100%); transition: transform 0.6s ease; }
.btn-admin:hover::before { transform: translateX(100%); }
.btn-admin:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124,58,237,0.55); }

.mobile-menu-btn { display: none; width: 40px; height: 40px; background: rgba(139,92,246,0.08); border: 1px solid var(--border-color); border-radius: var(--radius-sm); align-items: center; justify-content: center; color: var(--text-primary); font-size: 18px; }

/* Mobile Nav */
.mobile-nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); z-index: 9998; opacity: 0; visibility: hidden; transition: all var(--transition-base); }
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }
.mobile-nav { position: fixed; top: 0; right: -320px; width: 300px; height: 100vh; background: var(--bg-secondary); border-left: 1px solid var(--border-color); z-index: 9999; padding: 80px 24px 24px; transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto; }
.mobile-nav.open { right: 0; box-shadow: -10px 0 40px rgba(0,0,0,0.5); }
.mobile-nav-close { position: absolute; top: 20px; left: 20px; width: 36px; height: 36px; background: rgba(139,92,246,0.1); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 18px; transition: all var(--transition-base); }
.mobile-nav-close:hover { background: rgba(239,68,68,0.15); color: var(--red-danger); }
.mobile-nav-header { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; }
.mobile-nav-header img { width: 40px; height: 40px; border-radius: var(--radius-md); }
.mobile-nav a { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); padding: 12px 8px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--border-color); transition: all var(--transition-base); }
.mobile-nav a:hover { color: var(--purple-neon); padding-right: 16px; }
.mobile-nav a i { width: 20px; text-align: center; color: var(--purple-400); }

/* Hero */
.hero { position: relative; z-index: 1; padding: 160px 40px 100px; text-align: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 100px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%); pointer-events: none; z-index: -1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(217,70,239,0.06));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--purple-neon);
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}
.hero-badge .live-dot { width: 7px; height: 7px; background: var(--green-success); border-radius: 50%; animation: pulse 2s ease infinite; box-shadow: 0 0 10px var(--green-success); }

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.4); } }

/* ==========================================
   HERO LOGO - ELEGANT & CLEAN
   ========================================== */
.hero-logo-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.8s ease, floatChar 6s ease-in-out 0.8s infinite;
}

.hero-logo-wrapper::before {
  content: '';
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.4) 0%, rgba(124, 58, 237, 0.25) 40%, transparent 70%);
  filter: blur(35px);
  animation: glowPulse 4s ease-in-out infinite;
  z-index: -2;
}

.hero-logo-wrapper::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #7c3aed, #d946ef, #c084fc, #7c3aed);
  animation: rotateBorder 8s linear infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes rotateBorder {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes floatChar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--purple-neon);
  animation: pulseRing 3s ease-out infinite;
  pointer-events: none;
  opacity: 0;
}
.hero-pulse-ring.delay { animation-delay: 1.5s; border-color: var(--pink-accent); }
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

.hero-logo-big {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.5), 0 0 100px rgba(217, 70, 239, 0.3);
  border: 4px solid var(--bg-primary);
  position: relative;
  z-index: 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-logo-wrapper:hover .hero-logo-big { transform: scale(1.04); }

.hero-sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  animation: sparkleAnim 4s ease-in-out infinite;
  filter: drop-shadow(0 0 8px currentColor);
}
.hero-sparkle.s1 { top: 8%; right: -15px; font-size: 22px; color: var(--gold-accent); animation-delay: 0s; }
.hero-sparkle.s2 { bottom: 20%; left: -20px; font-size: 18px; color: var(--pink-light); animation-delay: 1.3s; }
.hero-sparkle.s3 { top: 60%; right: -22px; font-size: 16px; color: var(--cyan-accent); animation-delay: 2.6s; }
@keyframes sparkleAnim {
  0%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

.hero h1 { font-size: clamp(36px, 6vw, 72px); font-weight: 900; line-height: 1.15; margin-bottom: 20px; animation: fadeInUp 0.6s ease 0.1s both; letter-spacing: -1px; }
.gradient-text {
  background: linear-gradient(135deg, #c084fc 0%, #d946ef 50%, #f0abfc 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  animation: gradientShine 4s ease infinite;
  filter: drop-shadow(0 4px 20px rgba(217, 70, 239, 0.4));
}
@keyframes gradientShine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}
.gradient-text::after { content: ''; position: absolute; bottom: -8px; left: 0; right: 0; height: 4px; background: var(--gradient-main); border-radius: var(--radius-full); opacity: 0.5; filter: blur(2px); }

.hero p { font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 40px; line-height: 1.9; animation: fadeInUp 0.6s ease 0.2s both; }

.hero-buttons { display: flex; justify-content: center; gap: 16px; animation: fadeInUp 0.6s ease 0.3s both; flex-wrap: wrap; margin-bottom: 64px; }

.btn-primary { background: var(--gradient-main); color: #fff; padding: 16px 36px; border-radius: var(--radius-full); font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-purple); transition: all var(--transition-base); position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%); transform: translateX(-100%); transition: transform 0.7s ease; }
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(124,58,237,0.55); }

.btn-secondary { background: rgba(139,92,246,0.08); color: var(--purple-neon); border: 1px solid rgba(139,92,246,0.2); padding: 16px 36px; border-radius: var(--radius-full); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: all var(--transition-base); }
.btn-secondary:hover { background: rgba(139,92,246,0.18); border-color: var(--purple-700); transform: translateY(-3px); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  animation: fadeInUp 0.6s ease 0.4s both;
  flex-wrap: wrap;
  padding: 28px 40px;
  background: linear-gradient(135deg, rgba(139,92,246,0.06), rgba(217,70,239,0.03));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 800px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.hero-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
  animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { left: -100%; } 50% { left: 100%; } }
.hero-stat { text-align: center; position: relative; }
.hero-stat:not(:last-child)::after { content: ''; position: absolute; left: -24px; top: 50%; transform: translateY(-50%); width: 1px; height: 40px; background: linear-gradient(to bottom, transparent, var(--border-glow), transparent); }
.hero-stat-value {
  font-size: 38px;
  font-weight: 900;
  background: linear-gradient(135deg, #c084fc 0%, #d946ef 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  filter: drop-shadow(0 2px 10px rgba(217, 70, 239, 0.4));
}
.hero-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 8px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

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

/* Sections */
.section { position: relative; z-index: 1; padding: 80px 40px; max-width: 1500px; margin: 0 auto; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; flex-wrap: wrap; gap: 16px; position: relative; }
.section-header::before {
  content: '';
  position: absolute;
  bottom: -16px;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-main);
  border-radius: var(--radius-full);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}
.section-title { font-size: 30px; font-weight: 800; display: flex; align-items: center; gap: 14px; }
.section-title-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-main);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: var(--shadow-purple), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}
.section-title-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}
.section-title span { display: flex; flex-direction: column; line-height: 1.2; }
.section-title small { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-top: 4px; }
.section-link {
  color: var(--purple-300);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  background: rgba(139, 92, 246, 0.04);
}
.section-link:hover {
  color: var(--purple-neon);
  border-color: var(--purple-700);
  background: rgba(139,92,246,0.12);
  gap: 12px;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
}

/* Featured Slider */
.featured-slider { position: relative; z-index: 1; margin: 0 40px 48px; border-radius: var(--radius-2xl); overflow: hidden; height: 500px; border: 1px solid var(--border-color); box-shadow: var(--shadow-xl); }
.slider-track { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.slider-slide { min-width: 100%; height: 100%; position: relative; display: flex; align-items: center; padding: 60px; overflow: hidden; }
.slide-bg { position: absolute; inset: 0; z-index: 0; }
.slide-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(2px) brightness(0.5); transform: scale(1.1); }
.slide-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(8,6,15,0.95), rgba(8,6,15,0.5) 60%, transparent); }
.slide-content { position: relative; z-index: 1; max-width: 600px; }
.slide-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; background: var(--gradient-main); border-radius: var(--radius-full); font-size: 11px; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.slide-title { font-size: 48px; font-weight: 900; line-height: 1.1; margin-bottom: 16px; text-shadow: 0 4px 20px rgba(0,0,0,0.6); }
.slide-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.slide-meta span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.slide-meta .rating { color: var(--gold-accent); font-weight: 700; }
.slide-description { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-buttons { display: flex; gap: 12px; }
.slider-controls { position: absolute; bottom: 30px; right: 30px; display: flex; gap: 8px; z-index: 2; }
.slider-arrow { width: 48px; height: 48px; background: rgba(8,6,15,0.7); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-primary); font-size: 16px; transition: all var(--transition-base); }
.slider-arrow:hover { background: var(--purple-700); border-color: var(--purple-500); color: #fff; transform: scale(1.1); }
.slider-dots { position: absolute; bottom: 30px; left: 30px; display: flex; gap: 8px; z-index: 2; }
.slider-dot { width: 30px; height: 4px; background: rgba(255,255,255,0.3); border-radius: var(--radius-full); cursor: pointer; transition: all var(--transition-base); }
.slider-dot.active { background: var(--gradient-main); width: 50px; }

/* Anime Grid */
.anime-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px; }

.anime-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  isolation: isolate;
}
.anime-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(217,70,239,0.08));
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 1;
  pointer-events: none;
}
.anime-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(192, 132, 252, 0.4), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 2;
}
.anime-card:hover {
  transform: translateY(-12px);
  border-color: var(--border-glow);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.35), 0 20px 60px rgba(0, 0, 0, 0.6);
}
.anime-card:hover::before { opacity: 1; }
.anime-card:hover::after { opacity: 1; }

.anime-card-img { position: relative; aspect-ratio: 3 / 4.3; overflow: hidden; background: var(--bg-secondary); }
.anime-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.anime-card:hover .anime-card-img img { transform: scale(1.12); }
.anime-card-overlay { position: absolute; inset: 0; background: var(--gradient-overlay); display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; opacity: 0; transition: opacity var(--transition-base); z-index: 2; }
.anime-card:hover .anime-card-overlay { opacity: 1; }
.anime-card-overlay-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.anime-card-overlay-tag { padding: 3px 10px; background: rgba(139,92,246,0.3); border: 1px solid rgba(139,92,246,0.4); backdrop-filter: blur(10px); border-radius: var(--radius-xs); font-size: 10px; font-weight: 600; color: #f3e8ff; }
.anime-card-overlay-synopsis { font-size: 12px; color: var(--text-secondary); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.anime-card-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.7); width: 56px; height: 56px; background: var(--gradient-main); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; opacity: 0; transition: all var(--transition-bounce); box-shadow: 0 0 40px rgba(124,58,237,0.6); z-index: 3; }
.anime-card:hover .anime-card-play-btn { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.anime-card-badges { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.anime-card-badge { padding: 4px 10px; border-radius: var(--radius-xs); font-size: 10px; font-weight: 700; white-space: nowrap; backdrop-filter: blur(10px); }
.badge-sub { background: rgba(124,58,237,0.9); color: #fff; }
.badge-dub { background: rgba(217,70,239,0.9); color: #fff; }
.badge-new { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; animation: badgeShine 2s ease-in-out infinite; }
.badge-top { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
@keyframes badgeShine { 0%, 100% { box-shadow: 0 0 10px rgba(34,197,94,0.5); } 50% { box-shadow: 0 0 20px rgba(34,197,94,0.8); } }
.anime-card-rating { position: absolute; top: 12px; left: 12px; background: rgba(8,6,15,0.85); backdrop-filter: blur(10px); padding: 4px 10px; border-radius: var(--radius-xs); font-size: 11px; font-weight: 700; color: var(--gold-accent); display: flex; align-items: center; gap: 4px; z-index: 4; }
.anime-card-info { padding: 16px; position: relative; z-index: 2; }
.anime-card-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--transition-base); }
.anime-card:hover .anime-card-title { color: var(--purple-neon); }
.anime-card-subtitle { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.anime-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-muted); }
.anime-card-meta span { display: flex; align-items: center; gap: 4px; font-weight: 600; }

/* Manga Section Specific */
.manga-section .section-title-icon {
  box-shadow: 0 4px 25px rgba(217, 70, 239, 0.4);
}

/* Manga Card */
.manga-card { position: relative; }
.manga-card::before { background: linear-gradient(135deg, rgba(217, 70, 239, 0.15), rgba(236, 72, 153, 0.08)); }
.manga-card:hover {
  border-color: rgba(217, 70, 239, 0.4);
  box-shadow: 0 0 50px rgba(217, 70, 239, 0.3), 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Badge مانگا */
.badge-manga {
  background: linear-gradient(135deg, #ec4899, #d946ef);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px !important;
  letter-spacing: 0.3px;
}

.badge-manga i {
  font-size: 8px;
}

/* دکمه مطالعه مانگا */
.manga-read-btn {
  background: linear-gradient(135deg, #ec4899, #d946ef) !important;
  box-shadow: 0 0 40px rgba(217, 70, 239, 0.6) !important;
}
.manga-read-btn::before {
  background: linear-gradient(135deg, #ec4899, #d946ef) !important;
}

/* Genre Grid */
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.genre-card {
  padding: 28px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.genre-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glass);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.genre-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease;
}
.genre-card:hover {
  transform: translateY(-6px);
  border-color: var(--purple-700);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3), 0 15px 30px rgba(0, 0, 0, 0.3);
}
.genre-card:hover::before { opacity: 1; }
.genre-card:hover::after { transform: scaleX(1); }

.genre-card-icon {
  width: 60px;
  height: 60px;
  background: rgba(139,92,246,0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--purple-400);
  font-size: 26px;
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
}
.genre-card:hover .genre-card-icon {
  background: var(--gradient-main);
  border-color: transparent;
  color: #fff !important;
  transform: scale(1.1) rotate(8deg);
  box-shadow: var(--shadow-purple);
}
.genre-card-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1; }
.genre-card-count { font-size: 11px; color: var(--text-muted); font-weight: 500; position: relative; z-index: 1; }

/* Schedule */
.schedule-list { display: flex; flex-direction: column; gap: 12px; }
.schedule-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--bg-card), rgba(28, 20, 53, 0.5));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.schedule-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-main);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--transition-base);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}
.schedule-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glass);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.schedule-item:hover {
  border-color: var(--border-glow);
  transform: translateX(8px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}
.schedule-item:hover::before { transform: scaleY(1); }
.schedule-item:hover::after { opacity: 1; }
.schedule-item > * { position: relative; z-index: 1; }
.schedule-day { min-width: 60px; text-align: center; }
.schedule-day-name { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.schedule-day-num { font-size: 26px; font-weight: 900; background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.schedule-divider { width: 3px; height: 50px; background: var(--gradient-main); border-radius: var(--radius-full); flex-shrink: 0; }
.schedule-thumb { width: 60px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; border: 1px solid var(--border-color); }
.schedule-thumb img { width: 100%; height: 100%; object-fit: cover; }
.schedule-info { flex: 1; min-width: 0; }
.schedule-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-info p { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 12px; }
.schedule-info p span { display: flex; align-items: center; gap: 4px; }
.schedule-time { text-align: center; flex-shrink: 0; }
.schedule-time-value { font-size: 18px; font-weight: 800; color: var(--purple-neon); direction: ltr; }
.schedule-time-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* Filters */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-card), rgba(28, 20, 53, 0.6));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-label { font-size: 12px; color: var(--text-muted); font-weight: 700; letter-spacing: 0.5px; }
.filter-select {
  padding: 9px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-base);
  font-weight: 500;
}
.filter-select:hover, .filter-select:focus {
  border-color: var(--purple-700);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}
.filter-clear {
  padding: 9px 16px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-md);
  color: var(--red-danger);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
}
.filter-clear:hover { background: rgba(239,68,68,0.2); transform: translateY(-1px); }

/* Footer */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border-color); padding: 64px 40px 32px; background: rgba(8,6,15,0.6); margin-top: 64px; }
.footer-content { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .footer-logo { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand .footer-logo img { width: 44px; height: 44px; border-radius: var(--radius-md); border: 2px solid rgba(139,92,246,0.3); }
.footer-brand .footer-logo .nav-logo-text-fa { font-size: 20px; }
.footer-brand p { color: var(--text-tertiary); font-size: 13.5px; line-height: 1.9; margin-bottom: 16px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 40px; height: 40px; background: rgba(139,92,246,0.08); border: 1px solid var(--border-color); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 15px; transition: all var(--transition-base); }
.footer-social a:hover { background: var(--gradient-main); border-color: transparent; color: #fff; transform: translateY(-3px); box-shadow: var(--shadow-purple); }
.footer-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; position: relative; padding-bottom: 8px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; right: 0; width: 30px; height: 2px; background: var(--gradient-main); border-radius: var(--radius-full); }
.footer-col a { display: flex; align-items: center; gap: 8px; color: var(--text-tertiary); font-size: 13px; padding: 8px 0; transition: all var(--transition-base); }
.footer-col a:hover { color: var(--purple-neon); padding-right: 8px; }
.footer-col a i { font-size: 9px; opacity: 0.5; transition: all var(--transition-base); }
.footer-col a:hover i { opacity: 1; color: var(--purple-400); }
.footer-bottom { max-width: 1500px; margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; gap: 12px; }

/* Scroll Top */
.scroll-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: var(--gradient-main); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; cursor: pointer; box-shadow: var(--shadow-purple); z-index: 300; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all var(--transition-base); }
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(124,58,237,0.5); }

/* Empty State */
.empty-state { text-align: center; padding: 64px 16px; color: var(--text-muted); }
.empty-state i { font-size: 60px; color: var(--purple-700); opacity: 0.5; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ==========================================
   BOTTOM NAVIGATION - MOBILE
   ========================================== */
.bottom-nav { display: none; }

@media (max-width: 992px) {
  /* Bottom Nav Bar */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(8, 6, 15, 0.92);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    z-index: 250;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    flex: 1;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    min-height: 50px;
    justify-content: center;
    position: relative;
  }

  .bottom-nav-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .bottom-nav-icon i {
    font-size: 17px;
    transition: all 0.2s ease;
  }

  .bottom-nav-item:active {
    transform: scale(0.92);
  }

  .bottom-nav-item.active {
    color: var(--purple-neon);
  }

  .bottom-nav-item.active .bottom-nav-icon {
    background: var(--gradient-main);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
    transform: translateY(-4px);
  }

  .bottom-nav-item.active .bottom-nav-icon i {
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  }

  .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--gradient-main);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 0 8px var(--purple-neon);
  }

  /* Add padding to body to account for bottom nav */
  body { padding-bottom: 70px; }

  /* Adjust scroll-top button position */
  .scroll-top { bottom: 80px; }
}

/* ==========================================
   MOBILE-SPECIFIC IMPROVEMENTS
   ========================================== */
@media (max-width: 992px) {
  /* بهبود کلی فاصله */
  body {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
  }

  /* Smoother scrolling */
  html { scroll-behavior: smooth; }

  /* Better tap targets */
  a, button { -webkit-tap-highlight-color: rgba(139, 92, 246, 0.15); }
}

@media (max-width: 600px) {
  /* بزرگتر کردن دکمه‌های اصلی */
  .btn-primary, .btn-secondary {
    min-height: 46px;
    padding: 12px 24px;
    font-size: 13px;
  }

  /* جستجو روی موبایل */
  .nav-search {
    display: flex !important;
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    z-index: 200;
    transform: translateY(-200%);
    transition: transform 0.3s ease;
  }
  .nav-search.show { transform: translateY(0); }
  .nav-search input { width: 100%; padding: 12px 44px 12px 16px; font-size: 14px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); background: rgba(8, 6, 15, 0.95); backdrop-filter: blur(20px); }
  .nav-search-icon { right: 16px; }

  /* بهبود ظرافت کارت‌های انیمه روی موبایل */
  .anime-card {
    border-radius: 16px;
  }
  .anime-card:active {
    transform: scale(0.97);
    transition: transform 0.1s;
  }

  /* بهبود حس لمسی برای کارت‌ها */
  .anime-card-info {
    padding: 14px 12px 16px;
    background: linear-gradient(180deg, transparent, rgba(8, 6, 15, 0.4));
  }

  /* تیتر کارت بزرگ‌تر و خواناتر */
  .anime-card-title {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 6px;
  }

  /* Genre cards بزرگ‌تر و راحت‌تر */
  .genre-card {
    padding: 22px 14px;
  }
  .genre-card-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  /* بهبود hero روی موبایل */
  .hero {
    padding-top: 80px;
  }

  /* فاصله سکشن‌ها کمتر */
  .section {
    padding: 30px 14px;
  }

  /* عنوان بخش‌ها واضح‌تر */
  .section-title {
    font-size: 17px;
  }
  .section-title-icon {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .section-link {
    font-size: 11px;
    padding: 6px 12px;
  }
  .section-link i { font-size: 9px; }

  /* بهبود اسلایدر اصلی موبایل */
  .featured-slider { height: 360px; border-radius: 16px; margin: 0 12px 24px; }
  .slide-content { max-width: 100%; padding-bottom: 12px; }
  .slide-title { font-size: 20px; line-height: 1.2; }
  .slide-description { font-size: 12px; -webkit-line-clamp: 2; }

  /* بهبود فیلترها */
  .filters-bar {
    margin: 0 -2px 18px;
    padding: 14px;
    border-radius: 14px;
  }

  /* بهبود برنامه پخش */
  .schedule-item {
    border-radius: 14px;
    padding: 14px;
  }

  /* پایین صفحه (footer) ساده‌تر روی موبایل */
  .footer {
    padding-bottom: 84px;
    margin-bottom: 0;
  }

  /* Hero stats قشنگ‌تر */
  .hero-stats {
    margin: 0 8px;
    padding: 18px 16px;
    border-radius: 18px;
  }

  /* بزرگ‌تر کردن تمام دکمه‌های لمسی */
  .anime-card-play-btn {
    width: 50px;
    height: 50px;
    font-size: 16px;
  }

  /* اضافه کردن hint برای اسکرول افقی در جداول و... */

  /* Toast بهتر روی موبایل */
  .toast {
    bottom: 90px;
    padding: 12px 22px;
    font-size: 13px;
    border-radius: 50px;
  }

  /* Mobile menu بهتر */
  .mobile-nav {
    width: 85%;
    max-width: 320px;
    border-radius: 0;
    padding: 24px 16px;
  }

  /* Hide regular nav links on mobile - bottom nav replaces them */
  .nav-links { display: none !important; }
}

/* بهبود برای صفحات کوچک (380px) */
@media (max-width: 380px) {
  .bottom-nav-item span { font-size: 9.5px; }
  .bottom-nav-icon { width: 32px; height: 32px; }
  .bottom-nav-icon i { font-size: 15px; }
}

/* ==========================================
   TABLET & MOBILE NAVBAR (≤992px)
   روی این سایز navbar بالا فقط لوگو داره
   ========================================== */
@media (max-width: 992px) {
  .navbar { padding: 0 16px; height: 64px; }
  .nav-links, .nav-search { display: none; }
  .mobile-menu-btn { display: flex; width: 42px; height: 42px; }
  .nav-logo-img { width: 38px; height: 38px; }
  .nav-logo-text-fa { font-size: 16px; }
  .nav-logo-text-en { font-size: 8px; }

  .hero { padding: 100px 20px 60px; }
  .hero-logo-wrapper { width: 200px; height: 200px; margin-bottom: 28px; }
  .hero-badge { padding: 7px 16px; font-size: 12px; margin-bottom: 20px; }

  .section { padding: 48px 16px; }
  .featured-slider { margin: 0 16px 32px; height: 380px; }
  .slide-title { font-size: 28px; }
  .slider-slide { padding: 32px 24px; }

  .footer { padding: 48px 20px 24px; }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 24px; }
  .anime-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
}

/* ==========================================
   RESPONSIVE - MOBILE (Optimized & Beautiful)
   ========================================== */
@media (max-width: 600px) {
  /* Navbar Mobile */
  .navbar { padding: 0 14px; height: 60px; }
  .navbar.scrolled { height: 56px; }
  .nav-logo { gap: 8px; }
  .nav-logo-img { width: 36px; height: 36px; border-width: 1.5px; }
  .nav-logo-text-fa { font-size: 15px; }
  .nav-logo-text-en { font-size: 7px; letter-spacing: 1.5px; }
  .mobile-menu-btn { width: 40px; height: 40px; font-size: 16px; }

  /* Mobile Nav Drawer */
  .mobile-nav { width: 280px; padding: 70px 20px 20px; }
  .mobile-nav a { padding: 14px 12px; font-size: 14px; }

  /* Hero */
  .hero { padding: 90px 16px 50px; min-height: auto; }
  .hero-logo-wrapper { width: 170px; height: 170px; margin-bottom: 24px; }
  .hero-badge { padding: 6px 14px; font-size: 11px; gap: 6px; }
  .hero-badge .live-dot { width: 6px; height: 6px; }

  .hero h1 { font-size: 28px; line-height: 1.25; margin-bottom: 14px; letter-spacing: 0; }
  .hero p { font-size: 13px; line-height: 1.8; margin-bottom: 24px; padding: 0 8px; }

  /* Hero Buttons */
  .hero-buttons { gap: 10px; margin-bottom: 36px; }
  .btn-primary, .btn-secondary { padding: 13px 24px; font-size: 13px; flex: 1; min-width: 130px; justify-content: center; }
  .btn-primary { box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4); }

  /* Hero Stats - 2x2 Grid Pattern */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    padding: 20px 18px;
    border-radius: var(--radius-lg);
  }
  .hero-stat-value { font-size: 26px; }
  .hero-stat-label { font-size: 10.5px; margin-top: 4px; letter-spacing: 0.5px; }
  .hero-stat:not(:last-child)::after { display: none; }
  .hero-stat:nth-child(odd) { border-left: 1px solid var(--border-color); padding-left: 12px; }
  .hero-stat:nth-child(even) { padding-right: 12px; }
  .hero-stats::before { animation: none; display: none; }

  /* Sparkles - reduce on mobile */
  .hero-sparkle.s1 { font-size: 18px; right: -8px; }
  .hero-sparkle.s2 { font-size: 16px; left: -10px; }
  .hero-sparkle.s3 { font-size: 14px; right: -12px; }

  /* Section Headers */
  .section { padding: 36px 14px; }
  .section-header { margin-bottom: 24px; gap: 10px; }
  .section-title { font-size: 18px; gap: 10px; flex: 1; min-width: 0; }
  .section-title-icon { width: 38px; height: 38px; font-size: 14px; flex-shrink: 0; }
  .section-title small { font-size: 11px; margin-top: 2px; }
  .section-link { font-size: 11.5px; padding: 7px 14px; }
  .section-header::before { width: 50px; height: 2px; }

  /* Featured Slider - Vertical Mobile Style */
  .featured-slider { margin: 0 14px 28px; height: 380px; border-radius: var(--radius-lg); }
  .slider-slide { padding: 24px 20px; align-items: flex-end; }
  .slide-bg img { filter: blur(1px) brightness(0.4); }
  .slide-bg::after { background: linear-gradient(to top, rgba(8,6,15,0.97) 0%, rgba(8,6,15,0.6) 50%, transparent 100%); }
  .slide-content { max-width: 100%; }
  .slide-badge { font-size: 9px; padding: 4px 10px; margin-bottom: 10px; }
  .slide-title { font-size: 22px; line-height: 1.15; margin-bottom: 10px; }
  .slide-meta { gap: 10px; margin-bottom: 10px; }
  .slide-meta span { font-size: 11.5px; gap: 4px; }
  .slide-description { font-size: 12.5px; line-height: 1.7; margin-bottom: 16px; -webkit-line-clamp: 2; }
  .slide-buttons { gap: 8px; }
  .slide-buttons .btn-primary, .slide-buttons .btn-secondary { padding: 10px 18px; font-size: 12px; flex: 1; }

  /* Slider controls - smaller and better positioned */
  .slider-controls { bottom: auto; top: 16px; right: 16px; gap: 6px; }
  .slider-arrow { width: 36px; height: 36px; font-size: 12px; background: rgba(8,6,15,0.85); }
  .slider-dots { bottom: 16px; left: 50%; transform: translateX(-50%); right: auto; }
  .slider-dot { width: 24px; height: 3px; }
  .slider-dot.active { width: 36px; }

  /* Anime Cards - Mobile Optimized */
  .anime-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .anime-card { border-radius: 14px; }
  .anime-card-info { padding: 12px 10px; }
  .anime-card-title { font-size: 12.5px; margin-bottom: 4px; }
  .anime-card-subtitle { font-size: 10px; margin-bottom: 6px; }
  .anime-card-meta { font-size: 10.5px; gap: 4px; flex-wrap: wrap; }
  .anime-card-meta span { gap: 3px; font-size: 10.5px; }
  .anime-card-badges { top: 8px; right: 8px; }
  .anime-card-badge { padding: 3px 7px; font-size: 9px; }
  .anime-card-rating { top: 8px; left: 8px; padding: 3px 7px; font-size: 10px; }
  .anime-card-play-btn { width: 44px; height: 44px; font-size: 14px; }
  /* Show overlay on tap (mobile doesn't have hover) */
  .anime-card-overlay { display: none; }

  /* Genre Cards - Mobile */
  .genre-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .genre-card { padding: 18px 12px; border-radius: 14px; }
  .genre-card-icon { width: 48px; height: 48px; font-size: 20px; margin-bottom: 10px; }
  .genre-card-name { font-size: 12.5px; }
  .genre-card-count { font-size: 10px; }

  /* Schedule - Mobile Optimized */
  .schedule-list { gap: 10px; }
  .schedule-item { padding: 12px 14px; gap: 12px; border-radius: 14px; }
  .schedule-item:hover { transform: none; }
  .schedule-day { min-width: 44px; }
  .schedule-day-name { font-size: 9px; }
  .schedule-day-num { font-size: 22px; }
  .schedule-divider { display: none; }
  .schedule-thumb { width: 48px; height: 48px; border-radius: 8px; }
  .schedule-info h4 { font-size: 13px; margin-bottom: 2px; }
  .schedule-info p { font-size: 11px; gap: 8px; }
  .schedule-time-value { font-size: 14px; font-weight: 700; }
  .schedule-time-label { font-size: 8.5px; }

  /* Filters - Mobile */
  .filters-bar { padding: 12px; gap: 8px; flex-direction: column; align-items: stretch; }
  .filter-group { width: 100%; justify-content: space-between; }
  .filter-label { font-size: 11px; min-width: 60px; }
  .filter-select { flex: 1; padding: 9px 12px; font-size: 12px; }
  .filter-clear { width: 100%; padding: 10px; font-size: 12px; text-align: center; }

  /* Footer - Mobile */
  .footer { padding: 40px 16px 20px; margin-top: 40px; }
  .footer-content { grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
  .footer-brand .footer-logo img { width: 40px; height: 40px; }
  .footer-brand .footer-logo .nav-logo-text-fa { font-size: 18px; }
  .footer-brand p { font-size: 12.5px; line-height: 1.8; }
  .footer-social { justify-content: flex-start; gap: 8px; }
  .footer-social a { width: 38px; height: 38px; font-size: 14px; }
  .footer-col h4 { font-size: 14px; margin-bottom: 12px; }
  .footer-col a { font-size: 12.5px; padding: 6px 0; }
  .footer-bottom { font-size: 11.5px; flex-direction: column; gap: 8px; text-align: center; padding-top: 18px; }

  /* Scroll Top - Mobile */
  .scroll-top { width: 44px; height: 44px; font-size: 16px; bottom: 20px; right: 20px; }
}

/* ==========================================
   RESPONSIVE - SMALL MOBILE
   ========================================== */
@media (max-width: 380px) {
  .hero h1 { font-size: 24px; }
  .hero-logo-wrapper { width: 150px; height: 150px; }
  .hero-stats { padding: 16px 12px; }
  .hero-stat-value { font-size: 24px; }
  .anime-grid { grid-template-columns: 1fr; gap: 14px; }
  .genre-grid { grid-template-columns: 1fr 1fr; }
  .featured-slider { height: 360px; }
  .slide-title { font-size: 20px; }
}
