/* === Parity Palace Game-Specific Styles === */

/* Register Zone */
.register-zone {
  text-align: center;
  padding: 8px 0 4px;
}
.reg-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.reg-bits {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}
.reg-bit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.reg-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.reg-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--surface-2);
  transition: all 0.3s ease;
  min-width: 70px;
  text-align: center;
}
.reg-val.even {
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 8px rgba(0, 224, 224, 0.3);
}
.reg-val.odd {
  color: var(--gold);
  border-color: var(--gold);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}
.reg-val.locked {
  color: var(--invert-color);
  border-color: var(--invert-color);
  text-shadow: 0 0 8px rgba(144, 96, 224, 0.4);
  position: relative;
}
.reg-val.locked::after {
  content: "\1f512";
  font-size: 10px;
  position: absolute;
  top: -6px;
  right: -6px;
}

@keyframes regFlip {
  0% {
    transform: scaleY(1);
  }
  40% {
    transform: scaleY(0);
  }
  60% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(1);
  }
}
.reg-val.flipping {
  animation: regFlip 0.4s ease-in-out;
}

/* Register Timeline */
.reg-timeline {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 6px;
  min-height: 18px;
}
.tl-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.tl-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.tl-dot.even {
  background: var(--accent);
  border-color: var(--accent);
}
.tl-dot.odd {
  background: var(--gold);
  border-color: var(--gold);
}
.tl-dot.locked {
  background: var(--invert-color);
  border-color: var(--invert-color);
}
.tl-step.current .tl-dot {
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
  transform: scale(1.3);
}
.tl-arrow {
  font-size: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0 1px;
}

/* Declaration badges */
.decl-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  margin-left: 6px;
}
.decl-badge.set {
  border-color: var(--accent);
  color: var(--accent);
}
.decl-badge.hidden {
  color: var(--text-muted);
  border-color: var(--text-muted);
}

/* Declare Phase */
.declare-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 8px;
}
.declare-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.declare-btn {
  font-size: 11px !important;
  padding: 10px 12px !important;
  min-width: 90px;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.declare-btn:hover {
  background: rgba(0, 224, 224, 0.1) !important;
}
.lock-btn {
  font-size: 11px !important;
  padding: 10px 14px !important;
  border-color: var(--invert-color) !important;
  color: var(--invert-color) !important;
}

/* Selectable player cards */
.hand .card.selectable {
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.hand .card.selectable:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 12px rgba(0, 224, 224, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3);
}
.hand .card.played {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.9);
  filter: grayscale(0.5);
}
.hand .card.absorbed {
  opacity: 0.3;
  pointer-events: none;
  transform: scale(0.9);
  box-shadow: 0 0 8px rgba(144, 96, 224, 0.3);
}

/* Card parity pip */
.parity-pip {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}
.parity-pip.pp-odd {
  color: var(--gold);
  background: rgba(255, 215, 0, 0.12);
}
.parity-pip.pp-even {
  color: var(--accent);
  background: rgba(0, 224, 224, 0.12);
}

/* Turn info */
.turn-info {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-muted);
  min-height: 16px;
  padding: 2px 0;
}

/* Play hint */
.play-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-top: 4px;
  min-height: 14px;
}

/* Action info (passes/locks remaining) */
.action-info {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  min-height: 14px;
  padding: 2px 0;
}

/* Parity chart in rules */
.parity-chart {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 6px 0;
}

/* History row (BET phase) */
.history-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.4s ease-out both;
}
.hist-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  opacity: 0.85;
}

/* Dealer card played highlight */
@keyframes dealerPlay {
  0% {
    transform: translateY(-10px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
.card.dealer-played {
  animation: dealerPlay 0.3s ease-out;
}

/* Sweep glow */
@keyframes sweepPulse {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(0, 224, 224, 0.3);
  }
  50% {
    box-shadow:
      0 0 20px rgba(0, 224, 224, 0.6),
      0 0 40px rgba(0, 224, 224, 0.2);
  }
}
.reg-val.sweep-glow {
  animation: sweepPulse 1s ease-in-out 3;
}
