/* ===== Морской бой — встроенные стили для сайта ===== */
/* Все классы с префиксом bs- чтобы не конфликтовать с style.css */

.battleship-page {
  max-width: 500px;
  margin: 0 auto;
}

.battleship-intro {
  font-size: 14px;
  color: #6b4f3a;
  margin-bottom: 1rem;
  text-align: center;
}

/* Легенда */
.bs-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.bs-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b4f3a;
}

.bs-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #FFC891;
  flex-shrink: 0;
}

.bs-dot.l-empty { background: #FFE0C2; }
.bs-dot.l-hit   { background: #c0392b; border-color: #e74c3c; }
.bs-dot.l-miss  { background: #FFD8B5; opacity: 0.5; }

/* Поле */
.bs-field-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #b07040;
  text-transform: uppercase;
  margin-bottom: 10px;
  border-bottom: 2px solid #FFD8B5;
  padding-bottom: 6px;
}

.bs-grid-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.bs-num {
  font-size: 12px;
  color: #b07040;
  width: 18px;
  text-align: right;
  flex-shrink: 0;
}

.bs-cell {
  flex: 1;
  height: 54px;
  border-radius: 4px;
  border: 1px solid #FFC891;
  background: #FFE0C2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  user-select: none;
}

.bs-cell:hover:not(.fired) {
  background: #FFD8B5;
  border-color: #FF7B33;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.bs-cell.hit  { background: #e8a09a; border-color: #c0392b; cursor: default; transform: none; }
.bs-cell.sunk { background: #c0392b; border-color: #922b21; cursor: default; color: #fff; }
.bs-cell.miss { background: #FFD8B5; border-color: #FFC891; cursor: default; opacity: 0.5; transform: none; }
.bs-cell.fired { cursor: default; }

/* Сообщение */
.bs-msg {
  background: #FFE0C2;
  border: 1px solid #FFC891;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 1rem 0;
  font-size: 15px;
  color: #403730;
  min-height: 46px;
  display: flex;
  align-items: center;
}

.bs-msg.hit-msg  { border-color: #c0392b; color: #922b21; background: #fde8e6; }
.bs-msg.miss-msg { color: #6b4f3a; }
.bs-msg.win-msg  { border-color: #27ae60; color: #1e8449; background: #e9f7ef; }
.bs-msg.warn-msg { border-color: #e67e22; color: #a04000; background: #fef5ec; }

/* Статистика */
.bs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 1rem;
}

.bs-stat {
  background: #FFE0C2;
  border: 1px solid #FFD8B5;
  border-radius: 4px;
  padding: 10px 12px;
  text-align: center;
}

.bs-stat-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #b07040;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.bs-stat-val {
  font-size: 24px;
  font-weight: bold;
  color: #403730;
}

/* Кнопка */
.bs-restart {
  margin-top: 1rem;
  width: 100%;
  padding: 10px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #FFB570;
  background: #FFC891;
  color: #403730;
  font-family: 'Arial', sans-serif;
  transition: background 0.2s, color 0.2s;
}

.bs-restart:hover { background: #FF7B33; color: white; }
.bs-restart:active { transform: scale(0.98); }
