:root {
  --bg: #040406;
  --surface: #0c0c0e;
  --surface-hover: #141418;
  --island-bg: rgba(18, 18, 22, 0.85);
  --text-silver: #86868b;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Inter", "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Inter", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: #fff;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] { font-family: var(--font-ar); }

body {
  min-height: 100vh;
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

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

.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;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-spotlight-top {
  position: absolute;
  top: -180px;
  left: 50%;
  width: 1000px;
  height: 650px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0%, rgba(168, 176, 196, 0.05) 42%, transparent 78%);
  filter: blur(80px);
  animation: drift 14s var(--ease) infinite alternate;
}

.bg-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
}

.bg-spotlight-mid {
  position: absolute;
  top: 62%;
  left: 50%;
  width: 800px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
  filter: blur(100px);
}

@keyframes drift {
  from { transform: translateX(-50%) translateY(0); }
  to { transform: translateX(-48%) translateY(18px); }
}

.island-container {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  pointer-events: none;
}

.dynamic-island {
  pointer-events: auto;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 8px 0 12px;
  background: var(--island-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(30px) saturate(180%);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.dynamic-island:hover { border-color: rgba(255, 255, 255, 0.22); }

.island-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #13181b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.island-links { display: flex; align-items: center; gap: 18px; }

.island-links a {
  font-size: 0.8rem;
  color: var(--text-silver);
  transition: color 0.2s var(--ease);
}

.island-links a:hover { color: #fff; }

.island-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  direction: ltr;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #a1a1aa;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.lang-switch button.is-on {
  background: #fff;
  color: #000;
}

.island-btn {
  font-size: 0.75rem;
  font-weight: 600;
  background: #fff;
  color: #000;
  padding: 6px 13px;
  border-radius: 999px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.island-btn:hover { background: #d8d8dc; transform: scale(1.02); }

.island-menu-toggle {
  display: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  place-items: center;
}

.island-menu-toggle .menu-close-icon { display: none; }
.island-menu-toggle.is-open .menu-open-icon { display: none; }
.island-menu-toggle.is-open .menu-close-icon { display: block; }

.island-mobile-drawer {
  display: none;
  pointer-events: auto;
  width: min(520px, 100%);
  margin-top: 8px;
  padding: 16px;
  background: rgba(14, 14, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(35px);
}

.island-mobile-drawer.open {
  display: block;
  animation: drawer 0.28s var(--ease);
}

@keyframes drawer {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  color: #d4d4d8;
  font-weight: 500;
}

.drawer-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

html[dir="rtl"] .drawer-link svg { transform: scaleX(-1); }

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-btn-primary,
.drawer-btn-discord {
  display: flex;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.drawer-btn-primary { background: #fff; color: #000; }
.drawer-btn-discord {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 20px 70px;
  position: relative;
  z-index: 1;
}

.portal-card {
  width: 100%;
  max-width: 620px;
  padding: 44px 40px;
  text-align: center;
  background: rgba(14, 14, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(25px);
  animation: rise 0.8s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.portal-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

html[lang="ar"] .portal-title { letter-spacing: 0; }

.portal-desc {
  color: var(--text-silver);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-bottom: 32px;
}

.copy {
  transition: opacity 0.22s var(--ease);
}

.copy.is-swapping { opacity: 0; }

.download-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 24px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
  transition: background 0.22s var(--ease), transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.download-action-btn:hover {
  background: #e4e4e7;
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(255, 255, 255, 0.25);
}

.download-action-btn:active { transform: translateY(0) scale(0.99); }

.release-meta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  color: #71717a;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.driver-notice {
  margin-top: 24px;
  padding: 14px 18px;
  display: flex;
  gap: 10px;
  text-align: start;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  color: #93c5fd;
  font-size: 0.82rem;
  line-height: 1.5;
}

.driver-notice svg { flex-shrink: 0; margin-top: 2px; }
.driver-notice strong { color: #fff; margin-inline-end: 4px; }

.setup-guide-box {
  margin-top: 28px;
  padding: 24px 26px;
  text-align: start;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.setup-guide-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
}

.step-list { display: flex; flex-direction: column; gap: 12px; }

.step-item { display: flex; gap: 12px; align-items: flex-start; }

.step-num {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.step-content {
  color: #a1a1aa;
  font-size: 0.86rem;
  line-height: 1.5;
}

.step-content strong { color: #fff; }

.portal-footer-links {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: #86868b;
  font-size: 0.85rem;
}

.portal-footer-links a { transition: color 0.2s var(--ease); }
.portal-footer-links a:hover { color: #fff; }

.section {
  position: relative;
  z-index: 1;
  padding: 40px 0 90px;
}

.section-tight { padding-top: 10px; }

.container { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; }

.section-badge {
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-silver);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.section-heading {
  text-align: center;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

html[lang="ar"] .section-heading { letter-spacing: 0; }

.section-desc {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--text-silver);
}

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

.info-card {
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), background 0.28s var(--ease);
}

.info-card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

.card-num {
  margin-bottom: 14px;
  color: var(--text-silver);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.info-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.info-card p { color: var(--text-silver); font-size: 0.9rem; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }

.faq-item {
  background: rgba(14, 14, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}

.faq-item[open] { border-color: rgba(255, 255, 255, 0.2); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
}

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

.faq-item p {
  padding: 0 18px 16px;
  color: var(--text-silver);
  font-size: 0.92rem;
}

.faq-item a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .island-links { display: none; }
  .island-btn { display: none; }
  .island-menu-toggle { display: grid; }
  .portal-card { padding: 32px 22px; }
  .portal-title { font-size: 2rem; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
