:root {
  color-scheme: light dark;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #20283a, #0f121b);
  color: #f4f6ff;
}

.container {
  width: min(760px, 92vw);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

h1,
h2 {
  margin-top: 0;
}

.intro {
  margin-bottom: 1rem;
  opacity: 0.95;
}

.board {
  display: grid;
  grid-template-columns: repeat(var(--door-columns, 3), minmax(110px, 1fr));
  gap: 0.8rem;
  margin-block: 1rem;
}

.door {
  border: none;
  border-radius: 12px;
  min-height: 150px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  background: #d8914f;
  color: #2f1a05;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.door:hover:enabled {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.door.selected {
  outline: 3px solid #6ec3ff;
}

.door.open {
  background: #f0ebe2;
}

.door.goat.open {
  color: #71330f;
}

.door.car.open {
  color: #0d622f;
}

.controls {
  margin-bottom: 1rem;
}

.door-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.door-count input {
  width: 80px;
  border-radius: 8px;
  border: none;
  padding: 0.4rem 0.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

button {
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#stayBtn,
#switchBtn {
  background: #5aa9f3;
  color: #03223f;
}

#resetBtn {
  background: #d4d8e3;
  color: #1e2432;
}

.stats {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}
