:root {
  --base: #12131C;
  --panel: #1A1C28;
  --neon: #00F0FF;
  --neon2: #7C3AED;
  --text: #E5E7EB;
  --muted: #9CA3AF;
  --muted2: #6B7280;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--base);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  color-scheme: dark;
}

body {
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,240,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,240,255,0.3); border-radius: 3px; }

/* ===== Utilities ===== */
.hidden { display: none !important; }
.glass {
  background: rgba(26, 28, 40, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-strong {
  background: rgba(18, 19, 28, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.neon { color: var(--neon); text-shadow: 0 0 12px var(--neon); }
.cyan { color: var(--neon); }
.cyan-text { color: var(--neon); }
.green { color: #4ADE80; }
.yellow { color: #FACC15; }
.mono { font-family: 'JetBrains Mono', monospace; }
.ml-auto { margin-left: auto; }
.grad-text {
  background: linear-gradient(90deg, #00F0FF, #7C3AED);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ===== Icons ===== */
.i-xs { width: 12px; height: 12px; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 32px; height: 32px; }

/* ===== Ambient ===== */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.glow { position: absolute; width: 288px; height: 288px; border-radius: 50%; filter: blur(120px); }
.glow-cyan { top: -10%; left: -10%; background: rgba(0, 240, 255, 0.1); }
.glow-purple { bottom: -10%; right: -10%; background: rgba(124, 58, 237, 0.1); }

/* ===== Screens ===== */
.screen { position: relative; z-index: 10; min-height: 100vh; display: flex; flex-direction: column; animation: fadeIn 0.4s ease-out; }

/* ===== Topbar ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  position: relative;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, #22D3EE, #7C3AED);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(0,240,255,0.5);
}
.logo-mark::after {
  content: ''; position: absolute; inset: -4px; border-radius: 16px;
  background: rgba(34, 211, 238, 0.2); filter: blur(8px); z-index: -1;
}
.logo-icon { width: 24px; height: 24px; color: #fff; }
.logo-text h1 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: #fff; line-height: 1.1; }
.logo-text p { font-size: 10px; text-transform: uppercase; letter-spacing: 0.25em; color: var(--muted2); font-weight: 500; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ADE80; font-size: 12px;
}
.status-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ADE80; animation: pulse 1.5s ease-in-out infinite;
}

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text); font-size: 14px; font-family: inherit;
  transition: color 0.2s;
}
.back-btn:hover { color: #fff; }
.back-btn.ghost { opacity: 0.4; pointer-events: none; }

.platform-pill { display: inline-flex; align-items: center; gap: 8px; }
.pp-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.pp-icon svg { width: 16px; height: 16px; color: #fff; }
.platform-pill span { font-size: 14px; font-weight: 600; color: #fff; }

.step-tag { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* ===== Container / Hero ===== */
.container { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 32px 16px; }
@media (min-width: 640px) { .container { padding: 48px 16px; } }

.hero { text-align: center; margin-bottom: 40px; animation: slideUp 0.4s ease-out; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(26, 28, 40, 0.55); border: 1px solid rgba(255,255,255,0.08);
  color: var(--neon); font-size: 12px; font-weight: 500; margin-bottom: 16px;
}
.hero h2 { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 8px; }
@media (min-width: 640px) { .hero h2 { font-size: 48px; } .hero h2.smaller { font-size: 32px; } }
.hero p { color: var(--muted); font-size: 14px; max-width: 28rem; margin: 0 auto; }
@media (min-width: 640px) { .hero p { font-size: 16px; } }

/* ===== Grid ===== */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.pcard {
  position: relative; overflow: hidden;
  border-radius: 16px; padding: 16px;
  background: rgba(26, 28, 40, 0.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; text-align: left; color: inherit; font-family: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: slideUp 0.4s ease-out both;
}
.pcard:hover, .pcard:active { transform: translateY(-4px) scale(1.03); }
.pcard::before {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 30px var(--glow);
  opacity: 0; transition: opacity 0.5s;
}
.pcard:hover::before { opacity: 1; }
.pcard-glow {
  position: absolute; top: -48px; right: -48px;
  width: 128px; height: 128px; border-radius: 50%;
  filter: blur(48px); opacity: 0.3; transition: opacity 0.5s;
}
.pcard:hover .pcard-glow { opacity: 0.6; }
.pcard-inner { position: relative; z-index: 1; }
.pcard-ico {
  width: 48px; height: 48px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  transition: transform 0.3s;
}
.pcard:hover .pcard-ico { transform: scale(1.1); }
.pcard-ico svg { width: 24px; height: 24px; color: #fff; stroke: #fff; }
.pcard h3 { font-size: 16px; font-weight: 700; color: #fff; }
.pcard .tag { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.pcard .go { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.pcard .go svg { width: 14px; height: 14px; transition: transform 0.3s; }
.pcard:hover .go svg { transform: translateX(4px); }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 28rem; margin: 48px auto 0; }
.stat { padding: 12px; text-align: center; border-radius: 12px; }
.stat svg { margin: 0 auto 4px; }
.stat-val { font-size: 16px; font-weight: 700; color: #fff; }
.stat-lbl { font-size: 10px; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Footer ===== */
.foot { padding: 24px 16px; text-align: center; font-size: 11px; color: var(--muted2); display: flex; align-items: center; justify-content: center; gap: 4px; }

/* ===== Card / Form ===== */
.card { border-radius: 16px; padding: 20px; max-width: 560px; margin: 0 auto; }
@media (min-width: 640px) { .card { padding: 28px; } }
.slide-up { animation: slideUp 0.4s ease-out; }

.lbl { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.lbl:not(:first-child) { margin-top: 20px; }

.input-wrap, .select-wrap { position: relative; margin-bottom: 20px; }
.input-ico, .select-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted2); }
.input-wrap input {
  width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 14px 16px 14px 44px; color: #fff; font-size: 16px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-wrap input::placeholder { color: var(--muted2); }
.input-wrap input:focus { outline: none; border-color: rgba(0,240,255,0.6); box-shadow: 0 0 0 2px rgba(0,240,255,0.2); }

.select-btn {
  width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 14px 40px 14px 44px; text-align: left; color: #fff; font-size: 16px; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  transition: border-color 0.2s;
}
.select-btn:hover { border-color: rgba(255,255,255,0.2); }
.chev { width: 20px; height: 20px; color: var(--muted); transition: transform 0.2s; }
.chev.open { transform: rotate(180deg); }

.select-menu {
  position: absolute; z-index: 30; margin-top: 8px; width: 100%;
  border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  animation: fadeIn 0.2s ease-out;
}
.opt {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; text-align: left; background: transparent; border: none;
  color: var(--text); font-size: 14px; font-family: inherit; cursor: pointer;
  transition: background 0.2s;
}
.opt:hover { background: rgba(255,255,255,0.05); }
.opt.active { color: var(--neon); background: rgba(0,240,255,0.05); }
.opt .check { opacity: 0; margin-left: auto; }
.opt.active .check { opacity: 1; }

.warn {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted2); margin-bottom: 20px;
  padding: 12px; border-radius: 8px;
  background: rgba(250, 204, 21, 0.05); border: 1px solid rgba(250, 204, 21, 0.2);
}
.warn svg { flex-shrink: 0; }

.cta-primary {
  width: 100%; padding: 16px; border-radius: 12px; border: none;
  font-weight: 700; font-size: 16px; color: #fff; font-family: inherit;
  background: linear-gradient(90deg, #06B6D4, #7C3AED);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: box-shadow 0.3s, transform 0.1s;
}
.cta-primary:hover:not(:disabled) { box-shadow: 0 0 30px rgba(0,240,255,0.5); }
.cta-primary:active:not(:disabled) { transform: scale(0.98); }
.cta-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Progress Ring ===== */
.ring-wrap { position: relative; width: 144px; height: 144px; margin: 0 auto 32px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
#ringProg { transition: stroke-dashoffset 0.4s ease-out; filter: drop-shadow(0 0 8px rgba(0,240,255,0.6)); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-pct { font-size: 30px; font-weight: 800; color: #fff; text-shadow: 0 0 12px rgba(0,240,255,0.8); }
.ring-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted2); }

/* ===== Terminal ===== */
.terminal { border-radius: 16px; overflow: hidden; max-width: 560px; margin: 0 auto; }
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.3);
}
.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; }
.d-r { background: rgba(239, 68, 68, 0.7); }
.d-y { background: rgba(250, 204, 21, 0.7); }
.d-g { background: rgba(74, 222, 128, 0.7); }
.term-title { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-left: 8px; }
.term-body { padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: 13px; height: 256px; overflow-y: auto; }
@media (min-width: 640px) { .term-body { font-size: 14px; } }

.log-line { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; animation: fadeIn 0.2s ease-out; }
.log-line .prompt { color: #06B6D4; flex-shrink: 0; }
.log-line .txt { color: var(--text); }
.log-line.done .prompt { color: #4ADE80; }
.log-line.done .txt { color: #4ADE80; font-weight: 700; text-shadow: 0 0 12px rgba(74,222,128,0.6); }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--neon); margin-left: 4px; animation: blink 1s steps(2) infinite; vertical-align: middle; }

/* ===== Mini Stats ===== */
.ministats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; max-width: 560px; margin-left: auto; margin-right: auto; }
.ministat { padding: 12px; text-align: center; border-radius: 12px; }
.ministat svg { margin: 0 auto 4px; }
.ms-val { font-size: 12px; font-weight: 700; color: #fff; }
.ms-lbl { font-size: 10px; color: var(--muted2); text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== Locker ===== */
.locker { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn 0.3s ease-out; }
.locker-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.locker-card {
  position: relative; max-width: 28rem; width: 100%;
  border-radius: 24px; padding: 24px;
  border: 1px solid rgba(0,240,255,0.3);
  box-shadow: 0 0 60px rgba(0,240,255,0.3);
  text-align: center;
}
@media (min-width: 640px) { .locker-card { padding: 32px; } }

.locker-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 16px; border-radius: 999px;
  background: linear-gradient(90deg, #06B6D4, #7C3AED);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: #fff;
}
.locker-icon-wrap { position: relative; display: inline-flex; margin-bottom: 16px; margin-top: 8px; }
.locker-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(135deg, #FACC15, #F97316);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(255, 200, 0, 0.5);
}
.locker-pulse {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #EF4444; display: flex; align-items: center; justify-content: center;
  animation: pulse 1.5s ease-in-out infinite;
}
.locker-pulse span { width: 8px; height: 8px; border-radius: 50%; background: #fff; }

.locker-card h2 { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.locker-copy { color: #D1D5DB; font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.locker-success {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; color: #4ADE80; margin-bottom: 20px;
}
.verify-list { text-align: left; margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.verify-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 8px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05);
}
.vi-ico { width: 28px; height: 28px; border-radius: 8px; background: rgba(0,240,255,0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vi-ico svg { color: var(--neon); }
.verify-item span { font-size: 14px; color: #E5E7EB; }

.unlock-btn {
  width: 100%; padding: 16px; border-radius: 12px; border: none;
  font-weight: 800; font-size: 16px; color: #fff; font-family: inherit;
  background: linear-gradient(90deg, #22C55E, #06B6D4, #22D3EE);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  animation: glowPulse 2s ease-in-out infinite;
  transition: transform 0.1s;
}
.unlock-btn:active { transform: scale(0.98); }
.locker-fine { font-size: 10px; color: var(--muted2); margin-top: 16px; line-height: 1.5; }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,240,255,0.4); }
  50% { box-shadow: 0 0 40px rgba(0,240,255,0.8); }
}
