/* Reset / Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background-color: #121212;
  color: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Layout */
.container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin-bottom: 20px;
  color: #3074bb;
  text-shadow: 0 0 10px #3074bb;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  grid-gap: 6px;
  justify-content: center;
  margin: 20px;
}

.cell {
  display: flex;
  justify-content: flex-start;
  padding-left: 5px;
  width: 60px;
  height: 60px;
  background-color: #333;
  border: 2px solid #444;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;

}

.number {
    color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.black {background-color: black;}
.blue {background-color: blue;}
.green {background-color: green;}
.grey {background-color: grey;}
.orange {background-color: orange;}
.pink {background-color: pink;}
.violet {background-color: purple;}
.red {background-color: red;}
.white {background-color: white;}
.yellow {background-color: yellow;}


.cell:hover {
  transform: scale(1.05);
  border-color: #888;
}

/* Button styling */
button {
  padding: 12px 24px;
  background-color: #00bcd4;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 188, 212, 0.3);
  transition: background-color 0.2s, transform 0.2s;
}

button:hover {
  background-color: #0097a7;
  transform: translateY(-2px);
}

.controls {
  margin-bottom: 20px;
}

.controls button {
  margin: 0 5px;
}

.input-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.input-box input {
  padding: 8px;
  font-size: 16px;
  width: 300px;
  border: none;
  border-radius: 6px;
}

.input-box button {
  padding: 8px 16px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.input-box button:hover {
  background-color: #388e3c;
}

.layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 40px;
  padding: 20px;
}

.rules {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.rules h2 {
  color: #3074bb;
  margin-bottom: 10px;
}

.rules ul {
  list-style-type: disc;
  padding-left: 20px;
  line-height: 1.6;
}

#grid-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 280px;
  height: 280px;
  margin: 20px;
}

#corner-tl,
#corner-tr,
#corner-bl,
#corner-br {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 10;
  border-radius: 4px;
}

#corner-tl { top: -5px; left: -5px;}
#corner-tr { top: -5px; right: -5px;}
#corner-bl { bottom: -5px; left: -5px;}
#corner-br { bottom: -5px; right: -5px;}


#corner-links {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 12px;
  z-index: 1000;
}

.icon-link {
  display: inline-block;
  width: 32px;
  height: 32px;
  background-color: white;
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.icon-link img {
  width: 100%;
  height: 100%;
  filter: invert(0); /* black icon on white background */
}

.icon-link:hover {
  transform: scale(1.1);
}

.solution {
    display: inline-block;
    color: black;
    background-color: #f8f8f8;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}
.censored {
    filter: blur(8px);
    transition: filter 0.3s ease;
}

#known-patterns-div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  padding: 10px;
}

.grid-item {
  background-color: #040404;
  border: 1px solid #ccc;
  padding: 5px;
  text-align: center;
  font-family: sans-serif;
  border-radius: 6px;
}

#blur-btn {
    padding: 5px;
}

#blur-game-rule-btn {
    padding: 5px;
}