:root {
  --bg-dark: #111520;
  --card-dark: #282e37;
  --text-light: #f8fafc;
  --text-subtle: #94a3b8;
  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --border: #334155;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background: var(--bg-dark);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

header {
  color: var(--text-light);
  text-align: center;
  padding: 1rem 0;
}
header h1 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 1.25px;
}
header p {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

button {
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: var(--accent);
  color: var(--bg-dark);
  transition: all 0.2s ease;
}
button:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

footer {
  margin-top: auto;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-subtle);
}
footer a {
  color: var(--text-subtle);
}

#game {
  --grid-size: 5;
  --cell-size: 11vmin;
  --cell-gap: 0.5vmin;
  user-select: none;
  display: grid;
  grid-template-columns: repeat(var(--grid-size), var(--cell-size));
  grid-template-rows: repeat(var(--grid-size), var(--cell-size));
  background-color: var(--card-dark);
  gap: var(--cell-gap);
  border: 3px solid var(--border);
  border-radius: 1vmin;
  padding: var(--cell-gap);
  position: relative;
  box-shadow:
    0 0 5px rgba(139, 92, 246, 0.1),
    0 0 15px rgba(139, 92, 246, 0.05);
}

.cell {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 1vmin;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.1s ease;
}
.cell.on {
  background-color: #c4b5fd;
  box-shadow:
    0 0 4px rgba(139, 92, 246, 0.5),
    0 0 8px rgba(139, 92, 246, 0.3),
    0 0 16px rgba(139, 92, 246, 0.2);

  transform: scale(1.03);
}
.cell.off {
  background-color: var(--card-dark);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}
.cell:active {
  transform: scale(0.92);
}
