/* /Components/BoardGrid.razor.rz.scp.css */
/* --cell-size is set by the page that uses the grid; 3rem if it doesn't */
.board[b-1a1yicysr5] {
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0 auto;
}

/* The board the player should interact with glows slowly */
.board.active[b-1a1yicysr5] {
    animation: active-glow-b-1a1yicysr5 2.5s ease-in-out infinite;
}

@keyframes active-glow-b-1a1yicysr5 {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }

    50% {
        box-shadow: 0 0 1.25rem 0.3rem rgba(56, 189, 248, 0.45);
    }
}

.board th[b-1a1yicysr5],
.board td[b-1a1yicysr5] {
    width: var(--cell-size, 3rem);
    min-width: var(--cell-size, 3rem);
    height: var(--cell-size, 3rem);
    padding: 0;
    text-align: center;
}

.board th[b-1a1yicysr5] {
    font-size: calc(var(--cell-size, 3rem) * 0.4);
    font-weight: 600;
    color: var(--text-muted);
}

/* Each cell has three layers: the cell itself (state colour, sunk shake),
   ::before (last-shot ring) and ::after (hit, miss and sunk effects) */
.board td[b-1a1yicysr5] {
    position: relative;
    border: 1px solid rgba(56, 189, 248, 0.22);
    cursor: pointer;
}

.board.active td:hover[b-1a1yicysr5] {
    filter: brightness(1.3);
}

/* Cell states */
.water[b-1a1yicysr5] {
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.08), transparent 55%),
        linear-gradient(160deg, #1d4e89, #163c6b);
}

.ship[b-1a1yicysr5] {
    background: linear-gradient(180deg, #a5b4c8, #64748b);
}

.miss[b-1a1yicysr5] {
    background:
        radial-gradient(circle, rgba(226, 232, 240, 0.85) 12%, transparent 14%),
        linear-gradient(160deg, #1d4e89, #163c6b);
}

.hit[b-1a1yicysr5] {
    background: radial-gradient(circle, #fde68a 0%, #f97316 38%, #9a3412 75%, #431407 100%);
}

.sunk[b-1a1yicysr5] {
    background: radial-gradient(circle, #7f1d1d 0%, #450a0a 70%, #1c0505 100%);
    animation: sunk-shake-b-1a1yicysr5 0.45s ease-in-out;
}

.preview[b-1a1yicysr5] {
    background: rgba(74, 222, 128, 0.7);
}

.preview-invalid[b-1a1yicysr5] {
    background: rgba(248, 113, 113, 0.7);
}

/* Effects. Each one plays once, when the cell gets its class. */
.hit[b-1a1yicysr5]::after,
.miss[b-1a1yicysr5]::after,
.sunk[b-1a1yicysr5]::after {
    content: "";
    position: absolute;
    z-index: 2;
    border-radius: 50%;
    pointer-events: none;
}

/* Hit: a fireball that grows and fades */
.hit[b-1a1yicysr5]::after {
    inset: 0;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.95) 0%, rgba(249, 115, 22, 0.8) 40%, transparent 70%);
    animation: burst-b-1a1yicysr5 0.5s ease-out forwards;
}

/* Sunk: a bigger, darker blast on every cell of the ship at once */
.sunk[b-1a1yicysr5]::after {
    inset: -10%;
    background: radial-gradient(circle, rgba(254, 215, 170, 0.95) 0%, rgba(220, 38, 38, 0.85) 45%, transparent 72%);
    animation: burst-b-1a1yicysr5 0.7s ease-out forwards;
}

/* Miss: a ring spreading out like a splash */
.miss[b-1a1yicysr5]::after {
    inset: 15%;
    border: 2px solid rgba(226, 232, 240, 0.9);
    animation: splash-b-1a1yicysr5 0.6s ease-out forwards;
}

@keyframes burst-b-1a1yicysr5 {
    from {
        transform: scale(0.3);
        opacity: 1;
    }

    to {
        transform: scale(2.2);
        opacity: 0;
    }
}

@keyframes splash-b-1a1yicysr5 {
    from {
        transform: scale(0.2);
        opacity: 1;
    }

    to {
        transform: scale(1.7);
        opacity: 0;
    }
}

@keyframes sunk-shake-b-1a1yicysr5 {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px);
    }

    40% {
        transform: translateX(3px);
    }

    60% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }
}

/* The most recent shot on this board: a white ring that blinks once */
.last-shot[b-1a1yicysr5]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    box-shadow: inset 0 0 0 2px #f8fafc, 0 0 0.6rem rgba(248, 250, 252, 0.55);
    pointer-events: none;
    animation: blink-b-1a1yicysr5 0.4s ease-in-out;
}

@keyframes blink-b-1a1yicysr5 {
    50% {
        opacity: 0;
    }
}

/* People who turned off animations in their OS settings: no movement, same information */
@media (prefers-reduced-motion: reduce) {
    .board.active[b-1a1yicysr5] {
        animation: none;
        box-shadow: 0 0 0.75rem 0.2rem rgba(56, 189, 248, 0.35);
    }

    .sunk[b-1a1yicysr5],
    .last-shot[b-1a1yicysr5]::before {
        animation: none;
    }

    .hit[b-1a1yicysr5]::after,
    .miss[b-1a1yicysr5]::after,
    .sunk[b-1a1yicysr5]::after {
        display: none;
    }
}
/* /Components/GameOverScreen.razor.rz.scp.css */
/* Dims and blurs the game behind the dialog */
.backdrop[b-d7wuvuyyfk] {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(5, 13, 26, 0.65);
    backdrop-filter: blur(4px);
    animation: fade-in-b-d7wuvuyyfk 0.3s ease-out;
}

.dialog[b-d7wuvuyyfk] {
    width: min(26rem, 100%);
    box-sizing: border-box;
    padding: 2rem;
    border: 1px solid var(--panel-border);
    background: linear-gradient(180deg, rgba(18, 53, 91, 0.96), rgba(10, 26, 47, 0.98));
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: pop-in-b-d7wuvuyyfk 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

h2[b-d7wuvuyyfk] {
    margin: 0;
    font-family: var(--title-font);
    font-weight: normal;
    font-size: clamp(2.2rem, 9vw, 3rem);
    letter-spacing: 0.08em;
}

.victory h2[b-d7wuvuyyfk] {
    color: #fde68a;
    text-shadow: 0 0 1.5rem rgba(250, 204, 21, 0.6);
}

.defeat h2[b-d7wuvuyyfk] {
    color: #fca5a5;
    text-shadow: 0 0 1.5rem rgba(239, 68, 68, 0.6);
}

.subtitle[b-d7wuvuyyfk] {
    margin: 0.5rem 0 1.5rem;
    color: var(--text-muted);
}

.stats[b-d7wuvuyyfk] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0;
}

.stats div[b-d7wuvuyyfk] {
    padding: 0.75rem;
    border: 1px solid var(--panel-border);
    background: rgba(15, 23, 42, 0.6);
}

dt[b-d7wuvuyyfk] {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

dd[b-d7wuvuyyfk] {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.difficulty[b-d7wuvuyyfk] {
    margin: 1rem 0 1.5rem;
    color: var(--text-muted);
}

.actions[b-d7wuvuyyfk] {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

@keyframes fade-in-b-d7wuvuyyfk {
    from {
        opacity: 0;
    }
}

@keyframes pop-in-b-d7wuvuyyfk {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(1rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .backdrop[b-d7wuvuyyfk],
    .dialog[b-d7wuvuyyfk] {
        animation: none;
    }
}
/* /Components/MouseIcon.razor.rz.scp.css */
.mouse-icon[b-bk0jt89daz] {
    width: 1.1rem;
    height: 1.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.button[b-bk0jt89daz] {
    fill: var(--sonar);
    stroke: none;
}
/* /Pages/Home.razor.rz.scp.css */
/* Three columns: sidebar | boards | empty. The empty column mirrors the sidebar,
   which keeps the boards in the exact middle of the screen. */
.game[b-bd6i5zvbxb] {
    --sidebar-width: 14rem;
    --footer-height: 2.5rem;
    /* The largest cell size where two stacked boards and the footer still fit the height and the width */
    --cell-size: min(
        (100dvh - 8rem - var(--footer-height)) / 22,
        (100vw - 2 * var(--sidebar-width) - 6rem) / 11,
        4.5rem);

    height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr var(--footer-height);
    align-items: center;
    column-gap: 2rem;
    padding: 1rem;
}

.sidebar[b-bd6i5zvbxb] {
    justify-self: end;
    width: var(--sidebar-width);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--panel-border);
    background: var(--panel);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.35);
}

.sidebar h1[b-bd6i5zvbxb] {
    margin: 0;
    font-family: var(--title-font);
    font-weight: normal;
    font-size: 1.7rem;
    letter-spacing: 0.05em;
    text-shadow: 0 0 1rem rgba(56, 189, 248, 0.35);
}

.controls[b-bd6i5zvbxb] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.controls select[b-bd6i5zvbxb] {
    font: inherit;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--panel-border);
    background: var(--navy-900);
    color: var(--text);
}

.message[b-bd6i5zvbxb] {
    margin: 0;
    min-height: 4.5em;
    white-space: pre-line;
    line-height: 1.5;
}

.boards[b-bd6i5zvbxb] {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.board-panel h2[b-bd6i5zvbxb] {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-muted);
}

/* Spans all three columns, under the boards */
.hints[b-bd6i5zvbxb] {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    color: var(--text-muted);
}

.hint[b-bd6i5zvbxb] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Portrait or narrow screens: controls on top, boards below, still no scrolling */
@media (max-aspect-ratio: 1/1), (max-width: 50rem) {
    .game[b-bd6i5zvbxb] {
        --cell-size: min((100dvh - 16.5rem - var(--footer-height)) / 22, (100vw - 2rem) / 11);
        grid-template-columns: 1fr;
        grid-template-rows: auto auto var(--footer-height);
        align-content: center;
        justify-items: center;
        row-gap: 0.75rem;
    }

    .sidebar[b-bd6i5zvbxb] {
        justify-self: center;
        width: auto;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        text-align: center;
    }

    .sidebar h1[b-bd6i5zvbxb] {
        font-size: 1.25rem;
    }

    .message[b-bd6i5zvbxb] {
        min-height: 3em;
        font-size: 0.85rem;
    }

    .controls[b-bd6i5zvbxb] {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .boards[b-bd6i5zvbxb] {
        gap: 0.75rem;
    }
}
