/* ════════════════════════════════════════════════════════
   game.css — общая раскладка, полноэкранный режим
   ════════════════════════════════════════════════════════ */

html, body {
  height: 100%;
  margin: 0;
  background: #e8edf2;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Шапка ── */
.app-navbar {
  background: #fff;
  border-bottom: 1px solid #d0d8e0;
  flex-shrink: 0;
}

.app-logo {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 1px;
  color: #1a2a3a;
}

.app-logo b {
  color: #185FA5;
}

/* ── Экраны ── */
.app-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Карточки ── */
.card {
  border: 1px solid #d0d8e0;
  border-radius: 10px;
}

.card-header {
  background: #f8fafc;
  border-bottom: 1px solid #d0d8e0;
  font-size: 12px;
  font-weight: 600;
  color: #000;
}

/* ── Чипы статуса (имя игрока, фаза, очередь) ── */
.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid #d0d8e0;
  color: #000;
  background: #f8fafc;
  white-space: nowrap;
}

.chip.chip-active {
  background: #e6f1fb;
  border-color: #85B7EB;
  color: #0C447C;
}

.chip.chip-ai {
  background: #eeedfe;
  border-color: #afa9ec;
  color: #3c3489;
}

/* ── Кнопки акцентного синего ── */
.btn-primary {
  background: #185FA5;
  border-color: #0C447C;
}

.btn-primary:hover {
  background: #0C447C;
  border-color: #0C447C;
}

/* ── Подсказки (hint box) ── */
.hint-box {
  font-size: 11px;
  line-height: 1.5;
  border-radius: 6px;
  padding: 7px 12px;
  background: #fff3cc;
  border: 1px solid #e8c040;
  color: #7a4400;
}

.hint-box b {
  font-weight: 700;
}

.hint-box.hint-blue {
  background: #ddeeff;
  border-color: #85B7EB;
  color: #0C447C;
}

.hint-box.hint-green {
  background: #ddf0cc;
  border-color: #7ab830;
  color: #2a5a00;
}

.hint-box.hint-orange {
  background: #fdecc8;
  border-color: #e8a030;
  color: #7a4400;
}

/* ════════════════════════════════════════════════════════
   Лобби — режимы игры, сложность ИИ, история позывных
   ════════════════════════════════════════════════════════ */

.mode-btn {
  border: 1.5px solid #d0d8e0; border-radius: 8px; padding: 12px 8px;
  cursor: pointer; text-align: center; background: #f8fafc;
  transition: all .15s; user-select: none; height: 100%;
}
.mode-btn:hover { border-color: #85B7EB; background: #eef5fc; }
.mode-btn.active-blue   { background: #e6f1fb; border-color: #185FA5; box-shadow: 0 0 0 2px rgba(24,95,165,0.15); }
.mode-btn.active-purple { background: #eeedfe; border-color: #7c6fe0; box-shadow: 0 0 0 2px rgba(124,111,224,0.15); }
.mode-btn.mode-disabled  { opacity: .55; cursor: not-allowed; }
.mode-icon { font-size: 22px; margin-bottom: 4px; }
.mode-name { font-size: 11px; font-weight: 700; color: #334455; display: block; }
.mode-desc { font-size: 10px; color: #000; display: block; margin-top: 1px; }

.badge-soon, .badge-ai {
  position: absolute; top: -8px; right: 6px; font-size: 9px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px; z-index: 1;
}
.badge-soon { background: #e6f1fb; color: #0C447C; border: 1px solid #85B7EB; }
.badge-ai   { background: #eeedfe; color: #3c3489; border: 1px solid #afa9ec; }

.diff-btn {
  border: 1px solid #d0d8e0; border-radius: 6px; padding: 6px 0;
  font-size: 11px; font-weight: 600; color: #000; background: #f8fafc;
  cursor: pointer; transition: all .12s; text-align: center;
}
.diff-btn.d-easy { background: #eaf3de; border-color: #97c459; color: #27500a; }
.diff-btn.d-mid  { background: #faeeda; border-color: #ef9f27; color: #633806; }
.diff-btn.d-hard { background: #fcebeb; border-color: #f09595; color: #791f1f; }

.form-check-input:checked { background-color: #185FA5; border-color: #185FA5; }

.stat-val { font-size: 16px; font-weight: 700; color: #185FA5; }

/* ════════════════════════════════════════════════════════
   Экран результата — баннер победителя, итоговая статистика
   ════════════════════════════════════════════════════════ */

.result-banner {
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.result-banner.win {
  background: linear-gradient(135deg, #e6f1fb 0%, #cfe6fb 100%);
  border: 1px solid #85B7EB;
}
.result-icon { font-size: 42px; margin-bottom: 8px; }
.result-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.result-title.win { color: #0C447C; }
.result-sub { font-size: 13px; color: #000; }

.stat-card {
  background: #fff; border: 1px solid #d0d8e0; border-radius: 8px;
  padding: 10px; text-align: center;
}
.stat-card .v { font-size: 18px; font-weight: 700; color: #334455; }
.stat-card .l { font-size: 10px; color: #000; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

.field-title { font-size: 11px; font-weight: 600; color: #000; margin-bottom: 6px; }

.btn-replay {
  background: #185FA5; border-color: #0C447C; color: #e6f1fb;
  font-weight: 600; font-size: 13px; padding: 10px;
}
.btn-replay:hover { background: #0C447C; color: #fff; }
.btn-lobby {
  font-weight: 600; font-size: 13px; padding: 10px;
  color: #000; border-color: #c0ccd8;
}
.btn-lobby:hover { background: #f0f4f8; }
.name-wrap { position: relative; }
.name-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1px solid #d0d8e0; border-radius: 8px;
  z-index: 200; display: none; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.name-dropdown.open { display: block; }
.dd-header {
  padding: 5px 10px; font-size: 10px; font-weight: 600; color: #000;
  background: #f8fafc; border-bottom: 1px solid #eee;
  display: flex; justify-content: space-between; align-items: center;
  text-transform: uppercase; letter-spacing: .5px;
}
.dd-clear { font-size: 10px; color: #000; background: none; border: none; cursor: pointer; padding: 0; }
.dd-clear:hover { color: #e06060; }
.dd-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  font-size: 13px; color: #334455; cursor: pointer; border-bottom: 1px solid #f0f0f0;
}
.dd-item:last-child { border-bottom: none; }
.dd-item:hover { background: #f0f7ff; }
.dd-del { margin-left: auto; background: none; border: none; cursor: pointer; color: #ccc; font-size: 14px; padding: 0; line-height: 1; }
.dd-del:hover { color: #e06060; }
.input-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: #aaa; font-size: 18px;
  display: none; line-height: 1; padding: 0;
}
