@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");
@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&display=swap");

:root {
  --bg: #0a0d10;
  --bg-alt: #0d1114;
  --surface: #12171b;
  --surface-2: #1a2226;
  --border: #212b30;
  --text: #f0f4f5;
  --text-muted: #8fa3a8;
  --accent: #22e6e6;
  --accent-dim: #0fa3a3;
  --accent-soft: rgba(34, 230, 230, 0.12);
  --warn: #ff7a45;
  --good: #4ade80;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1120px;
  --ease: cubic-bezier(.22, .68, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

::selection { background: var(--accent); color: #04201f; }

/* اسکرول‌بار سفارشی هماهنگ با تم (وبکیت) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", "Oswald", sans-serif;
  direction: rtl;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  /* بافت ملایم زمین بازی در پس‌زمینه کل سایت */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(34,230,230,0.06), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(34,230,230,0.05), transparent 45%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .15s var(--ease); }
button { font-family: inherit; }

/* دسترس‌پذیری: حالت فوکوس واضح برای ناوبری با کیبورد، بدون افکت روی کلیک ماوس */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 1em; color: var(--text-muted); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--accent); font-weight: 600;
  letter-spacing: .04em; margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 16px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), opacity .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--accent); color: #04201f; box-shadow: 0 4px 18px rgba(34,230,230,.22); }
.btn-primary:hover { opacity: .92; box-shadow: 0 6px 22px rgba(34,230,230,.32); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------- هدر ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,13,16,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Oswald"; font-weight: 700; font-size: 19px; letter-spacing: .02em; }
.brand .mark { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.nav-links { display: none; gap: 26px; font-size: 14.5px; color: var(--text-muted); }
.nav-links a:hover { color: var(--accent); }
.nav-links a.nav-active { color: var(--accent); }
.mobile-nav a.nav-active { color: var(--accent); }
@media (min-width: 860px) { .nav-links { display: flex; } }
.header-cta { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: inline-flex; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 9px 11px; }
@media (min-width: 860px) { .menu-btn { display: none; } }

/* منوی موبایل */
.mobile-nav { display: none; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 15px; }

/* ---------- هیرو ---------- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }

/* موتیف امضادار برند: خطوط پاس روی تخته تاکتیک که به‌آرامی رسم می‌شن — چیزی که هیچ قالب آماده‌ای نداره */
.hero-tactic-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; pointer-events: none; }
.hero-tactic-bg .tline { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 8; opacity: .5; }
.hero-tactic-bg .t1 { stroke-dashoffset: 1000; stroke-dasharray: 1000; animation: draw-line 7s ease-in-out infinite; }
.hero-tactic-bg .t2 { stroke-dashoffset: 1000; stroke-dasharray: 1000; animation: draw-line 7s ease-in-out infinite 1.4s; opacity: .3; }
.hero-tactic-bg .tdot { fill: var(--accent); opacity: .6; }
@keyframes draw-line { 0% { stroke-dashoffset: 1000; } 45%, 60% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1000; } }
@media (prefers-reduced-motion: reduce) { .hero-tactic-bg .tline { animation: none; stroke-dashoffset: 0; } }
.hero .wrap { position: relative; z-index: 1; }

/* نوار تزئینی الهام‌گرفته از برش‌های مورب پیراهن تیم — امضای بصری اختصاصی آکادمی */
.jersey-slash { position: relative; }
.jersey-slash::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    linear-gradient(115deg, transparent 42%, rgba(34,230,230,.05) 43%, rgba(34,230,230,.05) 45%, transparent 46%),
    linear-gradient(115deg, transparent 55%, rgba(255,255,255,.02) 56%, rgba(255,255,255,.02) 60%, transparent 61%);
}
.hero-grid { display: grid; gap: 34px; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; } }
.hero h1 { font-size: clamp(30px, 6vw, 50px); line-height: 1.18; }
.hero h1 .accent { color: var(--accent); }
.hero p.lead { font-size: 17px; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.tactic-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); aspect-ratio: 4/5;
}
.tactic-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.tactic-frame:hover img { transform: scale(1.03); }
.tactic-frame .badge {
  position: absolute; bottom: 14px; right: 14px; left: 14px;
  background: rgba(10,13,16,0.75); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 13.5px;
}

/* خط بازی تزئینی - موتیف تخته تاکتیک */
.play-divider { display: flex; align-items: center; gap: 10px; margin: 46px 0 26px; color: var(--text-muted); }
.play-divider svg { flex: 0 0 auto; }
.play-divider .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* ---------- شمارش‌گر معکوس ثبت‌نام ---------- */
.deadline-strip {
  background: linear-gradient(90deg, rgba(34,230,230,.10), rgba(34,230,230,.02));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.countdown { display: flex; gap: 8px; }
.countdown .cell { background: #05201f; border: 1px solid var(--accent-dim); border-radius: 8px; padding: 8px 10px; min-width: 56px; text-align: center; box-shadow: inset 0 0 12px rgba(34,230,230,.12); }
.countdown .cell b { display: block; font-size: 21px; font-family: "Oswald"; color: var(--accent); letter-spacing: .04em; text-shadow: 0 0 10px rgba(34,230,230,.5); }
.countdown .cell span { font-size: 10.5px; color: var(--text-muted); }

/* ---------- بخش‌ها ---------- */
section { padding: 54px 0; }
.section-head { max-width: 640px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 32px); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
.grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-4 { grid-template-columns: repeat(4,1fr); } }
@media (min-width: 860px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent-dim); }
.card .icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.card h3 { font-size: 17px; }
.card p { margin: 0; font-size: 14.5px; }

/* پکیج‌ها */
.pkg-card { display: flex; flex-direction: column; gap: 12px; position: relative; }
.pkg-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pkg-card .price { font-family: "Oswald"; font-size: 28px; color: var(--accent); }
.pkg-card .price small { font-size: 13px; color: var(--text-muted); font-family: "Vazirmatn"; }
.pkg-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-muted); }
.pkg-card ul li::before { content: "✓"; color: var(--accent); margin-left: 8px; font-weight: 700; }

/* فرم‌ها */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: var(--text-muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-family: inherit; font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form-msg { font-size: 14px; padding: 10px 12px; border-radius: 10px; margin-top: 10px; display: none; }
.form-msg.ok { display: block; background: rgba(74,222,128,.1); color: var(--good); }
.form-msg.err { display: block; background: rgba(255,122,69,.1); color: var(--warn); }

/* گالری */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-grid .g-item { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.gallery-grid .g-item img, .gallery-grid .g-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery-grid .g-item:hover img, .gallery-grid .g-item:hover video { transform: scale(1.06); }

/* فوتر */
footer { border-top: 1px solid var(--border); padding: 34px 0; margin-top: 30px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- کامپوننت‌های پنل (داشبورد/ادمین) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-side {
  width: 240px; flex: 0 0 240px; background: var(--bg-alt); border-left: 1px solid var(--border);
  padding: 20px 14px; display: none; flex-direction: column; gap: 4px;
}
@media (min-width: 900px) { .app-side { display: flex; } }
.app-side a { padding: 11px 14px; border-radius: 10px; color: var(--text-muted); font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
.app-side a.active, .app-side a:hover { background: var(--surface-2); color: var(--text); }
.app-main { flex: 1; min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 20; background: rgba(10,13,16,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.app-topbar .wrap-app { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 18px; }
.wrap-app { max-width: 1080px; margin: 0 auto; }
.app-content { padding: 22px 18px 60px; max-width: 1080px; margin: 0 auto; }

.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-card b { display: block; font-family: "Oswald"; font-size: 26px; color: var(--accent); }
.stat-card span { font-size: 13px; color: var(--text-muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-muted); font-weight: 600; background: var(--surface); }
tr:last-child td { border-bottom: none; }

.badge-pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-pill.green { background: rgba(74,222,128,.12); color: var(--good); }
.badge-pill.orange { background: rgba(255,122,69,.12); color: var(--warn); }
.badge-pill.gray { background: var(--surface-2); color: var(--text-muted); }

.progress-bar { background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-bar > div { height: 100%; background: var(--accent); }

.tabbar { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 18px; overflow-x: auto; }
.tabbar button { flex: 0 0 auto; padding: 9px 16px; border-radius: 9px; background: transparent; border: none; color: var(--text-muted); font-size: 14px; cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.tabbar button.active { background: var(--accent); color: #04201f; font-weight: 700; }
.tabbar button:not(.active):hover { color: var(--text); background: var(--surface-2); }

.modal-backdrop { position: fixed; inset: 0; background: rgba(5,7,9,.72); backdrop-filter: blur(3px); display: none; align-items: flex-end; justify-content: center; z-index: 100; }
.modal-backdrop.open { display: flex; animation: fade-in .18s var(--ease); }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px 18px 0 0; width: 100%; max-width: 480px; padding: 22px; max-height: 85vh; overflow-y: auto; animation: modal-in .22s var(--ease); }
@media (min-width: 640px) { .modal-backdrop { align-items: center; } .modal { border-radius: 18px; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-backdrop.open, .modal { animation: none; } }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* ---------- اسکرول‌بار سفارشی ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 999px; border: 2px solid var(--bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }
* { scrollbar-color: var(--surface-2) var(--bg-alt); scrollbar-width: thin; }

/* ---------- حالت بارگذاری (اسکلتون) ---------- */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-sm); }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation: skel-sweep 1.4s infinite;
}
@keyframes skel-sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }

/* ---------- تصاویر: محو ملایم هنگام بارگذاری ---------- */
img { transition: opacity .3s ease; }
img[loading="lazy"] { opacity: 0; }
img[loading="lazy"].loaded, img[loading="lazy"]:not([src=""]) { opacity: 1; }

/* ---------- ورودی‌ها: حالت نامعتبر واضح ---------- */
.field input:invalid:not(:placeholder-shown), .field select:invalid:not(:placeholder-shown) { border-color: var(--warn); }
.field input:required:focus:invalid { border-color: var(--accent); }

/* ---------- بهبود هاور کارت‌ها و آمار ---------- */
.stat-card { transition: transform .18s var(--ease), border-color .18s var(--ease); }
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent-dim); }
.pkg-card.featured { position: relative; }
.pkg-card.featured::before {
  content: "پیشنهادی"; position: absolute; top: -11px; right: 18px;
  background: var(--accent); color: #04201f; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}

/* ---------- بهبود جدول‌ها در موبایل ---------- */
@media (max-width: 480px) {
  .app-content { padding-left: 12px; padding-right: 12px; }
  .card { padding: 18px; }
}

/* ---------- انتخاب متن با رنگ برند ---------- */
::selection { background: var(--accent); color: #04201f; }
