/* Toroidal donut catch mini-game on the propeller print page */

.propeller-credit {
  text-align: center;
}

.donut-catch {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1rem 1.65rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgb(196 137 58 / 12%), transparent 55%),
    var(--primary-color);
  border: 1px solid var(--secondary-color);
  border-radius: 12px;
}

.rpi-container .donut-catch-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin: 0;
  text-align: center;
  font-family: Bungee, Impact, fantasy;
  font-size: clamp(1.5rem, 5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.donut-catch-tagline {
  margin: 0.45rem 0 1.15rem;
  text-align: center;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  font-style: italic;
  font-weight: 400;
  color: var(--text-color);
  opacity: 0.78;
}

.donut-catch-title-link {
  color: #3B7FE8;
  text-decoration: none;
  text-shadow: 0 2px 0 rgb(10 22 40 / 35%);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.donut-catch-title-link:hover,
.donut-catch-title-link:focus-visible {
  color: #7EB6F5;
  text-shadow: 0 0 18px rgb(59 127 232 / 35%);
}

.donut-catch-title-link:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 4px;
}

.donut-catch-title-rest {
  color: #C4893A;
  text-shadow: 0 2px 0 rgb(10 22 40 / 25%);
}

.donut-catch-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.donut-catch-stat {
  min-width: 7.5rem;
  padding: 0.55rem 1rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--secondary-color);
  background: var(--secondary-color);
  text-align: center;
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.donut-catch-stat-score {
  border-color: rgb(59 127 232 / 55%);
  box-shadow: 0 0 0 1px rgb(59 127 232 / 15%);
}

.donut-catch-stat-lives {
  border-color: rgb(196 137 58 / 55%);
  box-shadow: 0 0 0 1px rgb(196 137 58 / 15%);
}

.donut-catch-stat-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  color: var(--text-color);
}

.donut-catch-stat-value {
  display: block;
  font-family: Bungee, Impact, fantasy;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-color);
}

.donut-catch-stat-score .donut-catch-stat-value {
  color: #3B7FE8;
}

.donut-catch-stat-lives .donut-catch-stat-value {
  color: #F0C9A0;
}

.donut-catch-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.donut-catch-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--secondary-color);
  border-radius: 10px;
  background: linear-gradient(180deg, #0B1420 0%, #2A3F54 55%, #C4893A 100%);
  box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
  touch-action: none;
  cursor: grab;
}

.donut-catch-stage canvas:active {
  cursor: grabbing;
}

.donut-catch-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.05rem;
}

.donut-catch-audio-credit {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-color);
  opacity: 0.65;
}

.donut-catch-btn {
  padding: 0.75rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #3d5266 0%, #2a4054 100%);
  color: #F0C9A0;
  border: 1px solid #C4893A;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 #1a2a3d;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.donut-catch-btn:hover {
  background: linear-gradient(180deg, #C4893A 0%, #a87430 100%);
  color: #0A1628;
  transform: translateY(-1px);
  box-shadow: 0 5px 0 #1a2a3d;
}

.donut-catch-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1a2a3d;
}

.donut-catch-btn:focus-visible {
  outline: 2px solid #6FD3A0;
  outline-offset: 3px;
}

.donut-catch-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 0 #1a2a3d;
}

@media (width <= 600px) {
  .donut-catch {
    padding: 1.15rem 0.75rem 1.35rem;
  }

  .donut-catch-stat {
    min-width: 6.5rem;
    padding: 0.45rem 0.8rem 0.5rem;
  }

  .donut-catch-stat-value {
    font-size: 1.15rem;
  }

  .donut-catch-btn {
    width: 100%;
    max-width: 320px;
    font-size: 0.82rem;
    padding: 0.7rem 1rem;
  }
}
