/* Main container */
.kp-container {
    max-width: 900px;
    background: #eef6ff;
    padding: 16px;
    border-radius: 10px;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

.kp-container *,
.kp-container *::before,
.kp-container *::after {
    box-sizing: border-box;
}

/* Setup */
#setup label {
    display: block;
    margin-bottom: 12px;
}

#setup input {
    width: 100%;
    padding: 6px;
    font-size: 16px;
    margin-top: 4px;
}

/* Buttons */
.kp-container button {
    margin-top: 10px;
    padding: 10px;
    width: 100%;
    font-size: 16px;
    cursor: pointer;
}

/* Player name colors */
#turn.p1 {
    color: red;
}
#turn.p2 {
    color: blue;
}

/* Board wrapper */
.board-wrapper {
    position: relative;
    margin-top: 16px;
}

/* Board grid */
#board {
    display: grid;
    grid-template-columns: repeat(18, 40px);
    grid-template-rows: repeat(4, 40px);
    gap: 4px;
    user-select: none;
}

/* Tiles */
.tile {
    width: 40px;
    height: 40px;
    background: #98cfff;
    border: 1px solid #333;
    position: relative;
    cursor: pointer;
}

.tile span {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Rocks */
.tile.rock {
    background: #666;
    cursor: not-allowed;
}

/* Allowed moves */
.tile.allowed {
    outline: 3px solid #2ecc71;
}

/* Boat layer */
#tokens {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.token {
    position: absolute;
    width: 36px;
    height: 36px;
    z-index: 10;
}

.token.p1 {
    background: url('img/boat1.png') center / contain no-repeat;
}

.token.p2 {
    background: url('img/boat2.png') center / contain no-repeat;
}

/* Winner */
#winner {
    margin-top: 12px;
    font-size: 20px;
    font-weight: bold;
    color: green;
}