body {
    margin: 0 auto;
    font-family: sans-serif;
}

.container {
    width: 1005px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 12px 0 0;
    align-items: start;
}

.box__logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 30px;
    height: 30px;
    border: 9px dashed #4d8da0;
    border-radius: 50%;
    /*cursor: pointer;*/
    /*transition: transform 0.8s ease;*/
    transition-property: transform;
    transition-duration: 2s;
    transition-timing-function: linear;
}

.logo:hover {
    transform: rotate(360deg);
}

.info__text {
    font-size: 14px;
    color: #cfcfcf;
    margin-top: 10px;
}

.title {
    color: #51516e;
    font-size: 36px;
    margin: 0;
}

.title span {
    color: #24859c;
    background: #ffffff;
    /*border-radius: 10px;*/
    line-height: 40px;
    padding: 0 10px 5px;
    /*box-shadow: 0 0 4px #a8a8a8;*/
    cursor: pointer;
}

.title span:active {
    color: #1f6e87;
}

.subtitle {
    min-width: 150px;
    font-size: 20px;
    margin: 0;
}

.container__field {
    width: 1001px;
    height: 521px;
    position: relative;
    margin: 10px 0;
}

.field {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, #4d8da0 1px, transparent 1px),
    linear-gradient(to bottom, #4d8da0 1px, transparent 1px);
    background-size: 40px 40px; /* Размер клетки */
    background-color: #fff; /* Фон поля */
    box-shadow: 0 0 3px #a8a8a8;
    position: relative;
    left: 0;
    top: 0;
}

#game-field {
    display: grid;
    grid-template-rows: repeat(12, 30px);
    grid-template-columns: repeat(24, 30px);
    gap: 10px;
    position: absolute;
    top: 4.75%;
    left: 2.5%;
}

.cell {
    position: relative;
    right: 0;
    bottom: 0;
}

.cell:hover {
    cursor: pointer;
    background-color: #f2f4f6;
    border-radius: 50%;
}

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    right: 16%;
    bottom: 16%;
}

.gamer1 {
    background-color: #d42f2f;
}

.gamer2 {
    background-color: #569e34;
}

.red {
    color: #d42f2f;
}

.green {
    color: #569e34;
}

.popup {
    padding: 15px;
    background-color: #f2f4f6;
    box-sizing: border-box;
    border-radius: 0px;
    box-shadow: 0 0 4px #929292;
    text-align: center;
    position: absolute;
    left: 55%;
    bottom: 33%;
}

.end-game_visible {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.close {
    width: 20px;
    height: 20px;
    background-image: url("./images/close-icon-13577.png");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    right: 15px;
    top: 15px;
    transition: transform 0.3s ease;
    opacity: 1;
}

.close:hover {
    transform: scale(1.2);
    cursor: pointer;
}

.close:active {
    opacity: .8;
}

.blocked {
    pointer-events: none;
}

.start-over {
    border: none;
    width: 150px;
    height: 45px;
    padding: 5px;
    font-size: 16px;
    border-radius: 10px;
    background-color: #94c2d7;
    transition: transform 0.1s ease;
    box-sizing: border-box;
    color: #fff;
}

.start-over:hover {
    background-color: #69aac1;
    cursor: pointer;
}

.start-over:active {
    transform: scale(1.1);
}

.rules {
    cursor: pointer;
    transition: transform 0.3s ease;
    color: #535353;
}

.rules:hover {
    color: #929292;
}

.rules:active {
    transform: scale(1.2);
}

.rules-game {
    width: 450px;
    height: 350px;
    display: none;
}

.rules-game_visible {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.rules-game__text {
    color: #535353;
    line-height: 1.6;
    text-align: justify; /* Выравнивание по ширине */
    hyphens: auto; /* Автоматический перенос слов */
    word-break: break-word; /* Перенос длинных слов */
}

.line {
    position: absolute;
    background-color: red;
    height: 4px; /* Толщина линии */
    transform-origin: 0 0;
    z-index: 1;
}

.lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Линии не будут блокировать клики */
}

