/* pages.css — страничные стили. */

/* === Лендинг === */
.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(ellipse at top, rgba(99,102,241,0.15), transparent 60%),
    var(--bg);
}
.landing-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.02em;
}
.landing-hero p.lead {
  max-width: 36rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

/* === Формы (register/login) === */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* === Создание персонажа === */
.character-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.character-step { display: none; }
.character-step.is-active { display: block; }

.summary-block {
  font-size: 1.05rem;
  line-height: 1.7;
}
.summary-block strong { color: var(--accent); }

/* === Игра === */
html.in-game, body.in-game { overflow: hidden; height: 100vh; }

#game-canvas {
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none; /* для мобильного джойстика */
}

#hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  pointer-events: none;
  z-index: 10;
}
#hud .hud-row { display: flex; gap: 0.5rem; pointer-events: auto; }

#chat {
  position: fixed;
  bottom: 0; left: 0;
  width: min(420px, 100%);
  max-height: 40vh;
  display: flex;
  flex-direction: column;
  background: rgba(20,20,20,0.55);
  backdrop-filter: blur(8px);
  z-index: 10;
}
#chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
#chat-log .msg { margin: 0.15rem 0; }
#chat-log .msg .nick { color: var(--accent); margin-right: 0.4rem; }
#chat-log .system { color: var(--fg-muted); font-style: italic; }

#chat-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  border-top: 1px solid var(--border);
}
#chat-input input {
  flex: 1;
  padding: 0.5rem;
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
}

/* Виртуальный джойстик контейнер (nipple.js монтируется сюда) */
#mobile-joystick {
  position: fixed;
  left: 0; bottom: 0;
  width: 40vw;
  height: 40vh;
  z-index: 5;
  display: none;
}
@media (hover: none) and (pointer: coarse) {
  #mobile-joystick { display: block; }
  #chat { width: 100%; }
}
