:root {
  --bg: #0e1116;
  --bg-soft: #161b22;
  --card: #1b222c;
  --border: #2a3441;
  --text: #e6edf3;
  --muted: #8b98a9;
  --accent: #4f9dff;
  --accent-hover: #3a86f0;
  --ok: #2ea043;
  --danger: #f0596a;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #17202c 0%, var(--bg) 55%) no-repeat;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.head { text-align: center; margin-bottom: 32px; }
.head h1 {
  font-size: 2.6rem;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.head .scissors { -webkit-text-fill-color: initial; }
.head .dot { color: var(--accent); }
.tagline { color: var(--muted); margin: 8px 0 0; font-size: 1.05rem; }

.shorten {
  display: flex;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.shorten input {
  flex: 1;
  min-width: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}
.shorten input:focus { border-color: var(--accent); }
.shorten input::placeholder { color: var(--muted); }
.shorten button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.shorten button:hover { background: var(--accent-hover); }

.alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(240, 89, 106, 0.12);
  border: 1px solid rgba(240, 89, 106, 0.4);
  color: #ffb3bc;
}

.result {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(46, 160, 67, 0.10);
  border: 1px solid rgba(46, 160, 67, 0.4);
}
.result-label { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.result-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.short-link {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
}
.short-link:hover { color: var(--accent); }
.copy {
  margin-left: auto;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.copy:hover { background: var(--accent); color: #fff; }
.copy.done { border-color: var(--ok); color: var(--ok); }
.copy.done:hover { background: transparent; }
.result-orig { display: block; margin-top: 10px; color: var(--muted); font-size: 0.85rem; word-break: break-all; }

.recent { margin-top: 44px; }
.recent h2 { font-size: 1.15rem; color: var(--muted); font-weight: 600; margin: 0 0 14px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
thead th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.code { color: var(--accent); text-decoration: none; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.code:hover { text-decoration: underline; }
.orig { max-width: 280px; }
.orig a { color: var(--muted); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orig a:hover { color: var(--text); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.date { color: var(--muted); white-space: nowrap; }

.foot { margin-top: 48px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.foot span { color: var(--text); font-weight: 600; }

@media (max-width: 520px) {
  .shorten { flex-direction: column; }
  .shorten button { padding: 14px; }
  .head h1 { font-size: 2.1rem; }
}
