

body {
  background-color: #1e1f1e;
  color: #e1e0d7;
  font-family: 'Georgia', serif;
  margin: 0;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}


.container {
  text-align: center;
  max-width: 600px;
  width: 100%;
}


#game {
  display: grid;
  grid-template-columns: repeat(12, 30px); /* Fast bredde */
  gap: 2px;
  margin: 20px auto;
  justify-content: center; /* ← dette centrerer indhold i grid’et */
}

.cell {
  width: 30px;
  height: 30px;
  background-color: #3e4e3f;
  border: 1px solid #2a2a2a;
  cursor: pointer;
}

@media (max-width: 600px) {
  #game {
    width: 100vw;
    gap: 2px;
    padding: 0; /* valgfrit – fjerner luft rundt om */
    grid-template-columns: repeat(12, calc((100vw - 22px) / 12)); /* 11 gaps à 2px = 22px */
  }

  .cell {
    width: calc((100vw - 22px) / 12);
    height: calc((100vw - 22px) / 12);
  }
}

.cell.safe {
  background-color: #6b8f71;
}

.cell.danger {
  background-color: #5c2a2a;
}

.cell.goal {
  background-color: #c9b068;
}

.cell.start {
  background-color: #68a0a0;
}

.cell.path {
  background-color: #88bba3;
}

@keyframes glow {
  0% { box-shadow: 0 0 5px #ffe79a; }
  50% { box-shadow: 0 0 15px #ffd85c; }
  100% { box-shadow: 0 0 5px #ffe79a; }
}

.cell.win {
  animation: glow 1.5s ease-in-out infinite;
}


@keyframes shake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0, 0); }
}

.cell.death {
  background-color: #e07b39;
  animation: shake 0.4s ease;
}

#status {
  margin-top: 10px;
  font-weight: bold;
}

button {
  padding: 8px 16px;
  background-color: #344e41;
  color: white;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

button:hover {
  background-color: #3a5a48;
}

.mosen-button {
  display: inline-block;
  background-color: #5a7c4f;
  color: #f0f0d8;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  border: 2px solid #8fa87c;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.mosen-button:hover {
  background-color: #7ca26b;
  color: #fff;
  border-color: #cde2b6;
}

