* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: white;
  color:black;
  transition: background-color 0.3s, color 0.3s;
}

.dark-theme {
   background-color: #333;
      color: white;
}

.dark-theme h1 {
  color: white;
}

.dark-theme .field {
  background-color: black;
}

.dark-theme .cell {
  color:#007fff;
}

.dark-theme button {
  color:white;
  background-color: black;
}

.dark-theme button:hover {
 color:white;
  background-color: rgb(36, 4, 161);
}

body {
  background-color: white;
  color:black;
  transition: background-color 0.3s, color 0.3s;
}

.main-container {
  display: grid;
  grid-template-rows: auto auto 1fr auto; 
  align-items: center;
  justify-items: center; 
  margin-top: 20px;
  font-family: 'Arial', sans-serif;
  gap: 10px; 
}

.title {
  font-size: 36px;
  color: #333;
  margin-bottom: 0; 
}

.field {
  display: grid;
  gap: 0px;
  position: relative;
  border: 1px solid #333;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  background: #fff;
   transition: width 0.3s ease-in-out, height 0.3s ease-in-out;
}

.field .cell {
  position: relative;
}

.bold-line {
  position: absolute;
  background-color: black;
  z-index: 10; 
}

.bold-line.horizontal {
  height: 3px; 
}

.bold-line.vertical {
  width: 3px; 
}

.field.size-7 {
    width: calc(7 * 22px + 6 * 2px);
     height: calc(7 * 22px + 6 * 2px);
}

.field.size-14 {
   width: calc(14 * 22px + 13 * 2px);
     height: calc(14 * 22px + 13 * 2px);
}
.field.size-20 {
    width: calc(20 * 22px + 19 * 2px);
     height: calc(20 * 22px + 19 * 2px);
}

.cell {
  position: relative;
  width: 20px;
  height: 20px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s ease-in-out; 

}

.cell:hover {
  background-color: #ccc;
  cursor: pointer;
  transform: scale(1.05);
}

.cell.active {
  background-color: #333;
}

.buttons {
  display: flex; 
  gap: 10px;
  
}

button,
.reset-button {
  padding: 10px 20px;
  font-size: 16px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 5px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Arial', sans-serif;
}

.dark {
  padding: 5px 10px;
  font-size: 8px;
  background: #fff;
  border: 2px solid #333;
  border-radius: 5px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Arial', sans-serif;
}

button:hover {
  background: #333;
  color: #fff;
  transform: scale(1.1);
}

button:active {
  transform: scale(0.98);
}

.buttons-container-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 30px; 
}

.start-game-button {
  margin-top: 20px;
  border-radius: 50%;
  padding: 20px 30px;
  font-size: 20px;
  background-color: #f006d9;
  color: rgb(16, 13, 13);
  border: none;
  cursor: pointer;
   transition: all 0.3s ease;
}

.start-game-button:hover {
  background-color: #f01408;
  color: black;
  transform: scale(1.1);
}

.win {
  z-index: 1000;
}

.filler {
   width: 20px;
    height: 20px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    background-color: rgb(55, 53, 53);
}

.grey-cell,
.grey-cell-row,
.grey-cell-col{
    background-color: rgb(204, 197, 197) ; 
    cursor: not-allowed;
    color: black; 
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  
}
.grey-cell:hover{
   transform: scale(1);
   cursor: auto;
}

.red-cell {
  background-color: rgb(132, 75, 75);
}

 .x {
    background-color: red; 
    text-align: center;
    font-size: 16px;
    color: white;
    font-weight: bold;
  }
  .x::before {
    content: "X"; 
  }

  .hidden {
    display: none;
  }

.gradient {
  font-weight: 900;
	color: transparent;    
	-webkit-background-clip: text;
	background-clip: text;
	background-image: linear-gradient(90deg, red, orange, fuchsia); 
}



  button:disabled {
  background-color: #ccc;
  color: #999;
  cursor: not-allowed;
  border: 2px solid #aaa;
  opacity: 0.9; 
}

  @media (max-width: 860px) {

 .buttons {
  flex-direction: column;
  gap: 10px;
}

.cell {
border-width: 0.5px;
  width: 20px;
  height: 20px;
}


.filler {
   width: 20px;
    height: 20px;
}

.main-container {
  gap: 3px; 
}


}


