button, 
input[type="button"], 
input[type="submit"], 
input[type="reset"],
.role-btn,
.floating-qa-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

dot-eater-card {
  display: flex;
  justify-content: center;
  flex: 0 1 auto;
}

dot-eater-card .game-card {
  width: 100%;
  max-width: 460px;
  box-sizing: border-box;
  background-color: var(--bg-card-body);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

dot-eater-card .game-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 520px;
  padding: 20px;
  box-sizing: border-box;
}

.pac-title {
  font-size: 0.95rem;
}

.pac-item-icon {
  font-size: 1rem;
  width: 75px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  text-align: center;
}

.fruit-grid {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px 4px;
  font-size: 0.9em;
  line-height: 1;
}

#pacCanvasWrapper {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #b5be8a;
  background-color: var(--bg-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 4px;
}

canvas#pacmanCanvas {
  background-color: var(--bg-dark);
  display: block;
}

.pac-control-mode-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 240px;
  margin: 4px auto 2px auto;
  font-size: 0.75rem;
  color: #b5be8a;
}

#pacControlModeBtn {
  padding: 2px 10px;
  font-size: 0.75rem;
  margin-top: 0;
}

.pac-pads-container {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px auto;
}

.pacman-trackpad {
  display: grid;
  grid-template-areas:
    ".   up   ."
    "left center right"
    ".   down   .";
  grid-template-columns: 50px 50px 50px;
  grid-template-rows: 46px 46px 46px;
  gap: 4px;
  justify-content: center;
  align-items: center;
  background: rgba(30, 35, 25, 0.5);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(181, 190, 138, 0.3);
  position: absolute;
  touch-action: none;
}

.pacman-trackpad .control-btn {
  background: rgba(181, 190, 138, 0.1);
  border: 1px solid rgba(181, 190, 138, 0.25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
  color: #b5be8a;
  font-size: 0.85rem;
  transition: transform 0.08s ease, background 0.15s ease;
}

.pacman-trackpad .control-btn:active,
.pacman-trackpad .control-btn:hover {
  background: rgba(181, 190, 138, 0.25);
}

.pacman-trackpad .control-btn:active {
  transform: scale(0.92);
}

.pad-up { grid-area: up; }
.pad-left { grid-area: left; }
.pad-center { grid-area: center; background: rgba(255, 255, 255, 0.02); border-radius: 4px; }
.pad-right { grid-area: right; }
.pad-down { grid-area: down; }

.pacman-swipe-pad {
  width: 240px;
  height: 240px;
  max-width: 100%;
  background: rgba(30, 35, 25, 0.6);
  border: 1px solid rgba(181, 190, 138, 0.3);
  border-radius: 12px;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.pac-swipe-svg {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.pac-swipe-label {
  transition: opacity 0.12s ease, fill 0.12s ease;
}

.pac-swipe-label.pac-swipe-label-active {
  opacity: 1;
  fill: #f1c40f;
}

.pac-help-label {
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--color-accent, #d1db9e);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pac-items-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  background: rgba(30, 35, 25, 0.6);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pac-item-row:not(:last-child) {
  border-bottom: 1px dashed rgba(181, 190, 138, 0.3);
}

.pac-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.8rem;
}

.pac-action-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 240px;
  justify-content: center;
  margin-top: 4px;
}

.pac-action-row .action-btn {
  flex: 1;
  margin-top: 0;
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(20%);
}

dot-eater-card .game-help-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-card-body);
  border-radius: 20px;
  z-index: 50;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

dot-eater-card .game-help-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pac-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 24, 18, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: sans-serif;
  font-size: 20px;
  font-weight: bold;
  z-index: 10;
  box-sizing: border-box;
  padding: 15px;
  pointer-events: none;
}

@keyframes pacSlowBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.pac-blink-text {
  animation: pacSlowBlink 2.5s infinite ease-in-out;
}

.pac-neon-red {
  color: #ff4d4d;
  text-shadow: 0 0 8px #ff0000, 0 0 15px #ff0000, 0 0 25px #ff0000;
}

.pac-neon-green {
  color: #2ecc71;
  text-shadow: 0 0 8px #27ae60, 0 0 15px #27ae60, 0 0 25px #27ae60;
}

#pacDifficultyBtn {
  background-color: #b5be8a;
  color: #1e2319;
}