/* Puzzle Maze - logic-based maze game */
.ct-gamebox.puzzle-maze-box {
  position: relative;
  min-height: 560px;
  width: 100%;
  margin-bottom: 56px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 90%, rgba(147, 51, 234, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 50% 30%, rgba(34, 197, 94, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(30, 58, 138, 0.15) 0%, transparent 65%),
    linear-gradient(180deg, #0c1222 0%, #1e293b 40%, #0f172a 70%, #0c1222 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    inset 0 0 150px rgba(0, 0, 0, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.1);
  padding: 20px;
}

.puzzle-maze-box .maze-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  color: #fff;
}

.puzzle-maze-box #remain {
  font-size: 18px;
}

.puzzle-maze-box #gate-status {
  color: #a78bfa;
  font-size: 16px;
  font-weight: 600;
}

.puzzle-maze-box #main {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* Click-to-play overlay - ensures focus for keyboard input */
.puzzle-maze-click-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  z-index: 1;
  transition: opacity 0.2s;
  border-radius: 12px;
}
.puzzle-maze-click-overlay.hidden {
  pointer-events: none;
  opacity: 0;
}

.puzzle-maze-box #gameCanvas {
  display: block;
  width: 100%;
  max-width: 100%;
  background: #1a1a1a;
  border-radius: 12px;
  border: 2px solid rgba(148, 163, 184, 0.2);
}

.puzzle-maze-box #gameover {
  display: none;
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 12px;
  text-align: center;
  padding-top: 80px;
  z-index: 2;
}

.puzzle-maze-box #gameover #msg {
  font-family: Arial, sans-serif;
  font-size: 24px;
  color: #a78bfa;
  margin-bottom: 20px;
}

.puzzle-maze-box #restartbtn {
  display: inline-block;
  margin: 16px auto;
  padding: 10px 24px;
  background-color: #22c55e;
  font-family: Arial, sans-serif;
  font-size: 18px;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
}

.puzzle-maze-box #restartbtn:hover {
  background-color: #16a34a;
}

.puzzle-maze-box .playfull {
  font-size: 16px;
  margin-top: 16px;
}

.puzzle-maze-box .playfull a {
  color: #facc15;
  text-decoration: none;
  cursor: pointer;
}

.puzzle-maze-box .playfull a:hover {
  text-decoration: underline;
}

.puzzle-maze-box #featured {
  margin-top: 32px;
  font-size: 14px;
}

.puzzle-maze-box #featured p {
  color: #94a3b8;
  margin-bottom: 12px;
}

.puzzle-maze-box #featured ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.puzzle-maze-box #featured li {
  padding: 6px 0;
}

.puzzle-maze-box #featured li a {
  color: #cbd5e1;
  text-decoration: none;
}

.puzzle-maze-box #featured li a:hover {
  color: #fff;
}
