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

:root {
  --bg: #0b1220;
  --bg-elevated: #111b2e;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-green: #22c55e;
  --accent-green-hover: #16a34a;
  --accent-blue: #38bdf8;
  --accent-purple: #a855f7;
  --border: rgba(56, 189, 248, 0.35);
  --glow: rgba(56, 189, 248, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(168, 85, 247, 0.06), transparent);
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.logo-icon {
  font-size: 1.1rem;
  filter: saturate(1.2);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(30, 58, 95, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 0.75rem;
  color: var(--accent-blue);
  margin-bottom: 1.75rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.gradient-text {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  background: linear-gradient(90deg, #c084fc 0%, #60a5fa 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

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

.btn-primary {
  background: var(--accent-green);
  color: #fff;
  border: none;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3), 0 0 24px var(--glow), 0 4px 20px rgba(34, 197, 94, 0.25);
}

.btn-primary:hover {
  background: var(--accent-green-hover);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 0 32px var(--glow), 0 6px 24px rgba(34, 197, 94, 0.35);
}

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

.btn-secondary:hover {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.06);
}

.btn-sm {
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
}

.hero-note {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 3.5rem;
}

.stats {
  display: flex;
  gap: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 3rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  opacity: 0.6;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* Sections */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  scroll-margin-top: 5rem;
}

.section-alt {
  background: rgba(17, 27, 46, 0.5);
  max-width: none;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-alt > * {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.download-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
}

.download-version {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.download-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section-footnote {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

.steps {
  max-width: 32rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.steps li {
  margin-bottom: 0.85rem;
}

.steps code {
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
}

.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

/* Installation steps */
.install-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.install-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
}

.step-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-body > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.warning-box {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(234, 179, 8, 0.45);
  border-radius: 0.5rem;
  background: rgba(234, 179, 8, 0.06);
}

.warning-icon {
  color: #eab308;
  font-size: 1rem;
  line-height: 1.4;
}

.warning-box p {
  font-size: 0.82rem;
  color: #eab308;
  line-height: 1.5;
}

/* Modals */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #151f33;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.85rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.modal-dialog--wide {
  max-width: 640px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-title-wrap h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.modal-title-icon--lock {
  font-size: 1rem;
}

.modal-title-icon--film {
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.35rem;
}

.modal-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.password-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.password-input {
  flex: 1;
  min-width: 0;
  background: #0c1424;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: #4ade80;
  font-weight: 500;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy:hover {
  background: #334155;
}

.tips-box {
  background: rgba(30, 58, 95, 0.35);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
}

.tips-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 0.65rem;
}

.tips-box ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  padding: 1rem 1.35rem 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.btn-outline {
  background: transparent;
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-outline:hover {
  background: rgba(56, 189, 248, 0.08);
}

.btn-gradient {
  background: linear-gradient(90deg, #7c3aed 0%, #2563eb 100%);
  color: #fff;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
}

.btn-gradient:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.video-wrap {
  margin-bottom: 1.25rem;
}

.video-wrap video {
  width: 100%;
  border-radius: 0.5rem;
  background: #0c1424;
  aspect-ratio: 16 / 9;
  display: block;
}

.video-placeholder-note {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.video-placeholder-note code {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-blue);
  padding: 0.1rem 0.3rem;
  border-radius: 0.2rem;
  font-size: 0.9em;
}

.tutorial-heading {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tutorial-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tutorial-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.check-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent-green);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.15rem;
}

button.btn {
  cursor: pointer;
  font-family: inherit;
}

.download-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 300;
  max-width: 90%;
  padding: 0.7rem 1.1rem;
  background: #1e293b;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 0.5rem;
  font-size: 0.82rem;
  color: #86efac;
  text-align: center;
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  pointer-events: none;
}

.download-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .header {
    padding: 1rem 1.25rem;
  }

  .nav {
    gap: 1rem;
  }

  .nav a {
    font-size: 0.72rem;
  }

  .cta-row {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .btn {
    width: 100%;
  }

  .stats {
    gap: 2rem;
  }

  .install-step {
    flex-direction: column;
    gap: 0.85rem;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn-outline,
  .modal-footer .btn-gradient {
    width: 100%;
    text-align: center;
  }

  .password-row {
    flex-direction: column;
  }

  .btn-copy {
    justify-content: center;
    padding: 0.65rem;
  }
}
