body {
    margin: 0 auto;
    font-family: sans-serif;
    background-color: #f2f4f6;
}

.container {
    width: 1280px;
    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: 55px;
    height: 55px;
    /*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: #1a2caf;
    /*background: #ffffff;*/
    /*border-radius: 10px;*/
    line-height: 40px;
    padding: 0 10px 5px;
    /*box-shadow: 0 0 4px #a8a8a8;*/
    cursor: pointer;
    transition: color 0.2s ease;
}

.title span:active {
    color: #162495;
}

.line__title {
    width: 350px;
    border-bottom: 1px solid #e1e1e1;
    margin-top: 15px;
}

.container__subtitle {
    width: 220px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-right: 40px;
}

.subtitle {
    min-width: 150px;
    font-size: 20px;
    margin: 0;
}

.gamer {
    min-width: 37px;
    height: 23px;
    border-radius: 15px;
    padding: 3px;
    box-sizing: border-box;
}

.gamer-red {
    background-color: #d42f2f;
}
.gamer-blue {
    background-color: #1a2caf;
}

.count {
    color: #f2f4f6;
    font-size: 16px;
    margin: 0;
    text-align: center;
}

.container__field {
    width: 1276px;
    height: 1026px;
    position: relative;
    margin: 10px 0;
}

.field {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to right, #5ea6bd 1px, transparent 1px),
    linear-gradient(to bottom, #5ea6bd 1px, transparent 1px);
    background-size: 25px 25px; /* Размер клетки */
    background-color: #fff; /* Фон поля */
    box-shadow: 0 0 3px #a8a8a8;
    position: relative;
    left: 0;
    top: 0;
}

#game-field {
    display: grid;
    grid-template-rows: repeat(40, 22px);
    grid-template-columns: repeat(50, 22px);
    gap: 3px;
    position: absolute;
    top: 1.4%;
    left: 1.1%;
}

.cell {
    position: relative;
    right: 0;
    bottom: 0;
}

.cell:hover {
    cursor: pointer;
    background-color: #f2f4f6;
    border-radius: 50%;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: absolute;
    right: 18%;
    bottom: 20%;
    /*!*right: 3.9px;*! 17*/
    /*bottom: 3.8px;*/
}

.gamer1 {
    background-color: #d42f2f;;
}

.gamer2 {
    background-color: #1a2caf;
}

.red {
    color: #d42f2f;
    opacity: 1;
}

.blue {
    color: #1a2caf;
    opacity: 1;
}

.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: #ED6B1A;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    color: #fff;
}

.start-over:hover {
    background-color: #ff6c11;
    cursor: pointer;
}

.start-over:active {
    background-color: #ff9900;
    /*transform: scale(1.1);*/
}

.rules {
    cursor: pointer;
    transition: transform 0.3s ease;
    color: #535353;
}

.rules:hover {
    color: #929292;
}

.rules:active {
    transform: scale(1.2);
}

.popup {
    padding: 15px;
    background-color: #f2f4f6;
    box-sizing: border-box;
    box-shadow: 0 0 4px #929292;
    text-align: center;
    position: absolute;
    right: 0;
    top: -35px;
}

.rules-game {
    width: 630px;
    height: 500px;
    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; /* Линии не будут блокировать клики */
}

.color-points {
    opacity: .3;
}



