:root {
  --bg: #0b0f17;
  --panel: #121826;
  --panel-2: #182034;
  --border: #232d45;
  --text: #e7ecf5;
  --muted: #8a94ab;
  --accent: #5eead4;
  --accent-2: #38bdf8;
  --danger: #f87171;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

/* ---------- header / nav ---------- */
.site-header { border-bottom: 1px solid var(--border); background: rgba(11,15,23,0.85); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: 0.3px; }
.nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 0.9rem; }
.nav a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 88px 0 72px; }
.eyebrow { color: var(--accent-2); text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; font-weight: 600; }
.hero h1 { font-size: 2.7rem; line-height: 1.1; margin: 12px 0 14px; font-weight: 800; }
.lede { color: var(--muted); max-width: 520px; font-size: 1.05rem; }

.shorten-form { display: flex; gap: 10px; margin-top: 28px; max-width: 560px; }
.shorten-form input {
  flex: 1; padding: 13px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-size: 1rem; outline: none;
}
.shorten-form input:focus { border-color: var(--accent); }
.shorten-form button {
  padding: 13px 22px; border-radius: 10px; border: none; background: var(--accent);
  color: #04211b; font-weight: 700; font-size: 1rem; cursor: pointer; transition: transform 0.06s;
}
.shorten-form button:hover { filter: brightness(1.05); }
.shorten-form button:active { transform: translateY(1px); }

.form-msg { margin-top: 14px; min-height: 22px; font-size: 0.92rem; word-break: break-all; }
.form-msg.ok { color: var(--accent); }

/* ---------- dashboard ---------- */
.dashboard { padding: 0 0 80px; }
.dashboard h2 { font-size: 1.6rem; margin-bottom: 24px; }

.stats { display: flex; gap: 16px; margin-bottom: 24px; }
.stat-card {
  flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 4px;
}
.stat-value { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.links-table { width: 100%; border-collapse: collapse; }
.links-table th, .links-table td { text-align: left; padding: 14px 16px; }
.links-table thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600; }
.links-table tbody tr { border-bottom: 1px solid var(--border); }
.links-table tbody tr:last-child { border-bottom: none; }
.links-table tbody tr:hover { background: var(--panel-2); }
.links-table .num { text-align: right; }
a.short { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
a.short:hover { text-decoration: underline; }
a.dest { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
a.dest:hover { color: var(--text); }
.click-pill { background: var(--panel-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; color: var(--text); }
.muted { color: var(--muted); }

/* ---------- copy button ---------- */
.copy-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 1rem;
  line-height: 1; transition: all 0.15s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); background: var(--panel); }
.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

/* ---------- trend sparkline ---------- */
.trend { text-align: center; }
.spark { display: block; margin: 0 auto; }
.trend-loading { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 30px !important; }

.updated { margin-top: 14px; color: var(--muted); font-size: 0.8rem; }

.site-footer { border-top: 1px solid var(--border); padding: 22px 0; color: var(--muted); font-size: 0.85rem; }

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .shorten-form { flex-direction: column; }
  .nav { display: none; }
  .links-table th:nth-child(2), .links-table td:nth-child(2) { display: none; }
  .links-table th:nth-child(4), .links-table td:nth-child(4) { display: none; }
}
