:root {
  --bg: #0c1a2e;
  --bg-deep: #08111e;
  --bar: #0a1525;
  --panel: #0d1b2e;
  --surface: #111e30;
  --line: #1a2e4a;
  --line-strong: #2a4a7f;
  --text: #ffffff;
  --muted: #aac0dd;
  --faint: #6b84a6;
  --placeholder: #5f7594;
  --accent: #1e4a8a;
  --accent-hover: #2a5aa8;
  --accent-soft: #1a2a44;
  --focus: #5a8abf;
  --danger: #ff6b5b;
  --ok: #46d39a;
  --radius: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 58px;
  padding: 0 20px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 32px; width: auto; display: block; border-radius: 3px; }
.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #1e3a5f;
  color: var(--muted);
}

/* ---------- main layout ---------- */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(440px, 560px) 1fr;
  min-height: 0;
}
.panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 36px 44px 44px;
}
.panel-title {
  margin: 4px 0 26px;
  text-align: center;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- drop zone & files ---------- */
.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: 14px;
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag {
  border-color: var(--focus);
  background: rgba(42, 74, 127, 0.16);
}
.dropzone.compact { padding: 18px 14px; }
.dropzone.compact .dz-icon { display: none; }
.dropzone.compact .dz-title { font-size: 17px; }
.dz-icon { color: var(--muted); margin-bottom: 8px; }
.dz-icon svg { display: block; margin: 0 auto; }
.dz-title { font-size: 23px; font-weight: 700; }
.dz-sub { margin-top: 6px; color: var(--muted); font-size: 16px; }
.dz-actions { margin-top: 12px; display: flex; justify-content: center; gap: 18px; font-size: 15px; }
.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linklike:hover { color: var(--text); }

.file-list { margin-top: 12px; }
.file-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.file-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.file-list li:last-child { border-bottom: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.file-remove {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.file-remove:hover { background: var(--accent-soft); color: var(--text); }
.file-summary {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.file-summary .over { color: var(--danger); font-weight: 600; }

/* ---------- form fields ---------- */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-top: 20px; }
.field > span {
  display: block;
  margin-bottom: 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 15px 14px;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  text-align: center;
  font-size: 17px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 116px; text-align: center; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(90, 138, 191, 0.18);
}
.field input[aria-invalid='true'] { border-color: var(--danger); }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aac0dd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.field select option { background: var(--panel); }
.hint { display: block; margin-top: 6px; text-align: center; font-size: 13px; color: var(--faint); }

.form-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 107, 91, 0.12);
  border: 1px solid rgba(255, 107, 91, 0.4);
  color: #ffd2cc;
  font-size: 14px;
  text-align: center;
}
.notice {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

/* ---------- buttons ---------- */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 28px;
  padding: 20px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--accent-soft); color: #6f84a3; cursor: not-allowed; }
.btn-secondary {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--focus); color: var(--text); }
.btn-danger-link { display: block; margin: 16px auto 0; color: var(--faint); }
.btn-danger-link:hover { color: var(--danger); }

/* ---------- confirm email ---------- */
.done-icon.verify-icon { background: rgba(79, 143, 224, 0.15); color: #8fbaf0; }
.code-input { font-size: 30px !important; letter-spacing: 0.5em; font-variant-numeric: tabular-nums; padding-left: calc(14px + 0.5em) !important; }
.email-status { color: var(--ok); }
.email-status .linklike { font-size: inherit; margin-left: 6px; }

/* ---------- progress ---------- */
.ring { position: relative; width: 180px; height: 180px; margin: 10px auto 18px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: var(--line); }
.ring .bar { stroke: #4f8fe0; stroke-linecap: round; transition: stroke-dashoffset 0.3s; }
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-pct { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring-sub { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.progress-meta { text-align: center; font-variant-numeric: tabular-nums; }
.progress-meta div + div { margin-top: 4px; color: var(--muted); font-size: 14px; }
.progress-file {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.keep-open { margin-top: 18px; text-align: center; font-size: 13px; color: var(--faint); }

/* ---------- done ---------- */
.done-icon {
  width: 72px;
  height: 72px;
  margin: 6px auto 16px;
  border-radius: 50%;
  background: rgba(70, 211, 154, 0.14);
  color: var(--ok);
  display: grid;
  place-items: center;
}
.done-text { text-align: center; color: var(--muted); margin: 0 0 16px; }
.link-box { display: flex; gap: 8px; }
.link-box input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border-radius: 9px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  font-size: 14px;
}
.link-box button {
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.link-box button:hover { background: var(--accent-hover); }
.done-meta { margin-top: 10px; text-align: center; font-size: 13px; color: var(--faint); }

/* ---------- showcase: full-size hero video (right side) ---------- */
.showcase { position: relative; min-width: 0; background: #000; }
/* Pinned to the screen height so the video stays in view while the form scrolls. */
.hero {
  position: sticky;
  top: 0;
  height: calc(100vh - 58px);
  min-height: 460px;
  overflow: hidden;
  background: #000 url('/video/hero-poster.webp') center / cover no-repeat;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 17, 30, 0.55) 0%, rgba(8, 17, 30, 0) 22%),
    linear-gradient(0deg, rgba(8, 17, 30, 0.75) 0%, rgba(8, 17, 30, 0) 40%);
  pointer-events: none;
}
.hero-top {
  position: absolute;
  top: 24px;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.today { font-size: 14px; font-weight: 600; }
.place { font-size: 13px; color: #d7e3f3; }
.clock { font-size: 38px; font-weight: 600; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.hero-body {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 30px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
.hero-body h2 { margin: 0; font-size: clamp(24px, 2.6vw, 40px); font-weight: 700; line-height: 1.15; max-width: 640px; }
.hero-body p { margin: 8px 0 0; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: #d7e3f3; }

/* ---------- footer ---------- */
.footer {
  padding: 18px 16px 16px;
  text-align: center;
  background: var(--bar);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.footer .visit {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.footer .visit:hover { background: var(--accent-hover); }
.footer .contact { margin-top: 10px; }
.footer .contact a { color: var(--muted); text-decoration: none; }
.footer .contact a:hover { color: var(--text); }
.footer .sep { margin: 0 10px; color: var(--line-strong); }
.footer .copy { margin-top: 6px; font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }

/* ---------- download page ---------- */
.dl-from { text-align: center; color: var(--muted); font-size: 14px; }
.dl-title { margin: 6px 0 0; text-align: center; font-size: 22px; font-weight: 700; word-break: break-word; }
.dl-message {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--line-strong);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}
.dl-meta { margin-top: 14px; text-align: center; color: var(--muted); font-size: 13.5px; }
.dl-files { list-style: none; margin: 16px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); max-height: 360px; overflow-y: auto; }
.dl-files li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.dl-files li:last-child { border-bottom: 0; }
.dl-files a.get {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--muted);
}
.dl-files a.get:hover { background: var(--accent); color: #fff; }
.state { text-align: center; padding: 20px 0; }
.state h1 { font-size: 21px; margin: 12px 0 8px; }
.state p { color: var(--muted); margin: 0 auto; max-width: 300px; }
.state-icon { color: var(--faint); }
.spinner {
  width: 34px;
  height: 34px;
  margin: 30px auto;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--focus);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 404 ---------- */
.center-page { flex: 1; display: grid; place-items: center; padding: 40px 16px; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(400px, 480px) 1fr; }
  .panel { padding: 30px 30px 36px; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--line); max-width: 620px; width: 100%; margin: 0 auto; }
  .hero { position: relative; min-height: 0; height: 56vw; max-height: 420px; }
  .hero-top { top: 16px; left: 16px; right: 16px; }
  .hero-body { left: 16px; right: 16px; bottom: 18px; }
  .clock { font-size: 26px; }
}
@media (max-width: 520px) {
  .panel { padding: 24px 16px 28px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .hero { height: 64vw; }
  .hero-body p { font-size: 11px; }
  .topbar { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; }
}
