body {
  margin: 0;
  padding: 0;
  font-family: 'Fredoka', sans-serif;
  background: linear-gradient(145deg, #fdf6e3, #ffe4ec);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  position: relative;
  text-align: center;
  background: #fffaf0;
  padding: 30px;
  border-radius: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

.title {
  font-size: 2.8rem;
  color: #FF8C00;
  animation: bounce 1.2s infinite alternate;
  margin-bottom: 10px;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

.status {
  font-size: 1.3rem;
  margin: 15px 0;
  color: #333;
}

.cell {
  width: 60px;
  height: 60px;
  background-color: #e0f7fa;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.cell:hover {
  transform: scale(1.1);
  background-color: #b2ebf2;
}

.restart-button,
.undo-button {
  margin-top: 20px;
  font-size: 1.2rem;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  border: none;
  transition: background 0.3s;
}

.restart-button {
  background-color: #FF8C00;
  color: white;
}

.restart-button:hover {
  background-color: #FF8C00;
}

.undo-button {
  background-color: #FF8C00;
  color:white;
  font-weight: bold;
  margin-left: 10px;
}

.undo-button:hover {
  background-color: #FF8C00;
}

.red {
  color: red;
  font-weight: bold;
  font-size: 1.6rem;
}

.blue {
  color: blue;
  font-weight: bold;
  font-size: 1.6rem;
}

.highlight {
  outline: 3px dashed #8888ff;
  cursor: pointer;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(6, 60px);
  grid-gap: 10px;
  z-index: 2;
  position: relative;
}

.svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.board-wrapper {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.rules-float {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.rules-button {
  background-color: #FF8C00;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s, transform 0.2s;
}

.rules-button:hover {
  background-color: #f4832d;
  transform: scale(1.05);
}

.rules-panel {
  position: absolute;
  top: 50px;
  right: 0;
  background-color: #fffaf0;
  border-radius: 15px;
  padding: 15px 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  width: 240px;
  animation: fadeIn 0.3s ease-in-out;
}

.rules-panel.hidden {
  display: none;
}

.rules-panel h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: #ff4d4d;
}

.rules-panel ul {
  padding-left: 20px;
  text-align: left;
  margin: 0;
  font-size: 0.95rem;
  color: #444;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.board-container {
  position: relative;
  display: inline-block;
}

.character {
  position: absolute;
  width: 80px;
  height: auto;
  pointer-events: none;
  z-index: 10;
}

/* 🐻 Bear at top-left, clearly visible */
.bear-character {
  top: -40px;
  left: -35px;
}

/* 🐰 Rabbit at bottom-right, nicely visible */
.rabbit-character {
  bottom: -30px;
  right: -40px;
}

* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
