:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand img { height: 30px; display: block; }
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  margin-left: 20px;
}
.nav a:hover { color: var(--ink); text-decoration: none; }

/* Hero */
.hero {
  text-align: center;
  padding: 56px 0 24px;
}
.hero h1 {
  font-size: 34px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--muted);
  margin: 0;
  font-size: 17px;
}

/* Homepage simplified style */
.home-simple {
  max-width: 760px;
  padding-top: 50px;
  padding-bottom: 48px;
}
.simple-upload-box {
  margin: 0 auto;
  max-width: 460px;
  background: var(--card);
  border: 1px dashed #94a3b8;
  padding: 26px 22px;
  text-align: center;
}
.simple-dropzone {
  display: block;
  padding: 8px;
  cursor: pointer;
  border: 1px dashed transparent;
  border-radius: 10px;
}
.simple-dropzone.dragover {
  border-color: var(--brand);
  background: #f5f3ff;
}
.simple-line {
  font-size: 18px;
  color: var(--ink);
}
.simple-sep {
  margin: 8px 0;
  color: var(--muted);
}
.simple-upload-btn {
  display: inline-block;
  margin-top: 8px;
  border: 1px solid #9ca3af;
  color: #111827;
  font-size: 13px;
  padding: 6px 10px;
  background: #f9fafb;
}
.simple-dropzone input[type="file"] {
  display: none;
}
.simple-hint {
  margin-top: 10px;
  margin-bottom: 10px;
}
.simple-submit-btn {
  width: 100%;
  margin-top: 10px;
}
.home-simple .cf-turnstile {
  margin: 12px auto 0;
}

/* Upload box */
.uploader {
  margin: 28px 0 40px;
}
.dropzone {
  display: block;
  width: 100%;
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  box-shadow: var(--shadow);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand);
  background: #f5f3ff;
}
.dropzone .icon { font-size: 40px; }
.dropzone strong { display: block; margin-top: 8px; font-size: 18px; }
.dropzone span { color: var(--muted); font-size: 14px; }
.dropzone input[type="file"] { display: none; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.secondary { background: #eef2ff; color: var(--brand-dark); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Result */
.result {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.result img.preview {
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
  display: block;
  margin: 0 auto 16px;
}
.link-row {
  display: flex;
  gap: 8px;
}
.link-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
}

/* Bulk upload */
.bulk-upload-form { margin-bottom: 20px; }
.bulk-result { margin-top: 16px; }
.bulk-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.bulk-result-head h2 {
  margin: 0;
  font-size: 20px;
}
.bulk-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bulk-table-wrap {
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.bulk-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.bulk-table th,
.bulk-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}
.bulk-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}
.bulk-status-ok { color: #166534; font-weight: 700; }
.bulk-status-error { color: #991b1b; font-weight: 700; }

/* Forms */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin: 24px 0 48px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field input, .field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}
.field textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Messages */
.msg { padding: 12px 14px; border-radius: 10px; margin: 12px 0; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.msg.success { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }

/* Content pages */
.prose { padding: 8px 0 48px; }
.prose h1 { font-size: 30px; }
.prose h2 { font-size: 20px; margin-top: 32px; }
.prose address { color: var(--muted); font-style: normal; background: #f1f5f9; padding: 12px 14px; border-radius: 10px; display: inline-block; }

/* Admin removal page */
body.admin-page .container { max-width: 1280px; }
.admin-wrap { padding: 24px 0 48px; }

.admin-filters {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.admin-filters select {
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.admin-summary {
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 14px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.admin-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  font-size: 14px;
}
.admin-table th {
  background: #f8fafc;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  position: sticky;
  top: 0;
}
.admin-table tbody tr:hover { background: #f8fafc; }
.admin-cell-wrap {
  max-width: 340px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.admin-empty {
  text-align: center;
  color: var(--muted);
  padding: 22px;
}

.admin-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 2px 10px;
}
.status-pending { background: #fef9c3; color: #854d0e; }
.status-actioned { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }

.admin-pagination {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}
.admin-btn-disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.site-footer a { color: var(--muted); margin: 0 8px; }

/* TOS page */
.tos-updated { color: var(--muted); margin-bottom: 24px; }
.tos-contact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  display: inline-block;
  line-height: 1.7;
}

/* Centered notice pages */
.notice { text-align: center; padding: 80px 0; }
.notice h1 { font-size: 28px; }
.notice p { color: var(--muted); }
