/* ==========================================================================
   1. FONTS & RESET
   ========================================================================== */
@font-face { font-family: 'IRANYekanX'; src: url('/assets/fonts/IRANYekanXFaNum-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap;}
@font-face { font-family: 'IRANYekanX'; src: url('/assets/fonts/IRANYekanXFaNum-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap;}
@font-face { font-family: 'IRANYekanX'; src: url('/assets/fonts/IRANYekanXFaNum-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap;}
@font-face { font-family: 'IRANYekanX'; src: url('/assets/fonts/IRANYekanXFaNum-Black.woff') format('woff'); font-weight: 900; font-style: normal; font-display: swap;}

:root {
  --color-base: #06060A; 
  --color-surface: #12121A; 
  --color-surface-light: #1A1A24;
  --color-accent: #8E1638; 
  --color-accent-hover: #b41c49;
  --color-accent-glow: rgba(142, 22, 56, 0.4);
  --color-text: #F3E4E3;
  --color-text-muted: #8E8E9B;
  --glass-bg: rgba(18, 18, 26, 0.5);
  --glass-border: rgba(255, 255, 255, 0.08);
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* { 
  margin: 0; padding: 0; box-sizing: border-box;
  font-family: 'IRANYekanX', sans-serif !important; /* اعمال اجباری فونت شما برای همه چیز از جمله اعداد */
}

html { scroll-behavior: smooth; }
body {
  background-color: var(--color-base);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at top right, rgba(142, 22, 56, 0.05), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(142, 22, 56, 0.05), transparent 40%);
  background-attachment: fixed;
  line-height: 1.6;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; opacity: 0.03; pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-base); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ==========================================================================
   2. TYPOGRAPHY & UTILITIES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; }
a { text-decoration: none; color: inherit; }

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 900;
  margin-bottom: 50px; text-align: right;
  display: flex; align-items: center; gap: 15px;
}
.section-title::before {
  content: ''; width: 6px; height: 35px; border-radius: 10px;
  background: linear-gradient(to bottom, var(--color-accent), #ff2a5f);
  box-shadow: 0 0 20px var(--color-accent-glow);
}

/* ==========================================================================
   3. BUTTONS (قابل استفاده در تمام صفحات)
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; font-weight: 700; font-size: 1rem;
  cursor: pointer; border: none; transition: var(--transition);
  text-align: center;
}
.btn-outline {
  background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
  color: #fff; backdrop-filter: blur(10px);
}
.btn-outline:hover { background: #fff; color: var(--color-base); }

.btn-glow {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  color: #fff; box-shadow: 0 10px 30px var(--color-accent-glow);
  position: relative; overflow: hidden;
}
.btn-glow::after {
  content: ""; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
  transform: skewX(-20deg); transition: 0.5s;
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 15px 40px rgba(142, 22, 56, 0.6); color:#fff;}
.btn-glow:hover::after { left: 150%; }

.btn-large { padding: 16px 40px; font-size: 1.15rem; }
.btn-block { width: 100%; } /* برای فرم‌های لاگین */

/* ==========================================================================
   4. FORMS & AUTH (برای صفحات ورود و ثبت‌نام آینده)
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; position: relative; z-index: 1;
}
.auth-card {
  background: rgba(18, 18, 26, 0.7); backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border); border-radius: 24px;
  padding: 50px 40px; width: 100%; max-width: 450px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.auth-card .logo { text-align: center; margin-bottom: 30px; }
.auth-card .logo img { height: 50px; }
.auth-card h2 { text-align: center; margin-bottom: 30px; color: #fff; }

.form-group { margin-bottom: 25px; position: relative; }
.form-label { display: block; margin-bottom: 10px; color: var(--color-text-muted); font-size: 0.95rem; }
.form-control {
  width: 100%; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; padding: 15px 20px; border-radius: 12px; font-size: 1rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none; border-color: var(--color-accent); background: rgba(0,0,0,0.4);
  box-shadow: 0 0 15px rgba(142, 22, 56, 0.3);
}

/* ==========================================================================
   5. NAVBAR & MOBILE MENU (Drawer)
   ========================================================================== */
.nav-ultra {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  padding: 25px 5%; display: flex; justify-content: space-between; align-items: center;
  transition: var(--transition);
}
.nav-ultra.scrolled {
  padding: 15px 5%; background: rgba(6, 6, 10, 0.9); backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--glass-border);
}
.nav-brand img { height: 40px; transition: var(--transition); filter: drop-shadow(0 0 5px rgba(255,255,255,0.1)); }
.nav-links { display: flex; gap: 30px; align-items: center; list-style: none; margin: 0; }
.nav-links a { color: var(--color-text-muted); font-weight: 500; font-size: 1.05rem; transition: var(--transition); }
.nav-links a:hover { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.nav-actions { display: flex; gap: 15px; align-items: center; }

/* دکمه همبرگری */
.menu-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; }

/* Backdrop منوی موبایل */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
  z-index: 1001; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.drawer-backdrop.active { opacity: 1; pointer-events: all; }

/* Drawer منوی موبایل */
.mobile-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 280px;
  background: var(--color-surface); z-index: 1002;
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex; flex-direction: column; padding: 30px 20px;
  border-left: 1px solid var(--glass-border); box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.mobile-drawer.active { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.drawer-header img { height: 35px; }
.close-drawer { background: none; border: none; color: #fff; padding: 5px; cursor: pointer; }
.drawer-links { list-style: none; display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.drawer-links a { color: #fff; font-size: 1.2rem; font-weight: 500; display: block; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px;}
.drawer-actions { display: flex; flex-direction: column; gap: 15px; margin-top: auto; }

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 0 5%;
}
.hero-slider { position: absolute; inset: 0; z-index: 1; }
.slide-item {
  position: absolute; inset: 0; background-size: cover; background-position: top center;
  opacity: 0; transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05);
}
.slide-item.active { opacity: 1; transform: scale(1); animation: breathe 15s linear infinite alternate; }
@keyframes breathe { 100% { transform: scale(1.1); } }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, rgba(6,6,10,0.4) 0%, transparent 40%, var(--color-base) 100%),
              radial-gradient(circle at center, transparent 0%, rgba(6,6,10,0.6) 100%);
}
.hero-content {
  position: relative; z-index: 3; text-align: center; max-width: 1000px;
  margin-top: 50px; opacity: 0; transform: translateY(40px);
  animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.5s;
}
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 6rem); font-weight: 900; line-height: 1.1; margin-bottom: 25px;
  background: linear-gradient(to bottom, #ffffff 30%, #a0a0a0 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.8));
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.4rem); color: #E0E0E0; font-weight: 400;
  margin-bottom: 40px; line-height: 1.8; text-shadow: 0 4px 10px rgba(0,0,0,0.5);
  max-width: 800px; margin-left: auto; margin-right: auto;
}
.hero-actions { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   7. STATS & FEATURES
   ========================================================================== */
.stats-section { position: relative; z-index: 10; margin-top: -60px; padding: 0 5%; }
.stats-container {
  background: rgba(18, 18, 26, 0.6); backdrop-filter: blur(25px);
  border: 1px solid var(--glass-border); border-radius: 24px;
  padding: 40px; box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.stat-box { text-align: center; border-left: 1px solid rgba(255,255,255,0.05); padding: 15px; }
.stat-box:last-child { border-left: none; }
.stat-box svg { width: 42px; height: 42px; color: var(--color-accent); margin-bottom: 20px; filter: drop-shadow(0 0 10px var(--color-accent-glow)); }
.stat-value { font-size: clamp(2rem, 3vw, 3.5rem); font-weight: 900; color: #fff; margin-bottom: 5px; line-height: 1;}
.stat-label { font-size: 1rem; color: var(--color-text-muted); font-weight: 500; }

.section-pad { padding: 120px 5%; position: relative; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 35px; }
.feature-card {
  background: linear-gradient(180deg, var(--color-surface) 0%, rgba(18,18,26,0.3) 100%);
  border: 1px solid var(--glass-border); border-radius: 24px; padding: 50px 40px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 24px; padding: 2px;
  background: linear-gradient(135deg, rgba(142,22,56,0.5), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
  opacity: 0; transition: var(--transition);
}
.feature-card:hover { transform: translateY(-12px); background: var(--color-surface); box-shadow: 0 25px 50px rgba(0,0,0,0.6); }
.feature-card:hover::after { opacity: 1; }
.f-icon {
  width: 70px; height: 70px; border-radius: 20px; background: rgba(142, 22, 56, 0.1);
  display: flex; align-items: center; justify-content: center; margin-bottom: 30px;
  color: var(--color-accent); border: 1px solid rgba(142, 22, 56, 0.2);
}
.f-icon svg { width: 32px; height: 32px; }
.feature-card h3 { font-size: 1.6rem; color: #fff; margin-bottom: 15px; }
.feature-card p { color: var(--color-text-muted); font-size: 1.05rem; line-height: 1.8; }

/* ==========================================================================
   8. MOVIE GRID
   ========================================================================== */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }
.m-card {
  position: relative; border-radius: 18px; overflow: hidden; background: #000;
  aspect-ratio: 2 / 3; cursor: pointer; box-shadow: 0 15px 30px rgba(0,0,0,0.4);
  isolation: isolate;
}
.m-poster { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s; }
.m-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(6,6,10,0.95) 0%, rgba(6,6,10,0.2) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 25px 20px;
  opacity: 0; transform: translateY(15px); transition: var(--transition);
}
.m-card:hover .m-poster { transform: scale(1.1); filter: brightness(0.6) blur(2px); }
.m-card:hover .m-overlay { opacity: 1; transform: translateY(0); }
.m-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
  width: 65px; height: 65px; border-radius: 50%; background: var(--color-accent);
  display: flex; align-items: center; justify-content: center; z-index: 3;
  opacity: 0; transition: var(--transition); box-shadow: 0 0 0 0 rgba(142, 22, 56, 0.7);
}
.m-card:hover .m-play { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 15px rgba(142, 22, 56, 0); } 100% { box-shadow: 0 0 0 0 rgba(142, 22, 56, 0); } }
.m-play svg { width: 28px; height: 28px; fill: #fff; margin-left: 5px; }

.m-title { font-size: 1.3rem; font-weight: 900; color: #fff; margin-bottom: 8px; text-shadow: 0 2px 5px rgba(0,0,0,0.8); }
.m-meta { font-size: 0.9rem; color: #ccc; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;}
.m-badges { display: flex; gap: 10px; align-items: center; }
.badge { padding: 5px 10px; border-radius: 6px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.5px; }
.badge-imdb { background: #F5C518; color: #000; display:flex; align-items:center; gap:4px; }
.badge-time { background: rgba(255,255,255,0.15); color: #fff; backdrop-filter: blur(5px); }

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.mega-footer {
  background: #09090E; border-top: 1px solid rgba(255,255,255,0.05);
  padding: 80px 5% 30px; position: relative; z-index: 10;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 50px; margin-bottom: 60px; }
.f-brand img { height: 50px; margin-bottom: 25px; }
.f-brand p { color: var(--color-text-muted); font-size: 1rem; line-height: 1.8; margin-bottom: 20px; max-width: 350px; }
.f-title { color: #fff; font-size: 1.2rem; font-weight: 700; margin-bottom: 25px; position: relative; display: inline-block;}
.f-title::after { content: ''; position: absolute; right: 0; bottom: -8px; width: 30px; height: 2px; background: var(--color-accent); }
.f-links { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.f-links a { color: var(--color-text-muted); transition: var(--transition); font-size: 1rem; }
.f-links a:hover { color: var(--color-accent); transform: translateX(-5px); }
.f-socials { display: flex; gap: 15px; margin-top: 20px; }
.social-icon {
  width: 45px; height: 45px; border-radius: 50%; background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: var(--transition); border: 1px solid rgba(255,255,255,0.1);
}
.social-icon:hover { background: var(--color-accent); transform: translateY(-5px); border-color: var(--color-accent); }
.social-icon svg { width: 20px; height: 20px; }
.f-bottom {
  border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px;
  display: flex; justify-content: space-between; align-items: center;
  color: #666; font-size: 0.9rem; flex-wrap: wrap; gap: 15px;
}

/* ==========================================================================
   10. ANIMATIONS & RESPONSIVE
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(50px); transition: 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 1200px) {
  .stats-container { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .stat-box:nth-child(even) { border-left: none; }
  .stat-box:nth-child(3), .stat-box:nth-child(4) { padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05); }
  .stat-box:nth-child(3) { border-left: 1px solid rgba(255,255,255,0.05); }
}
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .menu-toggle { display: block; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn-large { justify-content: center; width: 100%; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
  .stats-container { grid-template-columns: 1fr; padding: 25px; gap:0; }
  .stat-box { border-left: none !important; border-top: 1px solid rgba(255,255,255,0.05); padding: 25px 0 !important; }
  .stat-box:first-child { border-top: none; padding-top: 0 !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .f-bottom { justify-content: center; text-align: center; }
}

@media (hover: none) {
  .m-overlay, .m-play { opacity: 1; }
  .m-overlay { background: linear-gradient(to top, rgba(6,6,10,0.95) 0%, rgba(6,6,10,0.6) 40%, transparent 100%); transform: translateY(0); }
  .m-play { transform: translate(-50%, -50%) scale(1); background: rgba(142, 22, 56, 0.8); }
}
