:root {
  --bg: #05080f;
  --bg-2: #070d1a;
  --panel: #0b1524;
  --panel-2: #0f1c30;
  --border: #16263f;
  --accent: #29d3ee;
  --accent-strong: #22b8d6;
  --accent-glow: rgba(41, 211, 238, 0.35);
  --text: #e8f1f8;
  --muted: #8ba0b6;
  --green: #2ee06a;
  --red: # f2554d;
  --red: #f2554d;
  --radius: 16px;
  --maxw: 1180px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  font-family: "Vazirmatn", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #0d2036 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.progress-wrap {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.progress-wrap.active {
  opacity: 1;
}

.progress-track {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.15s linear;
}

.progress-percent {
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 42px;
  height: 42px;
}

.brand-text b {
  display: block;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text);
}

.brand-text b span {
  color: var(--accent);
}

.brand-text small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.nav a.active {
  color: var(--accent);
  background: rgba(41, 211, 238, 0.08);
}

.menu-toggle {
  display: none;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-btn {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.cart-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-btn svg {
  width: 20px;
  height: 20px;
}

.cart-count {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #04222b;
  font-size: 11px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 18px;
}

.cart-count.show {
  display: flex;
}

.page {
  display: none;
  padding: 48px 0 80px;
  animation: fadeUp 0.4s ease;
}

.page.active {
  display: block;
}

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

.section-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #04222b;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

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

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 32px;
  min-height: 460px;
}

.hero-welcome {
  font-size: 28px;
  color: var(--accent);
  font-style: italic;
  margin-bottom: 4px;
}

.hero h1 {
  font-size: 64px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 1px;
}

.hero h1 span {
  color: var(--accent);
}

.hero .lead {
  font-size: 18px;
  color: var(--text);
  margin: 18px 0;
}

.hero p {
  color: var(--muted);
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-img {
  position: relative;
}

.hero-img img {
  border-radius: 20px;
  width: 100%;
}

.features {
  margin-top: 48px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.feature {
  text-align: center;
  padding: 8px;
}

.feature .ico {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  color: var(--accent);
}

.feature b {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

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

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

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-head b {
  font-size: 17px;
}

.card-head .ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

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

.status-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-card .name {
  font-size: 16px;
  font-weight: 700;
}

.status-card .ico {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.status-card .info {
  font-size: 13px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.badge.on {
  color: var(--green);
  background: rgba(46, 224, 106, 0.08);
  border-color: rgba(46, 224, 106, 0.3);
}

.badge.off {
  color: var(--red);
  background: rgba(242, 85, 77, 0.08);
  border-color: rgba(242, 85, 77, 0.3);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.green {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.dot.red {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

#mta_players,
#mta_players_full,
#mta_ping,
#mta_ping_full,
#footer_players {
  direction: ltr;
  unicode-bidi: isolate;
}

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

.media-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.media-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.media-card .ico {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--accent);
  background: rgba(41, 211, 238, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.media-card b {
  display: block;
  font-size: 16px;
}

.media-card span {
  font-size: 13px;
  color: var(--muted);
}

.gateway-alert {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(242, 85, 77, 0.08);
  border: 1px solid rgba(242, 85, 77, 0.35);
  color: #ffb4b0;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 600;
}

.gateway-alert.show {
  display: flex;
}

.gateway-alert .ico {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

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

.shop-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.shop-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.shop-card .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--panel-2);
}

.shop-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-card .tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: #04222b;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.shop-card .body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.shop-card .body b {
  font-size: 16px;
}

.shop-card .price {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.shop-card .price small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.shop-card .btn {
  width: 100%;
  margin-top: auto;
}

.cart-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 20px;
}

.cart-empty svg {
  width: 64px;
  height: 64px;
  color: var(--muted);
  opacity: 0.6;
}

.cart-empty b {
  font-size: 18px;
}

.cart-empty p {
  color: var(--muted);
  margin-bottom: 8px;
}

.cart-layout {
  display: none;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.cart-item img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--panel-2);
}

.cart-item-info {
  flex: 1;
}

.cart-item-info b {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.cart-item-info .price {
  color: var(--accent);
  font-weight: 700;
}

.cart-item-info .price small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.qty-control button {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
}

.qty-control button:hover {
  background: rgba(41, 211, 238, 0.1);
}

.qty-control span {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--red);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.remove-btn:hover {
  background: rgba(242, 85, 77, 0.1);
}

.cart-summary {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 90px;
}

.cart-summary h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.cart-summary .total {
  color: var(--accent);
  font-size: 18px;
}

.gateway-select {
  margin: 20px 0;
}

.gateway-select > label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.gateway-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gateway-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 14px;
}

.gateway-option:hover {
  border-color: var(--accent);
}

.gateway-option.selected {
  border-color: var(--accent);
  background: rgba(41, 211, 238, 0.06);
}

.gateway-option input {
  display: none;
}

.gateway-option .radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.gateway-option.selected .radio-dot {
  border-color: var(--accent);
}

.gateway-option.selected .radio-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}

#checkout_btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 3000;
}

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

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

.gallery-grid img {
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.news-item b {
  font-size: 15px;
}

.news-item span {
  font-size: 13px;
  color: var(--muted);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span {
  color: var(--muted);
  font-size: 14px;
}

.info-row b {
  font-size: 15px;
}

.ip-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 16px;
  margin: 14px 0;
}

.ip-box button {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
}

.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer h4 {
  font-size: 16px;
  margin-bottom: 16px;
}

.footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer ul li a,
.footer p {
  color: var(--muted);
  font-size: 14px;
}

.footer ul li a:hover {
  color: var(--accent);
}

.footer .socials {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.footer .socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
}

.footer .socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.trust-slot {
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  min-width: 110px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-slot img {
  max-height: 100px;
  width: auto;
}

.trust-placeholder {
  background: var(--panel);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.footer-bottom .copyright {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-bottom .links {
  display: flex;
  gap: 20px;
}

.developer-credit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.dev-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(41, 211, 238, 0.1);
  border: 1px solid rgba(41, 211, 238, 0.25);
  border-radius: 8px;
  color: var(--accent);
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
}

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

.dev-text b {
  color: var(--accent);
  font-weight: 700;
}

.dev-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: monospace;
  font-size: 13px;
  direction: ltr;
  unicode-bidi: isolate;
  transition: color 0.2s ease;
}

.dev-phone::before {
  content: "📞";
  font-size: 12px;
}

.dev-phone:hover {
  color: var(--accent);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero h1 {
    font-size: 46px;
  }
  .hero p {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-3,
  .status-grid,
  .media-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .cart-summary {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    display: none;
  }
  .nav.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 36px;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3,
  .status-grid,
  .media-grid,
  .shop-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
  }
  .developer-credit {
    flex-wrap: wrap;
    justify-content: center;
  }
}

.shop-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  justify-content: center;
}

.shop-cat-btn {
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.shop-cat-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.shop-cat-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: bold;
}

.stock-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}

.stock-badge.stock-low {
  background: rgba(234,179,8,0.12);
  color: #eab308;
}

.stock-badge.stock-out {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}
