.pacgoat-root {
  --pg-bg: #05070d;
  --pg-panel: #111827;
  --pg-panel-2: #0f1724;
  --pg-text: #ffffff;
  --pg-accent: #d8ff5e;
  --pg-accent-dark: #0a1203;
  --pg-muted: rgba(255,255,255,.72);
  --pg-wall: #315eff;
  --pg-dot: #f4f4f4;
  --pg-power: #ffb703;
  --pg-danger: #ff5876;
  --pg-cyan: #49d7ff;
  --pacgoat-max-width: 600px;

  width: 100%;
  max-width: var(--pacgoat-max-width);
  margin: 0 auto;
  color: var(--pg-text);
  font-family: inherit;
}

.pacgoat-shell {
  width: 100%;
}

.pacgoat-header {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pacgoat-stat {
  background: linear-gradient(180deg, var(--pg-panel), var(--pg-panel-2));
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.pacgoat-stat span {
  display: inline-block;
  margin-left: 6px;
  color: var(--pg-accent);
}

.pacgoat-stage-wrap {
  width: 100%;
}

.pacgoat-stage-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 35%, #162238 0%, #09101d 45%, #05070d 100%);
  box-shadow:
    0 20px 40px rgba(0,0,0,.28),
    inset 0 0 0 1px rgba(255,255,255,.05);
}

.pacgoat-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.pacgoat-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(4,7,12,.35), rgba(4,7,12,.78));
  backdrop-filter: blur(3px);
  z-index: 5;
}

.pacgoat-overlay[hidden] {
  display: none;
}

.pacgoat-overlay-box {
  width: min(92%, 430px);
  background: linear-gradient(180deg, rgba(18,24,37,.98), rgba(10,14,24,.98));
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  box-shadow:
    0 18px 50px rgba(0,0,0,.35),
    inset 0 0 0 1px rgba(255,255,255,.06);
}

.pacgoat-kicker {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pg-accent);
  margin-bottom: 8px;
}

.pacgoat-overlay-box h3 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.05;
}

.pacgoat-overlay-box p {
  margin: 0;
  color: var(--pg-muted);
  line-height: 1.45;
}

.pacgoat-overlay-actions {
  margin-top: 18px;
}

.pacgoat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pacgoat-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--pg-accent);
  color: var(--pg-accent-dark);
  font-weight: 800;
  transition: transform .15s ease, opacity .15s ease;
}

.pacgoat-btn:hover {
  transform: translateY(-1px);
}

.pacgoat-btn:active {
  transform: translateY(1px);
}

.pacgoat-btn--secondary {
  background: var(--pg-panel);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.pacgoat-touch {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 62px);
  gap: 8px;
  justify-content: center;
}

.pacgoat-touch button {
  appearance: none;
  border: 0;
  height: 62px;
  border-radius: 14px;
  background: var(--pg-panel);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

@media (min-width: 992px) {
  .pacgoat-touch {
    display: none;
  }
}

@media (max-width: 520px) {
  .pacgoat-header {
    grid-template-columns: 1fr;
  }

  .pacgoat-overlay-box h3 {
    font-size: 26px;
  }

  .pacgoat-controls {
    justify-content: center;
  }
}
