/* ══════════════════════════════════════════════════════════════
   components.css — Reusable UI Components
   Shared across: home, auth, download, success, 404 pages.
══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   BRAND MARK
───────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  letter-spacing: 2px;
}

.brand__letter {
  font-size: 28px;
  line-height: 1;
  background: var(--gradient-cyan);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand__name {
  font-size: 22px;
  color: var(--color-white);
  opacity: 0.9;
}

.brand__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan);
  animation: pulse 2s ease-in-out infinite;
  align-self: flex-end;
  margin-bottom: 4px;
}

/* ─────────────────────────────────────────
   NAV
───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-12);
  height: 64px;
  background: rgba(3, 8, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-med), border-color var(--transition-med);
}

.nav--scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  border-bottom-color: rgba(0, 198, 255, 0.15);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav__link {
  font-size: 13px;
  color: var(--color-muted);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.nav__link:hover       { color: var(--color-white); }
.nav__link--highlight  { color: var(--color-cyan); }

.nav__user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gradient-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-bg);
  flex-shrink: 0;
}

.nav__logout {
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav__logout:hover {
  color: #ff8080;
  background: rgba(255, 80, 80, 0.06);
}

.nav__mobile-toggle { display: none; }

@media (max-width: 768px) {
  .nav { padding: 0 var(--space-5); }
  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(3, 8, 15, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-6);
    gap: var(--space-4);
    z-index: var(--z-nav);
  }
  .nav__mobile-toggle { display: flex; }
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 38px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before  { opacity: 0.12; }
.btn:hover          { transform: translateY(-2px); }
.btn:active         { transform: translateY(0); }
.btn:disabled       { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--gradient-cyan);
  color: var(--color-bg);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 8px 44px rgba(0, 198, 255, 0.42); }

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 13px 38px;
  border-radius: var(--radius-sm);
}
.btn--ghost:hover:not(:disabled) {
  border-color: rgba(0, 198, 255, 0.4);
  background: rgba(0, 198, 255, 0.05);
}

.btn--strava {
  background: var(--gradient-strava);
  color: #fff;
  box-shadow: var(--shadow-strava);
}
.btn--strava:hover:not(:disabled) { box-shadow: 0 8px 44px rgba(252, 76, 2, 0.42); }

.btn--nav {
  padding: 8px 24px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ─────────────────────────────────────────
   SPINNER (inline, reusable)
───────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(3, 8, 15, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner--light {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-white);
}

.spinner--lg {
  width: 32px; height: 32px;
  border-width: 3px;
}

/* ─────────────────────────────────────────
   BADGE
───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.badge__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
  animation: blink 1.8s ease-in-out infinite;
}

.badge--connected {
  background: rgba(0, 229, 160, 0.1);
  border: 1px solid rgba(0, 229, 160, 0.3);
  color: var(--color-success);
}

.badge--synced {
  background: rgba(0, 198, 255, 0.1);
  border: 1px solid rgba(0, 198, 255, 0.25);
  color: var(--color-cyan);
}

.badge--eyebrow {
  background: rgba(0, 198, 255, 0.07);
  border: 1px solid rgba(0, 198, 255, 0.25);
  color: var(--color-cyan);
  font-size: 11px;
  letter-spacing: 2.5px;
}

.badge--processing {
  background: rgba(255, 200, 60, 0.08);
  border: 1px solid rgba(255, 200, 60, 0.25);
  color: #ffc83c;
}

/* ─────────────────────────────────────────
   PANEL (glass card)
───────────────────────────────────────── */
.panel {
  position: relative;
  background: rgba(7, 20, 40, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  border-radius: 1px;
}

/* ─────────────────────────────────────────
   DIVIDER
───────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border) 50%, transparent);
  margin-block: var(--space-6);
}

/* ─────────────────────────────────────────
   SECTION LABELS
───────────────────────────────────────── */
.eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-cyan);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: 0.5px;
  line-height: 1.05;
  margin-bottom: var(--space-16);
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-8) var(--space-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  position: relative;
  z-index: var(--z-content);
}

.site-footer__copy {
  font-size: 12px;
  color: var(--color-muted);
}

.footer-strip {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  opacity: 0.3;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-cyan);
  font-family: var(--font-display);
  white-space: nowrap;
  pointer-events: none;
}

.footer-strip__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-cyan);
  display: inline-block;
}

/* ─────────────────────────────────────────
   SINGLE-SCREEN CARD (connect, success, etc.)
───────────────────────────────────────── */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.screen__card {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 52px 48px;
  width: min(460px, 92vw);
  animation: cardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen__card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  border-radius: 1px;
}

.screen__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 34px);
  letter-spacing: 2px;
  line-height: 1.1;
  background: linear-gradient(160deg, var(--color-white) 50%, var(--color-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-3);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.screen__desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.65;
  max-width: 320px;
  margin-bottom: 36px;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

/* ─────────────────────────────────────────
   FORM FIELDS  (shared: auth + modal)
───────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field__icon {
  position: absolute;
  left: 14px;
  width: 15px; height: 15px;
  stroke: var(--color-muted);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke var(--transition-fast);
  flex-shrink: 0;
}

.field__input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  outline: none;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  -webkit-text-fill-color: var(--color-white);
}

.field__input::placeholder { color: var(--color-muted); opacity: 0.6; }

.field__input:focus {
  border-color: rgba(0, 198, 255, 0.5);
  background: rgba(0, 198, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.08);
}

.field__input-wrap:focus-within .field__icon { stroke: var(--color-cyan); }

.field__input:disabled { opacity: 0.5; cursor: not-allowed; }

.field__toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  padding: 4px;
  transition: color var(--transition-fast);
}

.field__toggle:hover { color: var(--color-white); }

.field__toggle svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ─────────────────────────────────────────
   BANNERS  (error / success / info)
───────────────────────────────────────── */
.banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  /* collapsed by default */
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0 14px;
  transition:
    opacity 0.25s ease,
    max-height 0.3s ease,
    padding 0.25s ease;
}

.banner.is-visible {
  opacity: 1;
  max-height: 80px;
  padding: 10px 14px;
}

.banner svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}

.banner--error {
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.2);
  color: #ff8080;
}

.banner--success {
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.25);
  color: var(--color-success);
}

.banner--info {
  background: rgba(0, 198, 255, 0.06);
  border: 1px solid rgba(0, 198, 255, 0.2);
  color: var(--color-cyan);
}

/* ─────────────────────────────────────────
   AUTH SCREEN
───────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
  z-index: var(--z-content);
}

.auth-card {
  width: min(460px, 100%);
  padding: 52px 48px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: cardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-heading {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 2px;
  text-align: center;
  background: linear-gradient(160deg, var(--color-white) 50%, var(--color-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-1);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.auth-subheading {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: var(--space-8);
  line-height: 1.5;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Tab switcher */
.auth-tabs {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: var(--space-8);
  gap: 3px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab.is-active {
  background: var(--gradient-cyan);
  color: var(--color-bg);
}

.auth-forms { width: 100%; }

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-form[hidden] { display: none; }

/* Submit button (auth pages) */
.auth-submit {
  width: 100%;
  padding: 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  margin-top: var(--space-1);
}

.auth-submit__spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(3, 8, 15, 0.3);
  border-top-color: var(--color-bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.auth-submit.is-loading .auth-submit__spinner { display: block; }
.auth-submit.is-loading .auth-submit__label   { display: none; }

/* Password strength */
.pw-strength {
  height: 3px;
  border-radius: 2px;
  background: var(--color-border);
  margin-top: 6px;
  overflow: hidden;
}

.pw-strength__bar {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.35s ease, background 0.35s ease;
}

.pw-strength__label {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--color-muted);
  margin-top: 4px;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

/* Back link */
.auth-back {
  margin-top: var(--space-6);
  font-size: 12px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.auth-back:hover { color: var(--color-cyan); }

.auth-back svg {
  width: 13px; height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ─────────────────────────────────────────
   DOWNLOAD PAGE
───────────────────────────────────────── */
.download-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
}

.download-card {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(540px, 94vw);
  padding: 56px 52px 52px;
  background: rgba(7, 20, 40, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  animation: cardIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
  border-radius: 1px;
}

/* Status icon area */
.download-card__icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-lg);
  background: rgba(0, 198, 255, 0.07);
  border: 1px solid rgba(0, 198, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  position: relative;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  transition: background var(--transition-med), border-color var(--transition-med);
}

/* pulsing ring behind icon */
.download-card__icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 24px;
  border: 1px solid rgba(0, 198, 255, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.download-card__icon svg {
  width: 32px; height: 32px;
  stroke: var(--color-cyan);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--transition-med);
}

/* Processing state — icon turns amber */
.download-card__icon--processing {
  background: rgba(255, 200, 60, 0.07);
  border-color: rgba(255, 200, 60, 0.2);
}

.download-card__icon--processing svg { stroke: #ffc83c; }

/* Ready state — icon turns green */
.download-card__icon--ready {
  background: rgba(0, 229, 160, 0.07);
  border-color: rgba(0, 229, 160, 0.2);
}

.download-card__icon--ready svg { stroke: var(--color-success); }

/* Error state */
.download-card__icon--error {
  background: rgba(255, 80, 80, 0.07);
  border-color: rgba(255, 80, 80, 0.2);
}

.download-card__icon--error svg { stroke: #ff8080; }

.download-card__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: 2px;
  line-height: 1.05;
  background: linear-gradient(160deg, var(--color-white) 50%, var(--color-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-3);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
  transition: opacity var(--transition-med);
}

.download-card__desc {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.7;
  max-width: 360px;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  transition: opacity var(--transition-med);
}

/* ── Progress bar (processing state) ─────── */
.download-progress {
  width: 100%;
  margin-top: var(--space-6);
  display: none; /* shown by JS */
}

.download-progress.is-visible { display: block; }

.download-progress__track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.download-progress__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-cyan-deep), var(--color-cyan));
  width: 0%;
  transition: width 0.4s ease;
}

/* indeterminate shimmer when progress unknown */
.download-progress__fill--indeterminate {
  width: 40% !important;
  animation: shimmer-slide 1.6s ease-in-out infinite;
}

@keyframes shimmer-slide {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}

.download-progress__label {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.5px;
}

/* ── Processing steps list ──────────────── */
.download-steps {
  width: 100%;
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
  display: none;
}

.download-steps.is-visible { display: flex; }

.download-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--color-muted);
  transition: color var(--transition-fast);
}

.download-step.is-done    { color: var(--color-success); }
.download-step.is-active  { color: var(--color-white); }

.download-step__dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 9px;
  transition: all var(--transition-fast);
}

.download-step.is-done   .download-step__dot { background: var(--color-success); border-color: var(--color-success); }
.download-step.is-active .download-step__dot { border-color: var(--color-cyan); box-shadow: 0 0 8px rgba(0,198,255,0.4); }

.download-step__spinner {
  width: 10px; height: 10px;
  border: 1.5px solid rgba(0, 198, 255, 0.3);
  border-top-color: var(--color-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.download-step.is-active .download-step__spinner { display: block; }
.download-step.is-active .download-step__num     { display: none; }

/* ── File metadata pill ─────────────────── */
.download-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: 12px 20px;
  background: rgba(0, 198, 255, 0.04);
  border: 1px solid rgba(0, 198, 255, 0.1);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--color-muted);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
  width: 100%;
  transition: opacity var(--transition-med);
}

.download-card__meta-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(0, 198, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.download-card__meta-info { text-align: left; flex: 1; }
.download-card__meta-name { font-size: 13px; font-weight: 500; color: var(--color-white); }
.download-card__meta-detail { font-size: 11px; color: var(--color-muted); margin-top: 2px; }
.download-card__meta-type {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-cyan);
  font-weight: 500;
}

/* ── Main download CTA ──────────────────── */
.download-card__btn {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  border-radius: var(--radius-md);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
  gap: var(--space-3);
}

/* spinner inside the download button */
.download-card__btn .btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(3, 8, 15, 0.25);
  border-top-color: var(--color-bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
  flex-shrink: 0;
}

.download-card__btn.is-loading .btn-spinner    { display: block; }
.download-card__btn.is-loading .btn-label      { display: none; }

.download-card__back {
  margin-top: var(--space-4);
  font-size: 13px;
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
  text-decoration: none;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.download-card__back:hover { color: var(--color-cyan); }

.download-card__back svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.download-card__note {
  margin-top: var(--space-5);
  font-size: 11px;
  color: var(--color-muted-2);
  line-height: 1.6;
  animation: fadeUp 0.6s ease 0.6s both;
}

/* ─────────────────────────────────────────
   LOGIN MODAL
───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 8, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.is-open { opacity: 1; }
.modal-overlay[hidden]  { display: none; }

.modal {
  position: relative;
  width: min(420px, 100%);
  background: rgba(7, 20, 40, 0.95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 44px 40px 40px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 32px 100px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(0, 114, 255, 0.08);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay.is-open .modal { transform: scale(1) translateY(0); }

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
}

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
  font-size: 18px; line-height: 1;
}

.modal__close:hover {
  border-color: rgba(0, 198, 255, 0.35);
  color: var(--color-white);
  background: rgba(0, 198, 255, 0.06);
}

.modal__lock-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: rgba(0, 198, 255, 0.07);
  border: 1px solid rgba(0, 198, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
}

.modal__lock-icon svg {
  width: 22px; height: 22px;
  stroke: var(--color-cyan);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  text-align: center;
  background: linear-gradient(160deg, var(--color-white) 50%, var(--color-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-1);
}

.modal__subtitle {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: var(--space-6);
  line-height: 1.5;
}

.login-form { display: flex; flex-direction: column; gap: var(--space-4); }

/* spinner inside modal submit */
.login-submit { width: 100%; padding: 13px; margin-top: var(--space-2); border-radius: var(--radius-sm); }

.login-submit__spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(3, 8, 15, 0.3);
  border-top-color: var(--color-bg);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.login-submit.is-loading .login-submit__spinner { display: block; }
.login-submit.is-loading .login-submit__label   { display: none; }

.modal__footer-link {
  text-align: center;
  margin-top: var(--space-3);
  font-size: 12px;
  color: var(--color-muted);
}

.modal__footer-link a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.modal__footer-link a:hover { opacity: 0.8; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card       { padding: 40px 24px 36px; }
  .download-card   { padding: 40px 24px 36px; }
  .modal           { padding: 36px 24px 32px; }
  .screen__card    { padding: 40px 28px 36px; }
}
