/*
 * Стили мира поверх Tailwind: анимации и правила тем. Цвета и шрифты тем —
 * CSS-переменные, их выставляет game.js из app/game/themes.py (--bg, --ink,
 * --accent, --font-display, …). Здесь — значения по умолчанию (Космос) для
 * страниц без игры: вход, лендинг, пользователи.
 */
:root {
  --bg: radial-gradient(ellipse at top, #2b1660, #0b1024 55%, #070a17);
  --bg0: #0b1024;
  --panel: #141936;
  --ink: #ffffff;
  --accent: #c4b5fd;
  --accent2: #22d3ee;
  --planet-text: #ffffff;
  --planet-stroke: rgba(0, 0, 0, .45);
  --font-display: "Unbounded", system-ui;
  --font-body: system-ui, -apple-system, sans-serif;
}

[x-cloak] { display: none !important; }
body { background: var(--bg); background-attachment: fixed; font-family: var(--font-body); }
.display { font-family: var(--font-display); }
[data-theme="pixel"] *:not(svg):not(svg *) { border-radius: 0 !important; }
[data-theme="pixel"] .display { letter-spacing: .02em; }

@keyframes twinkle { 0%, 100% { opacity: .15 } 50% { opacity: .9 } }
.twinkle { animation: twinkle 3s ease-in-out infinite; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0 } 10% { opacity: .6 } 100% { transform: translateY(-560px); opacity: 0 } }
.rise { animation: rise linear infinite; }
.lbl { paint-order: stroke; stroke: var(--planet-stroke); stroke-width: 3px; fill: var(--planet-text); }
.bar { transition: width .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.7) }
  15% { opacity: 1; transform: translate(-50%, -10px) scale(1.1) }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1) }
}
.float { position: fixed; z-index: 60; pointer-events: none; font-family: var(--font-display); font-weight: 900; font-size: 18px; animation: floatUp 1.3s ease-out forwards; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
@keyframes fall { 0% { transform: translateY(-20px) rotate(0) } 100% { transform: translateY(105vh) rotate(720deg) } }
.confetti { position: fixed; top: 0; width: 9px; height: 14px; z-index: 70; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 60% { transform: scale(1.08); opacity: 1 } 100% { transform: scale(1) } }
.pop { animation: pop .45s ease-out; }
@keyframes bob { 0%, 100% { transform: translate(-50%, -100%) translateY(0) } 50% { transform: translate(-50%, -100%) translateY(-6px) } }
.note { animation: bob 2.6s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: translateX(0) } 25% { transform: translateX(-6px) } 75% { transform: translateX(6px) } }
.shake { animation: shake .35s ease-in-out 2; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0) } 50% { box-shadow: 0 0 24px 2px rgba(250, 204, 21, .45) } }
.glow { animation: glow 2s ease-in-out infinite; }
.noscroll::-webkit-scrollbar { display: none; }

/* Лендинг: плавающие планеты в шапке. */
@keyframes drift { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
.drift { animation: drift 6s ease-in-out infinite; }
@keyframes wave { 0% { transform: translateX(0) } 100% { transform: translateX(-50%) } }
.liquid { animation: wave 4s linear infinite; }
