* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: system-ui, sans-serif;
    scroll-behavior: smooth;
    --bg-color: #333333;
    --water-color1: #073985;
    --water-color2: #222285;
    --ship-color: #727272;
    --ship-color2: #555555;
    --hit-color: #990000;
}

body {
    background-color: var(--bg-color);
    color: white;
}

header {
    padding: 1rem;
}

h1 {
    margin-bottom: 1rem;
}

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    gap: 2rem;
    padding: 1rem;
}

.playerOne, .playerTwo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 20rem;
    min-height: 20rem;
}

.grid {
    display: grid;
    grid-template-rows: repeat(10, 1fr);
    grid-template-columns: repeat(10, 1fr);
    box-shadow: 4px 8px 12px #00000044;
}

.grid:hover {
    cursor: crosshair;
}

.cell {
    background: linear-gradient(to bottom right, var(--water-color1), var(--water-color2));
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    color: white;
    min-width: 2.1rem;
    min-height: 2.1rem;
}

.cell.ship {
    background: linear-gradient(to top right, var(--ship-color), var(--ship-color2));
}

.cell.hit {
    background: radial-gradient(#d89a15, #990000);
}

dialog {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 2rem;
    border: none;
    min-width: 20rem;
}

button {
    padding: 0.5rem 1rem;
    background: var(--ship-color);
    color: white;
    border-radius: 5px;
    border: none;
    font-family: inherit;
    box-shadow: 2px 4px 5px #00000044;
}

dialog .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

dialog::backdrop {
    background-color: #00000077;
}