:root {
  --bg: #09090b;
  --text: #f4f4f5;
  --muted: #71717a;
  --faint: #3f3f46;
  --accent: #ef4444;
  --accent-deep: #b91c1c;
  --ok: #3ddc84;
  color-scheme: dark;
}

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

html, body { min-height: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60vmax 60vmax at 50% 38%, rgba(239, 68, 68, 0.13), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 24px;
  text-align: center;
}

/* Olho: as tomoes giram devagar; o brilho da lente fica parado */
.eye {
  width: clamp(120px, 26vmin, 176px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.35), 0 0 0 1px rgba(239, 68, 68, 0.25);
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eye svg { display: block; width: 100%; height: 100%; }

.eye__spin {
  transform-box: view-box;
  transform-origin: 100px 100px;
  animation: spin 14s linear infinite;
}

.title {
  margin-top: 28px;
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fca5a5 0%, #ef4444 50%, #b91c1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.9s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tagline {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  animation: rise 0.9s 0.14s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Botão de download: o preenchimento mostra o progresso do download verificado */
.download {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 240px;
  height: 54px;
  padding: 0 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dc2626, var(--accent-deep));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(239, 68, 68, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  animation: rise 0.9s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.download:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 34px -8px rgba(239, 68, 68, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.download:active { transform: translateY(0); }
.download:focus-visible { outline: 2px solid #fca5a5; outline-offset: 3px; }

.download__icon { position: relative; width: 20px; height: 20px; flex-shrink: 0; }
.download__label { position: relative; font-variant-numeric: tabular-nums; }

.download__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: rgba(255, 255, 255, 0.16);
  transition: width 0.25s ease;
}

.download.is-busy { cursor: progress; transform: none; filter: none; }
.download.is-disabled { pointer-events: none; opacity: 0.45; filter: grayscale(0.4); }
.download.is-done { background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: 0 10px 30px -8px rgba(61, 220, 132, 0.45); }

.meta {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  animation: rise 0.9s 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.status { margin-top: 10px; min-height: 18px; font-size: 12.5px; color: var(--muted); max-width: 420px; line-height: 1.5; }
.status.is-error { color: #fca5a5; }

.footer { display: flex; justify-content: center; padding: 0 16px 28px; }

.integrity { max-width: 440px; font-size: 12px; color: var(--muted); text-align: center; }

.integrity summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(61, 220, 132, 0.25);
  background: rgba(61, 220, 132, 0.06);
  color: var(--ok);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.integrity summary::-webkit-details-marker { display: none; }
.integrity summary svg { width: 14px; height: 14px; }
.integrity summary:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
.integrity p { margin-top: 12px; line-height: 1.55; }
.integrity .hash { display: flex; flex-direction: column; gap: 4px; }
.integrity .hash span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.integrity code { font: 11px/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; color: #a1a1aa; word-break: break-all; user-select: all; }

[hidden] { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .eye__spin { animation: none; }
  .eye, .title, .tagline, .download, .meta { animation: none; }
}
