*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f7;
  --bg-card: #ffffff;
  --border: #e6e8eb;
  --text: #15191e;
  --text-soft: #6b7480;
  --accent: #0aa590;
  --accent-hover: #088775;
  --danger: #d6443a;
  --shadow: 0 12px 40px rgba(15, 25, 35, 0.08);
  --radius: 14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand .dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent);
  display: inline-block;
}
.topbar .meta {
  font-size: 13px;
  color: var(--text-soft);
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid var(--border);
}

.card.wide {
  max-width: 640px;
}

h1 {
  font-size: 22px;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}
.sub {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0 0 22px 0;
}

.dropzone {
  border: 2px dashed #cdd2d8;
  border-radius: 12px;
  padding: 36px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 18px;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: #f4fbfa;
}
.dropzone .plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 12px;
}
.dropzone .hint {
  font-size: 14px;
  color: var(--text-soft);
}
.dropzone strong { color: var(--text); }

.files {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  max-height: 220px;
  overflow-y: auto;
}
.files li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}
.files li .name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.files li .size {
  color: var(--text-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.files li .remove {
  cursor: pointer;
  color: var(--text-soft);
  background: none;
  border: 0;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}
.files li .remove:hover { color: var(--danger); }

.field {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-soft);
}
.field label { display: block; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
  color: var(--text);
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(10, 165, 144, 0.25);
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; background: var(--accent); }
.btn.secondary { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #ebeef1; }

.progress {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 100px;
  overflow: hidden;
  margin: 14px 0 6px;
}
.progress > div {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .2s;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.share {
  display: flex;
  gap: 8px;
  margin: 16px 0 6px 0;
}
.share input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--bg-soft);
  color: var(--text);
}
.share button {
  padding: 12px 16px;
  border-radius: 8px;
  border: 0;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.share button:hover { background: #2a3239; }
.share button.copied { background: var(--accent); }

.success-head {
  text-align: center;
  margin-bottom: 18px;
}
.success-head .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
}

.expiry-line {
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
  margin-top: 12px;
}

.dl-header {
  text-align: center;
  margin-bottom: 22px;
}
.dl-header h1 { margin-bottom: 6px; }
.dl-header .info { color: var(--text-soft); font-size: 14px; }
.message {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 18px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-soft);
}
footer a { color: var(--text-soft); text-decoration: none; }
footer a:hover { color: var(--text); }

.hidden { display: none !important; }

@media (max-width: 520px) {
  .topbar { padding: 18px 20px; }
  .card { padding: 22px; }
  h1 { font-size: 20px; }
}
