*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0f1115;
  --bg-2: #0b0d11;
  --card: rgba(20, 24, 30, 0.6);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #e8ecef;
  --muted: #8a9199;
  --muted-2: #6b727a;
  --primary: #58b6ff;
  --primary-2: #2f80ff;
  --primary-glow: rgba(88, 182, 255, 0.35);
  --shadow-card: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.02);
}

html, body { min-height: 100%; margin: 0; }

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 182, 255, 0.72) rgba(11, 13, 17, 0.95);
}

body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(11, 13, 17, 0.98), rgba(15, 17, 21, 0.98));
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(88, 182, 255, 0.9), rgba(47, 128, 255, 0.85));
  border-radius: 999px;
  border: 2px solid rgba(11, 13, 17, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(111, 196, 255, 0.96), rgba(58, 144, 255, 0.9));
}

body::-webkit-scrollbar-corner {
  background: rgba(11, 13, 17, 0.98);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(ellipse at top, #141a1f 0%, var(--bg) 50%, var(--bg-2) 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-y: auto;
}

main {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  overflow: visible;
}

.background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  top: -160px;
  left: 50%;
  width: 520px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(88, 182, 255, 0.35), transparent 70%);
  opacity: 0.4;
  animation: float-orb 18s ease-in-out infinite;
}

.orb-2 {
  bottom: 20px;
  right: -40px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(88, 182, 255, 0.22), transparent 70%);
  opacity: 0.25;
  animation: float-orb-alt 22s ease-in-out infinite;
}

@keyframes float-orb {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(calc(-50% + 14px), 12px) scale(1.03); }
}

@keyframes float-orb-alt {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, -14px) scale(0.96); }
}

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

section.panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

.subtitle {
  margin: 1rem auto 0;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.card {
  margin-top: 3rem;
  width: 100%;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(14, 18, 26, 0.85);
  background: var(--card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
}

.download-actions {
  margin-top: 1.75rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-card {
  width: 100%;
  padding: 1rem;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: stretch;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.download-card--mobile {
  background: linear-gradient(180deg, rgba(88, 182, 255, 0.1), rgba(255, 255, 255, 0.03));
}

.download-card__icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  color: var(--primary);
  background: linear-gradient(180deg, rgba(88, 182, 255, 0.12), rgba(47, 128, 255, 0.04));
  box-shadow: inset 0 0 0 1px rgba(88, 182, 255, 0.16);
}

.download-card__icon svg {
  width: 32px;
  height: 32px;
}

.download-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
}

.download-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.download-card__header h2 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.download-card__header p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

dl.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  width: 100%;
  text-align: center;
}

dl.meta > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

dl.meta > div.divider {
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}

dt {
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

dd { margin: 0; font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; color: rgba(232,236,239,0.9); }
dd.new { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }

.pulse-dot {
  width: 6px; height: 6px; border-radius: 9999px; background: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

button.install {
  position: relative;
  margin-top: 1.75rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #041a33;
  border: 0;
  border-radius: 0.85rem;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(135deg, #58b6ff, #2f80ff);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.download-actions .install {
  margin-top: 0;
}

.install-secondary {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(88, 182, 255, 0.18));
}

.install-secondary .spinner {
  border-color: rgba(232, 236, 239, 0.25);
  border-top-color: var(--text);
}

button.install:hover:not(:disabled) {
  transform: scale(1.01);
  box-shadow: 0 10px 40px -10px var(--primary-glow);
}

button.install:active:not(:disabled) { transform: scale(0.99); }
button.install:disabled { cursor: not-allowed; opacity: 0.9; }

button.install .shine {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

@media (hover: hover) {
  button.install:hover .shine { transform: translateX(100%); }
}

.spinner {
  width: 16px; height: 16px; border-radius: 9999px;
  border: 2px solid rgba(4, 26, 51, 0.35);
  border-top-color: #041a33;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.icon { width: 16px; height: 16px; stroke-width: 2.5; }

.note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: rgba(138, 145, 153, 0.8);
}

@media (max-width: 900px) {
  main {
    padding: 3rem 1.25rem;
  }

  section.panel {
    max-width: 42rem;
  }

  .card {
    padding: 1.5rem;
  }

  .download-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.875rem;
  }

  .download-card__icon {
    width: 64px;
    height: 64px;
  }

  .download-card__icon svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 640px) {
  main {
    min-height: auto;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.5rem 1rem 2rem;
  }

  section.panel {
    max-width: none;
  }

  .brand {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .card {
    margin-top: 2rem;
    padding: 1.15rem;
    border-radius: 0.9rem;
  }

  dl.meta {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  dl.meta > div.divider {
    border-right: 0;
    padding-right: 0;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
  }

  .download-actions {
    margin-top: 1.25rem;
    gap: 0.85rem;
  }

  .download-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 1rem 0.9rem;
  }

  .download-card__content {
    width: 100%;
    align-items: center;
  }

  .download-card__header {
    text-align: center;
  }

  button.install {
    padding: 0.9rem 1.2rem;
  }

  .note {
    margin-top: 1.1rem;
  }
}

@media (max-width: 480px) {
  main {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  h1 {
    font-size: clamp(1.8rem, 9vw, 2.35rem);
  }

  .card {
    padding: 1rem;
  }

  .download-card__header p {
    font-size: 0.78rem;
  }

  button.install {
    font-size: 0.86rem;
  }
}