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

:root {
  --background: #000000;
  --card: #1c1c1e;
  --card-hover: #2c2c2e;
  --border: #38383a;
  --text: #ecedee;
  --text-secondary: #9ba1a6;
  --tint: #ffffff;
  --accent: #ff3b30;
  --blue: #007aff;
  --green: #34c759;
  --overlay: rgba(255, 255, 255, 0.05);
  --overlay-hover: rgba(255, 255, 255, 0.08);
  --overlay-active: rgba(255, 59, 48, 0.1);
}

html {
  scroll-behavior: smooth;
}

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

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

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.logo {
  height: 120px;
  width: auto;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--tint);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Main Content */
main {
  padding-bottom: 80px;
}

/* Download Section */
.download-section {
  text-align: center;
  margin-bottom: 96px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--tint) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.download-card {
  background: var(--card);
  border: 1px solid var(--overlay);
  border-radius: 24px;
  padding: 32px;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Segmented Control */
.segmented-control {
  display: inline-flex;
  background: var(--background);
  border-radius: 12px;
  padding: 4px;
  position: relative;
  gap: 4px;
}

.segment-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.segment-btn:hover {
  color: var(--text);
}

.segment-btn.active {
  color: var(--tint);
  background: var(--card-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.os-icon {
  width: 18px;
  height: 18px;
}

/* Download Content */
.download-content {
  margin-top: 32px;
}

.download-option {
  display: none;
}

.download-option.active {
  display: block;
}

/* Command Block */
.command-block {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.command-text {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 14px;
  color: var(--text);
  flex: 1;
  text-align: left;
  word-break: break-all;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--overlay);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--overlay-hover);
}

.copy-btn.copied {
  background: var(--green);
  border-color: var(--green);
  color: var(--background);
}

.copy-icon {
  width: 16px;
  height: 16px;
}

/* Download Button */
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  color: var(--tint);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 16px;
  text-decoration: none;
}

.download-btn:hover {
  background: #ff453a;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.3);
}

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

.download-btn svg {
  width: 20px;
  height: 20px;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Version Info */
.version-info {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* QR Code Container */
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 16px;
}

#qr-code {
  border-radius: 8px;
}

#qr-code img {
  border-radius: 8px;
}

.qr-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Features Section */
.features-section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 48px;
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--overlay);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--overlay-hover);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--overlay);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 24px;
  }

  .hero-title {
    font-size: 36px;
  }

  .download-card {
    padding: 24px;
  }

  .segmented-control {
    flex-wrap: wrap;
    justify-content: center;
  }

  .segment-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .command-block {
    flex-direction: column;
    align-items: stretch;
  }

  .command-text {
    text-align: center;
  }

  .copy-btn {
    justify-content: center;
  }

  .nav {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}
