/**
 * 🎬 سینماتوگرو (Cinema Together) - Design System & UI v2.0
 * تم سینمایی، دارک، لوکس، گلس‌مورفیسم، انیمیشن‌های نرم و کاملاً ریسپانسیو
 */

@import url('https://cdn.jsdelivr.net/npm/vazirmatn@33.0.3/Vazirmatn-font-face.css');

/* ==========================================================================
   ۱. متغیرهای طراحی (Design Tokens & Color Palette)
   ========================================================================== */
:root {
  /* پالت رنگ سینمایی */
  --bg-deep: #07080f;
  --bg-body: #0b0d18;
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-surface-hover: rgba(255, 255, 255, 0.075);
  --bg-card: rgba(20, 24, 44, 0.65);
  --bg-card-solid: #121528;
  --bg-input: rgba(5, 7, 15, 0.7);

  /* خطوط و حاشیه‌ها */
  --bd: rgba(255, 255, 255, 0.09);
  --bd-hover: rgba(255, 255, 255, 0.2);
  --bd-glow: rgba(124, 92, 255, 0.4);

  /* گرادینت‌های اصلی و رنگ‌های زنده */
  --ac: #7c5cff;
  --ac-hover: #9375ff;
  --ac-gradient: linear-gradient(135deg, #7c5cff 0%, #6366f1 50%, #4f46e5 100%);
  --ac-glow: 0 0 25px rgba(124, 92, 255, 0.45);

  --ac2: #00d4ff;
  --ac2-gradient: linear-gradient(135deg, #00d4ff 0%, #0284c7 100%);
  --ac2-glow: 0 0 25px rgba(0, 212, 255, 0.4);

  --accent-pink: #ec4899;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --dn: #f43f5e;
  --dn-gradient: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);

  /* تایپوگرافی */
  --tx: #f8fafc;
  --tx-secondary: #cbd5e1;
  --mut: #94a3b8;
  --dim: #64748b;

  /* ابعاد و شعاع گوشه‌ها */
  --r-sm: 8px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  /* سایه‌ها و افکت‌های عمق */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.65);
  --shadow-ambient: 0 0 60px rgba(124, 92, 255, 0.12);
}

/* ==========================================================================
   ۲. بازنشانی و استایل‌های پایه (Reset & Base Styles)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: Vazirmatn, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(1000px 500px at 80% -10%, rgba(124, 92, 255, 0.18), transparent 70%),
    radial-gradient(900px 500px at 15% 15%, rgba(0, 212, 255, 0.12), transparent 60%),
    radial-gradient(1200px 700px at 50% 100%, rgba(236, 72, 153, 0.07), transparent 80%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-body) 100%);
  background-attachment: fixed;
  color: var(--tx);
  min-height: 100vh;
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* اسکرول‌بار سفارشی و مدرن */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ac);
}

::selection {
  background: var(--ac);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.muted { color: var(--mut); }
.dim { color: var(--dim); }
.small { font-size: 0.85rem; }
.grow { flex: 1; }
.center { text-align: center; }

/* ==========================================================================
   ۳. کارت‌ها، کانتینرها و المان‌های مشترک (Glassmorphism Cards & Layout)
   ========================================================================== */
.wrap {
  max-width: 1300px;
  margin: 32px auto;
  padding: 0 20px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bd), transparent);
  margin: 20px 0;
}

/* ==========================================================================
   ۴. نوار ناوبری و هدر (Sticky Glass Navigation)
   ========================================================================== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 8, 15, 0.82);
  border-bottom: 1px solid var(--bd);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: all 0.25s ease;
}

.logo {
  font-weight: 900;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(124, 92, 255, 0.3);
  letter-spacing: -0.5px;
}

.logo span {
  background: linear-gradient(135deg, var(--ac) 0%, var(--ac2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav nav a {
  color: var(--mut);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  transition: all 0.2s ease;
}

.nav nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

/* بنر اعلان بالای سایت */
.ann {
  background: linear-gradient(90deg, #6366f1, #06b6d4, #ec4899);
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 15px rgba(99, 102, 241, 0.35);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   ۵. دکمه‌ها و فرم‌ها (Buttons & Inputs System)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: 12px;
  background: var(--ac-gradient);
  box-shadow: 0 4px 18px rgba(124, 92, 255, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.5);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.big {
  padding: 14px 34px;
  font-size: 1.1rem;
  border-radius: 15px;
}

.btn.sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bd);
  box-shadow: none;
  color: var(--tx);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn.danger {
  background: var(--dn-gradient);
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.35);
}

.btn.danger:hover {
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.5);
}

/* ورودی‌های فرم */
input, textarea, select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--bd);
  color: var(--tx);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--ac);
  background: rgba(8, 11, 24, 0.95);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

input::placeholder, textarea::placeholder {
  color: var(--dim);
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--ac);
  cursor: pointer;
}

input[type=range] {
  padding: 0;
  accent-color: var(--ac);
  cursor: pointer;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--tx-secondary);
}

label.chk {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  margin: 12px 0;
  user-select: none;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.row > input {
  flex: 1;
  min-width: 160px;
}

/* ==========================================================================
   ۶. صفحه اصلی (Hero & Features Showcase)
   ========================================================================== */
.hero {
  text-align: center;
  padding: 100px 20px 60px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.25) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 4.4rem);
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 20px;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

.hero em {
  font-style: normal;
  background: linear-gradient(135deg, #a78bfa 0%, #38bdf8 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 35px rgba(124, 92, 255, 0.4));
}

.hero p {
  max-width: 680px;
  margin: 0 auto 36px;
  color: var(--tx-secondary);
  font-size: 1.2rem;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.feats {
  max-width: 1250px;
  margin: 40px auto 80px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feat {
  background: rgba(18, 22, 42, 0.55);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feat:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 92, 255, 0.15);
}

.feat .ico {
  font-size: 2.2rem;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.25);
  margin-bottom: 6px;
}

.feat h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

.feat p {
  margin: 0;
  color: var(--mut);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   ۷. داشبورد و کارت‌های عملیات (Dashboard & Action Cards)
   ========================================================================== */
.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0 36px;
}

.grid3 .card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
}

.grid3 .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ac-gradient);
}

.grid3 .card:nth-child(2)::before {
  background: var(--ac2-gradient);
}

.grid3 .card:nth-child(3)::before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.grid3 .card h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.stat {
  text-align: center;
  padding: 24px 16px;
  background: rgba(18, 22, 44, 0.6);
  border-radius: var(--r);
  border: 1px solid var(--bd);
}

.stat span {
  font-size: 2.6rem;
  font-weight: 900;
  display: block;
  background: linear-gradient(135deg, #fff 30%, var(--ac) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat small {
  color: var(--mut);
  font-size: 0.9rem;
  font-weight: 500;
}

.sec {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--bd), transparent);
  margin-right: 14px;
}

.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.room-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: rgba(18, 22, 42, 0.6);
  border-radius: var(--r);
  border: 1px solid var(--bd);
  transition: all 0.25s ease;
}

.room-item:hover {
  transform: translateY(-4px);
  border-color: var(--ac);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(124, 92, 255, 0.2);
}

.room-item b {
  font-size: 1.1rem;
  color: #fff;
}

/* باکس ورود/ثبت نام */
.authbox {
  max-width: 440px;
  margin: 70px auto;
  padding: 32px;
  background: rgba(18, 22, 44, 0.8);
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(124, 92, 255, 0.15);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  background: rgba(5, 7, 15, 0.6);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--bd);
}

.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  color: var(--mut);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.tabs a.on {
  background: var(--ac-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.4);
}

.alert {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  padding: 12px 18px;
  border-radius: 12px;
  margin: 14px 0;
  color: #fecdd3;
  font-size: 0.95rem;
  line-height: 1.6;
}

.alert.ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

/* جدول‌های ادمین */
.tbl {
  overflow-x: auto;
  margin-top: 16px;
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: rgba(12, 15, 30, 0.6);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bd);
  text-align: right;
  white-space: nowrap;
}

th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--tx-secondary);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.acts form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.foot {
  text-align: center;
  color: var(--dim);
  padding: 40px 20px;
  font-size: 0.9rem;
  border-top: 1px solid var(--bd);
  margin-top: 60px;
}

.spin {
  width: 48px;
  height: 48px;
  border: 3.5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--ac);
  border-right-color: var(--ac2);
  border-radius: 50%;
  margin: 24px auto;
  animation: sp 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

@keyframes sp {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   ۸. بانک و کارت‌های فیلم برفک (Movie Explorer & Cards)
   ========================================================================== */
.sec-box {
  margin: 40px 0;
  padding: 28px;
  background: rgba(15, 18, 35, 0.7);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), var(--shadow-ambient);
}

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.sec-head h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 40%, var(--ac2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sec-head p {
  margin: 4px 0 0;
  color: var(--mut);
  font-size: 0.95rem;
}

.bf-search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.bf-search-bar input {
  flex: 1;
  min-width: 260px;
  background: rgba(7, 9, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 1.05rem;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.bf-search-bar input:focus {
  border-color: var(--ac2);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
}

.mv-card {
  background: rgba(22, 26, 48, 0.6);
  border: 1px solid var(--bd);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.mv-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--ac);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(124, 92, 255, 0.28);
}

.mv-thumb {
  position: relative;
  aspect-ratio: 2/3;
  background: #0f1222;
  overflow: hidden;
}

.mv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.mv-card:hover .mv-thumb img {
  transform: scale(1.08);
}

/* آیکون پخش شناور روی کارت در حالت هوور */
.mv-thumb::after {
  content: '▶';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  background: rgba(124, 92, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  padding-right: 2px;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.5);
}

.mv-card:hover .mv-thumb::after {
  opacity: 1;
  transform: scale(1);
}

.mv-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.mv-badge {
  background: rgba(5, 7, 15, 0.8);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mv-badge.dubbed {
  background: rgba(124, 92, 255, 0.85);
  border-color: #7c5cff;
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.4);
}

.mv-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 15, 0.4) 100%);
}

.mv-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  transition: color 0.2s ease;
}

.mv-card:hover .mv-title {
  color: var(--ac2);
}

/* ==========================================================================
   ۹. مودال جزئیات فیلم و گروه‌های دوبله و زبان اصلی (Movie Details Modal)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-box {
  background: #0f1224;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-xl);
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(124, 92, 255, 0.2);
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--bd);
  background: rgba(255, 255, 255, 0.02);
}

.modal-head h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bd);
  color: var(--mut);
  font-size: 1.2rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: #fff;
  background: rgba(244, 63, 94, 0.3);
  border-color: #f43f5e;
  transform: rotate(90deg);
}

.modal-body {
  padding: 26px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mv-meta-box {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.mv-meta-poster {
  width: 150px;
  aspect-ratio: 2/3;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  background: #000;
  border: 1px solid var(--bd);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.mv-meta-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mv-meta-info h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.35;
  color: #fff;
}

.mv-meta-desc {
  font-size: 0.95rem;
  color: var(--tx-secondary);
  line-height: 1.8;
  margin: 0;
  max-height: 130px;
  overflow-y: auto;
  padding-left: 6px;
}

/* گروه‌های دانلود اختصاصی (دوبله و زبان اصلی) */
.mv-dlgroup {
  background: rgba(18, 22, 44, 0.7);
  border: 1px solid var(--bd);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.mv-dlgroup--dubbed {
  border-right: 5px solid var(--ac);
  background: linear-gradient(270deg, rgba(124, 92, 255, 0.08) 0%, rgba(18, 22, 44, 0.7) 100%);
}

.mv-dlgroup--original {
  border-right: 5px solid var(--ac2);
  background: linear-gradient(270deg, rgba(0, 212, 255, 0.08) 0%, rgba(18, 22, 44, 0.7) 100%);
}

.mv-dlgroup__head {
  margin-bottom: 16px;
}

.mv-dlgroup__title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mv-dlgroup__desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--mut);
}

.mv-dlgroup__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mv-dlrow {
  background: rgba(7, 9, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease;
}

.mv-dlrow:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.mv-dlrow-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mv-dlrow__q {
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mv-dlrow__size {
  color: var(--mut);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
}

.mv-dlrow__actions {
  display: flex;
  gap: 10px;
  margin-right: auto;
  flex-wrap: wrap;
}

.mv-subpanel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.mv-subitem {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bd);
  padding: 5px 12px;
  border-radius: 8px;
  color: var(--tx-secondary);
  font-size: 0.82rem;
  font-weight: 500;
}

/* ==========================================================================
   ۱۰. پلیر و تجربه تماشای گروهی در اتاق (Cinema Room & Player)
   ========================================================================== */
.gate {
  max-width: 520px;
  margin: 12vh auto;
  padding: 40px 32px;
  background: rgba(18, 22, 44, 0.85);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(124, 92, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.gate h2 {
  font-size: 1.8rem;
  font-weight: 900;
  margin: 0 0 14px;
}

.gate p {
  line-height: 1.8;
  margin-bottom: 28px;
}

.room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  padding: 20px;
  max-width: 1800px;
  margin: 0 auto;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}

.topbar h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

/* استیج ویدیو و پرده سینما */
.stage {
  position: relative;
  background: #000;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 60px rgba(124, 92, 255, 0.15);
}

.stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.stage:fullscreen {
  border-radius: 0;
  aspect-ratio: auto;
}

.empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  color: var(--mut);
  font-size: 1.15rem;
  font-weight: 500;
  background: radial-gradient(circle at center, #181d38 0%, #06070e 100%);
  z-index: 2;
}

.tap {
  position: absolute;
  inset: 0;
  margin: auto;
  width: max-content;
  height: max-content;
  padding: 16px 36px;
  border: 0;
  border-radius: 999px;
  background: var(--ac-gradient);
  color: #fff;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 8;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.6);
  animation: pulseButton 2s infinite;
}

@keyframes pulseButton {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 18px rgba(124, 92, 255, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); }
}

/* زیرنویس حرفه‌ای روی ویدیو */
.subs {
  position: absolute;
  bottom: 74px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.65em;
  font-weight: 800;
  padding: 6px 12%;
  white-space: pre-line;
  color: #ffffff;
  text-shadow: 
    0 0 4px #000, 
    0 2px 6px #000, 
    2px 2px 3px #000, 
    -2px -2px 3px #000;
  pointer-events: none;
  transition: bottom 0.25s ease, font-size 0.2s ease;
  z-index: 4;
  line-height: 1.5;
}

/* کنترل‌های پخش ویدیو */
.ctrl {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 18px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(5, 7, 15, 0.85) 40%, rgba(5, 7, 15, 0.98) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 6;
}

.stage:hover .ctrl,
.stage.show .ctrl,
.stage:focus-within .ctrl {
  opacity: 1;
}

.stage:has(.ctrl:hover) .subs {
  bottom: 88px;
}

.ctrl .row {
  gap: 12px;
  flex-wrap: nowrap;
}

.ctrl button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  min-width: 40px;
  height: 38px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.ctrl button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.ctrl button.active {
  background: var(--dn);
  border-color: #f43f5e;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.5);
}

.ctrl button.lock {
  opacity: 0.5;
  cursor: default;
}

.ctrl input[type=range] {
  height: 6px;
  border-radius: 4px;
}

.ctrl #vol {
  width: 90px;
  flex: none;
}

#seek {
  margin-bottom: 8px;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: height 0.15s ease;
}

#seek:hover {
  height: 9px;
}

.livebadge {
  color: #ff4d6d;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 77, 109, 0.12);
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.pop {
  position: absolute;
  bottom: 74px;
  left: 14px;
  width: min(360px, 92%);
  background: #111428;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

/* ایموجی‌های شناور */
.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

.fl {
  position: absolute;
  bottom: 60px;
  font-size: 2.8rem;
  animation: rise 3.2s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

@keyframes rise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { opacity: 1; transform: translateY(-40px) scale(1.1); }
  100% { transform: translateY(-420px) scale(1.4) rotate(16deg); opacity: 0; }
}

.reacts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 6px 0;
}

.reacts button {
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bd);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reacts button:hover {
  transform: scale(1.25) translateY(-5px);
  border-color: var(--ac);
  background: rgba(124, 92, 255, 0.2);
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.35);
}

/* سایدبار و تب‌های چت و اعضا */
.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.stabs {
  display: flex;
  gap: 8px;
  background: rgba(10, 13, 26, 0.8);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--bd);
}

.stabs button {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--mut);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stabs button.on {
  background: var(--ac-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

.stabs i {
  font-style: normal;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tab {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  height: min(600px, 66vh);
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

#t-chat {
  padding: 0;
}

.msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.msg:hover {
  background: rgba(255, 255, 255, 0.03);
}

.msg.sys {
  color: var(--mut);
  text-align: center;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 20px;
  margin: 6px auto;
  display: inline-block;
  align-self: center;
}

.chatf {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--bd);
  background: rgba(8, 10, 20, 0.6);
}

.mrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: background 0.15s ease;
}

.mrow:hover {
  background: rgba(255, 255, 255, 0.03);
}

.mrow.off {
  opacity: 0.45;
}

.mrow input[type=range] {
  width: 75px;
}

.av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.92rem;
  flex: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tag {
  font-size: 0.95rem;
}

/* پیام‌های توست (Toasts) */
.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 120;
  pointer-events: none;
}

.toast {
  background: rgba(18, 22, 44, 0.95);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 12px 24px;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(124, 92, 255, 0.2);
  color: #fff;
  font-weight: 600;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   ۱۱. استایل‌های ریسپانسیو موبایل و تبلت (Responsive Breakpoints)
   ========================================================================== */
@media (max-width: 960px) {
  .room {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 16px;
  }
  .tab {
    height: 52vh;
  }
  .stage {
    border-radius: 14px;
  }
  .ctrl #vol {
    display: none;
  }
  .nav {
    padding: 12px 16px;
  }
  .hero {
    padding-top: 60px;
  }
  .mv-meta-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .mv-meta-poster {
    width: 140px;
  }
  .mv-dlrow-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .mv-dlrow__actions {
    margin-right: 0;
    width: 100%;
  }
  .mv-dlrow__actions .btn {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .mv-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.05rem;
  }
  .cta .btn {
    width: 100%;
  }
  .modal-box {
    max-height: 96vh;
    border-radius: 18px;
  }
  .modal-body {
    padding: 16px;
  }
  .sec-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .sec-head .btn {
    width: 100%;
  }
}
