/* ══════════════════════════════════════════════════════
   Patched — Download Page Styles
   Ghost theme (default), matches auth.css visual language
   ══════════════════════════════════════════════════════ */

:root {
  --bg: #080808;
  --bg2: #0e0e0e;
  --card: #141414;
  --card-border: rgba(200,200,200,0.25);
  --card-shadow: 0 0 40px rgba(180,180,180,0.08), 0 0 80px rgba(140,140,140,0.04);
  --accent: #c8c8c8;
  --accent-dim: rgba(200,200,200,0.08);
  --accent-glow: 0 0 10px rgba(200,200,200,0.6), 0 0 30px rgba(200,200,200,0.3);
  --text: #f0f0f0;
  --text-muted: #555;
  --label: #888;
  --input-bg: #0a0a0a;
  --btn-bg: #0c0c0c;
  --logo-font: 'Orbitron', monospace;
  --ui-font: 'Exo 2', sans-serif;
  --label-font: 'IBM Plex Mono', monospace;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* ─── BASE LAYOUT ─── */
body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--ui-font);
  color: var(--text);
  overflow: hidden;
}

/* ─── ANIMATED BACKGROUND GRID ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--accent-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-dim) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  animation: gridDrift 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

/* ─── VIGNETTE ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ─── MAIN WRAPPER ─── */
.wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

/* ─── LOGO ─── */
.logo-wrap {
  text-align: center;
  margin-bottom: 4px;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Orbitron', monospace !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  color: var(--accent);
  text-shadow: var(--accent-glow);
  text-transform: uppercase;
  animation: logoPulse 3s ease-in-out infinite;
}

.logo-icon {
  width: 38px;
  height: 38px;
  color: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
  flex-shrink: 0;
}

@keyframes logoPulse {
  0%, 100% { text-shadow: var(--accent-glow); }
  50% { text-shadow: var(--accent-glow), 0 0 80px var(--accent); }
}

.logo-sub {
  font-family: var(--label-font), monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: lowercase;
}

/* ─── CARD ─── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 36px 32px;
  width: 380px;
  max-width: 90vw;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

/* ─── DETECTING PAGE ─── */
.detect-text {
  font-family: var(--label-font), monospace;
  font-size: 13px;
  color: var(--label);
  letter-spacing: 0.08em;
}

/* ─── MAC DOWNLOAD PAGE ─── */
.dl-heading {
  font-family: var(--ui-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.dl-sub {
  font-family: var(--label-font), monospace;
  font-size: 12px;
  color: var(--label);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

/* Animated spinner */
.dl-spinner {
  margin: 24px auto;
  width: 48px;
  height: 48px;
  border: 3px solid rgba(200,200,200,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Download link fallback */
.dl-fallback {
  margin-top: 20px;
  font-family: var(--label-font), monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.dl-fallback a {
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.dl-fallback a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ─── OS PICKER PAGE ─── */
.pick-heading {
  font-family: var(--ui-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.pick-sub {
  font-family: var(--label-font), monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.os-grid {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.os-card {
  background: var(--bg2);
  border: 1px solid rgba(200,200,200,0.1);
  border-radius: 12px;
  padding: 28px 24px 22px;
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
  position: relative;
}

.os-card:hover {
  border-color: rgba(200,200,200,0.25);
  background: var(--card);
}

.os-card.detected {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
}

.os-card .os-icon {
  width: 44px;
  height: 44px;
  color: var(--text);
  opacity: 0.9;
}

.os-card .os-name {
  font-family: var(--ui-font);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.os-card .os-detail {
  font-family: var(--label-font), monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Detected badge */
.detected-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--label-font), monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Download button */
.btn-download {
  width: 100%;
  padding: 10px;
  background: var(--btn-bg);
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: var(--accent);
  font-family: var(--ui-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--accent-glow);
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-download:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

/* Coming soon variant */
.btn-download.coming-soon {
  border-color: rgba(200,200,200,0.15);
  color: var(--text-muted);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

.coming-soon-badge {
  font-family: var(--label-font), monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(200,200,200,0.06);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(200,200,200,0.1);
}

/* ─── FOOTER LINKS ─── */
.dl-footer {
  margin-top: 8px;
}

.dl-footer a {
  font-family: var(--label-font), monospace;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.dl-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .os-grid { flex-direction: column; align-items: center; }
  .os-card { width: 240px; }
  .card { padding: 28px 20px; }
}
