html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  /* Background (image + gradient fallback). Replace the image path if needed */
  background-image: url("imgs/z12.jpg"), linear-gradient(#001133, #000811);
  background-size: cover, cover; /* ensure image fills viewport */
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed; /* keeps background fixed while scrolling */
  background-position: center center;
  background-color: #000811; /* fallback color */
  color: white;
  min-height: 100vh;
}

#app {
  text-align: center;
  padding: 20px;
}

h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

#controls {
  padding: 20px;
  background-color: rgb(36, 36, 136);
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

select,
button,
input {
  padding: 12px;
  font-size: 18px;
  margin: 10px;
  border-radius: 8px;
  border: none;
}

button {
  background-color: darkorchid;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  min-width: 120px;
  transition: background 0.15s ease, filter 0.15s ease;
}

button:disabled {
  background: #666;
  cursor: not-allowed;
}

.result {
  font-size: 48px;
  margin: 30px;
  min-height: 70px;
  font-weight: bold;
  text-shadow: 0 0 10px #fff;
}

.gelt-display {
  margin: 30px;
  font-size: 24px;
}

.coin {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: gold;
  border-radius: 50%;
  margin: 3px;
  box-shadow: 0 0 12px #ff0;
  animation: shine 2s infinite;
}

@keyframes shine {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.pot {
  font-size: 28px;
  margin-bottom: 15px;
}
.player {
  margin: 10px 0;
}

.player-controls {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-color {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Spacer between control area and play/canvas area */
.spacer {
  height: 28px; /* adjust as needed */
  width: 100%;
}

/* Override / enhancements for button glow and clicked state (placed here to override earlier rules if necessary) */
button {
  transition: background 0.15s ease, filter 0.15s ease, box-shadow 0.18s ease,
    transform 0.06s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Show mediumpurple only while hovered and button has been clicked */
button.clicked:hover {
  background: mediumpurple !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(147, 112, 219, 0.36) !important;
  border-color: rgba(147, 112, 219, 0.6) !important;
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px rgba(147, 112, 219, 0.12), 0 6px 20px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 8px 20px rgba(147, 112, 219, 0.28);
}
