@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/outfit-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/outfit-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Colours taken from logo A: indigo → blue → cyan */
:root {
  color-scheme: light;
  --bg: #eef1fb;
  --card: #ffffff;
  --subtle: #f5f7fd;
  --ink: #1f2a3d;
  --body: #3d475c;
  --muted: #66708a;
  --line: rgba(31, 42, 61, 0.08);
  --indigo: #4c3fc4;
  --indigo-press: #3f34ab;
  --blue-bg: #e3ecfd;
  --blue-ink: #2f4f9a;
  --cyan-bg: #dcf4f5;
  --cyan-ink: #1f6670;
  --violet-bg: #ebe7fd;
  --violet-ink: #4c3fc4;
  --accent-text: #4c3fc4;
  --danger: #c2413b;
  --wave-rest: #d5dbef;
  --wave-hover: #aab4d6;
  --shadow: 0 16px 32px -20px rgba(31, 42, 61, 0.2);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Dark: a dimmed night blue from the logo's palette, not black */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #20273a;
    --card: #283149;
    --subtle: #313b55;
    --ink: #eef1fb;
    --body: #c9cfe0;
    --muted: #9aa3bd;
    --line: rgba(238, 241, 251, 0.1);
    --indigo: #5b4fd6;
    --indigo-press: #6c61e0;
    --blue-bg: rgba(91, 143, 234, 0.18);
    --blue-ink: #a9c6f7;
    --cyan-bg: rgba(143, 211, 241, 0.16);
    --cyan-ink: #9fe0ea;
    --violet-bg: rgba(139, 120, 236, 0.22);
    --violet-ink: #c9c0fa;
    --accent-text: #b3a9f7;
    --danger: #ff8a80;
    --wave-rest: #3d4763;
    --wave-hover: #5a6585;
    --shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); }

.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 48px 16px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  padding: clamp(22px, 5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header: logo mark + wordmark */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brandline { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.tagline { font-size: 14px; color: var(--muted); padding-left: 14px; box-shadow: inset 1px 0 0 var(--line); }
.brand picture { display: block; }
.brand img { width: 40px; height: 40px; display: block; }
.brand span { font-size: 16px; font-weight: 700; letter-spacing: 0.12em; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lock svg { width: 13px; height: 13px; }

.sender { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 22px;
  background: var(--indigo);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.sender b { display: block; font-size: 15px; font-weight: 600; }
.sender div > span { display: block; font-size: 13px; color: var(--muted); }

h1 {
  margin: 0;
  font-size: clamp(36px, 8vw, 68px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.note { margin: -10px 0 0; font-size: 15px; color: var(--body); max-width: 560px; white-space: pre-line; }

/* File type chip */
.chip {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--blue-bg);
  color: var(--blue-ink);
}
.chip.image { background: var(--cyan-bg); color: var(--cyan-ink); }
.chip.video { background: var(--violet-bg); color: var(--violet-ink); }

/* File list */
.files { list-style: none; margin: 0; padding: 0; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.file + .file { box-shadow: inset 0 1px 0 var(--line); }
.row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 11px 16px; }
.row .name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.row .size { font-size: 12px; color: var(--muted); white-space: nowrap; }
.row .act { font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; min-width: 52px; text-align: right; }
.row .act.view { color: var(--cyan-ink); }
.file .preview { padding: 0 16px 14px 64px; }
details.more summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary svg { width: 12px; height: 12px; transition: transform 0.4s var(--ease); }
details.more[open] summary svg { transform: rotate(90deg); }
details.more > :not(summary) { margin-top: 12px; }

/* Audio player */
.track { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; align-items: center; }
.play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--indigo);
  color: #fff;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease);
}
.play:hover { background: var(--indigo-press); }
.play:active { transform: scale(0.95); }
.play:focus-visible, .btn:focus-visible, .act:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.play svg { width: 20px; height: 20px; }
.play .i-pause { display: none; }
.play[aria-pressed='true'] .i-play { display: none; }
.play[aria-pressed='true'] .i-pause { display: block; }
.wave { position: relative; height: 52px; cursor: pointer; touch-action: none; }
.wave canvas { width: 100%; height: 100%; display: block; }
.times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.track.compact { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
.track.compact .play { width: 40px; height: 40px; }
.track.compact .play svg { width: 14px; height: 14px; }
.track.compact .wave { height: 34px; }

/* Image and video */
.frame { border-radius: 14px; overflow: hidden; background: var(--subtle); box-shadow: inset 0 0 0 1px var(--line); }
.frame img, .frame video { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #0f1420; }
.frame img { background: var(--subtle); -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }

/* ZIP contents */
.tree { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; font-size: 13px; border-radius: 12px; background: var(--subtle); }
.tree li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 14px; }
.tree li + li { box-shadow: inset 0 1px 0 var(--line); }
.tree li span:first-child { overflow-wrap: anywhere; color: var(--body); }
.tree li span:last-child { color: var(--muted); white-space: nowrap; }

/* Actions */
.btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--indigo);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 15px 26px;
  cursor: pointer;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease);
}
.btn:hover { background: var(--indigo-press); }
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn .size { font-weight: 500; opacity: 0.75; }

.notice {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--subtle);
  font-size: 14px;
  color: var(--body);
}
.notice svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--cyan-ink); }

/* Upload in progress */
.progress { height: 6px; border-radius: 6px; background: var(--subtle); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.progress > div {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #4c3fc4, #5b8fea, #8fd3f1);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  transition: transform 1.2s var(--ease);
}
.pct { margin: -12px 0 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.adding { display: flex; flex-direction: column; gap: 8px; }
.adding .pct { margin: 0; }

/* Password */
.field { display: flex; gap: 8px; }
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--subtle);
  box-shadow: inset 0 0 0 1px var(--line);
}
.field input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--indigo); }
.field .btn { align-self: stretch; padding: 0 22px; }
.error { margin: -12px 0 0; color: var(--danger); font-size: 14px; }

.foot { text-align: center; font-size: 12px; color: var(--muted); }

.reveal { animation: rise 0.7s var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
  * { transition: none !important; }
}
@media (max-width: 560px) {
  .page { padding: 20px 12px 24px; justify-content: flex-start; }
  .brandline { flex-direction: column; align-items: flex-start; }
  .tagline { padding-left: 0; box-shadow: none; }
  .row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .row .size { display: none; }
  .file .preview { padding-left: 16px; }
  .btn { align-self: stretch; justify-content: center; }
}
