body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

header a {
    color: black;
    text-decoration: none;
}

header a:hover {
    text-decoration: underline;
}

h1 {
    font-weight: 200;
}

main {
    margin: 0;
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.5em;
    overflow: hidden; 
    min-height: 60vh;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    main {
        font-size: 1.2em;
    }
}

#grid {
    display: grid;
    grid-template-columns: repeat(10, 50px);
    grid-template-rows: repeat(10, 50px);
    gap: 3px;
    border: 1px solid black;
    padding: 5px;
}
.cell {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    font-size: 1.2rem;
    font-weight: bold;
    user-select: none;
    box-sizing: border-box;
}
.cell:hover {
    border: 1px solid black;
}
.hit {
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    color: blue;
}
.miss {
    background: #fff;
    color: red;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}
.hit-circle {
    width: 20px;
    height: 20px;
    background: #2196F3;
    border-radius: 50%;
}
.note {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 1rem;
    border: 1px solid black;
    z-index: 100;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    display: none;
}
.note img {
    max-width: 100%;
    display: block;
    margin: 0.5rem 0;
}
.note button {
    border: 1px solid black;
    background-color: white;
    font-family: inherit;
}
.note button:hover {
    background-color: black;
    color: white;
}
.close-note {
    display: block;
    margin-top: 1rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
}
