:root {
  --navy: #03040c;
  --navy-mid: #0a1020;
  --navy-card: #0d1528;
  --blue: #2b7fd4;
  --blue-bright: #4db8ff;
  --blue-glow: rgba(77, 184, 255, 0.45);
  --cyan: #7eb8e8;
  --white: #ffffff;
  --font: 'Cairo', system-ui, sans-serif;
  --radius: 20px;
  --radius-lg: 28px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
  --bg: #03040c;
  --bg-card: rgba(13, 21, 40, 0.75);
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.48);
  --border: rgba(77, 184, 255, 0.18);
  --header-bg: rgba(3, 4, 12, 0.82);
  --poster-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(43, 127, 212, 0.12);
}

[data-theme='light'] {
  --bg: #eef2f8;
  --bg-card: rgba(255, 255, 255, 0.88);
  --text: #0f1928;
  --text-soft: #2b4566;
  --text-faint: #5a7a9a;
  --border: rgba(23, 36, 55, 0.12);
  --header-bg: rgba(238, 242, 248, 0.9);
  --poster-shadow: 0 24px 60px rgba(23, 36, 55, 0.14), 0 0 40px rgba(43, 127, 212, 0.08);
}

*, *::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.6;
  overflow-x: hidden;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

[data-theme='light'] #stars { opacity: 0.15; }

.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(43, 127, 212, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(126, 184, 232, 0.08), transparent 55%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(43, 69, 102, 0.12), transparent 50%);
}

[data-theme='light'] .bg-aurora {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(43, 127, 212, 0.1), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(126, 184, 232, 0.06), transparent 55%);
}

.dot { color: var(--blue-bright); opacity: 0.85; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-glow {
  position: relative;
  border-radius: 12px;
}

.brand-glow::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 16px;
  background: radial-gradient(circle, var(--blue-glow), transparent 70%);
  filter: blur(8px);
  opacity: 0.7;
}

.brand-icon {
  position: relative;
  border-radius: 12px;
  display: block;
}

.brand-name { height: 20px; width: auto; }
[data-theme='dark'] .brand-name-light { display: none; }
[data-theme='light'] .brand-name-dark { display: none; }

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--blue-bright);
  box-shadow: 0 0 16px var(--blue-glow);
}

.theme-toggle svg { width: 18px; height: 18px; }
[data-theme='dark'] .icon-sun { display: block; }
[data-theme='dark'] .icon-moon { display: none; }
[data-theme='light'] .icon-sun { display: none; }
[data-theme='light'] .icon-moon { display: block; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-glow {
  background: linear-gradient(135deg, #1a4a8a 0%, #2b7fd4 50%, #4db8ff 100%);
  color: #fff;
  box-shadow:
    0 4px 24px rgba(43, 127, 212, 0.45),
    0 0 40px rgba(77, 184, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(43, 127, 212, 0.55),
    0 0 60px rgba(77, 184, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-glow.is-loading { opacity: 0.6; pointer-events: none; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 12px; }
.btn-xl { padding: 16px 36px; font-size: 1.05rem; border-radius: 16px; }

main { position: relative; z-index: 1; padding-top: 64px; }

/* Hero */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px 64px;
}

.hero-inner { max-width: 640px; }

.hero-logo-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 28px;
}

.logo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(77, 184, 255, 0.35);
  box-shadow:
    0 0 40px rgba(77, 184, 255, 0.3),
    0 0 80px rgba(43, 127, 212, 0.15);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 1; }
}

.hero-logo {
  position: relative;
  border-radius: 28px;
  filter: drop-shadow(0 8px 32px rgba(77, 184, 255, 0.4));
}

.hero-eyebrow {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin: 0 0 8px;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 900;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.glow-text {
  background: linear-gradient(135deg, var(--blue-bright), var(--cyan), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(77, 184, 255, 0.4));
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--blue-bright);
  font-weight: 600;
  margin: 0 0 20px;
  letter-spacing: 0.02em;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-soft);
  margin: 0 0 32px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.version-badge {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-soft);
  backdrop-filter: blur(12px);
  direction: ltr;
}

.hero-footnote {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin: 0;
}

/* Showcase */
.showcase {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.showcase-intro {
  text-align: center;
  margin-bottom: 36px;
}

.showcase-intro h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin: 0 0 8px;
}

.showcase-intro p {
  color: var(--text-soft);
  margin: 0;
  font-size: 0.95rem;
}

.poster {
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--poster-shadow);
  border: 1px solid var(--border);
  background: var(--navy-card);
}

.poster img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.poster-caption {
  padding: 18px 20px 22px;
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

.poster-caption h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
}

.poster-caption p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* Features strip */
.features-strip {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 56px;
}

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

.strip-card {
  padding: 18px 10px;
  border-radius: var(--radius);
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.strip-card:hover {
  border-color: var(--blue-bright);
  box-shadow: 0 0 24px var(--blue-glow);
  transform: translateY(-2px);
}

.strip-icon { font-size: 1.5rem; margin-bottom: 8px; }

.strip-card strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-soft);
}

.strip-tagline {
  text-align: center;
  margin: 28px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-bright);
}

/* Final CTA */
.final-cta {
  position: relative;
  padding: 64px 20px 72px;
  text-align: center;
  overflow: hidden;
}

.final-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(43, 127, 212, 0.2), transparent 70%);
  pointer-events: none;
}

.final-inner {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.final-logo {
  border-radius: 18px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 24px var(--blue-glow));
}

.final-inner h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  margin: 0 0 10px;
}

.final-inner > p {
  color: var(--text-soft);
  margin: 0 0 28px;
}

.apk-meta {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-faint);
  direction: ltr;
}

/* Legal */
.legal-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

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

.legal-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.legal-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 800;
}

.legal-card p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.legal-id {
  font-size: 0.8rem !important;
  color: var(--text-faint) !important;
}

.legal-card a {
  color: var(--blue-bright);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}

.legal-card a:hover { text-decoration: underline; }

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 20px 40px;
  border-top: 1px solid var(--border);
}

.site-footer img { border-radius: 8px; margin-bottom: 10px; }

.site-footer p {
  margin: 4px 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.footer-links a:hover { color: var(--blue-bright); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Legal sub-pages */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 40px) 64px;
}

.legal-page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  margin: 0 0 8px;
}

.legal-page .updated {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.legal-page h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 24px 0 8px;
}

.legal-page p, .legal-page li {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.75;
}

.legal-page ul { padding-right: 20px; }

.legal-page a { color: var(--blue-bright); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.back-link:hover { color: var(--blue-bright); }

@media (max-width: 720px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-grid { grid-template-columns: 1fr; }
  .btn-xl { width: 100%; }
  .header-actions .btn-sm span { display: none; }
  .header-actions .btn-sm { padding: 8px 12px; }
}

@media (max-width: 400px) {
  .hero-logo-wrap { width: 110px; height: 110px; }
  .hero-logo { width: 96px; height: 96px; }
}
