@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0d0305;
  --surface: #170709;
  --surface-2: #220d10;
  --text: #fff8f8;
  --muted: #f0c4c8;
  --line: rgba(255, 248, 248, 0.16);
  --cyan: #ffffff;
  --green: #ff2d3d;
  --amber: #ffb3ba;
  --red: #d90429;
  --violet: #ffffff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  --header-bg: rgba(13, 3, 5, 0.76);
  --brand-mark-bg: #2a090e;
  --switch-bg: rgba(255, 248, 248, 0.06);
  --hero-canvas-bg: #150711;
  /* v6 glass panels over the living 3D background */
  --glass-card: rgba(23, 7, 9, 0.84);
  --glass-strip: rgba(19, 6, 8, 0.82);
  --hero-noise-overlay: linear-gradient(90deg, rgba(19, 7, 14, 0.66), rgba(19, 7, 14, 0.14) 46%, rgba(19, 7, 14, 0.18) 72%, rgba(19, 7, 14, 0.46));
  --hero-title-fill: linear-gradient(180deg, #fff6e0 0%, #ffdf8a 36%, #ffb347 60%, #f0812c 86%, #c85a1e 100%);
  --hero-title-shadow: rgba(56, 16, 8, 0.92);
  --hero-accent: #ffd27a;
  --hero-star: #ffce54;
  --mobile-nav-bg: #170709;
  --forum-bg:
    radial-gradient(circle at 14% 0%, rgba(217, 4, 41, 0.16), transparent 270px),
    linear-gradient(180deg, #150508 0%, #0d0305 380px),
    var(--bg);
  --forum-header-bg: rgba(13, 3, 5, 0.82);
  --forum-copy: var(--muted);
  --forum-card-bg: rgba(23, 7, 9, 0.92);
  --forum-board-bg: rgba(23, 7, 9, 0.96);
  --forum-board-priority-bg: linear-gradient(90deg, rgba(217, 4, 41, 0.18), transparent), var(--forum-board-bg);
  --forum-category-header-bg: linear-gradient(180deg, rgba(255, 45, 61, 0.14), rgba(23, 7, 9, 0.94));
  --forum-chip-bg: rgba(255, 45, 61, 0.16);
  --forum-chip-text: #ffb3ba;
  --forum-member-bg: rgba(255, 248, 248, 0.08);
  --forum-member-text: var(--text);
  --forum-modal-backdrop: rgba(5, 2, 4, 0.72);
  --forum-modal-bg: linear-gradient(145deg, rgba(217, 4, 41, 0.14), rgba(23, 7, 9, 0.98)), var(--surface);
  --forum-modal-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --forum-input-bg: rgba(13, 3, 5, 0.74);
  --forum-warning-bg: rgba(217, 4, 41, 0.14);
  --forum-warning-text: #ffb3ba;
  --captcha-bg: linear-gradient(135deg, rgba(255, 45, 61, 0.18), rgba(255, 248, 248, 0.06)), #100306;
  --captcha-text: var(--text);
  --hero-subtext: #ffe3e5;
  --deep-surface: #130406;
  --deep-surface-text: #fff2f3;
  --deep-accent-bg: #320a10;
  --tab-active-bg: #330a10;
  --featured-card-bg: #25080d;
  --featured-card-border: rgba(255, 45, 61, 0.42);
  --footer-bg: #0b0204;
  --chip-text: #ffffff;
  --chip-neutral-bg: rgba(255, 248, 248, 0.12);
  --minimap-bg: #160609;
  --minimap-grid: rgba(255, 255, 255, 0.06);
  --minimap-road: rgba(255, 248, 248, 0.16);
  --minimap-zone-fill: rgba(255, 255, 255, 0.04);
  --minimap-zone-border: rgba(255, 255, 255, 0.7);
  --strength-weak: #e5484d;
  --strength-medium: #f0a202;
  --strength-strong: #2ecc71;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #fff5f6;
  --text: #1d1d22;
  --muted: #656b78;
  --line: rgba(29, 29, 34, 0.12);
  --cyan: #d90429;
  --green: #d90429;
  --amber: #b45309;
  --red: #d90429;
  --violet: #7c3aed;
  --shadow: 0 18px 42px rgba(31, 35, 46, 0.1);
  --header-bg: rgba(255, 255, 255, 0.88);
  --brand-mark-bg: #fff5f6;
  --switch-bg: rgba(255, 255, 255, 0.74);
  --hero-canvas-bg: #dfe9f5;
  /* v6 glass panels over the living 3D background */
  --glass-card: rgba(255, 255, 255, 0.90);
  --glass-strip: rgba(255, 255, 255, 0.88);
  --hero-noise-overlay: linear-gradient(90deg, rgba(255, 252, 248, 0.66), rgba(255, 250, 248, 0.20) 46%, rgba(255, 250, 248, 0.24) 72%, rgba(255, 252, 248, 0.54));
  --hero-title-fill: linear-gradient(180deg, #7c3a10 0%, #9a4e15 40%, #b96818 70%, #83400f 100%);
  --hero-title-shadow: rgba(255, 248, 240, 0.9);
  --hero-accent: #a15c1a;
  --hero-star: #c07f14;
  --mobile-nav-bg: #ffffff;
  --forum-bg:
    radial-gradient(circle at 14% 0%, rgba(217, 4, 41, 0.11), transparent 270px),
    linear-gradient(180deg, #fff 0%, #f7f8fb 380px),
    var(--bg);
  --forum-header-bg: rgba(255, 255, 255, 0.88);
  --forum-copy: #525866;
  --forum-card-bg: rgba(255, 255, 255, 0.92);
  --forum-board-bg: #ffffff;
  --forum-board-priority-bg: linear-gradient(90deg, rgba(217, 4, 41, 0.08), transparent), #ffffff;
  --forum-category-header-bg: linear-gradient(180deg, #ffffff, #fff7f8);
  --forum-chip-bg: #fff1f3;
  --forum-chip-text: #a6001d;
  --forum-member-bg: #f7f8fb;
  --forum-member-text: #333946;
  --forum-modal-backdrop: rgba(31, 35, 46, 0.34);
  --forum-modal-bg: linear-gradient(145deg, rgba(217, 4, 41, 0.08), rgba(255, 255, 255, 0.98)), var(--surface);
  --forum-modal-shadow: 0 28px 90px rgba(31, 35, 46, 0.18);
  --forum-input-bg: #ffffff;
  --forum-warning-bg: #fff6f7;
  --forum-warning-text: #a6001d;
  --captcha-bg: linear-gradient(135deg, rgba(217, 4, 41, 0.12), rgba(255, 255, 255, 0.9)), #ffffff;
  --captcha-text: #a6001d;
  --hero-subtext: #5c1c26;
  --deep-surface: #fff1f2;
  --deep-surface-text: #4a151d;
  --deep-accent-bg: #ffe1e4;
  --tab-active-bg: #fff0f1;
  --featured-card-bg: #fff5f6;
  --featured-card-border: rgba(217, 4, 41, 0.3);
  --footer-bg: #ffffff;
  --chip-text: #a6001d;
  --chip-neutral-bg: rgba(29, 29, 34, 0.06);
  --minimap-bg: #fdf1f2;
  --minimap-grid: rgba(29, 29, 34, 0.06);
  --minimap-road: rgba(29, 29, 34, 0.14);
  --minimap-zone-fill: rgba(29, 29, 34, 0.03);
  --minimap-zone-border: rgba(29, 29, 34, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  padding: 0 clamp(18px, 4vw, 52px);
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.site-header[data-elevated="true"] {
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 45, 61, 0.62);
  background: var(--brand-mark-bg);
  color: var(--green);
  border-radius: 8px;
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.language-switch,
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--switch-bg);
}

.language-switch button,
.theme-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.language-switch button[aria-pressed="true"],
.theme-switch button[aria-pressed="true"] {
  border-color: rgba(255, 45, 61, 0.48);
  background: rgba(255, 45, 61, 0.16);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.journey-stage {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  contain: paint;
}

#zoneCanvas {
  /* v6: the 3D city is now the LIVING BACKGROUND of the whole page -
   * fixed behind every section (not just the hero). hero3d.js keeps
   * animating it in an ambient camera mode after the journey ends. */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--hero-canvas-bg);
  z-index: 0;
}

/* v6: readability scrim that fades in over the moving city as the
 * scroll journey finishes - driven by the DOM journey director. */
.bg-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg,
    rgba(13, 3, 5, 0.12),
    rgba(13, 3, 5, 0.58) 26%,
    rgba(13, 3, 5, 0.78) 55%,
    rgba(13, 3, 5, 0.88));
}

html[data-theme="light"] .bg-scrim {
  background: linear-gradient(180deg,
    rgba(247, 248, 251, 0.14),
    rgba(247, 248, 251, 0.70) 30%,
    rgba(247, 248, 251, 0.86) 62%,
    rgba(240, 243, 250, 0.94));
}

/* v6: all flow content paints above the fixed background layers */
main > section,
main > .section-strip,
body > footer,
body > .site-footer {
  position: relative;
  z-index: 2;
}

.hero-noise {
  position: absolute;
  inset: 0;
  background:
    var(--hero-noise-overlay),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 4px);
  pointer-events: none;
}

/* act 1 keeps the classic hero grid but becomes an overlay layer
 * inside the sticky journey stage */
.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  align-items: end;
  gap: 40px;
  width: auto;
  padding: 116px clamp(18px, 4vw, 40px) 76px;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.journey-stage .eyebrow {
  color: var(--hero-accent);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.journey-stage h1 {
  margin: 0;
  font-size: clamp(56px, 12vw, 142px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  max-width: 880px;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  background: var(--hero-title-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 3px 0 var(--hero-title-shadow))
    drop-shadow(-1px 0 0 var(--hero-title-shadow))
    drop-shadow(1px 0 0 var(--hero-title-shadow))
    drop-shadow(0 14px 34px rgba(0, 0, 0, 0.42));
}

/* San Andreas HUD-style wanted stars under the logotype */
.hero-stars {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  font-size: 19px;
  letter-spacing: 0.32em;
  color: var(--hero-star);
  text-shadow:
    -1.5px -1.5px 0 rgba(46, 14, 6, 0.9),
    1.5px -1.5px 0 rgba(46, 14, 6, 0.9),
    -1.5px 1.5px 0 rgba(46, 14, 6, 0.9),
    1.5px 1.5px 0 rgba(46, 14, 6, 0.9),
    0 4px 10px rgba(0, 0, 0, 0.4);
  user-select: none;
}

html[dir="rtl"] .hero-stars {
  justify-content: flex-start;
}

.hero-text {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--hero-subtext);
  font-size: clamp(17px, 2vw, 21px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.30);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action,
.server-ip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-action {
  padding: 0 20px;
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
}

.secondary-action {
  padding: 0 18px;
  background: rgba(255, 248, 248, 0.08);
  border-color: var(--line);
}

.primary-action:hover,
.secondary-action:hover,
.server-ip button:hover {
  transform: translateY(-1px);
}

.server-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass-card);
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-weight: 800;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(255, 45, 61, 0.16);
  flex: none;
}

/* Real query states from /api/server/status (data-state on .panel-topline) */
.panel-topline[data-state="online"] {
  color: var(--green);
}

.panel-topline[data-state="online"] .live-dot {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(255, 45, 61, 0.2);
  animation: livePulse 2.4s ease-in-out infinite;
}

.panel-topline[data-state="offline"] {
  color: #9aa0a6;
}

.panel-topline[data-state="offline"] .live-dot {
  background: #9aa0a6;
  box-shadow: 0 0 0 6px rgba(154, 160, 166, 0.14);
  animation: none;
}

.panel-topline[data-state="unknown"],
.panel-topline[data-state="checking"] {
  color: var(--text);
}

.panel-topline[data-state="unknown"] .live-dot,
.panel-topline[data-state="checking"] .live-dot {
  background: #ffb000;
  box-shadow: 0 0 0 6px rgba(255, 176, 0, 0.16);
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(255, 45, 61, 0.18); }
  50% { box-shadow: 0 0 0 9px rgba(255, 45, 61, 0.05); }
}

.report-inbox .report-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 45, 61, 0.14);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.report-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.report-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 248, 0.03);
}

.report-item strong {
  color: var(--green);
  font-size: 14px;
}

.report-item span {
  font-size: 12px;
  color: var(--muted, #8b8f94);
}

.report-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  overflow-wrap: anywhere;
}

.server-ip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--deep-surface);
  color: var(--deep-surface-text);
  overflow: hidden;
}

.server-ip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.server-ip button {
  min-width: 76px;
  background: var(--deep-accent-bg);
  border-color: rgba(255, 45, 61, 0.45);
  color: var(--green);
  font-weight: 800;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.status-grid div {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 248, 248, 0.08);
}

.status-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.status-grid dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  right: 34px;
  bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.strip-item {
  min-height: 120px;
  padding: 28px clamp(20px, 4vw, 46px);
  border-right: 1px solid var(--line);
  background: var(--glass-strip);
}

.strip-item:last-child {
  border-right: 0;
}

.strip-item strong,
.strip-item span {
  display: block;
}

.strip-item strong {
  font-size: 22px;
}

.strip-item span {
  max-width: 340px;
  margin-top: 8px;
  color: var(--muted);
}

.content-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 88px 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.mode-tab {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.mode-tab.active {
  background: var(--tab-active-bg);
  color: var(--green);
  border-color: rgba(255, 45, 61, 0.45);
}

.mode-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 20px;
  align-items: stretch;
}

.mode-visual,
.mode-detail,
.tier-card,
.rule-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass-card);
}

.mode-visual {
  min-height: 430px;
  overflow: hidden;
  padding: 18px;
}

.mini-map {
  position: relative;
  height: 100%;
  min-height: 390px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, var(--minimap-grid) 1px, transparent 1px),
    linear-gradient(0deg, var(--minimap-grid) 1px, transparent 1px),
    var(--minimap-bg);
  background-size: 44px 44px;
}

.road,
.zone,
.marker {
  position: absolute;
  display: block;
}

.road {
  background: var(--minimap-road);
}

.road-a {
  width: 130%;
  height: 44px;
  left: -12%;
  top: 46%;
  transform: rotate(-12deg);
}

.road-b {
  width: 52px;
  height: 130%;
  left: 56%;
  top: -12%;
  transform: rotate(18deg);
}

.zone {
  border: 1px solid;
  background: var(--minimap-zone-fill);
}

.zone-a {
  width: 34%;
  height: 32%;
  left: 10%;
  top: 12%;
  border-color: var(--minimap-zone-border);
}

.zone-b {
  width: 36%;
  height: 34%;
  right: 9%;
  bottom: 12%;
  border-color: rgba(255, 45, 61, 0.72);
}

.marker {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.marker-a {
  left: 24%;
  top: 28%;
  background: var(--cyan);
}

.marker-b {
  left: 62%;
  top: 48%;
  background: var(--red);
}

.marker-c {
  left: 78%;
  top: 72%;
  background: var(--green);
}

.mode-detail {
  padding: 28px;
}

.mode-label {
  color: var(--amber);
  margin: 0 0 12px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.mode-detail h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
}

.mode-detail p:not(.mode-label) {
  color: var(--muted);
}

.feature-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.feature-list li {
  padding: 12px 12px 12px 16px;
  border-left: 3px solid var(--green);
  background: rgba(255, 248, 248, 0.06);
  border-radius: 6px;
}

.premium-section,
.rules-section {
  border-top: 1px solid var(--line);
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tier-card {
  padding: 24px;
  min-height: 220px;
}

.tier-card.featured {
  background: var(--featured-card-bg);
  border-color: var(--featured-card-border);
}

.tier-tag {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.tier-tag.bronze {
  color: var(--chip-text);
  background: rgba(255, 45, 61, 0.2);
}

.tier-tag.gold {
  color: var(--green);
  background: rgba(255, 45, 61, 0.16);
}

.tier-tag.silver {
  color: var(--chip-text);
  background: var(--chip-neutral-bg);
}

.tier-card h3 {
  margin: 24px 0 10px;
  font-size: 28px;
}

.tier-card p {
  margin: 0;
  color: var(--muted);
}

.rules-grid {
  display: grid;
  gap: 12px;
}

.rule-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  padding: 18px 22px;
}

.rule-item span {
  color: var(--cyan);
  font-weight: 900;
}

.rule-item p {
  margin: 0;
  color: var(--text);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 52px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--footer-bg);
}

.site-footer span:first-child {
  color: var(--text);
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 45, 61, 0.45);
  background: #21070b;
  color: var(--green);
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

html[dir="rtl"] body {
  font-family: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
  font-feature-settings: "ss01" 1;
}

html[dir="rtl"] .hero-copy,
html[dir="rtl"] .section-heading,
html[dir="rtl"] .mode-detail,
html[dir="rtl"] .forum-hero,
html[dir="rtl"] .board-copy,
html[dir="rtl"] .side-card {
  text-align: right;
}

html[dir="rtl"] .feature-list li,
html[dir="rtl"] .activity-list li {
  padding-right: 16px;
  padding-left: 12px;
  border-right: 3px solid var(--green);
  border-left: 0;
}

html[dir="rtl"] .board-numbers {
  text-align: left;
}

html[dir="rtl"] .board-latest {
  padding-right: 16px;
  padding-left: 0;
  border-right: 1px solid var(--line);
  border-left: 0;
}

.forum-page {
  min-height: 100vh;
  background: var(--forum-bg);
}

.forum-page .site-header {
  background: var(--forum-header-bg);
}

.forum-page .brand-mark {
  background: var(--brand-mark-bg);
  color: var(--red);
}

.forum-page .nav-links a:hover,
.forum-page .language-switch button[aria-pressed="true"],
.forum-page .theme-switch button[aria-pressed="true"] {
  color: var(--text);
}

.forum-shell {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 112px 0 78px;
}

.forum-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 30px 0 24px;
  border-bottom: 1px solid var(--line);
}

.forum-hero h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: 0;
}

.forum-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--forum-copy);
  font-size: 18px;
}

.forum-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.forum-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin: 22px 0;
}

.forum-search {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.forum-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
  color: var(--text);
}

.forum-search input:focus {
  border-color: rgba(255, 45, 61, 0.72);
}

.forum-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.forum-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.forum-stats article,
.forum-category,
.side-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
  box-shadow: var(--shadow);
}

.forum-stats article {
  padding: 16px;
}

.forum-stats span,
.forum-stats small {
  display: block;
  color: var(--muted);
}

.forum-stats span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.forum-stats strong {
  display: block;
  margin: 5px 0 2px;
  font-size: 30px;
  line-height: 1;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.forum-main {
  display: grid;
  gap: 18px;
}

.forum-category {
  overflow: hidden;
}

.category-header,
.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--forum-category-header-bg);
}

.category-header .eyebrow {
  margin-bottom: 6px;
}

.category-header h2,
.side-title h2,
.red-card h2 {
  margin: 0;
  font-size: 22px;
}

.category-header > span,
.side-pill {
  white-space: nowrap;
  padding: 6px 10px;
  border: 1px solid rgba(255, 45, 61, 0.4);
  border-radius: 999px;
  color: var(--green);
  background: rgba(255, 45, 61, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.forum-board {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 82px minmax(190px, 250px);
  gap: 16px;
  align-items: center;
  min-height: 116px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--forum-board-bg);
}

.forum-board:last-child {
  border-bottom: 0;
}

.forum-board.is-hidden,
.forum-category.is-hidden {
  display: none;
}

.forum-board.priority {
  background: var(--forum-board-priority-bg);
}

.forum-board.compact {
  min-height: 98px;
}

.board-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 45, 61, 0.5);
  border-radius: 8px;
  background: var(--forum-chip-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.board-copy h3 {
  margin: 0;
  font-size: 20px;
}

.board-copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

.board-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.board-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--forum-chip-bg);
  color: var(--forum-chip-text);
  font-size: 12px;
}

.board-numbers {
  text-align: right;
}

.board-numbers strong,
.board-numbers span,
.board-latest strong,
.board-latest span {
  display: block;
}

.board-numbers strong {
  font-size: 24px;
}

.board-numbers span,
.board-latest span {
  color: var(--muted);
  font-size: 12px;
}

.board-latest {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.board-latest strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.legal-section {
  padding-top: 44px;
}

.legal-grid {
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}

.legal-card {
  padding: 24px;
}

.legal-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.legal-card .feature-list {
  margin-top: 0;
}

.legal-card p {
  margin: 0;
  color: var(--forum-copy);
}

.side-card {
  padding: 18px;
}

.side-title {
  margin-bottom: 14px;
}

.side-title a {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.activity-list,
.member-list,
.donator-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-list li {
  padding-left: 12px;
  border-left: 3px solid var(--green);
}

.activity-list strong,
.activity-list span {
  display: block;
}

.activity-list span,
.donator-list dd {
  color: var(--muted);
  font-size: 12px;
}

.member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-list span {
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--forum-member-bg);
  color: var(--forum-member-text);
  font-size: 13px;
  font-weight: 800;
}

.member-list .role-admin-1 { color: #168a47; background: rgba(46, 204, 113, 0.12); }
.member-list .role-admin-2 { color: #0b78b6; background: rgba(35, 166, 240, 0.12); }
.member-list .role-admin-3 { color: #9a6500; background: rgba(255, 176, 0, 0.14); }
.member-list .role-admin-4 { color: #c33a17; background: rgba(255, 92, 51, 0.13); }
.member-list .role-admin-5 { color: #7633c7; background: rgba(180, 85, 255, 0.13); }
.member-list .role-owner { color: #8a6500; background: rgba(255, 215, 0, 0.24); border-color: rgba(255, 183, 0, 0.5); }

.forum-page .secondary-action {
  background: var(--surface);
}

.forum-page .site-footer {
  background: var(--surface);
}

.red-card {
  background: var(--forum-modal-bg);
  border-color: rgba(217, 4, 41, 0.22);
}

.red-card p:not(.eyebrow) {
  color: var(--forum-copy);
}

.red-card .primary-action {
  width: 100%;
  margin-top: 8px;
}

.donator-list {
  display: grid;
  gap: 10px;
}

.donator-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.donator-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.donator-list dt,
.donator-list dd {
  margin: 0;
}

.forum-modal[hidden] {
  display: none;
}

.forum-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.forum-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--forum-modal-backdrop);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.forum-modal-panel {
  position: relative;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid rgba(217, 4, 41, 0.24);
  border-radius: 8px;
  background: var(--forum-modal-bg);
  box-shadow: var(--forum-modal-shadow);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.forum-modal.is-open .forum-modal-backdrop {
  opacity: 1;
}

.forum-modal.is-open .forum-modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes modalContentIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.forum-modal-body.modal-content-enter {
  animation: modalContentIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  .forum-modal-backdrop,
  .forum-modal-panel,
  .forum-modal-body.modal-content-enter {
    transition: none !important;
    animation: none !important;
  }
}

.forum-modal-panel h2 {
  margin: 0 46px 16px 0;
  font-size: 28px;
}

.forum-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.forum-modal-close:hover {
  transform: rotate(90deg);
  border-color: rgba(255, 45, 61, 0.5);
  color: var(--green);
}

.forum-modal-body {
  display: grid;
  gap: 12px;
}

.forum-modal-body p {
  margin: 0;
  color: var(--muted);
}

.forum-modal-body label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.forum-modal-body input,
.forum-modal-body select,
.forum-modal-body textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--forum-input-bg);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.forum-modal-body input:focus,
.forum-modal-body select:focus,
.forum-modal-body textarea:focus {
  border-color: rgba(255, 45, 61, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 45, 61, 0.16);
}

.forum-modal-body textarea {
  min-height: 104px;
  resize: vertical;
}

.password-strength {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: -6px;
}

.password-strength[hidden] {
  display: none;
}

.password-strength-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--strength-weak);
  transition: width 160ms ease, background 160ms ease;
}

.password-strength[data-level="medium"] .password-strength-fill {
  background: var(--strength-medium);
}

.password-strength[data-level="strong"] .password-strength-fill {
  background: var(--strength-strong);
}

.password-strength span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--strength-weak);
}

.password-strength[data-level="medium"] span {
  color: var(--strength-medium);
}

.password-strength[data-level="strong"] span {
  color: var(--strength-strong);
}

.terms-agreement {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 500 !important;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.terms-agreement input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.terms-agreement span {
  line-height: 1.5;
}

.terms-agreement a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: underline;
  cursor: pointer;
}

.forum-form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 45, 61, 0.58);
  border-radius: 8px;
  background: rgba(217, 4, 41, 0.08);
  color: var(--forum-warning-text);
  font-size: 13px;
  font-weight: 800;
}

.forum-form-error[hidden] {
  display: none;
}

.forum-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.security-captcha {
  padding: 12px;
  border: 1px solid rgba(255, 45, 61, 0.38);
  border-radius: 8px;
  background: var(--surface-2);
}

.security-captcha small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.account-avatar-preview {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 2px solid rgba(217, 4, 41, 0.24);
  border-radius: 8px;
  background: var(--forum-chip-bg) center / cover no-repeat;
  color: var(--red);
  font-weight: 900;
  transition: border-color 200ms ease, transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.account-avatar-shell:hover .account-avatar-preview {
  border-color: rgba(217, 4, 41, 0.55);
  transform: scale(1.04);
}

.upload-warning {
  padding: 10px 12px;
  border: 1px solid rgba(217, 4, 41, 0.28);
  border-radius: 8px;
  background: var(--forum-warning-bg);
  color: var(--forum-warning-text) !important;
  font-weight: 800;
}

.captcha-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  background: var(--captcha-bg);
  color: var(--captcha-text);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  user-select: none;
}

.forum-page .captcha-box {
  background: var(--captcha-bg);
  color: var(--captcha-text);
}

.forum-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

html[dir="rtl"] .forum-modal-panel h2 {
  margin: 0 0 16px 46px;
}

html[dir="rtl"] .forum-modal-close {
  right: auto;
  left: 10px;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 18px;
    right: 18px;
    top: 80px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--mobile-nav-bg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
    border-radius: 6px;
  }

  .hero-inner,
  .mode-stage {
    grid-template-columns: 1fr;
  }

  .server-panel {
    max-width: 520px;
  }

  .section-strip,
  .tier-grid,
  .forum-stats {
    grid-template-columns: 1fr;
  }

  .forum-hero,
  .forum-toolbar,
  .forum-layout {
    grid-template-columns: 1fr;
  }

  .forum-actions,
  .forum-filters {
    justify-content: flex-start;
  }

  .forum-sidebar {
    position: static;
  }

  .forum-board {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .board-icon {
    width: 44px;
    height: 44px;
  }

  .board-numbers,
  .board-latest {
    grid-column: 2;
    text-align: left;
  }

  .board-latest {
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .strip-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .strip-item:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 10px;
  }

  .brand span:not(.brand-mark) {
    display: none;
  }

  .language-switch,
  .theme-switch {
    gap: 4px;
    padding: 3px;
  }

  .language-switch button,
  .theme-switch button {
    justify-content: center;
    min-width: 34px;
    padding: 0;
  }

  .language-switch button {
    font-size: 0;
  }

  .language-switch button span {
    font-size: 16px;
  }

  .theme-switch button {
    padding: 0 8px;
    font-size: 11px;
  }

  .hero {
    min-height: 100vh;
  }

  .hero-inner {
    width: min(100% - 28px, 1180px);
    padding-top: 104px;
  }

  .hero-actions,
  .site-footer,
  .forum-actions,
  .forum-filters {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action,
  .forum-filters .mode-tab {
    width: 100%;
  }

  .server-ip {
    align-items: stretch;
    flex-direction: column;
  }

  .server-ip button {
    width: 100%;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .rule-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 380px) {
  .site-header {
    gap: 6px;
    padding: 0 12px;
  }

  .language-switch,
  .theme-switch {
    padding: 2px;
    gap: 3px;
  }

  .language-switch button {
    min-width: 28px;
  }

  .theme-switch button {
    padding: 0 6px;
    font-size: 10px;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
  }
}

/* ---------------------------------- */
/* Dedicated Account page ("HAVOC")   */
/* ---------------------------------- */

.account-shell {
  width: min(1100px, calc(100% - 36px));
  margin: 0 auto;
  padding: 112px 0 78px;
}

.account-hero {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

#havocCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.account-hero-inner {
  position: relative;
  z-index: 1;
}

.account-hero-inner p:not(.eyebrow) {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--forum-copy);
}

.havoc-glitch {
  position: relative;
  margin: 0;
  font-size: clamp(46px, 9vw, 96px);
  line-height: 0.94;
  letter-spacing: 0.02em;
  color: var(--text);
}

.havoc-glitch::before,
.havoc-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.havoc-glitch::before {
  color: #ff2d3d;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: havocGlitchTop 4.4s infinite linear;
}

.havoc-glitch::after {
  color: #4dd0e1;
  clip-path: polygon(0 58%, 100% 58%, 100% 100%, 0 100%);
  animation: havocGlitchBottom 4.1s infinite linear;
}

@keyframes havocGlitchTop {
  0%, 91%, 100% { transform: translate(0, 0); opacity: 0; }
  92% { transform: translate(-4px, -2px); opacity: 0.75; }
  93% { transform: translate(3px, 1px); opacity: 0.6; }
  94% { transform: translate(-2px, 0); opacity: 0; }
}

@keyframes havocGlitchBottom {
  0%, 89%, 100% { transform: translate(0, 0); opacity: 0; }
  90% { transform: translate(4px, 2px); opacity: 0.7; }
  91% { transform: translate(-3px, -1px); opacity: 0.55; }
  92% { transform: translate(2px, 0); opacity: 0; }
}

.account-guard {
  max-width: 480px;
  margin: 40px auto;
  padding: 32px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
}

.account-guard h2 {
  margin: 6px 0 10px;
  font-size: 26px;
}

.account-guard p:not(.eyebrow) {
  margin: 0 0 20px;
  color: var(--forum-copy);
}

.account-guard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.account-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.account-identity,
.account-form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
  box-shadow: var(--shadow);
  padding: 22px;
  animation: modalContentIn 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.account-identity {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
  animation-delay: 40ms;
}

.account-form-panel {
  animation-delay: 140ms;
}

.account-form-panel h2 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.account-avatar-shell {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.account-avatar-preview.big {
  width: 96px;
  height: 96px;
  flex: none;
  font-size: 22px;
  border-radius: 12px;
}

.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.avatar-upload-btn:hover {
  border-color: rgba(255, 45, 61, 0.5);
  color: var(--green);
  transform: translateY(-1px);
}

.account-name {
  font-size: 20px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.account-meta-list {
  width: 100%;
  display: grid;
  gap: 8px;
  margin: 0;
  text-align: left;
}

.account-meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.account-meta-list div:first-child {
  border-top: 0;
}

.account-meta-list dt {
  color: var(--muted);
}

.account-meta-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-permissions {
  width: 100%;
  text-align: left;
}

.permission-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.permission-chips span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--forum-chip-bg);
  color: var(--forum-chip-text);
  font-size: 11px;
  font-weight: 700;
}

.account-identity-actions {
  display: grid;
  width: 100%;
  gap: 8px;
}

.account-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 12px;
}

.account-field-grid label:nth-child(1) { animation-delay: 180ms; }
.account-field-grid label:nth-child(2) { animation-delay: 210ms; }
.account-field-grid label:nth-child(3) { animation-delay: 240ms; }
.account-field-grid label:nth-child(4) { animation-delay: 270ms; }
.account-field-grid label:nth-child(5) { animation-delay: 300ms; }
.account-field-grid label:nth-child(6) { animation-delay: 330ms; }

.account-field-grid label,
.account-form-panel > label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: modalContentIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.account-field-grid input,
.account-field-grid select,
.account-form-panel input,
.account-form-panel select,
.account-form-panel textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--forum-input-bg);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.account-form-panel textarea {
  min-height: 110px;
  resize: vertical;
}

.account-field-grid input:focus,
.account-field-grid select:focus,
.account-form-panel input:focus,
.account-form-panel select:focus,
.account-form-panel textarea:focus {
  border-color: rgba(255, 45, 61, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 45, 61, 0.16);
}

.account-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

@keyframes havocImpact {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 61, 0.5); }
  100% { box-shadow: 0 0 0 18px rgba(255, 45, 61, 0); }
}

.account-identity.havoc-impact,
.account-form-panel.havoc-impact {
  animation: havocImpact 700ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .havoc-glitch::before,
  .havoc-glitch::after {
    animation: none !important;
    opacity: 0 !important;
  }

  .account-identity,
  .account-form-panel,
  .account-field-grid label,
  .account-form-panel > label {
    animation: none !important;
  }

  .account-identity.havoc-impact,
  .account-form-panel.havoc-impact {
    animation: none !important;
  }
}

@media (max-width: 880px) {
  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-meta-list {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .account-field-grid {
    grid-template-columns: 1fr;
  }

  .account-hero {
    min-height: 200px;
  }

  .account-guard-actions {
    flex-direction: column;
  }

  .account-identity,
  .account-form-panel {
    padding: 18px;
  }
}

/* ---------------------------------- */
/* Real forum content system          */
/* ---------------------------------- */

.board-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.forum-board.is-hidden {
  display: none;
}

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

.crumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.crumb-nav a {
  color: var(--green);
  font-weight: 700;
}

.crumb-nav span {
  color: var(--muted);
}

.topic-list {
  overflow: hidden;
}

.topic-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--forum-board-bg);
}

.topic-row:last-child {
  border-bottom: 0;
}

.topic-row:hover {
  background: var(--forum-category-header-bg);
}

.topic-row-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.topic-row-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-row-copy span {
  color: var(--muted);
  font-size: 12px;
}

.topic-row-badges {
  display: flex;
  gap: 6px;
}

.topic-row-stats {
  flex: none;
  text-align: right;
}

.topic-row-stats strong {
  display: block;
  font-size: 20px;
}

.topic-row-stats span {
  color: var(--muted);
  font-size: 11px;
}

.topic-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.topic-badge.pinned {
  background: rgba(255, 45, 61, 0.16);
  color: var(--green);
}

.topic-badge.locked {
  background: var(--forum-chip-bg);
  color: var(--forum-chip-text);
}

.topic-detail-header {
  padding: 6px 0 18px;
}

.topic-detail-header h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.1;
}

.topic-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.topic-post {
  position: relative;
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
}

.topic-post.original-post {
  background: var(--forum-board-priority-bg);
}

.post-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.post-meta .author-link {
  font-weight: 800;
}

.post-meta span {
  color: var(--muted);
  font-size: 12px;
}

.post-body {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.post-delete-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 32px;
}

html[dir="rtl"] .post-delete-btn {
  right: auto;
  left: 14px;
}

.topic-staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 24px;
}

.replies-heading {
  margin: 0 0 12px;
  font-size: 18px;
}

.reply-form-card {
  padding: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
}

.reply-form-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.reply-form-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.reply-form-card textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: var(--forum-input-bg);
  color: var(--text);
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.reply-form-card textarea:focus {
  border-color: rgba(255, 45, 61, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 45, 61, 0.16);
}

.topic-locked-note,
.topic-signin-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-warning-bg);
  color: var(--forum-warning-text);
  font-weight: 700;
  text-align: center;
}

.topic-signin-note a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 880px) {
  .topic-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .topic-row-stats {
    text-align: left;
  }
}

/* ---------------------------------- */
/* Author links, levels, achievements */
/* ---------------------------------- */

.author-link {
  position: relative;
  z-index: 2;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.author-link:hover {
  text-decoration: underline;
}

.level-chip {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--forum-chip-bg);
  color: var(--forum-chip-text);
  font-size: 10px;
  font-weight: 800;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 45, 61, 0.16);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.level-progress {
  width: 100%;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.level-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  width: 4%;
  border-radius: 999px;
  background: var(--green);
  transition: width 300ms ease;
}

.level-progress span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.achievement-badge {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  text-align: center;
}

.achievement-badge.locked {
  opacity: 0.35;
  filter: grayscale(1);
}

.achievement-badge.unlocked {
  border-color: rgba(255, 45, 61, 0.4);
  background: rgba(255, 45, 61, 0.08);
}

.achievement-icon {
  font-size: 22px;
  line-height: 1;
}

.achievement-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

/* ---------------------------------- */
/* Public profile page                */
/* ---------------------------------- */

.profile-view {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
  box-shadow: var(--shadow);
}

.profile-identity {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.profile-stats {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
  padding: 6px 18px;
}

.profile-bio {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--forum-card-bg);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-social-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--forum-chip-bg);
  color: var(--forum-chip-text);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-identity {
    justify-items: center;
  }
}

/* ===================================================================
 * v3 AWWWARDS PASS - journey, preloader, acts, HUD, cursor, sound
 * =================================================================== */

@font-face {
  font-family: "Anton";
  src: url("fonts/anton.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- scroll journey scaffolding ---- */

.hero-journey {
  position: relative;
  /* v6: 440vh (was 560vh) - the same five acts in less wheel travel,
   * so the story feels fast and alive instead of slow; the canvas
   * behind is now transparent because the fixed bg shows through. */
  height: 440vh;
  background: transparent;
}

.journey-stage {
  position: sticky;
  top: 0;
}

/* cinematic letterbox bars (slide in during acts 2-4) */
.letterbox {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  background: #050308;
  z-index: 4;
  pointer-events: none;
}

.letterbox-top { top: 0; }
.letterbox-bottom { bottom: 0; }

html[data-theme="light"] .letterbox {
  background: #17110c;
}

/* thin progress rail on the journey edge */
.journey-progress {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 3px;
  height: 180px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

html[data-theme="light"] .journey-progress {
  background: rgba(20, 12, 8, 0.18);
}

.journey-progress span {
  display: block;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--hero-accent), #ff7a3d);
  border-radius: 2px;
}

/* ---- act overlays ---- */

.act {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.act-block {
  width: min(980px, calc(100% - 40px));
  text-align: center;
}

.act-kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hero-accent);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.act-title {
  margin: 0;
  font-family: "Anton", "Vazirmatn", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(44px, 9.5vw, 132px);
  line-height: 0.94;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--hero-title-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 3px 0 var(--hero-title-shadow))
    drop-shadow(0 18px 44px rgba(0, 0, 0, 0.5));
}

html[dir="rtl"] .act-title {
  font-family: "Vazirmatn", "Anton", Impact, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}

.act-sub {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--hero-subtext);
  font-size: clamp(15px, 2vw, 19px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.act-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.act-chip {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #ffd9a6;
  background: rgba(24, 10, 18, 0.55);
  border: 1px solid rgba(255, 180, 110, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html[data-theme="light"] .act-chip {
  color: #7c3f14;
  background: rgba(255, 251, 245, 0.6);
  border-color: rgba(150, 90, 40, 0.35);
}

.act-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

/* act 3: the live rooftop panel */
.live-block {
  width: min(760px, calc(100% - 40px));
  padding: 34px clamp(18px, 4vw, 44px) 38px;
  border-radius: 20px;
  background: rgba(16, 6, 12, 0.52);
  border: 1px solid rgba(255, 190, 120, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] .live-block {
  background: rgba(255, 252, 246, 0.62);
  border-color: rgba(140, 90, 45, 0.3);
  box-shadow: 0 30px 70px rgba(90, 50, 20, 0.25);
}

.live-block .act-kicker { color: #7ce38b; }
html[data-theme="light"] .live-block .act-kicker { color: #22762f; }

.live-dot.big {
  width: 12px;
  height: 12px;
}

.live-title { font-size: clamp(40px, 7.5vw, 96px); }

.live-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.live-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .live-cell {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(20, 10, 5, 0.08);
}

.live-num {
  font-family: "Anton", "Vazirmatn", Impact, sans-serif;
  font-size: clamp(46px, 7vw, 84px);
  line-height: 1;
  color: #7ce38b;
  text-shadow: 0 0 26px rgba(110, 240, 140, 0.35);
}

html[dir="rtl"] .live-num {
  font-family: "Vazirmatn", Impact, sans-serif;
  font-weight: 900;
}

html[data-theme="light"] .live-num {
  color: #1e7a2c;
  text-shadow: none;
}

.live-num.offline {
  color: #ff5d6c;
  text-shadow: 0 0 26px rgba(255, 90, 110, 0.35);
}

html[data-theme="light"] .live-num.offline { color: #b3202e; }

.live-num.small { font-size: clamp(30px, 4.6vw, 54px); color: #ffd27a; text-shadow: 0 0 20px rgba(255, 180, 90, 0.3); }
html[data-theme="light"] .live-num.small { color: #96591a; text-shadow: none; }

.live-cap {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(255, 232, 200, 0.75);
}

html[data-theme="light"] .live-cap { color: rgba(80, 45, 20, 0.7); }

/* ---- scroll cue (refresh) ---- */

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
  color: var(--hero-accent);
  font-family: "Anton", "Vazirmatn", Impact, sans-serif;
  font-size: 13px;
  letter-spacing: 0.3em;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

html[dir="rtl"] .scroll-cue { font-family: "Vazirmatn", Impact, sans-serif; font-weight: 800; }

.scroll-cue::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: cue-bounce 1.6s ease-in-out infinite;
}

@keyframes cue-bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.6; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue::after { animation: none; }
}

/* ---- GTA-style preloader ---- */

body.loading {
  overflow: hidden;
}

#preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0410;
  transition: opacity 480ms ease 120ms;
}

html[data-theme="light"] #preloader {
  background: #efe7dc;
}

#preloader.done {
  opacity: 0;
}

#preloader.gone {
  display: none;
}

.pre-inner {
  width: min(460px, calc(100% - 48px));
  text-align: center;
}

.pre-logo {
  font-family: "Anton", "Vazirmatn", Impact, sans-serif;
  font-size: clamp(54px, 11vw, 96px);
  line-height: 0.92;
  letter-spacing: 0.03em;
  color: #f5ead2;
  text-shadow: 0 4px 0 #812f16, 0 10px 30px rgba(255, 110, 40, 0.35);
}

html[dir="rtl"] .pre-logo { font-family: "Vazirmatn", Impact, sans-serif; font-weight: 900; }

.pre-logo em {
  font-style: normal;
  background: linear-gradient(180deg, #ffdf8a 0%, #ff8a3d 55%, #c85a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .pre-logo { color: #5d2a10; text-shadow: 0 4px 0 rgba(190, 120, 60, 0.35); }

.pre-status {
  margin-top: 26px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.34em;
  color: #ff9a3d;
  text-transform: uppercase;
}

html[data-theme="light"] .pre-status { color: #a15c1a; }

.pre-bar {
  margin: 14px auto 0;
  width: min(300px, 70%);
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 210, 160, 0.16);
  overflow: hidden;
}

.pre-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff7a3d, #ffd27a);
  box-shadow: 0 0 12px rgba(255, 150, 70, 0.6);
  transition: width 220ms ease-out;
}

.pre-tip {
  margin-top: 18px;
  font-size: 12px;
  color: rgba(255, 226, 190, 0.55);
  letter-spacing: 0.06em;
}

html[data-theme="light"] .pre-tip { color: rgba(90, 50, 25, 0.6); }

/* reveal wipes */
.pre-wipe {
  position: absolute;
  left: 0;
  right: 0;
  height: 50.5%;
  background: #0b0410;
  transform: scaleY(1);
  transform-origin: center;
  transition: transform 700ms cubic-bezier(0.7, 0, 0.2, 1);
}

html[data-theme="light"] .pre-wipe { background: #efe7dc; }

.pre-wipe-a { top: 0; transform-origin: top; }
.pre-wipe-b { bottom: 0; transform-origin: bottom; }

#preloader.done .pre-wipe-a { transform: scaleY(0); }
#preloader.done .pre-wipe-b { transform: scaleY(0); }
#preloader.done .pre-inner { opacity: 0; transition: opacity 300ms ease; }

@media (prefers-reduced-motion: reduce) {
  .pre-wipe { transition-duration: 200ms; }
}

/* ---- HUD garnish (GTA clock + cash) ---- */

.hud {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 90;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

.hud-on .hud {
  display: flex;
}

.hud-clock {
  font-family: "Anton", Impact, sans-serif;
  font-size: 22px;
  color: #f3e7cd;
  letter-spacing: 0.08em;
}

.hud-cash {
  font-family: "Anton", Impact, sans-serif;
  font-size: 17px;
  color: #7ce38b;
  letter-spacing: 0.1em;
}

html[data-theme="light"] .hud-clock { color: #4a2a12; text-shadow: 0 1px 2px rgba(255,255,255,0.6); }
html[data-theme="light"] .hud-cash { color: #1e7a2c; text-shadow: 0 1px 2px rgba(255,255,255,0.6); }

/* ---- ambient sound toggle ---- */

.sound-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffd9a6;
  background: rgba(20, 8, 16, 0.55);
  border: 1px solid rgba(255, 180, 110, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.hud-on .sound-toggle { display: flex; }

.sound-toggle:hover { transform: translateY(-2px); border-color: rgba(255, 200, 130, 0.7); }

html[data-theme="light"] .sound-toggle {
  color: #7c4318;
  background: rgba(255, 252, 246, 0.66);
  border-color: rgba(150, 95, 50, 0.4);
}

.sound-toggle .sound-cross { display: block; }
.sound-toggle .sound-wave { display: none; }
.sound-toggle[aria-pressed="true"] .sound-cross { display: none; }
.sound-toggle[aria-pressed="true"] .sound-wave { display: block; }
.sound-toggle:hover .sound-wave { display: block; }
.sound-toggle:hover .sound-cross { display: none; }

/* ---- custom cursor ---- */

#cursor-dot,
#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0;
  display: none;
}

body.custom-cursor #cursor-dot,
body.custom-cursor #cursor-ring {
  display: block;
}

#cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: #ffd9a6;
  mix-blend-mode: difference;
}

#cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(255, 214, 160, 0.85);
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: width 180ms ease, height 180ms ease, margin 180ms ease, border-color 180ms ease;
}

#cursor-ring.active {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-color: rgba(255, 240, 200, 0.95);
}

body.custom-cursor {
  cursor: none;
}

body.custom-cursor a,
body.custom-cursor button,
body.custom-cursor [role="tab"],
body.custom-cursor .mode-tab,
body.custom-cursor .tier-card {
  cursor: none;
}

body.custom-cursor input,
body.custom-cursor textarea,
body.custom-cursor select {
  cursor: auto;
}

/* ---- journey responsive ---- */

@media (max-width: 900px) {
  .hero-journey { height: 410vh; }
  .journey-progress { right: 8px; height: 120px; }
  .live-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .hero-journey { height: 380vh; }
  .act-block { width: calc(100% - 32px); }
  .act-title { font-size: clamp(34px, 11.5vw, 64px); }
  .live-grid { grid-template-columns: 1fr; }
  .live-block { padding: 22px 16px 26px; }
  .journey-progress { display: none; }
}

@media (max-width: 720px) {
  .hud { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .letterbox { transition: none; }
  #cursor-ring { transition: none; }
}

/* act-1 (hero-inner) overrides the generic .act flex layout: it keeps
 * the classic two-column hero grid pinned to the bottom of the stage */
.act.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  align-items: end;
  justify-content: stretch;
  text-align: start;
}

/* ---------------------------------------------------- */
/* Content v2: 4-mode strip, platform, join, faq,       */
/* telegram CTA, footer (Persian SAMP edition)          */
/* ---------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero-fa-tagline {
  margin: 14px 0 4px;
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 2.2vw, 19px);
  color: var(--hero-accent);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

/* 4-column mode strip */
.section-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .section-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .strip-item:nth-child(2) { border-right: 0; }
  .strip-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Platform section */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

/* ---- v6: glass cards over the living 3D background ----
 * Semi-opaque panels (no backdrop-filter: it is expensive on weak
 * GPUs and the user experience here is scroll smoothness first).
 * The gaps between cards let the animated city show through. */

.platform-card {
  padding: 26px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-card);
  box-shadow: var(--shadow);
}

.platform-card h3 {
  margin: 0 0 10px;
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 20px;
  letter-spacing: 1.5px;
  color: var(--text);
}

.platform-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}

.platform-card.featured {
  border-color: var(--featured-card-border);
  background: var(--featured-card-bg);
}

.platform-card.featured h3 { color: var(--green); }

.platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* Persian join section (static fa, dir=rtl on the section) */
.join-section {
  text-align: start;
}

.join-section .section-heading h2 {
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-weight: 900;
}

.join-intro {
  max-width: 900px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--green);
  border-radius: 12px;
  background: var(--deep-surface);
  color: var(--deep-surface-text);
}

.join-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 2;
}

.join-intro strong { color: var(--green); }

.join-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.join-step {
  position: relative;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-card);
}

.join-step h3 {
  margin: 10px 0 8px;
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.join-step p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--muted);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(145deg, #ff5761, #b3061d);
  box-shadow: 0 8px 22px rgba(217, 4, 41, 0.35);
}

.join-ip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.join-ip code {
  direction: ltr;
  font-family: "Sarasa Mono SC", ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text);
}

.join-step a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Persian FAQ (static fa, dir=rtl) */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 900px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-card);
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  background: var(--tab-active-bg);
  transition: transform 200ms ease;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq-item p {
  margin: 0;
  padding: 16px 22px 20px;
  font-size: 15px;
  line-height: 2;
  color: var(--muted);
}

.faq-item a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Telegram CTA */
.telegram-section {
  padding: 70px clamp(18px, 4vw, 52px) 84px;
  background: var(--deep-surface);
}

.telegram-card {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 38px;
  border: 1px solid rgba(34, 158, 217, 0.5);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 10%, rgba(34, 158, 217, 0.22), transparent 260px),
    linear-gradient(135deg, rgba(34, 158, 217, 0.12), transparent 52%),
    rgba(23, 7, 9, 0.88);
  box-shadow: 0 26px 70px rgba(4, 30, 48, 0.35);
  overflow: hidden;
}

.telegram-icon {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, #38bdf0, #1687c9);
  box-shadow: 0 14px 34px rgba(34, 158, 217, 0.45);
}

.telegram-copy { flex: 1 1 320px; min-width: 240px; }

.telegram-copy h2 {
  margin: 6px 0 4px;
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(30px, 4.5vw, 52px);
  letter-spacing: 1px;
  color: var(--text);
}

.telegram-fa {
  margin: 0;
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--muted);
}

.telegram-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-decoration: none;
  background: linear-gradient(145deg, #38bdf0, #1687c9);
  box-shadow: 0 14px 34px rgba(34, 158, 217, 0.45);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.telegram-cta:hover,
.telegram-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(34, 158, 217, 0.55);
}

.telegram-fa-cta {
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.92;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  padding-right: 12px;
}

/* Footer v2 */
.site-footer {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: baseline;
}

.footer-brand span:first-child {
  color: var(--text);
  font-weight: 800;
}

.footer-brand span[lang="fa"] {
  font-family: "Vazirmatn", system-ui, sans-serif;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}

.footer-ip {
  direction: ltr;
  font-family: "Sarasa Mono SC", ui-monospace, monospace;
  color: var(--muted);
}

.footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #38bdf0;
  font-weight: 700;
  text-decoration: none;
}

.footer-telegram:hover,
.footer-telegram:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* RTL layout helpers for the static Persian sections */
html[dir="rtl"] .telegram-card { text-align: start; }

@media (max-width: 980px) {
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .join-steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .platform-grid { grid-template-columns: 1fr; }
  .telegram-card { padding: 26px 22px; }
  .telegram-icon { width: 64px; height: 64px; }
  .telegram-cta { width: 100%; justify-content: center; }
  .telegram-fa-cta { border-right: 0; padding-right: 0; }
}

/* ==================================================================
 * v6 — PERSIAN TYPOGRAPHY FIXES ("آنلاین" overflow + letter spacing)
 * Persian script needs: zero letter-spacing (joined letters break
 * otherwise), taller line-height than Anton's 0.94, and room to wrap.
 * ================================================================== */

html[lang="fa"] .act-title,
html[lang="fa"] .live-title {
  font-family: "Vazirmatn", "Anton", Impact, sans-serif;
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

html[lang="fa"] .act-title { font-size: clamp(36px, 8vw, 104px); }
html[lang="fa"] .live-title { font-size: clamp(30px, 6.5vw, 84px); line-height: 1.3; }

html[lang="fa"] .act-kicker,
html[lang="fa"] .live-cap,
html[lang="fa"] .act-chip,
html[lang="fa"] .act-sub,
html[lang="fa"] .eyebrow,
html[lang="fa"] .scroll-cue,
html[lang="fa"] .hud-clock,
html[lang="fa"] .hud-cash,
html[lang="fa"] .platform-card h3 {
  letter-spacing: 0.01em;
}

html[lang="fa"] .live-cap { font-size: 12.5px; line-height: 1.5; }
html[lang="fa"] .panel-topline { flex-wrap: wrap; row-gap: 4px; }
html[lang="fa"] .act-kicker { line-height: 1.7; }
html[lang="fa"] .act-sub { line-height: 1.9; }
html[lang="fa"] .act-chip { line-height: 1.8; }

/* ==================================================================
 * v6 — 3D CARD REVEALS + TILT over the living city background
 * (GPU-composited transforms only; no layout work while scrolling)
 * ================================================================== */

.platform-grid,
.tier-grid,
.join-steps,
.rules-grid,
.telegram-section {
  perspective: 1500px;
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 42px, -90px) rotateX(9deg);
    transition:
      opacity 760ms cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 760ms cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
  }

  [data-reveal].in {
    opacity: 1;
    transform: none;
    will-change: auto;
  }
}

@media (hover: hover) and (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .platform-card,
  .tier-card {
    transition: transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1), border-color 300ms ease;
  }

  .platform-card:hover,
  .tier-card:hover {
    transform: translateY(-6px) rotateX(2.2deg);
    border-color: rgba(255, 210, 122, 0.45);
  }

  .platform-card[data-reveal].in,
  .tier-card[data-reveal].in {
    transition:
      opacity 760ms cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1),
      border-color 300ms ease;
  }
}

/* sticky hero overlays stay above the fixed background layers */
.journey-stage { isolation: isolate; }
