:root {
  --bg: #070c16;
  --bg-soft: #0b1220;
  --card: rgba(17, 27, 45, 0.72);
  --card-border: rgba(148, 163, 184, 0.14);
  --text: #e8eef7;
  --muted: #93a3b8;
  --accent: #2dd4bf;
  --accent-strong: #14b8a6;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --ring: rgba(45, 212, 191, 0.35);
  --danger: #f87171;
  --radius: 18px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Tahoma", "Cairo", "Noto Naskh Arabic", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 420px at 85% -10%, rgba(45, 212, 191, 0.16), transparent 65%),
    radial-gradient(700px 500px at 8% 8%, rgba(59, 130, 246, 0.12), transparent 65%),
    linear-gradient(180deg, #080e1a 0%, #070c16 45%, #060a12 100%);
}

.container {
  width: min(980px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #04211d;
  background: linear-gradient(145deg, #5eead4, #14b8a6);
  box-shadow: 0 8px 24px -8px rgba(45, 212, 191, 0.6);
}

.brand-text b {
  font-weight: 800;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.5);
}

.header-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.14);
}

/* Hero */
.hero {
  padding: 64px 0 30px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 14px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.lead {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #c3cfdd;
  font-size: 0.83rem;
}

.chip svg {
  color: var(--accent);
  flex: none;
}

/* Download card */
.download-card {
  position: relative;
  margin-top: 34px;
  padding: 26px;
  border: 1px solid var(--card-border);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(180deg, rgba(21, 32, 53, 0.9), rgba(13, 21, 36, 0.9));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.download-card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.55), transparent);
}

.download-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.file-info {
  min-width: 0;
}

.file-info h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.file-info p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.file-status {
  margin-inline-start: auto;
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, 0.18);
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #5eead4, #14b8a6);
  color: #04211d;
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 34px -14px rgba(45, 212, 191, 0.75);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.download-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px -14px rgba(45, 212, 191, 0.85);
  filter: brightness(1.04);
}

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

.download-button:focus-visible,
.copy-btn:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.download-button[data-state="loading"] {
  pointer-events: none;
  filter: saturate(0.85);
}

.download-button .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(4, 33, 29, 0.3);
  border-top-color: #04211d;
  animation: spin 0.7s linear infinite;
}

.download-button[data-state="loading"] .btn-spinner {
  display: inline-block;
}

.download-button[data-state="loading"] > svg {
  display: none;
}

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

.download-hint {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

.download-hint.is-success {
  color: var(--accent);
}

.download-hint.is-error {
  color: var(--danger);
}

/* Hash */
.hash-box {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px dashed rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(7, 12, 22, 0.6);
}

.hash-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.6);
  color: var(--text);
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.copy-btn:hover {
  border-color: rgba(45, 212, 191, 0.45);
  color: var(--accent);
}

.hash-box code {
  display: block;
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #cbd5e1;
  word-break: break-all;
}

/* Steps */
.steps {
  padding: 58px 0 10px;
}

.steps h2,
.security h2 {
  margin: 0 0 20px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  position: relative;
  padding: 22px 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card);
}

.step-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 700;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Security */
.security {
  padding: 46px 0 20px;
}

.security-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.security-head h2 {
  margin: 0;
}

.security-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 212, 191, 0.18);
}

.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: rgba(45, 212, 191, 0.28);
}

.faq summary {
  position: relative;
  padding: 16px 20px;
  padding-inline-end: 46px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.93rem;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.85;
}

.faq code {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(7, 12, 22, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* Footer */
.site-footer {
  margin-top: 52px;
  padding: 24px 0 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-inner p {
  margin: 0;
}

.footer-note {
  opacity: 0.75;
}

/* Toast */
.toast {
  position: fixed;
  inset-inline: 0;
  bottom: 26px;
  width: fit-content;
  max-width: calc(100% - 40px);
  margin-inline: auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(17, 27, 45, 0.96);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: var(--text);
  font-size: 0.85rem;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 720px) {
  .hero {
    padding-top: 46px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    padding: 20px;
  }

  .file-status {
    display: none;
  }

  .header-badge {
    display: none;
  }
}

@media (max-width: 420px) {
  .file-info h2 {
    font-size: 0.92rem;
  }

  .chip {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
