/* =========================================
   Darkness Town - الستايل الرئيسي
   ========================================= */

body {
  margin: 0;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

/* ---------- الألوان والخطوط (غيّر من هنا) ---------- */

:root {
  --bg: #070605;
  --surface: #11100e;
  --surface-2: #1a1814;
  --line: #2a2520;
  --fg: #f3eee8;
  --muted: #a59c92;
  --orange: #ff7a1a;
  --orange-deep: #c2510a;
  --orange-glow: rgba(255,122,26,.35);
  --display: "Chakra Petch","Readex Pro",system-ui,sans-serif;
  --body: "Readex Pro",system-ui,"Segoe UI",Tahoma,sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  background: radial-gradient(900px 500px at 50% -10%,rgba(255,122,26,.10),transparent 70%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.012) 0 1px,transparent 1px 4px),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top,0px);
  z-index: 60;
  background: var(--bg);
}

a {
  color: inherit;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px,env(safe-area-inset-left,0px));
  padding-right: max(16px,env(safe-area-inset-right,0px));
}

/* ---------- الشريط العلوي ---------- */

header {
  position: sticky;
  top: env(safe-area-inset-top,0px);
  z-index: 50;
  background: rgba(7,6,5,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding-block: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .08em;
}

.brand b {
  color: var(--orange);
}

.mini-logo {
  direction: ltr;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--orange);
  background: #000;
}

.nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.nav a.tab {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  transition: color .2s,background .2s;
}

.nav a.tab:hover {
  color: var(--fg);
  background: var(--surface-2);
}

.nav a.tab[aria-current="page"] {
  color: #000;
  background: var(--orange);
  font-weight: 500;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- الصفحات ---------- */

.view {
  padding-block: 56px 80px;
}

/* ---------- الرئيسية ---------- */

.hero {
  position: relative;
  text-align: center;
  padding-block: 40px 20px;
  overflow: hidden;
}

.watermark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
}

.watermark span {
  font-family: var(--display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(220px,48vw,520px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,122,26,.10);
  background: linear-gradient(180deg,rgba(255,122,26,.10),rgba(255,122,26,0) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  transform: skewX(-8deg);
  letter-spacing: -.04em;
}

.hero>*:not(.watermark) {
  position: relative;
  z-index: 1;
}

.logo {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 200deg,var(--orange),var(--orange-deep),var(--orange));
  box-shadow: 0 0 50px var(--orange-glow),0 0 0 1px rgba(255,122,26,.4);
}

.logo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,#1b120a,#000 70%);
  display: grid;
  place-items: center;
  border: 3px solid #000;
  position: relative;
  overflow: hidden;
}

.logo-inner::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,122,26,.35);
}

.logo-inner span {
  display: block;
  direction: ltr;
  text-align: center;
  line-height: 1;
  font-family: var(--display);
  font-weight: 700;
  font-style: normal;
  font-size: 62px;
  color: var(--orange);
  letter-spacing: 0;
  text-shadow: 0 0 18px var(--orange-glow);
  transform: skewX(-10deg);
  transform-origin: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17,16,14,.8);
  font-size: 14px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% {
    opacity: .4;
  }
}

.status .on {
  color: var(--orange);
}

.status .sep {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.status .count {
  font-family: var(--display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

h1.title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px,9vw,96px);
  line-height: 1;
  margin: 22px 0 0;
  letter-spacing: .04em;
  direction: ltr;
}

h1.title .o {
  color: var(--orange);
  text-shadow: 0 0 30px var(--orange-glow);
}

.lead {
  max-width: 640px;
  margin: 22px auto 0;
  color: #d8d1c8;
  font-size: clamp(16px,2.4vw,19px);
  font-weight: 300;
  text-wrap: balance;
}

.ctas {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  font-family: var(--body);
  transition: transform .2s,box-shadow .2s,background .2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-primary {
  background: var(--orange);
  color: #000;
  box-shadow: 0 8px 30px var(--orange-glow);
}

.btn-primary:hover {
  box-shadow: 0 10px 40px rgba(255,122,26,.55);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--fg);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--orange);
}

.code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

.code button {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--orange);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
  direction: ltr;
}

.code button:hover {
  border-color: var(--orange);
}

/* ---------- عناوين الأقسام ---------- */

.head {
  text-align: center;
  margin-bottom: 44px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .3em;
  color: var(--orange);
  text-transform: uppercase;
  direction: ltr;
}

.head h2 {
  font-size: clamp(30px,5vw,46px);
  margin: 8px 0 10px;
  font-weight: 700;
  text-wrap: balance;
}

.head p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 560px;
}

/* ---------- الأرقام ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 48px;
}

.stat {
  background: var(--surface);
  padding: 24px;
  text-align: center;
}

.stat .n {
  font-family: var(--display);
  font-size: clamp(28px,4vw,40px);
  font-weight: 700;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.stat .l {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- الإنجازات ---------- */

.ach-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}

.ach {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s,transform .25s;
}

.ach:hover {
  border-color: var(--orange);
  transform: translateY(-4px);
}

.slot {
  aspect-ratio: 16/10;
  max-width: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  gap: 6px;
  background: repeating-linear-gradient(135deg,var(--surface-2) 0 12px,#15130f 12px 24px);
  border-bottom: 1px dashed var(--line);
  position: relative;
}

.slot svg {
  width: 34px;
  height: 34px;
  color: var(--orange);
  opacity: .7;
}

.slot .tag {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: #000;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--display);
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 6px;
  direction: ltr;
}

.ach-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.ach-body h3 {
  margin: 0;
  font-size: 19px;
}

.ach-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.ach-body .date {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  color: var(--orange);
  font-family: var(--display);
  direction: ltr;
  text-align: end;
}

/* ---------- طاقم الإدارة ---------- */

.tier {
  margin-bottom: 56px;
}

.tier-label {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 22px;
}

.tier-label::before, .tier-label::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 180px;
  background: linear-gradient(90deg,transparent,var(--line));
}

.tier-label::after {
  transform: scaleX(-1);
}

.tier-label span {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--orange);
  font-size: 14px;
  direction: ltr;
}

.row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 22px;
  text-align: center;
  width: 300px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: border-color .25s;
}

.card:hover {
  border-color: var(--orange);
}

.avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  background: repeating-linear-gradient(135deg,var(--surface-2) 0 8px,#15130f 8px 16px);
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-bottom: 8px;
}

.avatar svg {
  width: 38px;
  height: 38px;
  color: var(--orange);
  opacity: .6;
}

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

.role {
  display: inline-block;
  font-size: 13px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255,122,26,.12);
  color: var(--orange);
  border: 1px solid rgba(255,122,26,.35);
}

.card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14.5px;
}

.meta {
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.meta dd {
  margin: 0;
  font-family: var(--display);
  direction: ltr;
}

.meta dl {
  margin: 0;
  display: contents;
}

/* بطاقة الأونر (الكبيرة) */

.card.owner {
  width: 420px;
  padding: 36px 28px;
  border-color: rgba(255,122,26,.55);
  background: linear-gradient(180deg,rgba(255,122,26,.10),var(--surface) 55%);
  box-shadow: 0 0 60px rgba(255,122,26,.12);
}

.card.owner .avatar {
  width: 140px;
  height: 140px;
  border-width: 4px;
  box-shadow: 0 0 34px var(--orange-glow);
}

.card.owner h3 {
  font-size: 26px;
}

.crown {
  color: var(--orange);
  width: 30px;
  height: 30px;
}

/* ---------- الفوتر ---------- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- رسالة النسخ ---------- */
.toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom,0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--orange);
  color: #000;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 10px;
  opacity: 0;
  transition: .25s;
  pointer-events: none;
  z-index: 70;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- عن السيرفر ---------- */

.about {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
}

.about-text {
  min-width: 0;
}

.about-text h3 {
  font-size: 24px;
  margin: 0 0 10px;
}

.about-text p {
  color: #d8d1c8;
  margin: 0 0 14px;
  max-width: 62ch;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
  margin-top: 20px;
}

.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.fact b {
  font-family: var(--display);
  color: var(--orange);
  font-size: 18px;
}

.about .slot {
  border-radius: 16px;
  border: 1px dashed var(--line);
}

.rules {
  margin-top: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
}

.rules h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.rules ol {
  margin: 0;
  padding-inline-start: 22px;
  color: #d8d1c8;
  display: grid;
  gap: 6px;
}

.rules li::marker {
  color: var(--orange);
  font-family: var(--display);
  font-weight: 700;
}

/* ---------- المميزات ---------- */

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}

.feat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: border-color .25s;
}

.feat:hover {
  border-color: var(--orange);
}

.feat .ic {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,122,26,.12);
  border: 1px solid rgba(255,122,26,.35);
  color: var(--orange);
  margin-bottom: 14px;
}

.feat .ic svg {
  width: 24px;
  height: 24px;
}

.feat h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.feat p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- المتجر ---------- */

.store-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  align-items: start;
}

.pkg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pkg.hot {
  border-color: var(--orange);
  box-shadow: 0 0 50px rgba(255,122,26,.15);
}

.pkg .slot {
  aspect-ratio: 16/9;
}

.pkg-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pkg-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

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

.price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  color: var(--orange);
  white-space: nowrap;
}

.price small {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--body);
  font-weight: 400;
}

.pkg ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  color: #d8d1c8;
  font-size: 14.5px;
}

.pkg li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.pkg li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 9px;
  flex: none;
  border-radius: 2px;
  background: var(--orange);
  transform: rotate(45deg);
}

.pkg .btn {
  justify-content: center;
  margin-top: 6px;
  width: 100%;
}

.badge {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: var(--orange);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
}

.note {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 28px;
}

/* ---------- الأسئلة ---------- */

.faq {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 20px;
  transition: border-color .2s;
}

.faq details[open] {
  border-color: var(--orange);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 500;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

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

.faq summary::after {
  content: "+";
  font-family: var(--display);
  font-size: 24px;
  color: var(--orange);
  line-height: 1;
  transition: transform .2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* ---------- الجوال ---------- */
@media (max-width:860px) {
  .feat-grid, .store-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .about {
    grid-template-columns: 1fr;
  }
}

@media (max-width:560px) {
  .feat-grid, .store-grid, .facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width:860px) {
  .ach-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .stats {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:560px) {
  .ach-grid {
    grid-template-columns: 1fr;
  }
  .nav {
    justify-content: center;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .logo {
    width: 124px;
    height: 124px;
  }
  .logo-inner span {
    font-size: 50px;
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* الصور الحقيقية داخل الأماكن */

.slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar {
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta {
  margin-bottom: 0;
}

.meta dd.ar {
  font-family: var(--body);
  direction: rtl;
}
