:root {
  color-scheme: dark;
  --bg: #111214;
  --panel: #191a1d;
  --panel-2: #202125;
  --line: #303136;
  --text: #f0f0ee;
  --muted: #9b9c9f;
  --accent: #d8ff72;
  --accent-hover: #e3ff99;
  --danger: #ff8178;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button { -webkit-appearance: none; appearance: none; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header,
main,
footer {
  width: min(720px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: #71d693; }
.status.offline i { background: #d38c75; }

main { padding: 72px 0 88px; }

.intro { margin-bottom: 27px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 11px; font-size: clamp(30px, 6vw, 42px); line-height: 1.12; letter-spacing: -0.045em; }
h2 { margin-bottom: 0; font-size: 17px; letter-spacing: -0.02em; }
.intro p, .plain-page p { max-width: 580px; margin-bottom: 0; color: var(--muted); }

.upload-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.upload-card { padding: 14px; }
.drop-zone {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed #48494f;
  border-radius: 10px;
  color: var(--text);
  background: #151619 !important;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop-zone:hover,
.drop-zone.dragover { border-color: #77797f; background: #18191c; }
.drop-zone svg { width: 34px; height: 34px; margin-bottom: 5px; fill: none; stroke: var(--muted); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-weight: 620; }
.drop-note { color: var(--muted); font-size: 13px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
select, input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--text);
  background: var(--panel-2);
  padding: 0 11px;
}
select:focus, input:focus { border-color: #686a70; }

.upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.upload-footer > span { color: var(--muted); font-size: 13px; }
button { border: 0; }
.primary,
.secondary,
.download-button,
.danger {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 17px;
  cursor: pointer;
  font-weight: 650;
}
.primary { color: #151710; background: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.primary:disabled { cursor: not-allowed; opacity: .38; }
.secondary { color: var(--text); background: #303136; }
.secondary:hover { background: #383a3f; }
.danger { color: #1a0b0a; background: var(--danger); }

.progress { margin-top: 19px; }
.progress-line { height: 4px; overflow: hidden; border-radius: 99px; background: #2b2c30; }
.progress-line span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .12s linear; }
.progress-copy { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 12px; }
.form-error { margin: 15px 0 0; color: #ff9c95; font-size: 13px; }

.recent { margin-top: 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.text-button { padding: 0; color: var(--muted); background: none; cursor: pointer; font-size: 13px; }
.text-button:hover { color: var(--text); }
.recent-list { border-top: 1px solid var(--line); }
.recent-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.recent-item a { min-width: 0; text-decoration: none; }
.recent-item strong, .recent-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item strong { font-size: 14px; }
.recent-item span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.recent-item time { color: var(--muted); font-size: 12px; white-space: nowrap; }

.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); text-decoration: none; font-size: 13px; }
.back-link:hover { color: var(--text); }
.result-card { padding: clamp(22px, 5vw, 36px); }
.result-label { display: block; margin-bottom: 12px; color: #8fd6a5; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.result-card h1 { overflow-wrap: anywhere; font-size: clamp(26px, 5vw, 36px); }
.result-meta, .expiry-note { color: var(--muted); }
.link-box { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; margin-top: 25px; }
.link-box input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.download-button { display: inline-flex; align-items: center; justify-content: center; margin-top: 14px; color: #151710; background: var(--accent); text-decoration: none; }
.expiry-note { margin: 16px 0 0; font-size: 13px; }
.delete-details { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.delete-details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.delete-details p { margin: 12px 0; font-size: 13px; }

.plain-page { max-width: 610px; }
.plain-page p + p { margin-top: 15px; }

footer {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer nav { display: flex; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

[hidden] { display: none !important; }

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 28px, 720px); }
  main { padding-top: 48px; }
  .form-row { grid-template-columns: 1fr; }
  .drop-zone { min-height: 190px; }
  .link-box { grid-template-columns: 1fr; }
  .link-box .secondary { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 20px 0; }
}

/* Development mode is controlled by /api/config, not by a decorative client-only switch. */
.status.development i { background: #d6a85f; }
.status.online i { background: #71d693; }

.development-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  align-items: baseline;
  margin-top: 21px;
  padding: 12px 14px;
  border: 1px solid #3b3932;
  border-radius: 9px;
  color: #c9c2b3;
  background: #181815;
  font-size: 13px;
}
.development-note strong {
  color: #e3c98d;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.development-note span { color: var(--muted); }

.uploads-disabled .drop-zone {
  cursor: default;
  border-style: solid;
  border-color: #333439;
  color: #b7b8ba;
  background: #151619 !important;
}
.uploads-disabled .drop-zone:hover,
.uploads-disabled .drop-zone.dragover {
  border-color: #333439;
  background: #151619 !important;
}
.uploads-disabled .drop-zone svg { opacity: .55; }
.uploads-disabled .drop-note { max-width: 360px; padding-inline: 18px; text-align: center; }
.uploads-disabled select:disabled,
.uploads-disabled input:disabled {
  color: #747579;
  opacity: 1;
  cursor: not-allowed;
}
.uploads-disabled .primary:disabled { opacity: .55; }

@media (max-width: 560px) {
  .development-note { grid-template-columns: 1fr; gap: 4px; }
}
