:root {
  color-scheme: dark;
  font: 100%/1.5 "Segoe UI", system-ui, sans-serif;
  color: #f5f1fb;
  background: #100e14;
  --muted: #b8b0c5;
  --purple: #bc9bff;
  --surface: #1a1722;
  --stroke: #373044;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 0%, #241937, transparent 38rem); }
.masthead { border-bottom: 1px solid var(--stroke); background: #15111c; }
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  max-width: 68rem;
  margin: auto;
  padding: 1rem clamp(1rem, 5vw, 2rem);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.025em;
}
.brand strong { color: var(--purple); }
.brand-icon { background: #392558; color: #dac7ff; border-radius: .65rem; }
.download-icon { position: relative; display: inline-block; width: 2rem; height: 2rem; flex: 0 0 auto; }
.download-icon::before {
  content: "";
  position: absolute;
  width: 1rem;
  height: .42rem;
  bottom: .43rem;
  left: .5rem;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: .12rem;
}
.download-icon::after {
  content: "↓";
  position: absolute;
  inset: -.06rem 0 0;
  text-align: center;
  line-height: 1.62rem;
  font-size: 1.2rem;
  font-weight: 800;
}
main { width: min(100% - 2rem, 38rem); margin: clamp(2.25rem, 11vh, 6.5rem) auto 3rem; }
.card {
  border: 1px solid var(--stroke);
  border-radius: 1.35rem;
  padding: clamp(1.25rem, 5vw, 2.15rem);
  background: var(--surface);
  box-shadow: 0 1.25rem 4rem #0006;
}
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.25rem); line-height: 1.16; letter-spacing: -.045em; }
h2 { font-size: 1rem; }
p { color: var(--muted); }
.message-card p { margin-top: .75rem; }
.file-details {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: #231e2e;
  border: 1px solid var(--stroke);
  border-radius: .85rem;
  padding: .95rem;
  margin: 1.4rem 0 1rem;
}
.file-text { min-width: 0; }
.file-text h2 { overflow-wrap: anywhere; }
.file-text p { margin-top: .19rem; font-variant-numeric: tabular-nums; font-size: .9rem; }
.file-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2.45rem;
  background: #3c2a55;
  border: 1px solid #705998;
  border-radius: .4rem;
  position: relative;
}
.file-icon::before, .file-icon::after {
  content: "";
  position: absolute;
  left: .45rem;
  width: 1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--purple);
  top: 1rem;
}
.file-icon::after { top: 1.4rem; width: .65rem; }
button {
  min-height: 2.85rem;
  padding: .5rem 1rem;
  color: inherit;
  font: inherit;
  font-size: .95rem;
  font-weight: 650;
  background: #272135;
  border: 1px solid #4d405f;
  border-radius: .72rem;
  cursor: pointer;
}
button.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: 100%;
  min-height: 3.25rem;
  color: #1d112f;
  background: #b894ff;
  border-color: transparent;
}
button:hover { background: #352a48; }
button.primary:hover { background: #ccafff; }
button:focus-visible, a:focus-visible { outline: 2px solid #f3e7ff; outline-offset: 3px; }
button:disabled { cursor: default; opacity: .62; }
#native { margin-top: .65rem; }
a { color: var(--purple); }
.transfer { margin-top: 1.45rem; }
.transfer-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.transfer-heading strong { color: var(--purple); font-variant-numeric: tabular-nums; }
progress {
  display: block;
  width: 100%;
  height: .65rem;
  margin: .7rem 0 1.05rem;
  appearance: none;
  border: 0;
  border-radius: 2rem;
  color: #af87ff;
  background: #30283e;
  overflow: hidden;
}
progress::-webkit-progress-bar { background: #30283e; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #8e55f1, #bd9dff); transition: width .22s ease; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #8e55f1, #bd9dff); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.stats dt { color: var(--muted); font-size: .875rem; }
.stats dd { margin-top: .15rem; font-size: .95rem; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.controls { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.controls:empty { display: none; }
.notice { margin-top: 1rem; }
.expiry { border-top: 1px solid var(--stroke); padding-top: .9rem; margin-top: 1.4rem; font-size: .875rem; }
@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  progress::-webkit-progress-value { transition: none; }
}
