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

:root {
  --bg: #0a0a0f;
  --surface: #14141f;
  --primary: #6366f1;
  --primary-hover: #818cf8;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --danger: #ef4444;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.download-box {
  display: flex;
  gap: 0.75rem;
  background: var(--surface);
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
}

.download-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover { background: var(--primary-hover); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.hidden { display: none !important; }

.progress-section { margin-top: 2rem; }

.progress-bar {
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #a78bfa);
  width: 0%;
  transition: width 0.4s ease;
}

.progress-text {
  margin-top: 0.75rem;
  color: var(--muted);
}

.payment-section { margin-top: 2rem; }

.payment-card {
  background: var(--surface);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius);
  padding: 2rem;
}

.payment-card h2 { margin-bottom: 0.5rem; }
.promo { color: #fbbf24; margin: 1rem 0; }
.legal { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.legal a { color: var(--primary-hover); }

.result-section { margin-top: 2rem; }
.error-section { margin-top: 2rem; color: var(--danger); }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
}

.modal-content h2 { margin-bottom: 1rem; }
#subInfo { margin-bottom: 1.5rem; color: var(--muted); }

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--muted);
  margin: 0 1rem;
}

@media (max-width: 600px) {
  .download-box { flex-direction: column; }
}
