body {
  font-family: 'Cardo', serif !important; 
  text-align: center;
  background: #fdfbe6;
  color: #333;
}

h1, .game-title {
  font-family: 'Cherry Bomb One', sans-serif;
  font-size: 65px;      /* adjust as needed */
  color: #1e3362;          /* or something more playful */
  /* text-shadow: 2px 2px 2px rgba(0,0,0,0.2);  */
  margin-top: -10px;
  margin-bottom: 10px;
}


#game-area {
  position: relative;
  display: inline-block;
}

#board-img {
  max-width: 800px; /* adjust as needed */
}

#tokens {
  position: absolute;
  top: 0;
  left: 0;
}

.token {
  position: absolute;
  width: 35px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid black;
}

.player1 { background: #5c9cff; } 
.player2 { background: #ff5c5c; } 
.player3 { background: #f5a623; }
.player4 { background: #2ec46c; } 

#controls button {
  font-family: 'Cherry Bomb One', sans-serif;
  font-size: 20px;
  padding: 10px 25px;
  margin: 5px;
  margin-top: -10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 5px 0 #333, 0 5px 10px rgba(0,0,0,0.2);
  background: linear-gradient(145deg, #ff5c5c, #ff9a9a); /* playful red gradient */
  color: #fff;
}


#controls {
  display: flex;
  justify-content: flex-end; /* keep aligned right */
  gap: 10px;
  margin-top: 20px;
  margin-right: 100px; /* move left from far right edge */
}


#controls button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #333, 0 8px 12px rgba(0,0,0,0.25);
}

#controls button:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #333, 0 3px 6px rgba(0,0,0,0.2);
}

#controls button:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
}


/* h2 { */

#scores {
  margin-top: 20px;
  /* font-weight: bold; */
}

#scoreboard {
  position: fixed;
  top: 200px;
  left: 100px;
  width: 180px;
  background: #fdfbe6;
  border: 3px solid #333;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
  color: #333;
}

#scoreboard h2 {
  text-align: center;
  margin-bottom: 10px;
  font-size: 24px;
}

#scoreboard ul {
  list-style: none;
  padding: 0;
}

#scoreboard ul li {
  font-size: 20px;
  margin: 8px 0;
}

#dice-result {
  position: fixed;
  top: 610px;         
  right: 145px;   
  /* font-weight: bold;       */
  font-size: 20px;
  color: #333;
  text-align: center;
}


#winner {
  position: fixed; /* or absolute, depending on your needs */
  bottom: 100px;    /* distance from bottom of the window */
  left: 52%;
  transform: translateX(-50%);
  font-size: 40px;
  font-weight: bold;
  color: #333;
  text-align: center;
  z-index: 200;    /* above other elements */
}


@keyframes sink {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  50%  { transform: translateY(40px) scale(0.9); opacity: 0.7; }
  100% { transform: translateY(100px) scale(0.5); opacity: 0; }
}

.token.sinking {
  animation: sink 0.6s forwards ease-in;
}


/* Rules */
/* Info button */
#info-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  background: #1e3362;
  color: #fdfbe6;
  font-weight: bold;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

/* Modal overlay */
#rules-modal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
}

/* Modal content */
#rules-content {
  background: #fdfbe6;
  border-radius: 12px;
  text-align: left; 
  padding: 25px 25px;
  max-width: 600px;
  margin: 25px auto;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  color: #333;
  position: relative;
  max-height: 85vh;   /* makes sure it fits inside the screen */
  overflow-y: auto;
}

/* Close button */
#close-rules {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}