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

:root {
  --bg: #080c14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --green: #22c55e;
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background Mesh ── */
.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
}

/* ── Container ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(8, 12, 20, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.logo-icon.small {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #f1f5f9, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface);
}

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent-light);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 28px;
  letter-spacing: 0.2px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f8fafc 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 48px;
}

/* ── Download Card ── */
.download-card {
  max-width: 560px;
  margin: 0 auto 40px;
}

.download-card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.download-card-inner:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.08);
}

.download-info {
  text-align: left;
}

.download-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.platform-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
}

.download-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.version-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.3s;
}

.version-badge.loaded {
  animation: fadeIn 0.4s ease;
}

.dot {
  color: var(--text-muted);
  font-size: 12px;
}

#latest-size {
  font-size: 12px;
  color: var(--text-secondary);
}

.download-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Download Button ── */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
  filter: brightness(1.1);
}

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

.btn-download.downloading {
  background: linear-gradient(135deg, var(--green), #15803d);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

/* ── Features ── */
.features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.feature-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s;
}

.feature-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ── Section Title ── */
.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 36px;
  text-align: center;
}

/* ── Installation Steps ── */
.steps-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  display: flex;
  gap: 16px;
  flex: 1;
  min-width: 220px;
  max-width: 260px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.step:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-body code {
  font-family: "Menlo", "Consolas", monospace;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-light);
}

.step-arrow {
  font-size: 24px;
  color: var(--text-muted);
  align-self: center;
  flex-shrink: 0;
  display: none;
}

@media (min-width: 768px) {
  .step-arrow {
    display: block;
  }
}

/* ── Changelog Table ── */
.changelog-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.changelog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.changelog-table thead th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.changelog-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.changelog-table tbody tr:last-child {
  border-bottom: none;
}

.changelog-table tbody tr:hover {
  background: var(--surface-hover);
}

.changelog-table tbody tr.latest-row {
  background: rgba(59, 130, 246, 0.04);
}

.changelog-table td {
  padding: 16px 20px;
  color: var(--text-secondary);
  vertical-align: middle;
}

.version-cell {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
}

.latest-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}

.date-cell {
  font-size: 13px;
  white-space: nowrap;
}

.notes-cell {
  font-size: 13px;
  max-width: 300px;
}

.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.dl-link:hover {
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.08);
}

.loading-row,
.error-row {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Footer ── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer .container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Animations ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .download-card-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .download-info {
    text-align: center;
  }

  .download-meta {
    justify-content: center;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: 60px 0 50px;
  }

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