:root {
  --bg: #0a0a0a;
  --bg-panel: #101410;
  --bg-input: #0e150e;
  --green: #39ff8c;
  --green-dim: #1f7a4a;
  --green-faint: #163b26;
  --border: #1f3a28;
  --text-muted: #6fa885;
  --error: #ff6b6b;
  --font-heading: 'Source Serif 4', Georgia, serif;
  --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--green);
  font-family: var(--font-body);
  line-height: 1.6;
}

a { color: var(--green); text-decoration: underline; text-decoration-color: var(--green-dim); }
a:hover { text-decoration-color: var(--green); }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.01em;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  text-decoration: none;
}
.brand span { color: var(--green-dim); }

.site-nav { display: flex; align-items: center; gap: 1.25rem; font-family: var(--font-mono); font-size: 0.9rem; }
.who { color: var(--text-muted); }

.site-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.site-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
}
.panel-narrow { max-width: 420px; margin: 0 auto; }
.panel-spaced { margin-top: 1.5rem; }
.compact-top { margin-top: 0.5rem; }

.stack-form { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1.5rem; }
.stack-form label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.95rem; }

input[type="text"], input[type="password"], input[type="search"], textarea {
  background: var(--bg-input);
  border: 1px solid var(--green-dim);
  color: var(--green);
  padding: 0.6rem 0.7rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
textarea { resize: vertical; font-family: var(--font-mono); }
input:focus, textarea:focus { outline: none; border-color: var(--green); }

button, .link-button {
  background: var(--green-faint);
  border: 1px solid var(--green-dim);
  color: var(--green);
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
}
button:hover, .link-button:hover { background: var(--green-dim); color: #04140a; }
.link-button { padding: 0.2rem 0.5rem; font-size: 0.85rem; text-decoration: none; }
.danger { border-color: #6b2222; color: var(--error); }
.danger:hover { background: #6b2222; color: #fff; }

.inline-form { display: inline; }

.search-form { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; }
.search-form input { flex: 1; }

.compose-panel { padding: 1.25rem 1.5rem 1rem; }

#compose-body {
  width: 100%;
  min-height: 9rem;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--bg-input);
  border: 1px solid var(--green-dim);
  color: var(--green);
  padding: 0.7rem;
  border-radius: 4px;
  display: block;
}
#compose-body:focus { outline: none; border-color: var(--green); }

.drop-zone {
  margin-top: 0.6rem;
  border: 2px dashed var(--green-dim);
  border-radius: 4px;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-height: 2.4rem;
  transition: border-color 0.1s, background 0.1s;
}
.drop-zone.over {
  border-color: var(--green);
  background: var(--green-faint);
}
.drop-hint { font-size: 0.85rem; font-family: var(--font-mono); }
.file-queue { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; flex: 1; }
.file-queue li {
  display: flex; align-items: center; gap: 0.3rem;
  background: var(--green-faint); border: 1px solid var(--green-dim);
  border-radius: 3px; padding: 0.15rem 0.5rem;
  font-size: 0.8rem; font-family: var(--font-mono);
}
.file-queue li button { padding: 0; font-size: 0.9rem; background: none; border: none; color: var(--text-muted); cursor: pointer; line-height: 1; }
.file-queue li button:hover { color: var(--green); }

.compose-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }
.upload-progress-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  margin-right: 1rem;
}
.upload-progress-wrap progress {
  width: 100%;
  height: 0.5rem;
  accent-color: var(--green);
}

.paste-list { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.paste-list th, .paste-list td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.paste-list th { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.muted-link { color: var(--text-muted); margin-left: 0.75rem; }
.error { color: var(--error); }

.notice {
  background: var(--green-faint);
  border: 1px solid var(--green-dim);
  border-radius: 4px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}

.paste-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.paste-actions { display: flex; gap: 0.75rem; font-family: var(--font-mono); font-size: 0.9rem; }

.paste-body {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.2rem;
  font-family: var(--font-mono);
  margin: 1.5rem 0;
}

.bare-body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.bare-main { width: 100%; max-width: 390px; padding: 1.25rem; }

.login-box {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.login-heading { margin-bottom: 1.5rem; }
.login-heading h1 {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.2;
}
.login-heading p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.login-fields label {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--font-mono);
}
.login-fields input,
.login-fields button {
  width: 100%;
  min-width: 0;
}
.login-fields button { margin-top: 0.65rem; }
.login-fields [role="status"],
.login-fields [role="alert"] {
  margin: 0;
  font-size: 0.85rem;
}
.login-fields [role="status"]:empty,
.login-fields [role="alert"]:empty { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-list { list-style: none; padding: 0; }

/* ── password strength meter ───────────────────────────────────────────── */
.password-requirements {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--green);
  background: var(--green-faint);
  font-size: 0.9rem;
}
.password-requirements ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}
.password-requirements p { margin: 0; }

.strength-track {
  height: 4px;
  background: var(--green-faint);
  border-radius: 3px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.25s ease, background 0.25s ease;
}
.strength-score--1 { width: 0%; }
.strength-score-0 { width: 20%; background: #ff6b6b; color: #ff6b6b; }
.strength-score-1 { width: 40%; background: #ff8c42; color: #ff8c42; }
.strength-score-2 { width: 60%; background: #d4c030; color: #d4c030; }
.strength-score-3 { width: 80%; background: #8ddc50; color: #8ddc50; }
.strength-score-4 { width: 100%; background: #39ff8c; color: #39ff8c; }
.strength-label.is-valid { color: var(--green); }
.strength-label.is-invalid { color: var(--error); }
.strength-label {
  display: block;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  margin-top: 0.2rem;
  min-height: 1em;
}
.strength-tips {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.strength-tips li::before { content: '↳ '; }

/* ── idle-logout overlay ───────────────────────────────────────────────── */
#idle-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.idle-box {
  background: var(--bg-panel);
  border: 1px solid var(--green-dim);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  text-align: center;
}
.idle-box p { margin: 0 0 1.25rem; font-size: 1rem; }
#idle-count { font-family: var(--font-mono); font-size: 1.5rem; color: var(--green); }

/* ── mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; padding: 0.75rem 1rem; gap: 0.5rem; }
  .site-nav { width: 100%; gap: 0.5rem; font-size: 0.8rem; flex-wrap: wrap; }
  .site-main { padding: 1rem 0.75rem 2rem; }
  .panel { padding: 1rem 0.85rem; overflow-x: auto; }
  .panel-narrow { max-width: 100%; }
  .compose-panel { padding: 0.75rem 0.85rem 0.5rem; }
  #compose-body { min-height: 6rem; }
  .search-form { flex-wrap: wrap; }
  .drop-zone { flex-wrap: wrap; }
  .paste-list { min-width: 440px; }
  .bare-main { max-width: 90vw; }
  .idle-box { padding: 1.5rem; margin: 0 1rem; }
}
.file-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }

#uploader { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }
