#hudBottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 20px 20px;
  background: transparent;
  border-top: 3px dashed rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
  min-height: 250px;
}

#hudBottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  z-index: -1;
  pointer-events: none;
}

#powerContainer {
  width: 100%;
  cursor: pointer;
  transition: transform 0.1s ease;
  user-select: none;
}

#powerContainer:hover:not([style*="pointer-events: none"]) {
  transform: translateY(-1px);
}

#powerContainer:active:not([style*="pointer-events: none"]) {
  transform: translateY(1px);
}

.power-bar {
  height: 34px !important;
  border-radius: 6px !important;
  border-width: 4px !important;
  position: relative;
}

#powerLabel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  font-size: 20px;
  letter-spacing: 2px;
  pointer-events: none;
  color: var(--nearly-black);
  text-shadow: 
    1px 1px 0 #fff,
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    0 2px 4px rgba(0,0,0,0.1);
}

#hudMain {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 12px;
  flex: 1;
}

#leftPanel, #rightPanel {
  display: flex;
  flex-direction: column;
}

#leftPanel .card, #rightPanel .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 8px 14px;
}

.center-card {
  padding: 8px 12px;
}

/* Center HUD looks like scribbled control strip */
.hudGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  height: 100%;
  align-items: flex-start;
  position: relative;
}

.hudGroup {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: opacity 0.3s ease;
}

.actions-group {
  gap: 8px;
  justify-content: space-between;
}

.actions-group .btnwide {
  height: 44px;
}

.pips-container {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.stat {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
}

.stat.small {
  font-size: 15px;
  opacity: 0.7;
}

.wind-viz {
  position: relative;
  height: 50px;
  width: 100%;
  background: linear-gradient(90deg, 
    rgba(46, 196, 182, 0.4), 
    rgba(0, 79, 255, 0.35), 
    rgba(251, 177, 60, 0.35),
    rgba(255, 159, 28, 0.4),
    rgba(46, 196, 182, 0.4)
  );
  background-size: 200% 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 2px dashed rgba(0, 0, 0, 0.1);
  margin-top: 4px;
  animation: wind-bg-scroll var(--wind-bg-dur, 5s) linear infinite;
}

@keyframes wind-bg-scroll {
  0% { background-position: 0 0; }
  100% { background-position: -200% 0; }
}

.wind-viz.facing-left {
  transform: scaleX(-1);
}

.wind-stroke {
  position: absolute;
  height: 3px;
  width: var(--len, 30px);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.25), transparent);
  border-radius: 4px;
  top: var(--y, 50%);
  left: -60px;
  /* Duration is controlled via parent's --wind-dur variable */
  animation: wind-sweep var(--wind-dur, 2s) linear infinite;
  animation-delay: var(--delay, 0s);
  filter: blur(0.5px);
}

@keyframes wind-sweep {
  0% {
    transform: translateX(0) scaleX(0.5);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateX(250px) scaleX(1.5);
    opacity: 0;
  }
}

#hudCredits {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

#hudCredits:hover {
  opacity: 1;
}

#creditsLogo {
  height: 40px;
  width: auto;
  display: block;
}

#gameOverActions {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

#newGameBtn {
  font-size: 24px;
  padding: 20px 40px !important;
  transform: rotate(-1deg);
}

.hidden {
  display: none !important;
}

.hintkeys {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  text-align: center;
  margin-top: 4px;
}

#topHud {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 50;
  text-align: center;
}

#currentPlayerMarker {
  font-family: 'Cexsons', sans-serif;
  font-size: 32px;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
}

.big-pips {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.big-pips .pip {
  width: 24px;
  height: 24px;
  border-radius: 9px;
  border-width: 3px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.debug-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(0, 0, 0, 0.1);
  font-size: 14px;
  pointer-events: none;
  z-index: 50;
  border-radius: 10px;
}