:root {
  --font: "Vazirmatn", Tahoma, sans-serif;
  --bg1: #0b1220;
  --bg2: #12203a;
  --bg3: #1a3358;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8eef8;
  --muted: #9aa8bc;
  --primary: #2f9e8f;
  --primary-2: #1f7a6e;
  --accent: #e8b86d;
  --danger: #e35d6a;
  --success: #3ecf8e;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --transition: 0.25s ease;
}

html[data-theme="light"] {
  --bg1: #e8f1f4;
  --bg2: #d5e6ee;
  --bg3: #c4dae6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.9);
  --border: rgba(20, 40, 60, 0.1);
  --text: #152033;
  --muted: #5b6b7c;
  --primary: #1f7a6e;
  --primary-2: #166057;
  --accent: #c48a2e;
  --shadow: 0 16px 40px rgba(30, 50, 70, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--bg3), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(47, 158, 143, 0.25), transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

.glass-card, .glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.glass-card { padding: 1.5rem; }

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-2);
  --bs-btn-hover-border-color: var(--primary-2);
  --bs-btn-active-bg: var(--primary-2);
  --bs-btn-active-border-color: var(--primary-2);
}

.btn-glass {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-glass:hover { background: var(--surface); color: var(--text); }

.form-control, .form-select {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(47, 158, 143, .2);
}
.form-control::placeholder { color: var(--muted); }
.form-label { color: var(--muted); font-size: .9rem; }

.text-muted { color: var(--muted) !important; }

/* Guest */
.guest-body { min-height: 100vh; }
.guest-main { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.theme-toggle-float { position: fixed; top: 1rem; left: 1rem; z-index: 50; }

.auth-stage { width: min(440px, 100%); }
.rules-stage { width: min(720px, 100%); }
.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-brand h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin: .6rem 0 .2rem;
  background: linear-gradient(120deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-brand p { color: var(--muted); margin: 0; }
.brand-orb {
  width: 72px; height: 72px; margin: 0 auto;
  border-radius: 22px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  background: linear-gradient(145deg, var(--primary), #2a6f9e);
  color: #fff;
  box-shadow: 0 10px 30px rgba(47, 158, 143, .35);
  animation: floaty 4s ease-in-out infinite;
}
.brand-orb.admin { background: linear-gradient(145deg, #c48a2e, #9a5b1a); }
.success-orb {
  width: 80px; height: 80px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.2rem; color: var(--success);
  background: rgba(62, 207, 142, .12); border: 1px solid rgba(62, 207, 142, .3);
}
.input-icon { position: relative; }
.input-icon i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-right: 42px; }
.auth-hint { color: var(--muted); font-size: .85rem; text-align: center; }
.admin-link { display: block; text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--muted); }

.animate-rise { animation: rise .55s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.pulse-btn { animation: pulse 2.4s ease infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 158, 143, .4); }
  50% { box-shadow: 0 0 0 12px rgba(47, 158, 143, 0); }
}

/* Rules */
.permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.perm-card {
  padding: 1.1rem; border-radius: 14px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: var(--transition);
}
.perm-card i { font-size: 1.6rem; color: var(--accent); margin-bottom: .5rem; }
.perm-card h3 { font-size: 1rem; margin: 0 0 .35rem; }
.perm-card p { font-size: .85rem; color: var(--muted); margin: 0 0 .6rem; }
.perm-status { font-size: .8rem; font-weight: 700; }
.perm-card.ok { border-color: rgba(62, 207, 142, .5); }
.perm-card.ok .perm-status { color: var(--success); }
.perm-card.fail { border-color: rgba(227, 93, 106, .5); }
.perm-card.fail .perm-status { color: var(--danger); }
.rules-box {
  padding: 1.1rem 1.2rem; border-radius: 14px; line-height: 1.9;
  background: rgba(232, 184, 109, .08); border: 1px solid rgba(232, 184, 109, .25);
}

/* Admin shell */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-sidebar {
  margin: 1rem; padding: 1rem; display: flex; flex-direction: column; gap: 1rem;
  position: sticky; top: 1rem; height: calc(100vh - 2rem);
}
.sidebar-brand { display: flex; gap: .75rem; align-items: center; padding: .5rem; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--primary), #2a6f9e); color: #fff;
}
.sidebar-brand small { display: block; color: var(--muted); }
.sidebar-nav { display: flex; flex-direction: column; gap: .35rem; flex: 1; overflow: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem;
  border-radius: 12px; color: var(--text); transition: var(--transition);
}
.sidebar-nav a i { width: 18px; color: var(--muted); }
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(47, 158, 143, .15); color: var(--text);
}
.sidebar-nav a.active i { color: var(--primary); }
.admin-main { padding: 1rem 1rem 1rem 0; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; margin-bottom: 1rem;
}
.page-title { font-size: 1.15rem; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.admin-chip {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: .35rem .8rem; font-size: .85rem;
}
.admin-content { padding-left: .25rem; }

.stat-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem;
}
.stat-card {
  display: flex; gap: .85rem; align-items: center; padding: 1rem 1.1rem;
}
.stat-card i {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(47, 158, 143, .15); color: var(--primary);
}
.stat-card span { display: block; color: var(--muted); font-size: .8rem; }
.stat-card strong { font-size: 1.25rem; }

.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem;
}
.table-darkish { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--border); color: var(--text); }
.table-darkish > :not(caption) > * > * { background: transparent; color: var(--text); border-bottom-color: var(--border); }
.table-darkish thead th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.q-preview { max-width: 360px; }
.img-thumb { max-height: 120px; border-radius: 10px; }
.form-card { max-width: 960px; }
.cat-check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.log-list { list-style: none; padding: 0; margin: 0; }
.log-list li {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem;
  padding: .65rem 0; border-bottom: 1px solid var(--border); font-size: .9rem;
}
.dot-online {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 0 4px rgba(62, 207, 142, .2); margin-left: .35rem;
}

.watch-layout { max-width: 960px; }
.watch-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.video-stage {
  position: relative; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden;
  background: #000; border: 1px solid var(--border);
}
.video-stage video { width: 100%; height: 100%; object-fit: cover; }
.video-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #aaa;
}
.video-placeholder i { font-size: 2.5rem; margin-bottom: .5rem; }
.watch-note { color: var(--muted); font-size: .85rem; }

.pagination .page-link {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
.pagination .page-item.active .page-link {
  background: var(--primary); border-color: var(--primary);
}

@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed; inset: 1rem auto 1rem 1rem; width: 260px; z-index: 100;
    transform: translateX(110%); transition: transform .3s ease;
  }
  .admin-sidebar.open { transform: none; }
  .admin-main { padding: 1rem; }
  .permission-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .log-list li { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
  .stat-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
}

/* ---------- تایپوگرافی فارسی و متن مخلوط ---------- */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.75;
  word-spacing: 0.02em;
}
.fa-text, .question-card, .rules-box, .auth-hint, .q-text {
  line-height: 1.9;
  letter-spacing: 0;
}
.ltr-embed, .ltr-input {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
.ltr-input {
  display: block;
  width: 100%;
  text-align: left;
}
.exam-title-mix {
  font-size: 1.45rem !important;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0 !important;
  background: none !important;
  -webkit-text-fill-color: unset;
  color: var(--text) !important;
}
.exam-login-stage { width: min(520px, 100%); }
.exam-meta-row {
  display: flex; flex-wrap: wrap; gap: .75rem 1.25rem;
  font-size: .9rem; color: var(--muted); justify-content: center;
}
.exam-meta-row i { margin-left: .35rem; color: var(--primary); }

.countdown-box {
  padding: 1.1rem 1rem 1.2rem;
  border-radius: 16px;
  background: rgba(232, 184, 109, .08);
  border: 1px solid rgba(232, 184, 109, .28);
  text-align: center;
}
.countdown-label { font-weight: 700; margin-bottom: .35rem; }
.countdown-date { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.countdown-digits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin-bottom: .85rem;
  direction: ltr; /* از چپ: روز ← ساعت ← دقیقه ← ثانیه */
  unicode-bidi: isolate;
}
.countdown-digits > div {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: .65rem .35rem;
}
.countdown-digits span {
  display: block; font-size: 1.45rem; font-weight: 800;
  font-variant-numeric: tabular-nums; direction: ltr;
}
.countdown-digits small {
  color: var(--muted); font-size: .75rem;
  display: block;
  font-family: Vazirmatn, Tahoma, sans-serif;
}
.countdown-hint { color: var(--muted); font-size: .85rem; }

.exam-link-cell {
  display: flex; align-items: center; gap: .4rem; max-width: 280px;
}
.exam-link-cell code {
  font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 220px; color: var(--accent);
}

@media (max-width: 576px) {
  .countdown-digits {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .35rem;
  }
  .countdown-digits span { font-size: 1.15rem; }
  .countdown-digits small { font-size: .68rem; }
  .exam-link-cell { max-width: 160px; }
}

/* ---------- دروازه ورود آزمون ---------- */
.exam-gate {
  position: relative;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: .5rem 0 1rem;
}
.exam-gate__bg {
  position: absolute; inset: -8% -12%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.exam-gate__blob {
  position: absolute; border-radius: 50%; filter: blur(48px); opacity: .5;
}
.exam-gate__blob--a {
  width: 220px; height: 220px; top: 0; right: 0;
  background: rgba(47,158,143,.45); animation: floaty 6s ease-in-out infinite;
}
.exam-gate__blob--b {
  width: 180px; height: 180px; bottom: 10%; left: 0;
  background: rgba(232,184,109,.28); animation: floaty 8s ease-in-out infinite reverse;
}
.exam-gate__ring {
  position: absolute; inset: 18% 12%;
  border: 1px solid rgba(255,255,255,.06); border-radius: 40px;
  transform: rotate(-6deg);
}
.exam-gate__card {
  position: relative; z-index: 1;
  padding: 1.75rem 1.5rem 1.6rem;
  overflow: hidden;
}
.exam-gate__card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}
.exam-gate__brand { text-align: center; margin-bottom: 1.25rem; }
.exam-gate__kicker {
  display: inline-flex; align-items: center; gap: .4rem;
  margin: .85rem 0 .4rem; padding: .28rem .75rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
  background: rgba(47,158,143,.12); color: var(--primary);
  border: 1px solid rgba(47,158,143,.25);
}
.exam-gate--waiting .exam-gate__kicker {
  background: rgba(232,184,109,.12); color: var(--accent);
  border-color: rgba(232,184,109,.3);
}
.exam-gate__desc {
  color: var(--muted); margin: .55rem auto 0; max-width: 36rem; line-height: 1.85; font-size: .95rem;
}
.exam-gate__meta {
  display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.exam-gate__meta > div {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .85rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .86rem; color: var(--muted);
}
.exam-gate__meta i { color: var(--primary); }
.exam-gate__locked {
  margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1rem; border-radius: 14px;
  background: rgba(227,93,106,.08); border: 1px dashed rgba(227,93,106,.35);
  color: var(--danger); font-weight: 700; font-size: .92rem;
}
.brand-orb--wait {
  background: linear-gradient(145deg, #c49a3c, #8a5a12) !important;
  box-shadow: 0 10px 30px rgba(196,154,60,.35) !important;
}
.countdown-box--hero {
  margin-top: .25rem;
  padding: 1.25rem 1rem 1.35rem;
  background:
    linear-gradient(180deg, rgba(232,184,109,.12), rgba(255,255,255,.03));
  border: 1px solid rgba(232,184,109,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.countdown-box--hero .countdown-digits span {
  font-size: clamp(1.35rem, 5vw, 1.8rem);
  background: linear-gradient(180deg, var(--text), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.countdown-box--done {
  border-color: rgba(62,207,142,.45) !important;
  background: rgba(62,207,142,.1) !important;
}
.exam-gate__form .form-control-lg {
  border-radius: 14px; padding-top: .9rem; padding-bottom: .9rem;
}
.exam-gate__form .btn-primary {
  border-radius: 14px; padding: .9rem 1rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- صفحه اصلی شیک ---------- */
.guest-main--home {
  display: block;
  padding: 0;
  min-height: 100vh;
}
.home-page { overflow-x: hidden; }
.home-hero {
  position: relative;
  min-height: 100vh;
  padding: 1.25rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.home-hero__glow {
  position: absolute; inset: -20% -10% auto;
  height: 55vh;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(47,158,143,.38), transparent 55%),
    radial-gradient(ellipse at 20% 30%, rgba(232,184,109,.2), transparent 50%);
  pointer-events: none; z-index: 0;
  animation: glowPulse 8s ease-in-out infinite;
}
.home-hero__shine {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.04) 50%, transparent 60%);
  animation: shineMove 9s linear infinite;
}
.home-hero__orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: .45; z-index: 0; pointer-events: none;
}
.home-hero__orb--1 {
  width: 240px; height: 240px; top: 14%; left: 6%;
  background: rgba(47,158,143,.55); animation: floaty 7s ease-in-out infinite;
}
.home-hero__orb--2 {
  width: 170px; height: 170px; bottom: 18%; right: 10%;
  background: rgba(232,184,109,.38); animation: floaty 9s ease-in-out infinite reverse;
}
.home-hero__orb--3 {
  width: 120px; height: 120px; top: 42%; right: 28%;
  background: rgba(90,140,220,.28); animation: floaty 11s ease-in-out infinite;
}
.home-hero__grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 28%, transparent 75%);
}
.home-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.home-top__brand {
  display: flex; align-items: center; gap: .7rem;
}
.home-top__text { display: flex; flex-direction: column; line-height: 1.2; }
.home-top__text strong { font-size: .95rem; }
.home-top__text small { color: var(--muted); font-size: .75rem; }
.home-top__mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, var(--primary), #2a6f9e);
  box-shadow: 0 10px 28px rgba(47,158,143,.4);
}
.home-theme-btn { border-radius: 12px !important; }
.home-hero__content {
  position: relative; z-index: 2;
  max-width: 760px; margin: auto; text-align: center;
  padding: 2.2rem 0 1.5rem;
}
.home-kicker {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .85rem;
  padding: .4rem 1rem; border-radius: 999px;
  background: rgba(47,158,143,.12); border: 1px solid rgba(47,158,143,.28);
  color: var(--primary); font-size: .85rem; font-weight: 700;
}
.home-kicker__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px rgba(62,207,142,.2); animation: pulse 2s ease infinite;
}
.home-brand {
  margin: 0; font-size: clamp(3.4rem, 13vw, 6rem); font-weight: 900;
  letter-spacing: .14em; line-height: .95;
  background: linear-gradient(120deg, #fff 8%, var(--primary) 48%, var(--accent) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brandIn .85s cubic-bezier(.2,.8,.2,1) both;
  filter: drop-shadow(0 10px 30px rgba(47,158,143,.18));
}
html[data-theme="light"] .home-brand {
  background: linear-gradient(120deg, #123048 8%, var(--primary) 50%, var(--accent));
  -webkit-background-clip: text; background-clip: text;
}
.home-instructor {
  margin: 1rem 0 0; font-size: 1.2rem; color: var(--muted);
}
.home-instructor strong {
  font-size: 1.35rem;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-lead {
  margin: 1.05rem auto 0; max-width: 34rem;
  color: var(--muted); font-size: 1.05rem; line-height: 1.95;
}
.home-cta-block { margin-top: 1.9rem; }
.home-link-hint {
  display: flex; gap: 1rem; align-items: flex-start; text-align: right;
  max-width: 480px; margin: 0 auto; padding: 1.15rem 1.2rem;
  border-radius: 18px; background: var(--surface);
  border: 1px solid var(--border); backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.home-link-hint__icon {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(232,184,109,.14); color: var(--accent);
}
.home-link-hint strong { display: block; margin-bottom: .25rem; }
.home-link-hint p { margin: 0; color: var(--muted); line-height: 1.8; font-size: .92rem; }
.home-features {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  max-width: 980px; width: 100%; margin: 1.75rem auto 0;
}
.home-feature {
  padding: 1.25rem 1.2rem; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(14px); box-shadow: var(--shadow);
  animation: rise .7s ease both; animation-delay: var(--d, 0s);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.home-feature:hover {
  transform: translateY(-6px);
  border-color: rgba(47,158,143,.45);
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
}
.home-feature__icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(47,158,143,.14); color: var(--primary); margin-bottom: .8rem;
}
.home-feature h2 { font-size: 1.02rem; margin: 0 0 .4rem; }
.home-feature p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.75; }

@keyframes glowPulse {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes brandIn {
  from { opacity: 0; transform: translateY(22px) scale(.94); }
  to { opacity: 1; transform: none; }
}
@keyframes shineMove {
  from { transform: translateX(-30%); }
  to { transform: translateX(30%); }
}

@media (max-width: 900px) {
  .home-features { grid-template-columns: 1fr; max-width: 440px; }
  .home-hero { padding-bottom: 2rem; }
  .exam-gate { width: min(100%, 520px); }
}
@media (max-width: 576px) {
  .home-hero { padding: 1rem 1rem 1.75rem; }
  .home-hero__content { padding-top: 1.1rem; }
  .home-link-hint { text-align: right; }
  .auth-stage, .exam-login-stage, .rules-stage { width: 100%; }
  .auth-card, .rules-card, .exam-gate__card { padding: 1.15rem .9rem; border-radius: 18px; }
  .exam-gate__meta { gap: .45rem; }
  .exam-gate__meta > div { font-size: .8rem; padding: .4rem .65rem; }
  .exam-gate__form .btn-primary,
  .rules-card .btn-primary,
  .auth-card .btn-primary {
    width: 100%;
    min-height: 50px;
    font-size: 1rem !important;
  }
  .countdown-digits > div { padding: .55rem .25rem; }
  .countdown-box--hero { padding: 1rem .7rem 1.1rem; }
  body { padding-left: env(safe-area-inset-left, 0); padding-right: env(safe-area-inset-right, 0); }
}

/* انیمیشن نرم‌تر کارت‌ها */
.glass-card, .home-feature, .stat-card, .option-item {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background .28s ease;
}
.btn {
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(47,158,143,.28); }

