:root {
  --accent: #5b7cfa;
  --bg: #0f1220;
  --card: #171a2b;
  --card-2: #1e2338;
  --text: #eef0f8;
  --muted: #9aa1bd;
  --ok: #35c88a;
  --err: #ff6b6b;
  --line: #2a2f4a;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2140 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.head { text-align: center; margin-top: 8px; }
.head h1 { font-size: 1.7rem; margin: 0 0 6px; letter-spacing: -0.02em; }
.subtitle { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---- Access code gate ---- */
.gate {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.gate label { display: block; margin-bottom: 12px; color: var(--muted); }
.gate-row { display: flex; gap: 10px; }
.gate-row input {
  flex: 1; padding: 14px 16px; font-size: 1.1rem; text-transform: uppercase;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text);
}
.gate-row input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ---- Dropzone ---- */
.dropzone {
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .05s;
  user-select: none;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone.drag { border-color: var(--accent); background: var(--card-2); }
.dropzone:active { transform: scale(.995); }

.plus {
  width: 84px; height: 84px; margin: 0 auto 16px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #7a5bfa);
  border-radius: 50%;
  box-shadow: 0 10px 30px -8px var(--accent);
}
.dz-main { font-size: 1.15rem; font-weight: 600; margin: 0 0 4px; }
.dz-sub { color: var(--muted); margin: 0; font-size: .92rem; }
.dz-max { color: var(--muted); margin: 10px 0 0; font-size: .85rem; opacity: .85; }

/* ---- File list ---- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.thumb {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  background: var(--card-2); flex: 0 0 auto; display: grid; place-items: center;
  color: var(--muted); font-size: 20px; overflow: hidden;
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.meta { flex: 1; min-width: 0; }
.name {
  font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px;
}
.bar { height: 6px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.bar > span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #7a5bfa);
  transition: width .15s ease;
}
.item.done .bar > span { background: var(--ok); }
.item.error .bar > span { background: var(--err); width: 100% !important; }
.status { flex: 0 0 auto; width: 26px; text-align: center; font-size: 1.1rem; }
.status .spin {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
.item.done .status { color: var(--ok); }
.item.error .status { color: var(--err); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Summary ---- */
.summary {
  text-align: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 20px;
}
.summary-icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.6rem; color: #fff; background: var(--ok);
}
.summary p { margin: 0 0 16px; font-size: 1.05rem; }

.foot { text-align: center; }
button {
  font: inherit; cursor: pointer; border: none; border-radius: 12px;
  background: var(--accent); color: #fff; padding: 12px 20px; font-weight: 600;
}
button:active { transform: translateY(1px); }
.ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
}
.err { color: var(--err); margin: 10px 0 0; font-size: .9rem; }

/* ---- Phone: bigger, more tappable upload button ---- */
@media (max-width: 640px) {
  .dropzone { padding: 64px 20px; border-radius: 22px; }
  .plus {
    width: 128px; height: 128px; margin-bottom: 20px;
  }
  .plus svg { width: 64px; height: 64px; }
  .dz-main { font-size: 1.35rem; }
  .dz-sub { font-size: 1rem; }
  .dz-max { font-size: .95rem; }
  /* Comfortable touch targets for all buttons */
  button { padding: 16px 24px; font-size: 1.05rem; }
}
