/*
 * Морской бой. Лобби, чат, журнал и окна — общие стили карточных столов
 * (cards.css, приставка th-); здесь только доски, корабли и баннер.
 */

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

/* ---------- баннер: что сейчас происходит ---------- */
.bs-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    font-size: 15px;
    font-weight: 700;
    color: #c9c9d4;
}

.bs-banner--own  { border-color: rgba(95, 101, 220, .55); background: rgba(95, 101, 220, .14); color: #fff; }
.bs-banner--good { border-color: rgba(76, 201, 128, .5);  background: rgba(76, 201, 128, .12); color: #7fe6ad; }
.bs-banner--bad  { border-color: rgba(230, 90, 90, .5);   background: rgba(230, 90, 90, .12);  color: #ff9b9b; }

.bs-banner__clock { font-variant-numeric: tabular-nums; color: #8a8a95; }

/* ---------- две доски ---------- */
.bs-fleets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

@media (max-width: 1100px) {
    .bs-fleets { grid-template-columns: 1fr; }
}

.bs-side { min-width: 0; transition: opacity .2s; }
.bs-side.is-dim { opacity: .45; }

.bs-side__title {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a8a95;
}

.bs-board {
    display: grid;
    grid-template-columns: 22px repeat(10, minmax(0, 1fr));
    gap: 2px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #0b1730;
    user-select: none;
    -webkit-user-select: none;
}

.bs-lab {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #6f7686;
}

.bs-cell {
    position: relative;
    aspect-ratio: 1;
    border-radius: 3px;
    background: #12264a;
    transition: background .12s;
}

/* Стрелять можно только по свободным клеткам чужого поля */
.bs-cell.can { cursor: crosshair; }
.bs-cell.can:hover { background: #2a4a85; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }

#bsMine .bs-cell { cursor: default; }
#bsMine.is-placing .bs-cell { cursor: pointer; }

.bs-cell.is-ship { background: #8aa0c8; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }

/* Промах — точка, ранил — красный с крестом, потоплен — тёмно-красный */
.bs-cell.is-miss::after {
    content: "";
    position: absolute;
    inset: 36%;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
}

.bs-cell.is-hit { background: #e05252; }
.bs-cell.is-sunk { background: #7a1d1d; }

.bs-cell.is-hit::after,
.bs-cell.is-sunk::after {
    content: "✕";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.bs-cell.is-sunk::after { color: #ffb0b0; }

/* Клетки вокруг потопленного корабля: кораблей там нет */
.bs-cell.is-mark::after {
    content: "";
    position: absolute;
    inset: 42%;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
}

/* После конца партии: что осталось у соперника */
.bs-cell.is-reveal { background: #4a5b7d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }

/* Предпросмотр расстановки */
.bs-cell.is-prev { background: rgba(76, 201, 128, .55); }
.bs-cell.is-prev-bad { background: rgba(230, 90, 90, .55); }

/* Последний выстрел — рамкой, чтобы глаз сразу находил */
.bs-cell.is-last { box-shadow: inset 0 0 0 2px #ffd54a; }

.bs-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
    font-size: 12px;
    color: #8a8a95;
}

.bs-left__label { font-weight: 600; }
.bs-left__item { display: inline-flex; align-items: center; gap: 4px; color: #c9c9d4; }
.bs-left__item.is-zero { opacity: .35; text-decoration: line-through; }

/* ---------- расстановка ---------- */
.bs-tools {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
}

.bs-tools[hidden] { display: none; }

.bs-tools__hint { margin-bottom: 12px; font-size: 13px; line-height: 1.5; color: #8a8a95; }

.bs-ships { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.bs-ship {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
    color: #c9c9d4;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}

.bs-ship:hover:not(:disabled) { border-color: var(--accent); }
.bs-ship.is-picked { border-color: var(--accent); background: rgba(95, 101, 220, .2); color: #fff; }
.bs-ship.is-done { opacity: .35; cursor: default; }
.bs-ship b { font-weight: 700; }

.bs-ship__cells { display: inline-flex; gap: 2px; }
.bs-ship__cells i { display: inline-block; width: 13px; height: 13px; border-radius: 2px; background: #8aa0c8; }

.bs-tools__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
