/* ============================================================
   ULTIMA — Quality Hacks  •  Dark violet theme
   ============================================================ */

:root {
  /* base */
  --bg:            #0d0a16;
  --bg-2:          #100c1c;
  --surface:       rgba(255, 255, 255, 0.028);
  --surface-2:     rgba(255, 255, 255, 0.05);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(167, 123, 255, 0.35);

  /* text */
  --text:      #f4f2fb;
  --text-dim:  #a7a3b8;
  --text-mute: #726e85;

  /* accent — dark violet */
  --accent:       #8257ff;
  --accent-hi:    #a97bff;
  --accent-deep:  #6d28d9;
  --accent-2:     #b14dff;
  --accent-soft:  rgba(130, 87, 255, 0.14);
  --accent-glow:  rgba(130, 87, 255, 0.45);

  --grad-accent: linear-gradient(135deg, #8257ff 0%, #6d28d9 100%);
  --grad-text:   linear-gradient(120deg, #b794ff 0%, #8257ff 100%);

  --radius:    16px;
  --radius-sm: 11px;
  --shadow:    0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 16px 40px -12px rgba(130, 87, 255, 0.5);

  --maxw: 1180px;
  --header-h: 78px;
}

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- background fx ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.55; }
.glow-1 {
  width: 620px; height: 620px; top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(130, 87, 255, 0.5), transparent 70%);
}
.glow-2 {
  width: 560px; height: 560px; top: 30%; right: -160px;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.4), transparent 70%);
  opacity: 0.4;
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; border-radius: 12px;
  padding: 12px 22px; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 13px; }

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -12px rgba(130, 87, 255, 0.7); }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--accent-soft); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(13, 10, 22, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-flex; filter: drop-shadow(0 4px 12px var(--accent-glow)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; letter-spacing: 2px; font-size: 19px; }
.brand-tag { font-size: 10px; letter-spacing: 2.5px; color: var(--text-mute); font-weight: 600; }

.nav { display: flex; gap: 34px; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-link {
  font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-dim); transition: color .2s ease; position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--grad-accent); border-radius: 2px; transition: width .25s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
}
.lang-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .5px;
  color: var(--text-dim); background: transparent; border: none; cursor: pointer;
  padding: 5px 11px; border-radius: 7px; transition: all .2s ease;
}
.lang-btn.is-active { background: var(--grad-accent); color: #fff; box-shadow: 0 4px 12px -4px var(--accent-glow); }

.link-login { font-size: 14.5px; font-weight: 600; color: var(--text); transition: color .2s ease; }
.link-login:hover { color: var(--accent-hi); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 90px 0 70px; position: relative; overflow: hidden; }
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 40px;
  min-height: 560px;
}

/* hero floating particles (rising "balls") */
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-particle {
  position: absolute; bottom: -12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px 0 var(--accent-glow);
  opacity: 0; will-change: transform, opacity;
  animation: particle-rise linear infinite;
}
@keyframes particle-rise {
  0%   { opacity: 0; transform: translateY(0) scale(1); }
  10%  { opacity: var(--p-opacity, .4); }
  85%  { opacity: var(--p-opacity, .4); }
  100% { opacity: 0; transform: translateY(-92vh) scale(.6); }
}
@media (prefers-reduced-motion: reduce) { .hero-particles { display: none; } }
.hero-title {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800; line-height: 1.12; letter-spacing: -1px;
  max-width: 640px;
}
.hl {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-cta { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

/* hero emblem */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.emblem { position: relative; width: 380px; height: 380px; display: grid; place-items: center; }
.ring {
  position: absolute; border-radius: 50%; border: 1px solid var(--border);
  inset: 0; place-self: center;
}
.ring-a { width: 380px; height: 380px; border-color: rgba(167,123,255,0.14); animation: spin 26s linear infinite; }
.ring-b { width: 290px; height: 290px; border-color: rgba(167,123,255,0.22); border-style: dashed; animation: spin 20s linear infinite reverse; }
.ring-c {
  width: 210px; height: 210px;
  border: 1.5px solid transparent;
  background: conic-gradient(from 0deg, transparent, var(--accent), transparent 55%) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 12s linear infinite;
}
.core {
  width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, rgba(130,87,255,0.28), rgba(13,10,22,0.9) 70%);
  box-shadow: 0 0 70px -8px var(--accent-glow), inset 0 0 40px -10px var(--accent-glow);
  filter: drop-shadow(0 10px 30px rgba(130,87,255,0.4));
  animation: pulse 4s ease-in-out infinite;
}
.core svg { filter: drop-shadow(0 6px 18px rgba(130,87,255,0.6)); }

.spark { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 14px 2px var(--accent-glow); }
.spark.s1 { top: 8%;  left: 30%; animation: float 5s ease-in-out infinite; }
.spark.s2 { top: 24%; right: 6%; width: 6px; height: 6px; animation: float 6.5s ease-in-out infinite .6s; }
.spark.s3 { bottom: 14%; left: 10%; width: 7px; height: 7px; animation: float 5.8s ease-in-out infinite 1.1s; }
.spark.s4 { bottom: 6%; right: 26%; width: 5px; height: 5px; animation: float 7s ease-in-out infinite .3s; }

@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes float { 0%,100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-16px); opacity: .5; } }

/* ============================================================
   STRIP
   ============================================================ */
.strip { padding: 30px 0 20px; }
.strip-inner {
  text-align: center; max-width: 820px; margin: 0 auto;
  padding: 40px 32px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  border: 1px solid var(--border);
}
.strip-title { font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.3; }
.strip-desc { margin-top: 16px; color: var(--text-dim); font-size: 16px; }

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 3px;
  color: var(--accent-hi); text-transform: uppercase; margin-bottom: 14px;
  padding: 5px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--accent-soft);
}
.section-title { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.5px; }
.section-sub { margin-top: 14px; color: var(--text-dim); font-size: 16px; }
.section-more { text-align: center; margin-top: 44px; }

/* ============================================================
   PRODUCTS
   ============================================================ */
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 15px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, var(--accent), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s ease;
}
.card:hover { transform: translateY(-6px); background: var(--surface-2); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

.card-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 7px;
}
.badge-accent { color: #fff; background: var(--grad-accent); border-color: transparent; }

.card-thumb {
  height: 130px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(130,87,255,0.35), transparent 60%),
    linear-gradient(160deg, #1a1330, #120d20);
  border: 1px solid var(--border);
  font-weight: 800; font-size: 30px; letter-spacing: 2px;
  color: rgba(255,255,255,0.85);
}
.card-thumb span { text-shadow: 0 4px 20px rgba(130,87,255,0.6); }
.thumb-cert { background: radial-gradient(circle at 30% 25%, rgba(90,120,255,0.3), transparent 60%), linear-gradient(160deg, #101a30, #0d1320); }
.thumb-oxide { background: radial-gradient(circle at 30% 25%, rgba(177,77,255,0.32), transparent 60%), linear-gradient(160deg, #22122e, #150d20); }
.thumb-ff { background: radial-gradient(circle at 30% 25%, rgba(255,120,90,0.28), transparent 60%), linear-gradient(160deg, #2a1520, #180d18); }

.card-title { font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.pill-row { display: flex; gap: 7px; flex-wrap: wrap; }
.pill {
  font-size: 11.5px; font-weight: 500; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.price { display: flex; flex-direction: column; line-height: 1.1; }
.price-from { font-size: 11px; color: var(--text-mute); }
.price strong { font-size: 18px; font-weight: 700; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; transition: border-color .2s ease, background .2s ease;
}
.faq-item[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 22px;
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; font-weight: 400; color: var(--accent-hi);
  transition: transform .25s ease; line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 22px 20px; color: var(--text-dim); font-size: 15px; }

.faq-foot { text-align: center; margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.faq-foot p { color: var(--text-dim); max-width: 520px; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.step:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); }
.step-num {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  background: var(--grad-accent); color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: var(--shadow-accent); margin-bottom: 16px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14.5px; }

/* ============================================================
   CTA
   ============================================================ */
.cta { padding-top: 20px; }
.cta-box {
  text-align: center; padding: 64px 40px; border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(130,87,255,0.28), transparent 65%),
    linear-gradient(160deg, #17102b, #100c1c);
  border: 1px solid var(--border-strong);
  position: relative; overflow: hidden;
}
.cta-box::after {
  content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  bottom: -260px; left: 50%; transform: translateX(-50%); filter: blur(40px); opacity: .5;
}
.cta-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; margin: 6px 0 16px; letter-spacing: -.5px; }
.cta-desc { color: var(--text-dim); max-width: 560px; margin: 0 auto 30px; font-size: 16px; position: relative; }
.cta .btn { position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .brand-name { font-size: 17px; }
.footer-copy { color: var(--text-mute); font-size: 14px; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.product-grid .card:nth-child(2) { transition-delay: .07s; }
.product-grid .card:nth-child(3) { transition-delay: .14s; }
.product-grid .card:nth-child(4) { transition-delay: .21s; }
.how-grid .step:nth-child(2) { transition-delay: .06s; }
.how-grid .step:nth-child(3) { transition-delay: .12s; }
.how-grid .step:nth-child(4) { transition-delay: .18s; }
.how-grid .step:nth-child(5) { transition-delay: .24s; }
.how-grid .step:nth-child(6) { transition-delay: .30s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ring, .core, .spark { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; min-height: unset; }
  .hero-visual { order: -1; }
  .emblem { width: 300px; height: 300px; }
  .ring-a { width: 300px; height: 300px; }
  .ring-b { width: 230px; height: 230px; }
  .ring-c { width: 165px; height: 165px; }
  .core { width: 150px; height: 150px; }
  .core svg { width: 130px; height: 130px; }
}

@media (max-width: 760px) {
  .nav { display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; transform: none;
    background: rgba(13,10,22,0.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); padding: 8px 0; }
  .nav.open { display: flex; }
  .nav-link { padding: 14px 24px; width: 100%; }
  .nav-link::after { display: none; }
  .hamburger { display: flex; }
  .link-login { display: none; }
  .hero-cta .btn { flex: 1; }
}

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 10px; }
  .brand-tag { display: none; }
  .cta-box { padding: 48px 22px; }
  .strip-inner { padding: 32px 22px; }
}

/* ============================================================
   AUTH + ACCOUNT + MODAL + HERO CHARACTER (added)
   ============================================================ */

/* ---- hero character ---- */
.hero-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 520px; }
.emblem-bg { position: absolute; inset: 0; margin: auto; opacity: .9; }
.emblem-bg.emblem-solo { position: relative; opacity: 1; }
.hero-char {
  position: relative; z-index: 2; max-height: 560px; width: auto; margin: 0 auto; display: block;
  filter: drop-shadow(0 34px 60px rgba(0,0,0,.65)) drop-shadow(0 0 46px rgba(130,87,255,.30));
  animation: charFloat 7s ease-in-out infinite;
}
@keyframes charFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---- auth cluster / account ---- */
.auth-cluster { display: flex; align-items: center; gap: 14px; }
.account { position: relative; }
.account-btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 14.5px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 6px 12px 6px 6px; transition: border-color .2s ease, background .2s ease;
}
.account-btn:hover { border-color: var(--border-strong); background: var(--accent-soft); }
.account-btn svg { color: var(--text-dim); }
.account-avatar {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--grad-accent); color: #fff; font-weight: 800; font-size: 14px; text-transform: uppercase;
}
.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 230px;
  background: #15111f; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; z-index: 120; overflow: hidden;
}
.account-info { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.account-info-name { font-weight: 700; font-size: 15px; }
.account-info-email { font-size: 12.5px; color: var(--text-mute); word-break: break-all; }
.account-item {
  display: block; width: 100%; text-align: left; font-family: inherit; font-size: 14px; font-weight: 500;
  color: var(--text); background: none; border: none; cursor: pointer; padding: 10px 12px; border-radius: 9px;
  transition: background .18s ease;
}
.account-item:hover { background: var(--surface-2); }
.account-item.danger { color: #ff6b8a; }
.account-item.danger:hover { background: rgba(255,107,138,.1); }

/* ---- modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  background: rgba(6,4,12,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .2s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: 100%; max-width: 420px;
  background: linear-gradient(180deg, #17122480, #120d1c), #120d1c;
  border: 1px solid var(--border-strong); border-radius: 20px; padding: 34px 30px 30px;
  box-shadow: 0 40px 90px -30px #000; animation: modalIn .28s cubic-bezier(.2,.7,.2,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer; transition: all .2s ease;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }

.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand-mark { display: inline-flex; filter: drop-shadow(0 4px 14px var(--accent-glow)); margin-bottom: 10px; }
.auth-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.auth-sub { color: var(--text-dim); font-size: 14.5px; margin-top: 4px; }

.field { display: block; margin-bottom: 15px; }
.field span { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.field input {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text);
  background: #0e0a17; border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder { color: var(--text-mute); }

.btn-block { width: 100%; margin-top: 6px; }
.form-error {
  background: rgba(255,107,138,.1); border: 1px solid rgba(255,107,138,.35); color: #ff9db2;
  font-size: 13.5px; padding: 10px 13px; border-radius: 10px; margin-bottom: 14px;
}
.auth-switch { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 18px; }
.auth-switch a { color: var(--accent-hi); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ---- toast ---- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #17122a; border: 1px solid var(--border-strong); color: var(--text);
  padding: 13px 22px; border-radius: 12px; font-size: 14.5px; font-weight: 500; z-index: 300;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(255,107,138,.5); }

/* ---- product grid dynamic states ---- */
.grid-loading { grid-column: 1 / -1; text-align: center; color: var(--text-mute); padding: 40px 0; }
.card-thumb.accent-purple  { background: radial-gradient(circle at 30% 25%, rgba(130,87,255,.38), transparent 60%), linear-gradient(160deg,#1a1330,#120d20); }
.card-thumb.accent-blue    { background: radial-gradient(circle at 30% 25%, rgba(90,120,255,.32), transparent 60%), linear-gradient(160deg,#101a30,#0d1320); }
.card-thumb.accent-magenta { background: radial-gradient(circle at 30% 25%, rgba(177,77,255,.34), transparent 60%), linear-gradient(160deg,#22122e,#150d20); }
.card-thumb.accent-orange  { background: radial-gradient(circle at 30% 25%, rgba(255,120,90,.30), transparent 60%), linear-gradient(160deg,#2a1520,#180d18); }
.card-thumb.accent-green    { background: radial-gradient(circle at 30% 25%, rgba(70,220,160,.28), transparent 60%), linear-gradient(160deg,#0f2420,#0d1a16); }
.card-thumb.accent-red     { background: radial-gradient(circle at 30% 25%, rgba(255,80,90,.30), transparent 60%), linear-gradient(160deg,#2a1216,#1a0d12); }
.stock-tag { font-size: 11px; font-weight: 600; color: var(--text-mute); }
.stock-tag.out { color: #ff6b8a; }

@media (max-width: 760px) {
  .auth-cluster .link-login { display: none; }
  .account-name { display: none; }
  .hero-stage { min-height: 380px; }
  .hero-char { max-height: 400px; }
}

/* ============================================================
   PURCHASE / MY KEYS / PASSWORD (added)
   ============================================================ */
.modal.modal-wide { max-width: 540px; }

/* product image on card */
.card-thumb.has-img { padding: 0; overflow: hidden; }
.card-thumb.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* account balance line */
.account-balance { font-size: 12.5px; color: var(--text-dim); margin-top: 8px; }
.account-balance strong { color: var(--accent-hi); }

/* purchase tiers */
.pur-tiers-wrap { margin-bottom: 16px; }
.pur-tiers-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin-bottom: 9px; }
.pur-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 9px; }
.pur-tier { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 13px; border-radius: 11px;
  background: #0e0a17; border: 1px solid var(--border); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s, transform .1s; text-align: left; }
.pur-tier:hover { border-color: var(--accent); }
.pur-tier.active { border-color: var(--accent); background: rgba(139, 92, 246, .12); box-shadow: 0 0 0 1px var(--accent) inset; }
.pur-tier-label { font-size: 12.5px; color: var(--text-dim); }
.pur-tier.active .pur-tier-label { color: var(--text); }
.pur-tier-price { font-size: 16px; font-weight: 700; }
.pur-tier-stock { font-size: 10.5px; color: var(--text-mute); min-height: 13px; }
.pur-tier.out { opacity: .45; cursor: not-allowed; }
.pur-tier.out:hover { border-color: var(--border); }
.pur-tier.out .pur-tier-stock { color: #ff8098; }

/* purchase summary */
.pur-summary { background: #0e0a17; border: 1px solid var(--border); border-radius: 12px; padding: 6px 16px; margin-bottom: 16px; }
.pur-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; font-size: 14.5px; }
.pur-row + .pur-row { border-top: 1px solid var(--border); }
.pur-row span { color: var(--text-dim); }
.pur-row strong { font-size: 16px; }

.success-check {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px; color: #fff;
  background: linear-gradient(135deg, #2fce9a, #17a877); box-shadow: 0 10px 26px -8px rgba(47,206,154,.6);
}
.key-reveal {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: #0e0a17; border: 1px dashed var(--border-strong); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 18px;
}
.key-reveal code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; color: var(--accent-hi); word-break: break-all; }

/* ===== shared mini button (purchase + account) ===== */
.btn-mini {
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); transition: border-color .16s ease, color .16s ease;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent-hi); }

/* ===== account / my purchases page ===== */
.header-right { display: flex; align-items: center; gap: 12px; }
.account-header { position: sticky; top: 0; }
.account-page { padding: calc(var(--header-h) + 44px) 0 80px; min-height: 100vh; }
.acc-hero { margin-bottom: 30px; }
.acc-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
.acc-hero p { color: var(--text-dim); margin-top: 8px; }
.acc-guard { text-align: center; padding: 110px 0; }
.acc-guard h1 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.acc-guard p { color: var(--text-dim); margin-bottom: 24px; }

.acc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 44px; }
.acc-stat {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 6px;
}
.acc-stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.acc-stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.01em; word-break: break-word; }
.acc-stat:first-child .acc-stat-value { color: var(--accent-hi); }
.acc-stat-hint { font-size: 12.5px; color: var(--text-mute); }
.acc-stat-hint b { color: var(--text-dim); }

.acc-section-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.acc-orders { display: flex; flex-direction: column; gap: 12px; }
.acc-order {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px;
  transition: border-color .16s ease;
}
.acc-order:hover { border-color: var(--border-strong); }
.acc-order-main { min-width: 0; }
.acc-order-title { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-order-tier {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent-hi); background: var(--accent-soft); border: 1px solid var(--border-strong);
  padding: 2px 9px; border-radius: 999px;
}
.acc-order-meta { font-size: 13px; color: var(--text-dim); margin-top: 5px; }
.acc-order-price { color: var(--text); font-weight: 600; }
.acc-order-key { display: flex; align-items: center; gap: 10px; }
.acc-order-key code {
  font-family: ui-monospace, Menlo, monospace; font-size: 14px; color: var(--accent-hi);
  background: #0e0a17; border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; word-break: break-all;
}
.acc-empty { text-align: center; color: var(--text-mute); padding: 46px 0; border: 1px dashed var(--border); border-radius: 14px; }

@media (max-width: 640px) {
  .header-right { gap: 8px; }
  .header-right .btn { padding-left: 11px; padding-right: 11px; }
  .acc-order-key { width: 100%; }
  .acc-order-key code { flex: 1; }
}
