:root {
  --neon-blue: #0ff;
  --neon-red: #f00;
  --neon-green: #0f0;
  --neon-gold: #fb0;
  --dark-bg: #050510;
  --panel-bg: rgba(0, 20, 40, 0.8);
}

body {
  background-color: var(--dark-bg);
  color: var(--neon-blue);
  font-family: "Courier New", Courier, monospace;
  margin: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.04),
      rgba(0, 255, 0, 0.02),
      rgba(0, 0, 255, 0.04)
    );
  background-size:
    100% 4px,
    3px 100%;
  pointer-events: none;
  z-index: 999;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 5, 15, 0.95);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: opacity 0.5s ease-in-out;
}

.overlay h1 {
  font-size: 48px;
  letter-spacing: 5px;
  text-shadow: 0 0 20px var(--neon-blue);
  margin-bottom: 10px;
}

.overlay h3 {
  color: var(--neon-gold);
  text-shadow: 0 0 10px var(--neon-gold);
  margin-bottom: 40px;
}

.menu-btn {
  background: transparent;
  color: var(--neon-blue);
  border: 2px solid var(--neon-blue);
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  margin: 10px;
  width: 260px;
  transition: all 0.3s;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2) inset;
}

.menu-btn:hover:not(:disabled) {
  background: var(--neon-blue);
  color: var(--dark-bg);
  box-shadow: 0 0 20px var(--neon-blue);
}

.menu-btn:disabled {
  border-color: #333;
  color: #333;
  cursor: not-allowed;
  box-shadow: none;
}

#draft-screen {
  padding-top: 40px;
  overflow-y: auto;
  justify-content: flex-start;
}

#draft-instructions {
  color: #fff;
  margin-bottom: 20px;
}

#draft-credits {
  color: var(--neon-gold);
  font-weight: bold;
}

.draft-container {
  display: flex;
  gap: 20px;
  max-width: 1100px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.draft-card {
  background: rgba(0, 20, 40, 0.6);
  border: 1px solid var(--neon-blue);
  border-radius: 6px;
  width: 220px;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 12px;
}

.draft-card h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  text-transform: uppercase;
  text-shadow: 0 0 5px var(--neon-blue);
}

.draft-card .cost {
  color: var(--neon-gold);
  font-weight: bold;
  margin-bottom: 10px;
}

.draft-card .ability-desc {
  color: #8af;
  font-style: italic;
  margin-top: 10px;
  min-height: 45px;
}

#win-title {
  color: var(--neon-gold);
  text-shadow: 0 0 20px var(--neon-gold);
}

#win-quote {
  font-style: italic;
  color: var(--neon-gold);
  margin-bottom: 25px;
  text-align: center;
  max-width: 600px;
}

#stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  background: rgba(0, 255, 255, 0.05);
  padding: 20px;
  border: 1px solid var(--neon-blue);
  border-radius: 10px;
  margin-bottom: 20px;
  width: 450px;
}

.stat-box {
  text-align: center;
  padding: 8px;
  border: 1px dashed rgba(0, 255, 255, 0.3);
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: var(--neon-gold);
  margin-top: 5px;
}

.p1-color {
  color: var(--neon-blue) !important;
}

.p2-color {
  color: var(--neon-red) !important;
}

#game-container {
  display: flex;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  gap: 20px;
}

#board-area {
  position: relative;
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.board-hint {
  text-align: center;
  max-width: 500px;
  margin-top: 30px;
  font-size: 11px;
  color: #666;
}

#board {
  display: grid;
  grid-template-columns: repeat(7, 60px);
  grid-template-rows: repeat(7, 60px);
  gap: 4px;
  padding: 15px;
  background: radial-gradient(
    circle,
    rgba(0, 255, 255, 0.1) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  transform: perspective(600px) rotateX(15deg);
  transition: transform 0.1s ease-out;
}

/* Juice & Screenshake Vectors */
.shake {
  animation: lowShaking 0.25s linear infinite;
}

@keyframes lowShaking {
  0% {
    transform: perspective(600px) rotateX(15deg) translate(2px, 1px)
      rotate(0.5deg);
  }

  20% {
    transform: perspective(600px) rotateX(15deg) translate(-1px, -2px)
      rotate(-0.5deg);
  }

  40% {
    transform: perspective(600px) rotateX(15deg) translate(-3px, 0px)
      rotate(0deg);
  }

  60% {
    transform: perspective(600px) rotateX(15deg) translate(0px, 2px)
      rotate(0.5deg);
  }

  80% {
    transform: perspective(600px) rotateX(15deg) translate(1px, -1px)
      rotate(-0.5deg);
  }

  100% {
    transform: perspective(600px) rotateX(15deg) translate(-1px, 1px)
      rotate(0deg);
  }
}

/* Absolute VFX Floating Layer Canvas Wrapper */
#vfx-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 50;
  width: 100%;
  height: 100%;
}

.cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.playable {
  background: rgba(0, 50, 100, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.3);
}

.playable:hover {
  background: rgba(0, 255, 255, 0.2);
}

.void {
  background: transparent;
  border: none;
  pointer-events: none;
}

.void.hazard {
  background: rgba(255, 0, 0, 0.1);
  border: 1px dashed rgba(255, 0, 0, 0.3);
  box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.2);
}

.playable.p1-deploy-zone {
  border: 1px dashed rgba(0, 255, 255, 0.6);
  background: rgba(0, 50, 100, 0.6);
}

.playable.p2-deploy-zone {
  border: 1px dashed rgba(255, 0, 0, 0.6);
  background: rgba(100, 0, 0, 0.4);
}

.playable.highlight-placement {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 10px var(--neon-blue);
  animation: pulse 1.5s infinite;
}

/* Highlights */
.playable.highlight-move {
  background: rgba(0, 255, 0, 0.25);
  border-color: var(--neon-green);
  box-shadow: inset 0 0 10px var(--neon-green);
}

.playable.highlight-attack {
  background: rgba(255, 0, 0, 0.25);
  border-color: var(--neon-red);
  box-shadow: inset 0 0 10px var(--neon-red);
}

.playable.highlight-ability {
  background: rgba(255, 170, 0, 0.25);
  border-color: var(--neon-gold);
  box-shadow: inset 0 0 10px var(--neon-gold);
}

.piece {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  z-index: 10;
  user-select: none;
  box-shadow: 0 0 10px currentColor;
  transition:
    transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    left 0.25s,
    top 0.25s;
}

.player1-piece {
  background: rgba(0, 255, 255, 0.2);
  color: var(--neon-blue);
  border: 2px solid var(--neon-blue);
}

.player2-piece {
  background: rgba(255, 0, 0, 0.2);
  color: var(--neon-red);
  border: 2px solid var(--neon-red);
}

/* Selection Pulse Animation Engine */
.piece-selected-pulse {
  animation: selectPulse 1s ease-in-out infinite alternate;
}

@keyframes selectPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px #fff;
  }

  100% {
    transform: scale(1.12);
    box-shadow:
      0 0 22px #fff,
      0 0 12px currentColor inset;
  }
}

#ui-panel {
  flex: 1;
  background: var(--panel-bg);
  border: 1px solid var(--neon-blue);
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  margin-top: 0;
  text-transform: uppercase;
  text-shadow: 0 0 5px currentColor;
}

#status-box {
  margin-bottom: 15px;
  padding: 10px;
  border: 1px dashed var(--neon-blue);
}

#info-box {
  flex-grow: 1;
}

#piece-stats {
  line-height: 1.4;
  font-size: 13px;
  margin-bottom: 10px;
}

button {
  background: transparent;
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
  padding: 10px;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: bold;
  margin-top: 10px;
  width: 100%;
  transition: all 0.2s;
}

button:hover:not(:disabled) {
  background: var(--neon-blue);
  color: var(--dark-bg);
}

button:disabled {
  border-color: rgba(0, 255, 255, 0.2);
  color: rgba(0, 255, 255, 0.2);
  cursor: not-allowed;
}

.hp-bar {
  position: absolute;
  bottom: 2px;
  left: 5px;
  right: 5px;
  height: 4px;
  background: #333;
}

.hp-fill {
  height: 100%;
  background: var(--neon-green);
  transition: width 0.3s;
}

.status-dot {
  position: absolute;
  top: 2px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0f;
  box-shadow: 0 0 5px #f0f;
  display: none;
}

/* Floating Damage Texts Layer */
.dmg-popup {
  position: absolute;
  font-weight: 900;
  font-size: 22px;
  pointer-events: none;
  z-index: 60;
  animation: floatUpward 0.8s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
  text-shadow:
    0 0 4px #000,
    0 0 8px currentColor;
}

@keyframes floatUpward {
  0% {
    transform: translateY(0) scale(0.4);
    opacity: 0;
  }

  20% {
    transform: translateY(-15px) scale(1.3);
    opacity: 1;
  }

  80% {
    transform: translateY(-35px) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-45px);
    opacity: 0;
  }
}

#log {
  height: 180px;
  overflow-y: auto;
  border-top: 1px solid var(--neon-blue);
  margin-top: 15px;
  padding-top: 10px;
  font-size: 11px;
  display: flex;
  flex-direction: column-reverse;
}

.log-entry {
  margin-bottom: 4px;
  line-height: 1.3;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

/* Unique Monster SVG Icon Styling */
.piece svg {
  width: 26px;
  height: 26px;
  margin-bottom: 2px;
  /* Pulls it up slightly to make room for the HP bar */
  transition: all 0.2s ease-in-out;
}

.piece-selected-pulse svg {
  transform: scale(1.15);
}
/* Selection Interface Card Custom Layout Elements */
.draft-card-icon {
  width: 44px;
  height: 44px;
  margin: 4px 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.draft-card-icon svg {
  width: 100%;
  height: 100%;
}

.draft-card .ability-desc {
  font-size: 11px;
  margin-bottom: 12px;
}
