/* Игра с компьютером (views/play_computer.ejs). Цвета - переменные темы сайта
   (--surface-1, --text-1, ...), как в articles.css и mini_chess.css: светлая и
   тёмная тема меняют их сами. */

.pc-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 16px 40px;
  color: var(--text-1, #212529);
}

.pc-crumbs {
  font-size: 0.9rem;
  color: var(--text-2, #6c757d);
  margin-bottom: 8px;
}

.pc-crumbs a {
  color: inherit;
}

.pc-h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 6px;
}

.pc-lead {
  max-width: 65ch;
  color: var(--text-2, #6c757d);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.pc-game {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(240px, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 36px;
}

.pc-board-col {
  min-width: 0;
}

.pc-board-shell .cg-board-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
}

.pc-board-shell .cg-board {
  border-radius: 6px;
}

/* координаты Chessground лежат поверх крайних рядов - клики проходят сквозь них */
.pc-board-shell coords {
  pointer-events: none;
}

.pc-status {
  margin-top: 10px;
  min-height: 1.6em;
  font-weight: 700;
}

.pc-status.is-thinking {
  color: var(--text-2, #6c757d);
}

.pc-status.is-over {
  font-size: 1.15rem;
}

.pc-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 8px;
  background: var(--surface-1, #fff);
}

.pc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.pc-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2, #6c757d);
}

.pc-colors {
  display: flex;
}

.pc-colors .btn {
  flex: 1 1 0;
}

.pc-hint {
  font-size: 0.85rem;
  color: var(--text-2, #6c757d);
}

.pc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-moves {
  max-height: 260px;
  overflow-y: auto;
  margin: 0;
  padding: 6px 6px 6px 2.4em;
  border: 1px solid var(--border, #dee2e6);
  border-radius: 6px;
  background: var(--surface-2, #f8f9fa);
  font-variant-numeric: tabular-nums;
  min-height: 2.4em;
}

.pc-moves li span {
  display: inline-block;
  min-width: 4.5em;
  font-weight: 600;
}

.pc-noscript {
  font-weight: 700;
}

.pc-section {
  max-width: 75ch;
  margin-bottom: 28px;
}

.pc-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.pc-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 14px 0 4px;
}

.pc-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.pc-about-site {
  max-width: 75ch;
  padding-top: 16px;
  border-top: 1px solid var(--border, #dee2e6);
  color: var(--text-2, #6c757d);
  font-size: 0.9rem;
}

/* Тёмная тема. Раскрытый список уровня браузер рисует по системной схеме - белым,
   а текст у .custom-select в теме сайта белый (common.css): пунктов не видно.
   color-scheme даёт тёмный список (и полосы прокрутки), цвета пунктов - из темы
   (для браузеров, которые красят пункты сами). */
html[data-theme='dark'] .pc-page {
  color-scheme: dark;
}

html[data-theme='dark'] .pc-select option {
  background-color: var(--surface-1, #0f172a);
  color: var(--text-1, #e5e7eb);
}

@media (max-width: 767px) {
  /* поля уже даёт контейнер сайта - доске нужна вся ширина */
  .pc-page {
    padding-left: 0;
    padding-right: 0;
  }

  .pc-game {
    grid-template-columns: minmax(0, 1fr);
  }
}
