/* ===== CSS Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #12121f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --purple-light: #b388ff;
  --purple: #7c4dff;
  --purple-dark: #5c2db5;
  --gold: #ffd700;
  --gold-light: #ffe066;
  --gold-dim: #bfa230;
  --text-primary: #f0e6ff;
  --text-secondary: #a89cc8;
  --text-muted: #6e6494;
  --white: #ffffff;
  --gradient-purple: linear-gradient(135deg, #7c4dff 0%, #b388ff 100%);
  --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffab00 100%);
  --gradient-hero: linear-gradient(180deg, rgba(124, 77, 255, 0.15) 0%, transparent 60%);
  --shadow-glow: 0 0 30px rgba(124, 77, 255, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --container-max: 1200px;
  --nav-height: 72px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

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

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 77, 255, 0.15);
  z-index: 1000;
  transition: background var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 10, 20, 0.95);
  border-bottom-color: rgba(124, 77, 255, 0.3);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-brand .brand-icon {
  font-size: 1.8rem;
}

.nav-brand span {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-gold);
  transition: width var(--transition);
  border-radius: 1px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Mobile Nav ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 20, 0.98);
    backdrop-filter: blur(20px);
    padding: 32px 24px;
    gap: 24px;
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(124, 77, 255, 0.2);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links a {
    font-size: 1.1rem;
  }
}

/* ===== Language Toggle ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color var(--transition);
  font-family: var(--font-main);
  letter-spacing: 0.5px;
}

.lang-btn.active {
  color: var(--gold);
}

.lang-btn:hover {
  color: var(--gold-light);
}

.lang-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
  user-select: none;
}

@media (max-width: 768px) {
  .lang-toggle {
    margin-left: auto;
    margin-right: 12px;
  }
}

/* ===== Stars Background (Landing page only) ===== */
.stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 77, 255, 0.15);
  border: 1px solid rgba(124, 77, 255, 0.3);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 0.85rem;
  color: var(--purple-light);
  margin-bottom: 28px;
  animation: fadeInDown 0.8s ease;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 .highlight {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--gradient-purple);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(124, 77, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(124, 77, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn .btn-icon {
  font-size: 1.3rem;
}

.btn .btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.btn .btn-text small {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn .btn-text strong {
  font-size: 1rem;
}

/* ===== Features Section ===== */
.features {
  padding: 100px 0;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 77, 255, 0.3), transparent);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(124, 77, 255, 0.1);
  border-radius: 20px;
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-purple);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 77, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(124, 77, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ===== Screenshots Section ===== */
.screenshots {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.screenshots::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.screenshots-track {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
}

.screenshot-item {
  width: 240px;
  height: 480px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 77, 255, 0.15);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.screenshot-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(124, 77, 255, 0.05) 0%, transparent 40%);
}

.screenshot-item:hover {
  border-color: rgba(124, 77, 255, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(124, 77, 255, 0.15);
}

.screenshot-item .placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}

@media (max-width: 600px) {
  .screenshot-item {
    width: 180px;
    height: 360px;
  }
}

/* ===== Download Section ===== */
.download {
  padding: 100px 0;
  text-align: center;
  position: relative;
}

.download::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 32px;
  background: var(--bg-card);
  border: 1px solid rgba(124, 77, 255, 0.2);
  border-radius: 16px;
  color: var(--text-primary);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.download-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 77, 255, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.download-btn .store-icon {
  font-size: 2rem;
}

.download-btn .store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
}

.download-btn .store-text small {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.download-btn .store-text strong {
  font-size: 1.15rem;
}

/* ===== Footer ===== */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid rgba(124, 77, 255, 0.1);
  background: var(--bg-secondary);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand .brand-name span {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.7;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a {
  color: var(--purple-light);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--gold-light);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== Legal Pages ===== */
.legal-page {
  padding: calc(var(--nav-height) + 60px) 0 100px;
  min-height: 100vh;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-container h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.legal-container .legal-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-content {
  background: var(--bg-card);
  border: 1px solid rgba(124, 77, 255, 0.1);
  border-radius: 20px;
  padding: clamp(32px, 5vw, 56px);
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(124, 77, 255, 0.12);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  margin-bottom: 14px;
}

.legal-content ul {
  margin: 12px 0 20px;
  padding-left: 20px;
}

.legal-content ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 10px;
  list-style: none;
}

.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-light);
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-content a {
  color: var(--purple-light);
  transition: color var(--transition);
}

.legal-content a:hover {
  color: var(--gold-light);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

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

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

/* ===== Utility ===== */
.text-gradient {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
