:root {
  --bg: #12082b;
  --bg-2: #1d0f45;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f6f3ff;
  --muted: #b7acd9;
  --accent: #ff3d7f;
  --accent-2: #ffc23d;
  --ok: #2ee59d;
  --warn: #ffb020;
  --bad: #ff5a5a;
  --c1: #ff3d7f; --c2: #ffc23d; --c3: #2ee59d; --c4: #3db8ff; --c5: #a35bff; --c6: #ff7a3d;
  --radius: 18px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 800px at 15% -10%, #3a1784 0%, transparent 60%),
              radial-gradient(900px 700px at 110% 110%, #6b0f4f 0%, transparent 55%),
              var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }

.screen { display: none; min-height: 100vh; min-height: 100dvh; }
.screen.active { display: flex; }

.center-col { flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; text-align: center; }

.logo { font-weight: 900; letter-spacing: -0.03em; line-height: 1; margin: 0; }
.logo span { background: linear-gradient(90deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 16px 28px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 0 #b0124d;
  transition: transform .08s, box-shadow .08s, opacity .2s;
  touch-action: manipulation;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b0124d; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--panel-strong); box-shadow: 0 6px 0 rgba(0,0,0,.35); }
.btn.secondary:active { box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.btn.gold { background: var(--accent-2); color: #3a2400; box-shadow: 0 6px 0 #b8860b; }
.btn.small { padding: 10px 16px; font-size: .9rem; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.input {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: rgba(0,0,0,.25);
  font-size: 1.3rem;
  font-weight: 700;
  outline: none;
}
.input:focus { border-color: var(--accent-2); }
.input.pin { text-align: center; letter-spacing: .4em; font-size: 2rem; font-variant-numeric: tabular-nums; }

.muted { color: var(--muted); }
.error { color: var(--bad); font-weight: 700; min-height: 1.4em; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120%);
  background: #2a1858; border: 1px solid var(--line); padding: 14px 20px; border-radius: 14px;
  font-weight: 700; transition: transform .3s, opacity .3s; z-index: 50; max-width: calc(100% - 32px);
  opacity: 0; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.avatar {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-weight: 900; color: #1b0d3a; flex: none;
}

@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 70% { transform: scale(1.08) } 100% { transform: scale(1); opacity: 1 } }
@keyframes pulse { 50% { transform: scale(1.06) } }
@keyframes eq { 0%, 100% { height: 15% } 50% { height: 100% } }

.eq { display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.eq i { display: block; width: 12px; border-radius: 6px; background: linear-gradient(var(--c2), var(--c1)); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.2s } .eq i:nth-child(3) { animation-delay: -.5s }
.eq i:nth-child(4) { animation-delay: -.1s } .eq i:nth-child(5) { animation-delay: -.7s }
.eq i:nth-child(6) { animation-delay: -.35s } .eq i:nth-child(7) { animation-delay: -.6s }
.eq.paused i { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
