/* Magic UI / shadcn dark theme — CVE Shop */

:root {
  --bg-deep: #04040a;
  --bg-card: #080810;
  --bg-card-hover: #0c0c1a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8f0;
  --text-muted: rgba(255, 255, 255, 0.35);
  --indigo: #6366f1;
  --indigo-light: #818cf8;
  --indigo-glow: rgba(99, 102, 241, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.magic-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.dot-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
  opacity: 0.15;
}

.aurora {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 45% at 50% 45%, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
}

.meteors span {
  position: absolute;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.8), #fff);
  transform: rotate(-35deg);
  opacity: 0;
  animation: meteor 8s linear infinite;
}

.meteors span:nth-child(1) { top: 10%; left: 15%; }
.meteors span:nth-child(2) { top: 35%; left: 70%; animation-delay: 2.5s; }
.meteors span:nth-child(3) { top: 60%; left: 35%; animation-delay: 5s; }
.meteors span:nth-child(4) { top: 20%; left: 85%; animation-delay: 1s; }
.meteors span:nth-child(5) { top: 75%; left: 10%; animation-delay: 3.5s; }
.meteors span:nth-child(6) { top: 45%; left: 50%; animation-delay: 6s; }

@keyframes meteor {
  0% { opacity: 0; transform: translate(0, 0) rotate(-35deg); }
  8% { opacity: 1; }
  100% { opacity: 0; transform: translate(260px, 260px) rotate(-35deg); }
}

.beam-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(8, 8, 16, 0.92);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.beam-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), rgba(165, 180, 252, 0.35), transparent);
  background-size: 200% 100%;
  animation: beam 8s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes beam { to { background-position: 200% 0; } }

.btn-shimmer {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 0.75rem;
  background: var(--indigo);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--indigo-glow);
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.35) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: shimmer 2.5s infinite;
}

.btn-shimmer:hover { background: #818cf8; }
.btn-shimmer:disabled { opacity: 0.55; cursor: not-allowed; }

@keyframes shimmer { to { transform: translateX(100%); } }

.ui-label { display: block; font-size: 0.75rem; color: rgba(255,255,255,.4); margin-bottom: .35rem; }

.ui-input {
  width: 100%;
  padding: .65rem .9rem;
  border-radius: .75rem;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-size: .875rem;
  font-family: inherit;
  outline: none;
}

.ui-input:focus { border-color: rgba(99,102,241,.45); }

.ui-field { margin-bottom: 1rem; }

.input-eye-wrap { position: relative; }
.input-eye-wrap .ui-input { padding-right: 2.5rem; }

.eye-btn {
  position: absolute;
  right: .65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.25);
  cursor: pointer;
}

.alert-ui { padding: .65rem .9rem; border-radius: .75rem; font-size: .78rem; margin-bottom: 1rem; display: none; }
.alert-ui.show { display: block; }
.alert-ui.error { border: 1px solid rgba(239,68,68,.25); background: rgba(239,68,68,.08); color: #fca5a5; }
.alert-ui.success { border: 1px solid rgba(34,197,94,.25); background: rgba(34,197,94,.08); color: #86efac; }
.alert-ui.info { border: 1px solid rgba(99,102,241,.25); background: rgba(99,102,241,.08); color: #a5b4fc; }

.field-error { font-size: .7rem; color: #fca5a5; min-height: 1rem; margin-top: .25rem; }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; }
.auth-shell { width: 100%; max-width: 420px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 2rem; }
.auth-logo-icon { width: 2rem; height: 2rem; border-radius: .5rem; background: var(--indigo); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; color: #fff; box-shadow: 0 4px 14px var(--indigo-glow); }
.auth-logo span { font-size: .875rem; font-weight: 600; color: #fff; }
.auth-card-inner { padding: 1.5rem 1.75rem; }
.auth-title { text-align: center; font-size: 1.15rem; font-weight: 700; color: #fff; margin: 0 0 .35rem; }
.auth-sub { text-align: center; font-size: .75rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.auth-kicker { text-align: center; font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(129,140,248,.7); margin-bottom: .5rem; }
.auth-switch { text-align: center; font-size: .75rem; color: rgba(255,255,255,.25); margin-top: 1.5rem; }
.auth-switch a { color: var(--indigo-light); font-weight: 500; }

.steps-wrap { position: relative; margin-bottom: 1.75rem; padding-bottom: 1rem; }
.steps-row { display: flex; align-items: flex-start; width: 100%; }
.step-item { display: flex; align-items: flex-start; flex: 1; }
.step-item:last-child { flex: none; }
.step-col { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.step-circle { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: .62rem; font-weight: 700; color: rgba(255,255,255,.2); }
.step-circle.active { border-color: rgba(99,102,241,.6); color: #818cf8; background: rgba(99,102,241,.1); }
.step-circle.done { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.step-label { font-size: .56rem; color: rgba(255,255,255,.15); }
.step-label.active { color: rgba(129,140,248,.7); }
.step-line { flex: 1; height: 1px; background: rgba(255,255,255,.06); margin: .85rem .25rem 0; }
.step-line.done { background: rgba(99,102,241,.4); }
.step-profile { position: absolute; bottom: -.25rem; left: 50%; transform: translateX(-50%); font-size: .56rem; color: rgba(129,140,248,.4); margin: 0; white-space: nowrap; }

.pwd-bars { display: flex; gap: .25rem; margin: .5rem 0; }
.pwd-bar { flex: 1; height: 3px; border-radius: 999px; background: rgba(255,255,255,.1); }
.pwd-bar.on.weak { background: #ef4444; }
.pwd-bar.on.fair { background: #eab308; }
.pwd-bar.on.good { background: #facc15; }
.pwd-bar.on.strong { background: #22c55e; }
.pwd-rules { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; }
.pwd-rule { font-size: .62rem; color: rgba(255,255,255,.25); display: flex; gap: .3rem; align-items: center; }
.pwd-rule.ok { color: rgba(134,239,172,.75); }

.onboard-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.25rem; text-align: center; position: relative; z-index: 1; }
.onboard-logo { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 2rem; }
.onboard-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .18em; color: rgba(129,140,248,.6); margin-bottom: 1rem; }
.onboard-title { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; color: #fff; line-height: 1.15; margin-bottom: .75rem; }
.gradient-text { background: linear-gradient(90deg, #818cf8, #c4b5fd, #818cf8); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradient-shift 4s linear infinite; }
@keyframes gradient-shift { to { background-position: 200% center; } }
.onboard-sub { font-size: .875rem; color: rgba(255,255,255,.25); max-width: 22rem; margin: 0 auto 2rem; line-height: 1.6; }
.choice-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; width: 100%; max-width: 40rem; }
@media (min-width: 640px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice-card { position: relative; text-align: left; padding: 1.5rem; border-radius: 1rem; border: 1px solid rgba(255,255,255,.07); background: var(--bg-card); cursor: pointer; transition: all .25s; font-family: inherit; color: inherit; }
.choice-card:hover { border-color: rgba(99,102,241,.35); background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(99,102,241,.1); }
.choice-icon { width: 2.75rem; height: 2.75rem; border-radius: .75rem; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 1rem; }
.choice-badge { position: absolute; top: 1.25rem; right: 1.25rem; padding: .15rem .5rem; border-radius: 999px; font-size: .62rem; font-weight: 600; border: 1px solid rgba(255,255,255,.06); color: rgba(255,255,255,.2); }
.choice-card h3 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: .5rem; }
.choice-card p { font-size: .75rem; color: rgba(255,255,255,.3); line-height: 1.55; margin-bottom: 1rem; }
.choice-cta { font-size: .75rem; color: rgba(255,255,255,.2); }
.choice-card:hover .choice-cta { color: #818cf8; }
.onboard-login { margin-top: 2.5rem; display: flex; align-items: center; gap: 1rem; width: 100%; max-width: 28rem; font-size: .75rem; color: rgba(255,255,255,.2); }
.onboard-login hr { flex: 1; border: none; border-top: 1px solid rgba(255,255,255,.05); }
.onboard-login a { color: rgba(129,140,248,.7); }

.success-box { padding: 1.25rem; border-radius: .75rem; border: 1px solid rgba(34,197,94,.25); background: rgba(34,197,94,.08); text-align: center; }
.success-box h3 { font-size: .875rem; font-weight: 600; color: #86efac; margin: .75rem 0 .35rem; }
.success-box p { font-size: .75rem; color: rgba(255,255,255,.3); line-height: 1.55; }
.success-icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid rgba(34,197,94,.25); background: rgba(34,197,94,.12); display: flex; align-items: center; justify-content: center; margin: 0 auto; color: #86efac; }

.hidden { display: none !important; }
.spinner { width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-shell { background: var(--bg-deep) !important; padding-top: 3.5rem; }
