
    @font-face {
      font-family: 'Delta';
      src: url('fonts/delta.ttf') format('truetype');
      font-display: swap;
    }
    @font-face {
      font-family: 'Delta2';
      src: url('fonts/delta2.ttf') format('truetype');
      font-display: swap;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      background: #0a0a0a;
      color: #e0e0e0;
      font-family: 'Delta', sans-serif;
      min-height: 100vh;
    }

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  background: transparent;
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(39, 164, 248, 0.12);
  padding: 0.7rem 0;
}


.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  cursor: default;
}

.nav-logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}


.logo-community {
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: #152f40;
}

.logo-delta {
  font-size: 1rem;
  font-weight: 800;
  color: #27a4f8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-cta {
  margin-left: 0.6rem;
  background: #27a4f8;
  color: #0a0a0a !important;
  padding: 0.48rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.nav-cta:hover {
  color: #0a0a0a !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209, 127, 251, 0.4);
  filter: brightness(1.15);
}


/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: rgba(10, 10, 26, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0.4rem;
    transition: right 0.35s ease;
    border-left: 1px solid rgba(212, 175, 55, 0.1);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    width: 100%;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
    text-align: center;
    padding: 0.65rem 1rem;
  }
}









/* rules.css */

@font-face {
  font-family: 'Delta2';
  src: url('fonts/delta2.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Delta';
  src: url('fonts/delta.ttf') format('truetype');
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #27a4f8;
  --blue-dim: rgba(39, 164, 248, 0.15);
  --blue-glow: rgba(39, 164, 248, 0.25);
  --bg: #0a0c10;
  --surface: #10141a;
  --surface2: #13181f;
  --border: rgba(39, 164, 248, 0.15);
  --text: #d8e4f0;
  --muted: #7a8fa8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  /* Persian body text uses Delta, English uses Delta2 */
  font-family: 'Delta', 'Delta2', sans-serif;
    overflow-x: clip; /* به جای hidden — sticky رو نمیشکنه */
}

.page-wrapper {          /* ← یه div با این کلاس دور محتوا بذار */
  overflow-x: hidden;
}

/* ─── HERO ─────────────────────────── */

.rules-hero {
  position: relative;
  height: 340px;
  overflow: hidden;
  background: url('photo/backrules.jpg') center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  border-bottom: 2px solid var(--blue);
}

.rules-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(5,8,14,0.92) 0%,
    rgba(5,8,14,0.6) 55%,
    rgba(5,8,14,0.1) 100%);
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 0 3rem 2.5rem;
  direction: ltr;
}

.hero-welcome {
  font-family: 'Delta', sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 0.6rem;
  direction: rtl;
  text-align: right;
}

.hero-title {
  font-family: 'Delta2', sans-serif;
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 80px var(--blue-glow);
}

.hero-subtitle {
  font-family: 'Delta2', sans-serif;
  font-size: 1rem;
  color: var(--blue);
  letter-spacing: 0.15em;
  margin-top: 0.3rem;
}

/* watermark text behind title */
.rules-hero::before {
  content: 'RULES';
  position: absolute;
  bottom: 1.5rem;
  left: 2rem;
  font-family: 'Delta2', sans-serif;
  font-size: clamp(5rem, 18vw, 14rem);
  font-weight: 900;
  color: rgba(255,255,255,0.04);
  z-index: 1;
  letter-spacing: 0.05em;
  line-height: 1;pointer-events: none;
}

/* ─── LAYOUT ────────────────────────── */

.rules-main {
  display: flex;
  flex-direction: row-reverse; /* TOC سمت راست */
  align-items: flex-start;  /* ← این حتماً باید باشه */
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
  gap: 2rem;
  /* direction: rtl رو نگه دار */
  direction: rtl;
  overflow: visible; /* ← مهم! بدون این sticky کار نمیکنه */
}

/* ─── LEFT CONTENT ──────────────────── */

.rules-content {
  flex: 1;
  min-width: 0;
  direction: rtl;
}

/* section title bar */
.section-titlebar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
  direction: ltr;
}

.hex-icon {
  position: relative;
  width: 40px;
  height: 46px;
  flex-shrink: 0;
}
.hex-icon svg { position: absolute; inset: 0; }
.hex-icon span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--blue);
}

.section-heading {
  font-family: 'Delta2', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--blue), transparent);
}

/* info box */
.info-box {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;direction: rtl;
}

.info-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--blue-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-weight: bold;
  font-size: 0.85rem;
}

.info-box p {
  font-family: 'Delta', sans-serif;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.8;
}

.blue-link { color: var(--blue); text-decoration: none; }
.blue-link:hover { text-decoration: underline; }

/* handbook card */
.handbook-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  direction: rtl;
}

.handbook-icon {
  flex-shrink: 0;
  position: relative;
  width: 38px;
  height: 44px;
}
.handbook-icon svg { position: absolute; inset: 0; }
.handbook-icon span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.handbook-text { flex: 1; }
.handbook-text strong {
  font-family: 'Delta2', sans-serif;
  font-size: 0.95rem;
  color: #fff;
  display: block;
  margin-bottom: 0.2rem;
}
.handbook-text p {
  font-family: 'Delta', sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.handbook-link {
  flex-shrink: 0;
  color: var(--blue);
  font-family: 'Delta2', sans-serif;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.handbook-link:hover { opacity: 0.75; }

/* search */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1.1rem;
  margin-bottom: 2rem;
}

.search-icon { color: var(--muted); font-size: 0.9rem; }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Delta2', sans-serif;
  font-size: 0.9rem;
}
.search-input::placeholder { color: var(--muted); }

/* ─── RULE SECTIONS ─────────────────── */

.rule-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 1.5rem;
}

.rule-section-title {
  font-family: 'Delta2', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  direction: ltr;
}

.rule-section-title .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue);
  flex-shrink: 0;
}

.rule-subsection {
  font-family: 'Delta2', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.2rem 0 0.5rem;
  direction: ltr;
}

.rule-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  direction: rtl;
}

.rule-list li {
  font-family: 'Delta', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.85;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(39,164,248,0.07);
  list-style: none;
  counter-increment: rule-counter;
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}

.rule-list { counter-reset: rule-counter; }

.rule-list li::before {
  content: counter(rule-counter);
  flex-shrink: 0;
  min-width: 1.4rem;
  height: 1.4rem;
  background: var(--blue-dim);
  color: var(--blue);
  border-radius: 4px;
  font-family: 'Delta2', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rule-list li:last-child { border-bottom: none; }

/* search hide */
.rule-section.hidden { display: none; }

/* ─── TOC ───────────────────────────── */

.rules-toc {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  align-self: flex-start;
  border-right: 3px solid var(--blue); /* چون الان سمت راسته */
  border-left: none;
  padding-right: 1.25rem;
  padding-left: 0;
  direction: ltr;
  
}

.toc-title {
  font-family: 'Delta2', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-bottom: 1rem;
 
}

.rules-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.rule-section,
.info-box,
.handbook-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.rule-section.visible,
.info-box.visible,
.handbook-card.visible {
  opacity: 1;
  transform: translateY(0);
}


.toc-cat {
  font-family: 'Delta2', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 0.3rem 0;
  transition: color 0.2s;
  margin-top: 0.5rem;
}
.toc-cat:first-child { margin-top: 0; }
.toc-cat:hover { color: var(--blue); }

.toc-sub {
  font-family: 'Delta2', sans-serif;
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.15rem 0 0.15rem 0.5rem;
  border-left: 1px solid rgba(39,164,248,0.2);
  margin-left: 0.25rem;
  transition: color 0.2s;
}
.toc-sub:hover { color: var(--blue); }

/* ─── RESPONSIVE ────────────────────── */

@media (max-width: 900px) {
  .rules-toc { display: none; }
  .hero-text { padding: 0 1.5rem 2rem; }
}

@media (max-width: 600px) {
  .rules-main { padding: 1.5rem 1rem 4rem; }
  .handbook-card { flex-wrap: wrap; }
  .handbook-link { margin-top: 0.5rem; }
}


















    /* ===== FOOTER ===== */
    .footer {
      position: relative;
      background: #080808;
      border-top: 1px solid rgba(39,164,248,0.1);
      padding: 4rem 0 2rem;
      overflow: hidden;
      /* Force LTR on footer */
      direction: ltr;
    }
    .footer-glow {
      position: absolute;
      top: 0; left: 50%;
      transform: translateX(-50%);
      width: 600px; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(39,164,248,0.4), transparent);
      box-shadow: 0 0 40px 10px rgba(39,164,248,0.08);
    }
    .container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
    .footer-top {
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1.5fr;
      gap: 3rem;
      margin-bottom: 3rem;
    }
    @media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; } }
    @media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

    .footer-brand p {
      font-size: 0.85rem;
      color: rgba(255,255,255,0.45);
      line-height: 1.7;
      margin: 1rem 0 1.4rem;
      max-width: 280px;
      font-family: 'Delta2', sans-serif;
    }

    .socials { display: flex; gap: 0.8rem; }
    .socials a {
      width: 36px; height: 36px;
      border-radius: 50%;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      display: flex; align-items: center; justify-content: center;
      color: rgba(255,255,255,0.5);
      font-size: 0.95rem;
      text-decoration: none;
      transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
    }
    .socials a:hover {
      background: rgba(39,164,248,0.12);
      border-color: rgba(39,164,248,0.4);
      color: #27a4f8;
      transform: translateY(-3px);
    }

    .footer-links h4 {
      font-size: 0.78rem;
      letter-spacing: 0.14em;
      color: #27a4f8;
      text-transform: uppercase;
      margin-bottom: 1.2rem;
      font-family: 'Delta2', sans-serif;
    }
    .footer-links a {
      display: block;
      color: rgba(255,255,255,0.45);
      text-decoration: none;
      font-size: 0.85rem;
      margin-bottom: 0.65rem;
      font-family: 'Delta2', sans-serif;
      transition: color 0.2s, padding-left 0.2s;
    }
    .footer-links a:hover { color: #27a4f8; padding-left: 4px; }

    .footer-discord h4 {
      font-size: 0.78rem;
      letter-spacing: 0.14em;
      color: #27a4f8;
      text-transform: uppercase;
      margin-bottom: 0.8rem;
      font-family: 'Delta2', sans-serif;
    }
    .footer-discord p {
      font-size: 0.82rem;
      color: rgba(255,255,255,0.4);
      line-height: 1.6;
      margin-bottom: 1rem;
      font-family: 'Delta2', sans-serif;
    }
    .btn-discord {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      background: rgba(88,101,242,0.15);
      border: 1px solid rgba(88,101,242,0.35);
      color: #7289da;
      padding: 0.55rem 1.1rem;
      border-radius: 4px;
      text-decoration: none;
      font-size: 0.82rem;
      font-weight: 600;
      font-family: 'Delta2', sans-serif;
      transition: background 0.25s, border-color 0.25s, transform 0.2s;
    }
    .btn-discord:hover {
      background: rgba(88,101,242,0.25);
      border-color: #7289da;
      transform: translateY(-2px);
    }

    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 2rem;
      border-top: 1px solid rgba(255,255,255,0.06);
      flex-wrap: wrap;
      gap: 1rem;
    }
    .footer-bottom p {
      font-size: 0.78rem;
      color: rgba(255,255,255,0.3);
      font-family: 'Delta2', sans-serif;
    }
    .footer-bottom-links { display: flex; gap: 1.5rem; }
    .footer-bottom-links a {
      font-size: 0.78rem;
      color: rgba(255,255,255,0.3);
      text-decoration: none;
      font-family: 'Delta', sans-serif;
      transition: color 0.2s;
    }
    .footer-bottom-links a:hover { color: #27a4f8; }
	

    /* ===== ANIMATIONS ===== */
    @keyframes heroFadeUp {
      from { opacity: 0; transform: translateY(28px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes cardReveal {
      from { opacity: 0; transform: translateY(20px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    @media (max-width: 600px) { .rules-grid { grid-template-columns: 1fr; } }
		
		
		
/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a1a;
}

::-webkit-scrollbar-thumb {
  background: rgba(39, 164, 248, 0.7);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(39, 164, 248, 1);
}


		
		
.scroll-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #27a4f8;
  color: white;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(39,164,248,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s, background 0.2s;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  background: #0e8de0;
  transform: scale(1.1);
}
/* Language toggle button */
.lang-toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-inline-start:14px;
  padding:0.4rem 0.75rem;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.04);
  color:rgba(255,255,255,0.7);
  border-radius:6px;
  font-size:0.78rem;
  font-weight:700;
  letter-spacing:0.03em;
  cursor:pointer;
  font-family:inherit;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.lang-toggle:hover{
  background:rgba(255,255,255,0.09);
  color:#fff;
}
.lang-toggle.fa-active{
  color:#fff;
}
@media (max-width: 768px) {
  .lang-toggle{ margin-inline-start:0; margin-top:0.5rem; width:100%; justify-content:center; }
}
