/* reset.css */

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 5. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 7. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
    9. Create a root stacking context
  */
#root,
#__next {
  isolation: isolate;
}

html {
  font-size: 10px;
}

button {
  background: none;
  color: inherit;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: inherit;
}

/* variables */

[data-theme="light"] {
  --bg: #f0eed4;
  --main-dark: #524f42;
  --primary-dark: #909a45;
  --main-light: #524f42;
  --primary-bright: #a9c82e;
  --font-family: "Unbounded", sans-serif;
  --second-family: "Blaka", sans-serif;
  --btn-text: #f2efe4;
}

[data-theme="dark"] {
  --bg: #323736;
  --main-dark: #323736;
  --primary-dark: #bcca85;
  --main-light: #f7f4e9;
  --dark-text-color: #323736;
  --primary-bright: #abc932;
  --font-family: "Unbounded", sans-serif;
  --second-family: "Blaka", sans-serif;
  --btn-text: #323736;
}

body {
  background-color: var(--bg);
}

/* typography */

.h1 {
  cursor: default;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 4.8rem;
  color: var(--primary-dark);
}

.p {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--main-light);
}

.h2 {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 3.2rem;
  color: var(--primary-dark);
}

.h1-logo {
  position: relative;
  bottom: 3px;
}

.feedback {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 1.4rem;
  text-align: center;
  color: var(--primary-bright);
}

.primary-btn {
  border-radius: 10px;
  padding: 5px 10px;
  background: var(--primary-dark);
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 2rem;
  text-align: center;
  color: var(--btn-text);
  transition: all 0.2s;
}

.secondary-btn {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 2rem;
  color: var(--main-light);
  transition: all 0.2s;
  position: relative;
}

.secondary-btn svg path {
  stroke: var(--primary-dark);
}

.secondary-btn::after {
  content: " ";
  position: absolute;
  left: 22px;
  top: 33px;
  width: calc(100% - 22px);
  height: 2px;
  background-color: var(--primary-dark);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.2s;
  transform-origin: right;
}

.svg-btn svg path {
  transition: all 0.2s;
}

.options__select {
  border: 1px solid var(--main-light);
  border-radius: 10px;
  width: 100%;
  height: 40px;
  color: var(--main-dark);
  padding: 0px 10px;
  background: #f7f4e9;
}

.option-container {
  width: 100%;
}

.options {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 2rem;
}

.options select {
  cursor: pointer;
  appearance: none;
}

.options select:focus {
  outline: none;
}

.wrapper {
  width: 100%;
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 15px 10px;
}

.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main {
  display: flex;
  gap: 20px;
}

.game-info {
  width: max(20%, 240px);
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

.game-description {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-info__game-options {
  display: flex;
  gap: 10px;
  flex-direction: column;
  align-items: flex-start;
  width: 90%;
}

.game-info__game-options .primary-btn {
  margin-top: 10px;
}

.secondary-actions {
  display: flex;
  gap: 30px;
}

.game-field {
  border: 1px solid var(--main-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  padding: 10px 20px;
  background-color: #f7f4e9;
  border-radius: 10px;
}

.timer {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 2rem;
  color: var(--main-dark);
}

.game-field__upper-container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.game-field__controls {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

th,
td {
  border: 2px solid var(--main-dark);
}

.nonogram {
  border-color: transparent;
  border-collapse: collapse;
  margin-bottom: 20px;
}

tr td:nth-of-type(5n + 1) {
  border-right: 3px solid var(--main-dark);
}

tr:nth-child(1) td {
  border-left: 0px;
  border-top: 0px;
  border-left: 0px;
  text-align: center;
  vertical-align: bottom;
}

tr td:first-of-type {
  border-left: 0px;
  text-align: right;
  padding-right: 5px;
}

tr:nth-child(5n + 1) td {
  border-bottom: 3px solid var(--main-dark);
}

.nonogram-input-cell {
  cursor: pointer;
  transition: all 0.1s;
  text-align: center;
}

.cell-big {
  width: 35px;
  height: 35px;
  font-size: 19px;
}

.cell-small {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.cell-middle {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.nonogram-clue-cell {
  position: center;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 12px;
  color: var(--main-dark);
  letter-spacing: 3px;
}

.nonogram-clue {
  padding: -1px;
}

.cell-checked {
  background-color: var(--main-dark);
}

.cell-crossed::before {
  content: "✖";
  font-family: var(--font-family);
  color: #323736;
}

.game-info__btn-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


