@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;900&family=Manrope:wght@500;700;800&display=swap');

:root {
  --bg: #0a0614;
  --ink: #0a0614;
  --text: #f6f3ff;
  --muted: #a69cc7;
  --line: rgba(255, 255, 255, .12);
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .10);
  --pink: #ff3d8b;
  --lime: #d4ff3a;
  --violet: #7c5cff;
  --cyan: #22e1ff;
  --orange: #ff8a3d;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --r: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- живой фон: размытые цветные пятна + зерно ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.bg i:nth-child(1) { width: 55vmax; height: 55vmax; background: var(--violet); top: -20vmax; left: -15vmax; }
.bg i:nth-child(2) { width: 45vmax; height: 45vmax; background: var(--pink); bottom: -20vmax; right: -10vmax; animation-duration: 28s; opacity: .4; }
.bg i:nth-child(3) { width: 30vmax; height: 30vmax; background: var(--cyan); top: 30%; left: 55%; animation-duration: 34s; opacity: .22; }
.bg::after {
  content: ''; position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* ---------- типографика ---------- */
.display { font-family: var(--display); font-weight: 900; letter-spacing: -.02em; line-height: 1.02; }
.grad { background: linear-gradient(100deg, var(--lime), var(--cyan) 45%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.logo { font-family: var(--display); font-weight: 900; letter-spacing: -.03em; display: inline-flex; align-items: center; gap: .06em; }
.logo b { display: inline-grid; place-items: center; width: 1.2em; height: 1.25em; border-radius: .3em; background: var(--lime); color: var(--ink); transform: rotate(-8deg); font-size: 1em; margin-right: .04em; }

/* ---------- кнопки и поля ---------- */
button {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  border: none; cursor: pointer; border-radius: 999px; padding: 18px 30px;
  background: var(--lime); color: var(--ink);
  transition: transform .15s cubic-bezier(.2, 1.6, .4, 1), filter .15s, opacity .2s;
}
button:hover { filter: brightness(1.08); }
button:active { transform: scale(.95); }
button.alt { background: var(--pink); color: #fff; }
button.ghost { background: var(--glass); color: var(--text); border: 1px solid var(--line); backdrop-filter: blur(12px); }
button:disabled { opacity: .35; pointer-events: none; }

input, textarea {
  font-family: var(--body); font-weight: 700; font-size: 1.15rem;
  width: 100%; padding: 18px 20px; border-radius: 20px;
  background: var(--glass-2); color: var(--text);
  border: 1.5px solid var(--line); outline: none;
  transition: border-color .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: #8b80ad; }
input:focus, textarea:focus { border-color: var(--lime); background: rgba(255, 255, 255, .14); }
textarea { resize: none; min-height: 120px; line-height: 1.35; }

.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

/* ---------- аватар игрока ---------- */
.ava {
  --c: var(--lime);
  display: inline-grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff6, transparent 55%), var(--c);
  box-shadow: 0 0 0 3px #0a061488, 0 8px 24px -6px var(--c);
  font-size: 30px; line-height: 1;
}

/* ---------- ИИ-ведущий: живое лицо ---------- */
.bot { --s: 120px; position: relative; width: var(--s); height: var(--s); flex: none; animation: bob 3s ease-in-out infinite; }
.bot .head {
  position: absolute; inset: 0; border-radius: 38%;
  background: radial-gradient(circle at 30% 20%, #fff8, transparent 40%), linear-gradient(145deg, var(--lime), var(--cyan) 60%, var(--violet));
  box-shadow: 0 20px 60px -10px #22e1ff88, inset 0 -10px 20px #0003;
}
.bot .eye {
  position: absolute; top: 34%; width: 18%; height: 24%; border-radius: 50%; background: var(--ink);
  animation: blink 4.5s infinite;
}
.bot .eye::after { content: ''; position: absolute; width: 35%; height: 30%; top: 18%; left: 22%; border-radius: 50%; background: #fff; }
.bot .eye.l { left: 26%; } .bot .eye.r { right: 26%; }
.bot .mouth {
  position: absolute; left: 50%; bottom: 20%; width: 34%; height: 8%; transform: translateX(-50%);
  background: var(--ink); border-radius: 0 0 40px 40px; transition: height .1s;
}
.bot.talking .mouth { animation: talk .22s ease-in-out infinite alternate; }
.bot.thinking { animation: think 1s ease-in-out infinite; }
.bot.thinking .eye { animation: look 1.6s ease-in-out infinite; height: 14%; top: 38%; }
.bot .brow { position: absolute; top: 24%; width: 20%; height: 5%; background: var(--ink); border-radius: 4px; transition: transform .3s; }
.bot .brow.l { left: 24%; transform: rotate(-12deg); } .bot .brow.r { right: 24%; transform: rotate(12deg); }
.bot.smug .brow.l { transform: rotate(8deg) translateY(-4px); }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes think { 50% { transform: rotate(6deg) scale(.96); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes look { 0%, 100% { transform: translateX(-30%); } 50% { transform: translateX(30%); } }
@keyframes talk { from { height: 6%; } to { height: 20%; } }

/* ---------- анимации ---------- */
@keyframes pop { from { transform: scale(.6) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 30%, 70% { transform: translateX(4px); } 50% { transform: translateX(-4px); } }
.pop { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.rise { animation: rise .6s cubic-bezier(.2, 1, .3, 1) both; }
.screen > * { animation: rise .6s cubic-bezier(.2, 1, .3, 1) both; }
.screen > *:nth-child(2) { animation-delay: .07s; }
.screen > *:nth-child(3) { animation-delay: .14s; }
.screen > *:nth-child(4) { animation-delay: .21s; }
.screen > *:nth-child(5) { animation-delay: .28s; }

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