:root {
  --bg: #080c14;
  --bg-alt: #0e1422;
  --text: #eef2fa;
  --muted: #8b9bb8;
  --accent: #3dd6c8;
  --accent-2: #6b8cff;
  --accent-warm: #c084fc;
  --card: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.09);
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(8, 12, 20, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.lang-switch-label {
  white-space: nowrap;
}

.lang-picker {
  position: relative;
}

.lang-picker-btn {
  appearance: none;
  background: var(--card);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 1.6rem 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  min-width: 5.5rem;
  text-align: left;
}

.lang-picker-btn:hover,
.lang-picker-btn:focus {
  border-color: rgba(61, 214, 200, 0.4);
  outline: none;
}

.lang-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 100%;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.lang-picker-menu[hidden] {
  display: none;
}

.lang-picker-menu li {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
}

.lang-picker-menu li:hover:not(.is-selected) {
  background: #f0f2f6;
}

.lang-picker-menu li.is-selected {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), #4a6fd4);
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
}

.logo-en {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.25;
  max-width: min(320px, 48vw);
}

.logo-zh {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.1rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.35rem;
  font-size: 0.92rem;
  transition: color 0.15s;
}

nav a:hover {
  color: var(--accent);
}

@media (max-width: 560px) {
  .header-right {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0.5rem;
  }

  nav a {
    margin-left: 0.85rem;
    font-size: 0.85rem;
  }

  .lang-switch-label {
    display: none;
  }
}

/* ---- RTL (Urdu) ---- */
html[dir="rtl"] body {
  font-family: "Segoe UI", "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", system-ui, sans-serif;
}

html[dir="rtl"] .header-inner {
  flex-direction: row-reverse;
}

html[dir="rtl"] .header-right {
  flex-direction: row-reverse;
}

html[dir="rtl"] nav a {
  margin-left: 0;
  margin-right: 1.35rem;
}

html[dir="rtl"] .product-points li,
html[dir="rtl"] .feature-list li {
  padding-left: 0;
  padding-right: 1rem;
}

html[dir="rtl"] .product-points li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .lang-picker-btn {
  padding: 0.35rem 0.65rem 0.35rem 1.6rem;
  background-position: left 0.45rem center;
  text-align: right;
}

html[dir="rtl"] .lang-picker-menu {
  right: auto;
  left: 0;
}

@media (max-width: 560px) {
  html[dir="rtl"] nav a {
    margin-right: 0.85rem;
  }

  html[dir="rtl"] .header-right {
    align-items: flex-start;
  }
}

/* ---- hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 4rem;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.hero-glow {
  position: absolute;
  inset: -30% auto auto -10%;
  width: 70%;
  height: 480px;
  background: radial-gradient(ellipse at 30% 0%, rgba(61, 214, 200, 0.22), transparent 68%);
  pointer-events: none;
}

.hero-glow-2 {
  inset: -10% -20% auto auto;
  width: 55%;
  background: radial-gradient(ellipse at 70% 20%, rgba(107, 140, 255, 0.18), transparent 65%);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
  font-weight: 700;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
}

.lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.68rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.94rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #061018;
  box-shadow: 0 8px 28px rgba(61, 214, 200, 0.22);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(61, 214, 200, 0.35);
}

/* ---- sections ---- */
.section {
  padding: 3.75rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  margin-bottom: 2rem;
}

.section h2 {
  margin: 0 0 0.45rem;
  font-size: 1.8rem;
}

.section-desc {
  color: var(--muted);
  margin: 0;
  max-width: 36rem;
}

/* ---- products ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.6rem;
}

.product-featured {
  border-color: rgba(61, 214, 200, 0.25);
  background: linear-gradient(145deg, rgba(61, 214, 200, 0.06), rgba(107, 140, 255, 0.04));
}

.product-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.product-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(107, 140, 255, 0.12);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.55rem;
}

.product-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
}

.product-sub {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--accent);
}

.product-card > p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.product-points {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

.product-points li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.product-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- games ---- */
.game-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  transition: border-color 0.15s, transform 0.15s;
}

.game-card:hover {
  border-color: rgba(192, 132, 252, 0.3);
  transform: translateY(-2px);
}

.game-card-more {
  border-style: dashed;
  opacity: 0.92;
}

.game-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent-warm);
  background: rgba(192, 132, 252, 0.12);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.55rem;
}

.game-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- about ---- */
.about-grid {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: 1.15fr 1fr;
  align-items: start;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-grid > div > p {
  color: var(--muted);
  margin: 0;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.94rem;
}

.feature-list strong {
  color: var(--text);
}

/* ---- contact ---- */
.contact-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, rgba(61, 214, 200, 0.05), rgba(107, 140, 255, 0.04));
  max-width: 640px;
}

.contact-box h2 {
  margin: 0 0 0.5rem;
}

.contact-box > p {
  margin: 0;
  color: var(--muted);
}

.contact-brand {
  margin-top: 1.1rem !important;
  font-weight: 600;
  color: var(--text) !important;
  font-size: 0.95rem;
}

.contact-email {
  margin-top: 0.85rem !important;
  font-size: 0.95rem;
  color: var(--muted);
}

.contact-email a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.contact-email a:hover {
  text-decoration: underline;
}

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.sep {
  opacity: 0.45;
}

.footer-mail {
  color: var(--muted);
  text-decoration: none;
}

.footer-mail:hover {
  color: var(--accent);
}

/* ---- privacy links (home) ---- */
.privacy-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.privacy-link-card {
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  transition: border-color 0.15s, transform 0.15s;
}

.privacy-link-card:hover {
  border-color: rgba(61, 214, 200, 0.35);
  transform: translateY(-2px);
}

.privacy-link-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(61, 214, 200, 0.1);
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.65rem;
}

.privacy-link-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  color: var(--text);
}

.privacy-link-card p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

.privacy-link-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

html[dir="rtl"] .privacy-link-cta::after {
  content: ' ←';
}

html[dir="ltr"] .privacy-link-cta::after {
  content: ' →';
}
