* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  color: black;
}

body.light-mode {
  background-color: rgb(216, 228, 239);
}

body.night-mode {
  background-color: gray;
}

.header.light-mode {
  background: #ccf5a2;
  margin-bottom: 10px;
}

.header.night-mode {
  background: #811d7c;
}

.header__wrapper,
.container {
  max-width: 1440px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
}

.header__btn.light-mode {
  background: rgb(252, 222, 55);
  border-radius: 10px;
  border: solid 1px;
  cursor: pointer;
}

.header__sound {
  border-radius: 5px;
  background-color: transparent;
  border: none;
}

.header__btn,
.header__sound,
.header__nonograms,
.header__link {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header__title,
.header__nonograms,
.header__link {
  margin-left: 10px;
}

.header__btn-img,
.header__sound-img,
.header__nonograms-image,
.header__link-image {
  width: 30px;
  height: 30px;
}

.header__sound {
  margin-left: auto;
}

.container {
  flex-direction: row;
  padding: 0px 10px;
  gap: 30px;
}

.section__table {
  display: flex;
  justify-content: center;
  align-items: center;
}

.section__table-field {
  border-spacing: 0px;
  border-collapse: collapse;
  border: 1px solid black;
  user-select: none;
}

td,
th {
  width: 30px;
  height: 30px;
  padding: 4px;
  line-height: 1.5;
  white-space: nowrap;
  font-size: 16px;

  &:nth-child(5n + 1) {
    border-right: 2px solid black;
  }
}

tr {
  &:nth-child(5n + 1) {
    td,
    th {
      border-bottom: 2px solid black;
    }
  }
}

th {
  background-color: #ffffff;
}

th.night-mode {
  background-color: rgb(141, 141, 228);
}

.highlight {
  background-color: rgb(229, 241, 177);
}

td {
  border-top: 1px solid #aaa;
  border-left: 1px solid #aaa;
  position: relative;
}

td:hover {
  opacity: 0.75;
}

.pressed {
  background-color: black;
}

td.mark:before {
  content: "";
  position: absolute;
  display: block;
  width: auto;
  height: auto;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0)
    url(https://paulradzkov.com/2012/crosswise/cross.svg) no-repeat;
  background-size: 100% 100%;
}

.section__setting,
.section__setting-field,
.section__setting-btn {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.section__setting-field {
  margin-bottom: 10px;
}

.legend {
  margin-bottom: 10px;
}

.setting-wrap {
  display: flex;
  gap: 10px;
}

.input-height,
.input-width {
  max-width: 40px;
  padding: 3px;
}

.section__setting-btn {
  gap: 10px;
  flex-direction: row;
}

.btn {
  padding: 5px;
  border-radius: 10px;
  cursor: pointer;
}

.btn.night-mode {
  background-color: rgb(141, 141, 228);
}

.section__setting-time {
  margin-bottom: 40px;
  border: 7px solid white;
  padding: 10px;
}

@media screen and (max-width: 700px) {
  .header__wrapper,
  .container {
    padding: 5px 20px;
  }

  .header {
    margin-bottom: 10px;
  }

  .header__title {
    font-size: 25px;
  }

  th {
    font-size: 10px;
  }

  .section__setting-btn {
    flex-direction: column;
  }
}
