/* ── Reset & Variables ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #05050f;
  --surface:     #0d0d1f;
  --surface2:    #111126;
  --border:      #1a1a32;
  --border2:     #252545;
  --accent:      #7c5cfc;
  --accent2:     #5e3fde;
  --accent3:     #a78bfa;
  --glow:        rgba(124,92,252,0.18);
  --glow-strong: rgba(124,92,252,0.35);
  --text:        #f0f0ff;
  --text2:       #c8c8e8;
  --muted:       #7070a0;
  --success:     #10b981;
  --error:       #ef4444;
  --warning:     #f59e0b;
  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 8px 40px rgba(0,0,0,0.6);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.4);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Container ─────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Nav ───────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5,5,15,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(124,92,252,0.12);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  background: linear-gradient(135deg, #fff 40%, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, #8b6dfd 0%, var(--accent2) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124,92,252,0.4), 0 1px 0 rgba(255,255,255,0.08) inset;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124,92,252,0.55), 0 1px 0 rgba(255,255,255,0.08) inset;
  text-decoration: none;
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(124,92,252,0.5); background: rgba(124,92,252,0.06); text-decoration: none; }

.btn-accent {
  background: linear-gradient(135deg, #8b6dfd, var(--accent2));
  color: #fff;
  box-shadow: 0 2px 12px rgba(124,92,252,0.35);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(124,92,252,0.5); text-decoration: none; color: #fff; }

.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #dc2626; text-decoration: none; color: #fff; }

.btn-nav {
  background: linear-gradient(135deg, #8b6dfd, var(--accent2));
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(124,92,252,0.4);
}
.btn-nav:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,92,252,0.5); text-decoration: none; }

.btn-full { width: 100%; }
.btn-lg { padding: 0.9rem 2.25rem; font-size: 1rem; border-radius: var(--radius-sm); }

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 5px;
  cursor: pointer;
  border: none;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-family: var(--font);
}
.btn-sm.btn-accent { background: var(--accent); color: #fff; }
.btn-sm.btn-ghost  { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-sm.btn-ghost:hover { color: var(--text); }
.btn-sm.btn-danger { background: #1a0606; color: var(--error); border: 1px solid #3a0a0a; }
.btn-sm.btn-danger:hover { background: var(--error); color: #fff; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Radial glow blobs */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(124,92,252,0.14) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle, rgba(124,92,252,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(124,92,252,0.1);
  border: 1px solid rgba(124,92,252,0.25);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent3);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.08;
  background: linear-gradient(160deg, #ffffff 0%, #d4c8ff 50%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
}

/* ── Shorten Card ──────────────────────────────────────── */
.shorten-card {
  background: rgba(13,13,31,0.8);
  border: 1px solid rgba(124,92,252,0.2);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  width: 100%;
  max-width: 700px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(124,92,252,0.05), 0 0 60px rgba(124,92,252,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s;
}
.shorten-card:hover {
  box-shadow: var(--shadow), 0 0 0 1px rgba(124,92,252,0.12), 0 0 80px rgba(124,92,252,0.12);
}

.shorten-card-sm {
  max-width: 100%;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.input-row { display: flex; gap: 0.75rem; }

.url-input {
  flex: 1;
  background: rgba(5,5,15,0.9);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 0.8rem 1.1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font);
}
.url-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.15), 0 2px 8px rgba(0,0,0,0.3);
}
.url-input::placeholder { color: var(--muted); }

/* ── Mode Toggle ───────────────────────────────────────── */
.form-options {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.mode-toggle { display: flex; gap: 1.5rem; }

.mode-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.15s;
}
.mode-label input[type=radio] { accent-color: var(--accent); }
.mode-label:hover { color: var(--text2); }

.expiry-pick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: auto;
}
.expiry-pick label { white-space: nowrap; }
.expiry-pick select {
  background: rgba(5,5,15,0.9);
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.expiry-pick select:focus { border-color: var(--accent); }

/* ── Result Box ────────────────────────────────────────── */
.result-box {
  margin-top: 1.5rem;
  padding: 1.4rem;
  background: rgba(5,5,15,0.95);
  border: 1px solid rgba(124,92,252,0.35);
  border-radius: var(--radius-sm);
  animation: slideIn 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 30px rgba(124,92,252,0.1);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-url-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.short-url {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent3);
  word-break: break-all;
  flex: 1;
}
.short-url:hover { text-decoration: underline; }

.result-original {
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
  margin-bottom: 0.9rem;
}

.qr-code {
  margin: 0.9rem 0;
  display: flex;
  justify-content: center;
}
.qr-code canvas, .qr-code img {
  border-radius: 8px;
  border: 2px solid var(--border2);
  padding: 8px;
  background: #fff;
}

.result-actions { margin-top: 0.9rem; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: auto;
  background: linear-gradient(to top, rgba(124,92,252,0.03), transparent);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text2); text-decoration: none; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Forms (auth pages) ────────────────────────────────── */
.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.5px;
}

.auth-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font);
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.15);
}
.form-input::placeholder { color: var(--muted); }

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.form-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--error);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.form-success {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--success);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 1.25rem 0;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Dashboard ─────────────────────────────────────────── */
.dash-page { padding: 3rem 0; }

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 1.5rem;
  align-items: start;
}

.stats-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.stats-number {
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stats-label { font-size: 0.8rem; color: var(--muted); }

.links-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.links-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.links-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.2);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.links-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.links-table tr:last-child td { border-bottom: none; }
.links-table tr:hover td { background: rgba(124,92,252,0.03); }

.links-table .code-cell a {
  font-weight: 600;
  color: var(--accent3);
  font-size: 0.9rem;
}

.links-table .url-cell {
  color: var(--muted);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.links-table .actions-cell { display: flex; gap: 0.5rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-active   { background: rgba(16,185,129,0.12); color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.badge-inactive { background: rgba(239,68,68,0.1);   color: var(--error);   border: 1px solid rgba(239,68,68,0.2); }
.badge-expired  { background: rgba(245,158,11,0.1);  color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}
.empty-state p { margin-bottom: 1.25rem; }

/* ── Stats page ─────────────────────────────────────────── */
.stats-page { padding: 3rem 0; }
.stats-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.stats-hero h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.stats-meta { color: var(--muted); font-size: 0.875rem; }
.stats-meta a { color: var(--text2); }

.stats-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.stat-box-num {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-box-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-title { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }

.device-bars { display: flex; flex-direction: column; gap: 0.75rem; }
.device-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; }
.device-label { min-width: 70px; color: var(--muted); }
.device-bar-wrap { flex: 1; background: var(--border); border-radius: 100px; height: 8px; overflow: hidden; }
.device-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent3)); border-radius: 100px; }
.device-count { min-width: 30px; text-align: right; color: var(--text2); font-weight: 600; }

/* ── Admin ──────────────────────────────────────────────── */
.admin-page { padding: 3rem 0; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.admin-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.5px; }
.admin-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 0.75rem 1rem; background: rgba(0,0,0,0.2); color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(124,92,252,0.03); }

/* ── Alert / Notice ────────────────────────────────────── */
.alert { padding: 0.9rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error   { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.3);  color: var(--error); }
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.alert-warn    { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.3); color: var(--warning); }

/* ── Features ───────────────────────────────────────────── */
.features { padding: 6rem 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,92,252,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
}

.feature-card:hover {
  border-color: rgba(124,92,252,0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,92,252,0.1);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.9rem;
  display: block;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── Trust bar ──────────────────────────────────────────── */
.trust-bar {
  background: linear-gradient(to bottom, var(--surface) 0%, rgba(13,13,31,0.6) 100%);
  border-top: 1px solid rgba(124,92,252,0.12);
  border-bottom: 1px solid rgba(124,92,252,0.12);
  padding: 2.5rem 0;
  position: relative;
}

.trust-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
}

.trust-stat { text-align: center; }

.trust-num {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -1px;
}

.trust-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
  display: block;
  letter-spacing: 0.02em;
}

/* ── Section titles ─────────────────────────────────────── */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.6rem;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* ── How It Works section ───────────────────────────────── */
.how-section { padding: 6rem 0; background: var(--surface); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(16.66% + 24px);
  right: calc(16.66% + 24px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,92,252,0.4), transparent);
  pointer-events: none;
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.step-card:hover {
  border-color: rgba(124,92,252,0.35);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,92,252,0.08);
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 16px rgba(124,92,252,0.5);
  position: relative;
  z-index: 1;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.step-card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── FAQ section ─────────────────────────────────────────── */
.faq-section { padding: 6rem 0; }
.faq-inner { max-width: 760px; }
.faq-list { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.6rem; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover { border-color: rgba(124,92,252,0.3); }
details[open].faq-item { border-color: rgba(124,92,252,0.3); box-shadow: 0 0 0 1px rgba(124,92,252,0.06); }

.faq-q {
  padding: 1.1rem 1.35rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.15s;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
  font-weight: 300;
}
details[open] .faq-q::after { content: '−'; }
details[open] .faq-q { color: var(--accent3); }

.faq-a {
  padding: 0 1.35rem 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: -0.1rem;
}
.faq-a a { color: var(--accent3); }

/* ── CTA section ─────────────────────────────────────────── */
.cta-section {
  padding: 6rem 0;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center bottom, rgba(124,92,252,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  text-align: center;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

.cta-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-inner p { color: var(--muted); margin-bottom: 2rem; font-size: 1rem; }

/* ── Page hero (inner pages) ─────────────────────────────── */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(124,92,252,0.1) 0%, transparent 70%);
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -1px;
  position: relative;
  background: linear-gradient(135deg, var(--text) 60%, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Content page ────────────────────────────────────────── */
.content-section { padding: 5rem 0; }
.content-narrow { max-width: 760px; }

.content-narrow h2 {
  font-size: 1.35rem;
  margin: 3rem 0 0.85rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.content-narrow p, .content-narrow li {
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.95rem;
}

.content-narrow ul, .content-narrow ol { padding-left: 1.5rem; margin: 0.75rem 0; }

.content-narrow ol.how-list { counter-reset: step; list-style: none; padding: 0; }
.content-narrow ol.how-list > li {
  counter-increment: step;
  margin: 1.75rem 0;
  padding-left: 3rem;
  position: relative;
}
.content-narrow ol.how-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1px;
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(124,92,252,0.4);
}
.content-narrow ol.how-list > li strong { color: var(--text); display: block; margin-bottom: 0.35rem; font-size: 1rem; }

.url-example {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text2);
  margin: 1.25rem 0;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: 'SF Mono', 'Fira Code', monospace;
  line-height: 1.6;
}
.url-example .arrow { display: block; color: var(--accent); font-size: 1.2rem; margin: 0.35rem 0; }

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}
.info-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.info-table td { padding: 0.7rem 1rem; border: 1px solid var(--border); color: var(--muted); }
.info-table tr:hover td { background: rgba(124,92,252,0.03); }

.cta-box {
  background: linear-gradient(135deg, rgba(124,92,252,0.08), rgba(94,63,222,0.05));
  border: 1px solid rgba(124,92,252,0.25);
  border-radius: var(--radius);
  padding: 2.25rem;
  margin-top: 3.5rem;
  text-align: center;
}
.cta-box h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.cta-box p { color: var(--muted); margin-bottom: 1.5rem; }

/* ── Recent links table ──────────────────────────────────── */
.recent-links { margin-top: 3rem; }
.recent-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

.link-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.link-table th { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.link-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--text); }
.link-table a { color: var(--accent3); text-decoration: none; }
.url-truncate { color: var(--muted) !important; font-size: 0.8rem; }
.recent-more { text-align: right; margin-top: 0.5rem; }
.recent-more a { color: var(--accent); font-size: 0.85rem; }

/* ── Page 404 / 410 ──────────────────────────────────────── */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}
.error-code {
  font-size: 6rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}
.error-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.error-body { color: var(--muted); margin-bottom: 2rem; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .stats-numbers { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid::before { display: none; }
  .trust-inner { justify-content: center; gap: 2rem; }
  .trust-num { font-size: 1.8rem; }
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 4rem 0 2.5rem; }
  .nav-inner { height: 56px; }
  .shorten-card { padding: 1.5rem; }
  .input-row { flex-direction: column; }
  .url-input { font-size: 0.95rem; }
  .form-options { flex-direction: column; align-items: flex-start; }
  .expiry-pick { margin-left: 0; }
  .auth-card { padding: 1.75rem; }
  .links-table th:nth-child(3),
  .links-table td:nth-child(3) { display: none; }
}

/* ── Button shimmer animation ─────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.btn-primary {
  background-size: 200% auto;
  background-image: linear-gradient(135deg, #8b6dfd 0%, var(--accent2) 40%, #a78bfa 60%, var(--accent2) 80%, #8b6dfd 100%);
}
.btn-primary:hover {
  background-image: linear-gradient(135deg, #8b6dfd 0%, var(--accent2) 40%, #a78bfa 60%, var(--accent2) 80%, #8b6dfd 100%);
  animation: shimmer 2s linear infinite;
}

/* ── Logger toggle ───────────────────────────────────────── */
.logger-toggle {
  background: rgba(124,92,252,0.06);
  border: 1px solid rgba(124,92,252,0.2);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  color: var(--accent3) !important;
  font-size: 0.82rem !important;
  transition: background 0.2s, border-color 0.2s;
}
.logger-toggle:hover { background: rgba(124,92,252,0.12); border-color: rgba(124,92,252,0.4); }
.logger-toggle input[type=checkbox] { accent-color: var(--accent); }

/* ── Global fade-in on load ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-inner > * { animation: fadeUp 0.6s cubic-bezier(0.4,0,0.2,1) both; }
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.12s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.19s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.26s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.33s; }
.anim-fade-up { animation: fadeUp 0.5s cubic-bezier(0.4,0,0.2,1) both 0.1s; }

/* ── Pulse glow on shorten card focus ───────────────────── */
@keyframes glowPulse {
  0%,100% { box-shadow: var(--shadow), 0 0 0 1px rgba(124,92,252,0.05), 0 0 60px rgba(124,92,252,0.08); }
  50%      { box-shadow: var(--shadow), 0 0 0 1px rgba(124,92,252,0.18), 0 0 80px rgba(124,92,252,0.18); }
}
.shorten-card:focus-within { animation: glowPulse 3s ease-in-out infinite; }

/* ── Result box entrance ─────────────────────────────────── */
@keyframes slideInBounce {
  0%   { opacity: 0; transform: translateY(-12px) scale(0.98); }
  70%  { transform: translateY(2px) scale(1.005); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.result-box { animation: slideInBounce 0.35s cubic-bezier(0.34,1.56,0.64,1); }

/* ── Nav logo hover sparkle ─────────────────────────────── */
.nav-logo:hover { filter: brightness(1.2); text-decoration: none; }

/* ── Feature card border gradient on hover ──────────────── */
.feature-card { isolation: isolate; }
.feature-card:hover { background: var(--surface2); }
