:root {
  --bg: #08080c;
  --card: #121216;
  --ink: #f7f7fb;
  --muted: #c4c4ce;
  --line: #3a3a44;
  --accent: #ffffff;
  --good: #3dcf8e;
  --bad: #ff6b6b;
  --input: #0b0b10;
  --glow: rgba(255, 255, 255, 0.42);
  --silver: linear-gradient(90deg, #9a9aa6, #ffffff, #cfcfd6, #ffffff, #9a9aa6);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  min-height: 100dvh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 8% -12%, rgba(255, 255, 255, 0.14), transparent 55%),
    radial-gradient(700px 380px at 100% 110%, rgba(255, 255, 255, 0.08), transparent 55%);
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255,255,255,0.018) 46px 47px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(255,255,255,0.018) 46px 47px);
}

.shell {
  width: min(34rem, 100%);
  margin: 0 auto;
  padding: 1.4rem 1.1rem 3rem;
  position: relative;
  z-index: 1;
}

.brand { margin-bottom: 1.2rem; }
.brand h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--silver);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.45));
}
.brand .subtitle {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  font-weight: 650;
  color: #ececf2;
  letter-spacing: 0.04em;
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(22, 22, 28, 0.96), rgba(12, 12, 16, 0.96)) padding-box,
    linear-gradient(135deg, #ffffff, #bdbdc8, #ffffff) border-box;
  border: 2px solid transparent;
  border-radius: 1.1rem;
  padding: 1.15rem 1.1rem 1.25rem;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(255, 255, 255, 0.16),
    0 0 40px rgba(255, 255, 255, 0.08);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), transparent 46%);
}

h2 { margin: 0 0 0.75rem; font-size: 1.25rem; line-height: 1.3; color: var(--ink); }
p { color: var(--muted); line-height: 1.45; }

.steps {
  font-size: 0.85rem;
  margin: 0 0 0.85rem;
  font-weight: 700;
  color: #f0f0f5;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

label { display: block; font-size: 0.92rem; margin-bottom: 0.45rem; color: var(--ink); }
.field { margin: 0.9rem 0 1.1rem; }
.input-wrap {
  display: flex;
  align-items: center;
  background: var(--input);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.8rem;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.prefix {
  padding: 0 0.2rem 0 0.9rem;
  color: var(--muted);
}
input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  padding: 0.9rem 0.9rem 0.9rem 0.15rem;
  outline: none;
}
.input-wrap:focus-within {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 0 18px rgba(255, 255, 255, 0.2);
}

button {
  width: 100%;
  border: 0;
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  font-size: 1.02rem;
  font-weight: 750;
  color: #111115;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #d8d8e0 100%);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.45),
    0 0 32px rgba(255, 255, 255, 0.18);
}
button:disabled { opacity: 0.55; cursor: wait; }
button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.45);
  margin-top: 0.65rem;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.err {
  background: rgba(255,107,107,.14);
  color: #ffb4b4;
  border: 1px solid rgba(255,107,107,.35);
  border-radius: 0.7rem;
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
}

.success { text-align: center; padding: 1.4rem 0.5rem 0.8rem; }
.tick {
  width: 4.4rem; height: 4.4rem; margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(61,207,142,.15);
  color: var(--good);
  display: grid; place-items: center;
  font-size: 2.2rem;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
.success h2 { font-size: 1.45rem; }
.success p { font-size: 1.05rem; color: var(--ink); }

.panel { margin-bottom: 1rem; }
.panel h2 { font-size: 1.1rem; }
.stat {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.stat:last-child { border-bottom: 0; }
.stat span { color: var(--muted); }
.stat strong { font-size: 1.15rem; }

.updated { font-size: 0.82rem; color: var(--muted); margin: 0.6rem 0 0; }

.rank { list-style: none; padding: 0; margin: 0; }
.rank li {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.rank li:last-child { border-bottom: 0; }
.rank .n {
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}
.rank .who { font-weight: 600; }
.rank .meta { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.rank .money { font-weight: 700; white-space: nowrap; color: #f2f2f7; }
.me {
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
  margin: 0 -0.4rem;
  padding: 0.7rem 0.4rem;
  border-radius: 0.6rem;
}

.empty { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

button.logout {
  margin-top: 0.85rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 107, 107, 0.45);
  box-shadow: none;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
}
.toolbar button { width: auto; flex: 1 1 10rem; }
.clipper-list { list-style: none; padding: 0; margin: 0; }
.clipper-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.clipper-list li:last-child { border-bottom: 0; }
.clipper-list .who { font-weight: 700; font-size: 1.02rem; }
.clipper-list .meta { color: var(--muted); font-size: 0.86rem; margin-top: 0.28rem; line-height: 1.4; }
.clipper-list .row-actions { margin-top: 0.65rem; }
.clipper-list .row-actions button {
  width: auto;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  background: transparent;
  color: #ffb4b4;
  border: 1px solid rgba(255, 107, 107, 0.45);
  box-shadow: none;
}
