:root {
  --bg-deep: #0f0518;
  --bg-mid: #1a0a2e;
  --bg-soft: #16082a;
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --gold: #fbbf24;
  --gold-light: #fde68a;
  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --radius: 16px;
  --font: 'Vazirmatn', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

.page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.page__bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 45%, var(--bg-soft) 100%);
}

.page__stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 18% 22%, rgba(255, 255, 255, 0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 62% 12%, rgba(255, 255, 255, 0.35) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 82% 38%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 72%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 88% 78%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
    radial-gradient(1.2px 1.2px at 8% 55%, rgba(255, 255, 255, 0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 48% 88%, rgba(255, 255, 255, 0.25) 0%, transparent 100%);
  animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

.page__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
}

.page__glow--1 {
  width: 420px;
  height: 420px;
  background: var(--purple);
  top: -120px;
  right: -80px;
}

.page__glow--2 {
  width: 340px;
  height: 340px;
  background: #f59e0b;
  bottom: 10%;
  left: -100px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(15, 5, 24, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.header__logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.35));
}

.header__name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--gold-light);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.5vw, 24px);
  font-size: 0.88rem;
  font-weight: 600;
}

.header__nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.header__nav a:hover {
  color: #fff;
}

.header__web {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.15);
  color: var(--purple-light) !important;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px) 48px;
}

.hero__badge {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.hero__title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.hero__title-gold {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 45%, #d97706 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(245, 158, 11, 0.25));
}

.hero__title-sub {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 700;
  color: var(--text-muted);
}

.hero__desc {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.02rem;
  margin-bottom: 28px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  color: #1a0a2e;
  background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 40%, #f59e0b 100%);
  box-shadow:
    0 8px 28px rgba(245, 158, 11, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn--primary:hover {
  box-shadow:
    0 12px 36px rgba(245, 158, 11, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.08rem;
}

.btn__icon svg {
  width: 22px;
  height: 22px;
}

.hero__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero__meta-dot {
  opacity: 0.4;
}

.hero__warn {
  font-size: 0.85rem;
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.hero__warn code {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: #fecaca;
}

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 16px;
}

.hero__logo-scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(400px, 100%);
  height: min(400px, 100%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero__rays {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(167, 139, 250, 0.2) 8deg,
    transparent 16deg,
    transparent 30deg,
    rgba(251, 191, 36, 0.12) 38deg,
    transparent 48deg,
    transparent 62deg,
    rgba(236, 72, 153, 0.14) 70deg,
    transparent 80deg,
    transparent 100deg,
    rgba(129, 140, 248, 0.16) 108deg,
    transparent 118deg,
    transparent 140deg,
    rgba(196, 181, 253, 0.18) 148deg,
    transparent 158deg,
    transparent 180deg,
    rgba(167, 139, 250, 0.2) 188deg,
    transparent 198deg,
    transparent 220deg,
    rgba(244, 114, 182, 0.14) 228deg,
    transparent 238deg,
    transparent 260deg,
    rgba(251, 191, 36, 0.13) 268deg,
    transparent 278deg,
    transparent 300deg,
    rgba(192, 132, 252, 0.17) 308deg,
    transparent 318deg,
    transparent 340deg,
    rgba(167, 139, 250, 0.22) 348deg,
    transparent 360deg
  );
  animation: spin-rays 48s linear infinite;
  mask-image: radial-gradient(circle, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 70%);
}

@keyframes spin-rays {
  to { transform: rotate(360deg); }
}

.hero__logo-glow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.5) 0%, transparent 70%);
  filter: blur(24px);
  animation: glow-pulse 3.2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.hero__logo-img {
  position: relative;
  z-index: 2;
  display: block;
  width: min(320px, 88vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 36px rgba(124, 58, 237, 0.72));
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.section-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 900;
  margin-bottom: 32px;
  color: #fff;
}

.section-title--left {
  text-align: right;
}

.features {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 48px) 64px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.35);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-card--duel { border-top: 3px solid #a78bfa; }
.feature-card--tournament { border-top: 3px solid #fbbf24; }
.feature-card--themed { border-top: 3px solid #34d399; }
.feature-card--friends { border-top: 3px solid #818cf8; }
.feature-card--coins { border-top: 3px solid #fcd34d; }
.feature-card--rank { border-top: 3px solid #f472b6; }

.showcase {
  padding: 48px clamp(16px, 4vw, 48px) 72px;
  background: linear-gradient(180deg, transparent 0%, rgba(124, 58, 237, 0.06) 50%, transparent 100%);
}

.showcase__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.showcase__text p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.showcase__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.showcase__list li {
  position: relative;
  padding-right: 22px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
}

.showcase__list li::before {
  content: '✦';
  position: absolute;
  right: 0;
  color: var(--gold);
  font-size: 0.75rem;
  top: 2px;
}

.showcase__phones {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone {
  position: absolute;
  width: 200px;
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(145deg, #2a1545, #12061f);
  border: 2px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.phone--back {
  right: 12%;
  top: 20px;
  transform: rotate(-8deg) scale(0.92);
  opacity: 0.85;
}

.phone--front {
  left: 12%;
  bottom: 0;
  transform: rotate(6deg);
  z-index: 2;
}

.phone__screen {
  border-radius: 20px;
  background: linear-gradient(180deg, #1a0a2e, #0f0518);
  padding: 16px 12px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone__bar {
  height: 8px;
  width: 60%;
  margin: 0 auto 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.phone__scores {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
  font-size: 1.2rem;
}

.phone__score--me { color: #a78bfa; }
.phone__score--opp { color: #fbbf24; }
.phone__vs { font-size: 0.65rem; color: var(--text-muted); }

.phone__question {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  line-height: 1.5;
}

.phone__opt {
  font-size: 0.68rem;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.phone__opt--sel {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(124, 58, 237, 0.25);
}

.phone__crown {
  text-align: center;
  font-size: 2rem;
  margin-top: 24px;
}

.phone__logo-text {
  text-align: center;
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.phone__start {
  margin: 0 auto;
  padding: 10px 24px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  color: #1a0a2e;
  width: fit-content;
}

.phone__modes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

.install {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 48px) 64px;
}

.install__steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.install__steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
}

.install__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--gold-light);
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.install__steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.install__steps p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cta {
  padding: 0 clamp(16px, 4vw, 48px) 72px;
}

.cta__card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 28px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.2), rgba(26, 10, 46, 0.9));
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.cta__icon {
  width: min(160px, 60vw);
  height: auto;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 24px rgba(124, 58, 237, 0.4));
}

.cta__card h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.cta__card p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 16px 40px;
  border-top: 1px solid var(--glass-border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--purple-light);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    align-items: center;
  }

  .hero__visual {
    order: -1;
    min-height: 280px;
  }

  .hero__logo-img {
    width: min(260px, 90vw);
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase__inner {
    grid-template-columns: 1fr;
  }

  .section-title--left {
    text-align: center;
  }

  .showcase__phones {
    height: 340px;
  }
}

@media (max-width: 560px) {
  .header__nav a:not(.header__web) {
    display: none;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .phone--back {
    right: 0;
  }

  .phone--front {
    left: 0;
  }
}
