@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-500.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-600.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --field: #f2f2f2;
  --text: #111111;
  --muted: #777777;
  --line: #e5e5e5;
  --warn: #c03030;
  --drop-over: #eaeaea;
  --select: #d8d8d8;
  --btn: #111111;
  --btn-text: #ffffff;
  --btn-hover: #333333;
  --btn-text-hover: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --field: #222222;
  --text: #eeeeee;
  --muted: #888888;
  --line: #333333;
  --warn: #ee8888;
  --drop-over: #1e1e1e;
  --select: #333333;
  --btn: #eeeeee;
  --btn-text: #111111;
  --btn-hover: #ffffff;
  --btn-text-hover: #111111;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--select);
  color: var(--text);
}

.page {
  max-width: 38rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h1 a:hover {
  opacity: 0.7;
}

h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.top-meta {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.hint,
.summary {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

main {
  display: grid;
  gap: 1rem;
}

.block {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.drop {
  padding: 2.5rem 1rem;
  text-align: center;
  background: var(--field);
  border: 2px dashed var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.drop:hover,
.drop:focus-visible {
  border-color: var(--muted);
  background: var(--drop-over);
}

.drop.is-over {
  border-style: solid;
  border-color: var(--text);
  background: var(--drop-over);
}

.drop.has-files {
  padding: 1.1rem;
}

.drop-title {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
}

.drop-hint {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.picker {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.file-list {
  margin-top: 0.75rem;
}

.file {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 0.85rem;
  margin-top: 1rem;
}

.field {
  display: grid;
  gap: 0.2rem;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-wide {
  grid-column: 1 / -1;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  border-color: var(--muted);
}

input[readonly] {
  background: var(--field);
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
.drop:focus-visible,
.text-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.summary {
  margin-top: 0.75rem;
}

.progress-block {
  margin-top: 0.85rem;
}

.progress-block .progress-speed {
  margin: 0.45rem 0 0;
}

.progress {
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--text);
  transition: width 0.2s;
}

.error {
  margin: 0.65rem 0 0;
  color: var(--warn);
  font-size: 0.85rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  margin-top: 1rem;
}

.primary {
  padding: 0.5rem 1.1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--btn-text);
  background: var(--btn);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

a.primary {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.primary:hover {
  background: var(--btn-hover);
  color: var(--btn-text-hover);
}

.primary:active {
  opacity: 0.85;
}

.primary:disabled {
  opacity: 0.35;
  cursor: default;
}

.top-side {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.who {
  color: var(--muted);
  font-size: 0.85rem;
}

#discord-login {
  margin-top: 0.2rem;
}

.stats-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
}

.stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.stats th {
  padding: 0.2rem 0.5rem 0.5rem 0;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats td {
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

.stats td:first-child,
.stats th:first-child {
  white-space: normal;
}

.person {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 9rem;
}

.person .avatar {
  width: 24px;
  height: 24px;
}

.person small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.text-btn,
.text-link {
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.text-btn:hover,
.text-link:hover {
  color: var(--text);
}

.link-row {
  display: flex;
  gap: 0.5rem;
}

.note-text {
  margin: 0 0 0.45rem;
  overflow-wrap: anywhere;
}

#receive-expiry {
  margin-bottom: 0.35rem;
}

.noscript {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

.encrypted-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 560px) {
  .page {
    padding: 1.5rem 1rem 3rem;
  }

  .options,
  .link-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .link-row .primary,
  .actions .primary {
    width: 100%;
  }

  .top-side {
    gap: 0.5rem;
  }
}
