body {
  margin: 0;
  background: #050505;
  color: #00ff00;
  font-family: monospace;
  display: flex;
  justify-content: center;
}

.system {
  width: 500px;
}

header {
  padding: 10px 0;
  border-bottom: 1px solid #00ff00;
}

#status-text {
  padding: 10px 0;
  opacity: 0.7;
}

#grid {
  display: grid;
  grid-template-columns: repeat(8, 50px); /* 8 columns */
  grid-auto-rows: 50px;
  gap: 5px;
}

.cell {
  width: 50px;
  height: 50px;
  border: 1px solid #00ff00;
  cursor: pointer;
}

.cell.active {
  background: #00ff00;
  color: black;
}

button {
  background: transparent;
  border: 1px solid #00ff00;
  color: #00ff00;
  padding: 5px 10px;
  cursor: pointer;
}

.playing-col {
  outline: 2px solid #00ff00;
  background: rgba(0, 255, 0, 0.1);
}

.grid-wrapper {
  display: flex;
}

#labels {
  display: flex;
  flex-direction: column;
  margin-right: 5px;
}

.label {
  height: 50px;
  display: flex;
  align-items: center;
  font-size: 12px;
  opacity: 0.7;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  pointer-events: none;

  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 0, 0.05),
    rgba(0, 255, 0, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );

  z-index: 999;
}

body {
  margin: 0;
  background: #050505;
  color: #00ff00;
  font-family: "Courier New", monospace;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  min-height: 100vh;
  padding-top: 40px;
}

.system {
  width: fit-content;
  max-width: 95vw;
}

.grid-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#labels {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.label {
  height: 50px;
  display: flex;
  align-items: center;
  font-size: 12px;
  opacity: 0.8;
}

#grid {
  display: grid;
  gap: 6px;
}

.controls {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

button:focus {
  outline: none;
  box-shadow: 0 0 8px #00ff00;
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 8px #00ff00;
}

button:hover {
  background: #00ff00;
  color: black;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: #00ff00;
  border-radius: 5px;
  box-shadow: 0 0 5px #00ff00;
}

::-webkit-scrollbar-thumb:hover {
  background: #00cc00;
}

input[type="number"] {
  background: #050505;
  color: #00ff00;
  border: 1px solid #00ff00;

  font-family: "Courier New", monospace;
  padding: 4px;
  width: 60px;

  outline: none;
}

/* Chrome, Safari, Edge */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]:focus {
  box-shadow: 0 0 6px #00ff00;
}

.grid-controls {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.grid-wrapper {
  margin-top: 10px;
}