:root {
  --bg: #05060d;
  --text: #f4f8ff;
  --muted: #a8b6d4;
  --cyan: #79e7ff;
  --blue: #48d3ff;
  --violet: #9b6cff;
  --pink: #ff82bd;
  --red: #ff8a9b;
  --green: #6dffa8;
  --line: rgba(190, 224, 255, .22);
  --glass: rgba(14, 20, 38, .52);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.55 "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; }

/* background */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #04050b; }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.aurora.a { width: 60vw; height: 60vw; left: -15vw; top: -22vw; background: radial-gradient(circle, #1a4fff, transparent 65%); animation: drift-a 20s ease-in-out infinite alternate; }
.aurora.b { width: 55vw; height: 55vw; right: -14vw; top: 4vh; background: radial-gradient(circle, #8a2bff, transparent 65%); animation: drift-b 24s ease-in-out infinite alternate; }
.aurora.c { width: 50vw; height: 50vw; left: 24vw; bottom: -26vw; background: radial-gradient(circle, #00cfff, transparent 65%); animation: drift-c 28s ease-in-out infinite alternate; }
.grid { position: absolute; inset: -50%; background-image: linear-gradient(rgba(140,190,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(140,190,255,.06) 1px, transparent 1px); background-size: 46px 46px; transform: perspective(600px) rotateX(58deg) translateY(18%); opacity: .55; }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, transparent 18%, rgba(3,4,10,.78) 92%); }
@keyframes drift-a { to { transform: translate(14vw, 12vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vw, 16vh) scale(1.1); } }
@keyframes drift-c { to { transform: translate(10vw, -14vh) scale(1.2); } }

/* structure */
.nav { max-width: 980px; margin: 0 auto; padding: 24px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 800; font-size: 1.1rem; letter-spacing: -.04em; }
.brand span { color: var(--cyan); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: .85rem; color: var(--muted); }
.nav-links a:hover, .link-button:hover { color: var(--cyan); }
.inline { display: inline; }
.link-button { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font-size: inherit; }
.shell { max-width: 980px; margin: 0 auto; padding: 0 20px 60px; }
.page { display: flex; flex-direction: column; gap: 64px; padding-top: 36px; }
.footer { text-align: center; color: var(--muted); font-size: .78rem; padding-top: 20px; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
section { display: flex; flex-direction: column; gap: 18px; }
.narrow { width: 100%; max-width: 520px; text-align: left; padding: 34px; }
.narrow-left { max-width: 760px; }

/* text */
.eyebrow { color: var(--cyan); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; margin: 0; }
.title { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; margin: 0; letter-spacing: -.05em; }
.title span { background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.greeting { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: 1.35rem; margin: 0; }
.lede { color: var(--muted); max-width: 560px; margin: 0; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: .8rem; }
.error-text { color: var(--red); }
.accent { color: var(--cyan); }
.accent:hover { text-decoration: underline; }
.hero { min-height: 46vh; justify-content: center; padding: 30px 0 10px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 10px; }

/* card */
.card {
  position: relative; padding: 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.015) 45%, rgba(120,205,255,.04)), var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 16px 44px rgba(0,0,0,.4);
}
.message { padding: 30px; font-size: 1.02rem; }
.message h1, .message h2, .message h3 { color: #fff; margin: 22px 0 10px; }
.message h1 { font-size: 1.7rem; }
.message h2 { font-size: 1.4rem; }
.message h3 { font-size: 1.15rem; }
.message p { color: #dbe6ff; margin: 0 0 14px; }
.message p:last-child { margin-bottom: 0; }
.message ul { margin: 0 0 14px; padding-left: 22px; color: #dbe6ff; }
.message a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.message code { background: rgba(8,12,26,.7); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

/* controls */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; border: 1px solid var(--line);
  background: rgba(10,16,32,.6); color: var(--text); cursor: pointer; font-size: .9rem; font-weight: 600;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.button:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(72,211,255,.25); transform: translateY(-1px); }
.button.primary { border-color: rgba(121,231,255,.6); background: linear-gradient(120deg, rgba(72,211,255,.22), rgba(155,108,255,.22)); }
.button.tiny { padding: 6px 11px; font-size: .76rem; }
.button.danger { color: var(--red); border-color: rgba(255,138,155,.4); }
.button.danger:hover { border-color: var(--red); box-shadow: 0 0 14px rgba(255,138,155,.25); }
.stack { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--muted); flex: 1; min-width: 0; }
.field input, .field textarea {
  width: 100%; color: var(--text); background: rgba(6,10,22,.72);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(121,231,255,.12); }
.field textarea { resize: vertical; line-height: 1.5; }
.check { display: flex; align-items: center; gap: 9px; font-size: .85rem; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--blue); width: 16px; height: 16px; }
.two-col { display: flex; gap: 14px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 22px 0; opacity: .7; }
.small-field { min-width: 150px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.danger-zone { border-color: rgba(255,138,155,.3); }

/* flash */
.flash { border-radius: 10px; padding: 10px 14px; font-size: .85rem; border: 1px solid var(--line); background: rgba(10,16,32,.7); }
.flash.ok { color: var(--green); border-color: rgba(109,255,168,.35); }
.flash.error { color: var(--red); border-color: rgba(255,138,155,.4); }

/* admin lists */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.account-card { display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.account-card strong { font-size: 1.05rem; }
.tag { color: var(--cyan); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; }
.arrow { color: var(--muted); align-self: flex-end; }
.row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row-main { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.row-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; flex: 1; }
.row-form .order { max-width: 90px; }
.invite-url { color: var(--cyan); font-size: .72rem; word-break: break-all; cursor: pointer; background: rgba(6,10,22,.7); padding: 6px 8px; border-radius: 6px; }
.invite-url:hover { text-decoration: underline; }
.pill { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.active { color: var(--green); border-color: rgba(109,255,168,.4); }
.pill.expired, .pill.used-up, .pill.revoked { color: var(--red); border-color: rgba(255,138,155,.4); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.upload-box { display: block; border: 1px dashed var(--cyan); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; color: var(--cyan); background: rgba(72,211,255,.05); }
.upload-box input { display: block; margin: 10px auto 0; max-width: 100%; color: var(--muted); font-size: .75rem; }

/* personal page */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.shot { padding: 10px; }
.shot img { width: 100%; height: auto; display: block; border-radius: 10px; }
.shot figcaption { color: var(--muted); font-size: .8rem; padding: 8px 4px 2px; text-align: center; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.link-card { display: flex; align-items: center; gap: 14px; min-height: 82px; }
.link-card:hover { border-color: rgba(121,231,255,.65); box-shadow: 0 0 18px rgba(72,211,255,.2); }
.link-text { display: flex; flex-direction: column; min-width: 0; }
.link-text span { color: var(--muted); font-size: .78rem; }

@media (max-width: 560px) {
  .narrow { padding: 24px 18px; }
  .card { padding: 18px; }
  .page { gap: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
