:root {
  --bg: #05060d;
  --panel: rgba(16, 17, 34, 0.72);
  --panel-solid: #11122a;
  --line: rgba(170, 155, 255, 0.15);
  --line-2: rgba(170, 155, 255, 0.32);
  --text: #e9e7f7;
  --dim: #9a98b8;
  --accent: #b69cff;
  --accent-2: #7fd6ff;
  --gold: #f3cf7a;
  --danger: #ff6b7a;
  --radius: 16px;
  --top: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #3a3470 transparent; color-scheme: dark; }
::selection { background: rgba(182, 156, 255, .35); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #2c2858; border-radius: 10px; border: 2px solid var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.68 Inter, system-ui, sans-serif; min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- background layers ---------- */
.nebula { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.nebula i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 38s ease-in-out infinite alternate; }
.nebula i:nth-child(1) { width: 60vw; height: 60vw; left: 45%; top: -25%; background: radial-gradient(circle, #3b2a8a 0%, transparent 65%); }
.nebula i:nth-child(2) { width: 55vw; height: 55vw; left: -20%; top: 45%; background: radial-gradient(circle, #0f3d66 0%, transparent 65%); animation-duration: 46s; animation-delay: -12s; }
.nebula i:nth-child(3) { width: 40vw; height: 40vw; left: 30%; top: 60%; background: radial-gradient(circle, #5a1f5e 0%, transparent 65%); opacity: .35; animation-duration: 52s; animation-delay: -20s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6vw, 4vh) scale(1.12); } 100% { transform: translate(5vw, -5vh) scale(.95); } }
#stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#glow { position: fixed; left: -300px; top: -300px; width: 600px; height: 600px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(140, 110, 255, .10) 0%, transparent 60%); transition: transform .12s linear; will-change: transform; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 22px;
  background: rgba(5, 6, 13, .55); backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
body.scrolled .topbar { border-color: var(--line); background: rgba(5, 6, 13, .8); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-star { color: var(--accent); font-size: 24px; text-shadow: 0 0 18px var(--accent); display: inline-block; animation: spin 14s linear infinite; }
.brand:hover .brand-star { animation-duration: 1.5s; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-text { font-family: Cinzel, serif; font-weight: 900; font-size: 20px; letter-spacing: .6px; }
.brand-text em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-discord { display: grid; place-items: center; width: 34px; height: 34px; margin-left: -4px; border-radius: 10px; color: #8b93ff; transition: color .2s, background .2s, transform .2s var(--ease); flex: none; }
.top-discord svg { width: 22px; height: 22px; }
.top-discord:hover { color: #fff; background: #5865F2; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(88, 101, 242, .45); text-decoration: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-link { font-size: 14px; color: var(--dim); padding: 8px 12px; border-radius: 999px; }
.top-link:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .05); }
.cart-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s var(--ease); }
.cart-chip:hover { border-color: var(--accent); background: rgba(182, 156, 255, .12); text-decoration: none; }
.cart-chip b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: linear-gradient(135deg, #8f6bff, #5bb8ff); color: #fff; font-size: 12px; }
.cart-chip b.bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.45); } }
#progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-2), var(--accent), #ff8ad8); box-shadow: 0 0 12px var(--accent); }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 36px clamp(18px, 4vw, 40px) 0; }

.banner { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(243, 207, 122, .38);
  background: linear-gradient(135deg, rgba(243, 207, 122, .1), rgba(243, 207, 122, .02)); }

/* ---------- hero ---------- */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orbit { to { --a: 360deg; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } }
.hero { position: relative; overflow: hidden; padding: 56px 40px 40px; border-radius: 26px; margin-bottom: 28px; border: 1px solid var(--line-2);
  background: radial-gradient(800px 400px at 85% 0%, rgba(143, 107, 255, .35), transparent 60%), radial-gradient(600px 300px at 0% 100%, rgba(91, 184, 255, .22), transparent 60%), rgba(12, 12, 30, .6);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); }
.hero::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, var(--accent) 80%, var(--accent-2) 88%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 6s linear infinite; }
.hero-fig { position: absolute; right: -40px; top: 0; width: 48%; opacity: .4; pointer-events: none; }
.hero-fig line { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.4s calc(var(--i) * 90ms + .3s) var(--ease) forwards; }
.hero-fig circle { fill: #fff; filter: drop-shadow(0 0 4px #b69cff); opacity: 0; animation: twinkle 3s calc(var(--i) * 120ms) ease-in-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.hero-inner { position: relative; }
.crumb { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; font-weight: 600; }
h1 { font-family: Cinzel, serif; font-weight: 900; font-size: clamp(36px, 6vw, 64px); line-height: 1.12; margin: 0 0 14px; letter-spacing: .3px; animation: rise .8s var(--ease) both; }
.shimmer { background: linear-gradient(100deg, #fff 0%, #fff 38%, #cdbcff 46%, #8fe0ff 52%, #fff 60%, #fff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.lead { font-size: 19px; color: #d3d0ec; max-width: 600px; margin: 0 0 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 30px; animation: rise .8s .2s var(--ease) both; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.stat b { display: block; font-family: Cinzel, serif; font-size: 22px; font-weight: 900; color: #fff; line-height: 1.2; }
.stat small { font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; transition: all .2s var(--ease); position: relative; overflow: hidden; }
.btn:hover { text-decoration: none; border-color: var(--accent); background: rgba(182, 156, 255, .12); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(182, 156, 255, .2); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, #8f6bff, #5bb8ff); border-color: transparent; color: #fff; box-shadow: 0 6px 22px rgba(130, 100, 255, .4); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .6s; }
.btn.primary:hover { box-shadow: 0 10px 34px rgba(130, 100, 255, .6); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.discord { background: #5865F2; border-color: transparent; color: #fff; box-shadow: 0 6px 22px rgba(88, 101, 242, .45); }
.btn.discord:hover { background: #4752C4; border-color: transparent; box-shadow: 0 8px 26px rgba(88, 101, 242, .6); }
.btn.discord svg { width: 18px; height: 18px; flex: none; }
.btn.big { padding: 13px 26px; font-size: 16px; }
.btn.block { width: 100%; justify-content: center; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* ---------- shop ---------- */
.shop { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
h2 { font-family: Inter, sans-serif; font-size: 23px; margin: 22px 0 14px; padding-bottom: 8px; position: relative; letter-spacing: -.2px; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--accent), rgba(127, 214, 255, .4) 30%, transparent 70%); opacity: .5; }
h2::before { content: "\2726"; color: var(--accent); font-size: 14px; margin-right: 10px; vertical-align: 3px; text-shadow: 0 0 10px var(--accent); }
.muted { color: var(--dim); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--text);
  backdrop-filter: blur(8px); transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.card:hover { border-color: var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(182, 156, 255, .15) inset; transform: translateY(-3px); }
.card .icon { width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; border-radius: 14px; margin-bottom: 6px;
  background: radial-gradient(circle at 30% 20%, rgba(182, 156, 255, .35), rgba(91, 184, 255, .08)); border: 1px solid var(--line-2); box-shadow: 0 0 24px rgba(182, 156, 255, .2); }
.card h3 { font-size: 17px; margin: 6px 0 0; color: #fff; }
.card .tag { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .4px; margin: 0; }
.card .desc { color: var(--dim); font-size: 14px; margin: 0; flex: 1; line-height: 1.55; }
.card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 10px; }
.price { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 18px; color: var(--gold); }
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease), border-color .25s, box-shadow .25s; transition-delay: calc(var(--n, 0) * 60ms); }
.rv.in { opacity: 1; transform: none; }
.rv.in:hover { transform: translateY(-3px); transition-delay: 0s; }

/* ---------- cart ---------- */
.cart { position: sticky; top: calc(var(--top) + 16px); padding: 22px; border-radius: 20px; border: 1px solid var(--line-2); background: rgba(12, 12, 30, .72); backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); scroll-margin-top: 84px; }
.cart h2 { margin: 0 0 12px; font-size: 20px; }
.cart-items { list-style: none; margin: 0; padding: 0; }
.cart-items li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.cart-items strong { color: var(--gold); font-family: "JetBrains Mono", monospace; font-size: 14px; }
.qty { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; font-family: "JetBrains Mono", monospace; font-size: 13px; }
.qty button { width: 26px; height: 26px; padding: 0; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--text); cursor: pointer; line-height: 1; }
.qty button:hover:not(:disabled) { border-color: var(--accent); background: rgba(182, 156, 255, .15); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty .remove { width: auto; padding: 0 8px; margin-left: auto; border: 0; background: none; color: var(--dim); font-family: Inter, sans-serif; font-size: 12.5px; text-decoration: underline; }
.qty .remove:hover { color: var(--danger); background: none; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 14px; font-size: 15px; color: var(--dim); }
.total strong { font-family: "JetBrains Mono", monospace; font-size: 24px; color: #fff; }

label { display: block; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; color: #6f6c93; margin-bottom: 8px; }
.username-row { display: flex; gap: 10px; align-items: center; }
.username-row img { width: 42px; height: 42px; flex: none; border-radius: 10px; image-rendering: pixelated; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); }
input[type=text] { flex: 1; min-width: 0; width: 100%; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text);
  font: inherit; font-size: 15px; outline: none; transition: all .25s var(--ease); }
input[type=text]:focus { border-color: var(--accent); background: rgba(182, 156, 255, .07); box-shadow: 0 0 0 4px rgba(182, 156, 255, .14), 0 0 30px rgba(182, 156, 255, .2); }
.hint { font-size: 12.5px; color: var(--dim); margin: 8px 0 14px; line-height: 1.5; }
.error { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
.fine { font-size: 12px; color: #6f6c93; margin: 14px 0 0; line-height: 1.5; }

.foot { position: relative; z-index: 1; margin: 70px 16px 0; padding-bottom: 40px; color: #6f6c93; font-size: 13px; text-align: center; letter-spacing: .5px; }
.foot a { color: var(--dim); }

/* ---------- success page ---------- */
.center { position: relative; z-index: 1; max-width: 580px; margin: 14vh auto 0; padding: 44px 36px; border-radius: 26px; border: 1px solid var(--line-2); text-align: center;
  background: radial-gradient(500px 260px at 80% 0%, rgba(143, 107, 255, .3), transparent 60%), rgba(12, 12, 30, .65); backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); animation: rise .7s var(--ease) both; }
.center .big-star { font-size: 40px; color: var(--accent); text-shadow: 0 0 28px var(--accent); display: block; animation: spin 14s linear infinite; }
.center h1 { font-size: clamp(28px, 6vw, 40px); }
.center p { color: var(--dim); }

@media (max-width: 880px) {
  .shop { grid-template-columns: 1fr; }
  .cart { position: static; }
  .hero { padding: 36px 22px 26px; }
  .hero-fig { width: 100%; opacity: .22; }
  .brand-text { font-size: 17px; }
  .top-link { display: none; }
  .topbar { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .hero-fig line { stroke-dashoffset: 0; }
  .hero-fig circle { opacity: .8; }
}
