* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  background: #0f0f11;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  min-height: 100vh;
  user-select: none;
}

h1 {
  font-size: 1.75rem;
  background: linear-gradient(135deg, #5c7cfa, #3f52e8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  text-align: center;
}

.description {
  max-width: 560px;
  margin-bottom: 1.2rem;
  color: #aaa;
  font-size: 0.95rem;
  text-align: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

input[type="color"] {
  width: 50px;
  height: 30px;
  border: 1px solid #2a2b30;
  border-radius: 4px;
  cursor: pointer;
  background: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(15, 25px);
  grid-template-rows: repeat(15, 25px);
  gap: 1px;
  padding: 4px;
  background: #1a1b1f;
  border: 1px solid #2a2b30;
  border-radius: 8px;
  margin-bottom: 1.2rem;
}

.cell {
  width: 25px;
  height: 25px;
  background: #000;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn {
  background: linear-gradient(135deg, #5c7cfa, #3f52e8);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn:hover {
  background: linear-gradient(135deg, #748efa, #5a68f5);
  transform: scale(1.03);
}

textarea {
  width: 100%;
  max-width: 760px;
  height: 140px;
  background: #1a1b1f;
  color: #e0e0e0;
  border: 1px solid #2a2b30;
  border-radius: 8px;
  padding: 0.9rem;
  font-family: monospace;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 0.6rem;
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(15, 20px);
    grid-template-rows: repeat(15, 20px);
  }

  .cell {
    width: 20px;
    height: 20px;
  }

  button {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
  }

  textarea {
    font-size: 0.85rem;
  }
}
