.container {
  width: 70%;
  margin: auto;
  text-align: center;
}

.dice-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 40px);
  box-sizing: border-box;
  width: min(100%, 560px);
  margin: 16px auto 24px;
  padding: 32px 20px;
  border: 8px solid #46655e;
  border-radius: 48px;
  background: radial-gradient(ellipse at center, #304b43, #1c302b);
  box-shadow:
    inset 0 4px 14px rgba(0, 0, 0, 0.5),
    inset 0 0 0 2px rgba(159, 220, 192, 0.2),
    0 6px 0 #182b25,
    0 14px 24px rgba(0, 0, 0, 0.3);
}

.dice {
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  max-width: 200px;
}

body {
  background-color: #393E46;
}

h1 {
  margin: 30px;
  font-family: 'Lobster', cursive;
  text-shadow: 5px 0 #232931;
  font-size: 5rem;
  color: #4ECCA3;
}

h2 {
  margin: 30px;
  font-family: 'Lobster', cursive;
  text-shadow: 5px 0 #232931;
  font-size: 5rem;
  color: #4ECCA3;
}

p {
  font-size: 2rem;
  color: #4ECCA3;
  font-family: 'Indie Flower', cursive;
}

.status-board {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.timer-settings,
.turn-timer {
  margin: 16px 0;
  color: #fefae0;
  font-family: 'Indie Flower', cursive;
  font-size: 1.5rem;
}

.timer-settings select,
.timer-settings input {
  margin: 8px;
  padding: 8px 12px;
  border: 2px solid #4ECCA3;
  border-radius: 8px;
  background: #232931;
  color: #EEEEEE;
  font: inherit;
}

.timer-settings input {
  width: 100px;
}

.turn-timer {
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.turn-timer.is-urgent {
  color: #ffad80;
}

.player-badge {
  min-width: 170px;
  padding: 14px 18px;
  border: 2px solid #4ECCA3;
  border-radius: 16px;
  background: linear-gradient(145deg, #232931, #2d3641);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  color: #EEEEEE;
  font-family: 'Indie Flower', cursive;
}

.player-badge.is-active {
  border-color: #ffad66;
  box-shadow: 0 0 50px rgba(255, 153, 64, 0.5);
  transform: translateY(-2px);
}

.player-badge__name {
  margin-bottom: 8px;
  font-size: 1.7rem;
  color: #fefae0;
}

.player-badge__stats {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background-color: #4ECCA3;
  color: #14213d;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.03em;
}

.status-message {
  width: 100%;
  margin-bottom: 6px;
  color: #fefae0;
  font-family: 'Indie Flower', cursive;
  font-size: 1.5rem;
}

img {
  width: 80%;
}

.dice img.is-rolling {
  animation: dice-roll 280ms ease-in-out infinite;
}

@keyframes dice-roll {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(-14deg); }
  75% { transform: translateY(-6px) rotate(14deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dice img.is-rolling {
    animation: none;
  }
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-container {
  margin: 24px 0 16px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.button-container button {
  flex: 1 1 120px;
  max-width: 240px;
}

.menu-buttons > button {
  margin: 8px;
}

#next-round {
  margin-top: 24px;
}

.stop-button {
  width: 40%;
  height: auto;
  font-size: 24px;
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 5px;
  background-color: #4ECCA3;
  padding: 1%;
}

.stop-button:hover {
  background-color: #4ECCA3;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(4, 217, 18, 0.8);
}

button {
  width: 40%;
  height: auto;
  min-height: 64px;
  padding: 12px 16px;
  font-size: 24px;
  color: white;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 5px;
  background-color: #4ECCA3;
}

button:hover {
  background-color: #4ECCA3;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(4, 217, 18, 0.8);
}

footer {
  margin-top: 5%;
  color: #EEEEEE;
  text-align: center;
  font-family: 'Indie Flower', cursive;
}

input[type="text"] {
  width: 280px;
  padding: 12px 16px;
  font-size: 1.4rem;
  font-family: 'Indie Flower', cursive;
  color: #EEEEEE;
  background-color: #232931;
  border: 2px solid #4ECCA3;
  border-radius: 8px;
  outline: none;
  text-align: center;
  box-shadow: 0 0 12px rgba(78, 204, 163, 0.15);
}

input[type="text"]::placeholder {
  color: rgba(238, 238, 238, 0.6);
}

input[type="text"]:focus {
  border-color: #fefae0;
  box-shadow: 0 0 18px rgba(254, 250, 224, 0.35);
}

.is-hidden {
  display: none;
}
