:root {
  --neon-pink: #ff007f;
  --neon-cyan: #00f3ff;
  --neon-yellow: #fffb00;
  --bg-black: #0a0a16;
  --terminal: #39ff14;
}

* {
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  user-select: none;
}

body {
  background-color: var(--bg-black);
  color: #fff;
  margin: 0;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-image: linear-gradient(135deg, #050515 0%, #120224 100%);
}

#game-wrapper {
  width: 100%;
  max-width: 980px;
  border: 4px solid var(--neon-pink);
  border-radius: 16px;
  background: rgba(10, 10, 25, 0.95);
  box-shadow: 0 0 30px var(--neon-pink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: 3px double var(--neon-cyan);
  background: rgba(0, 0, 0, 0.5);
  color: var(--neon-cyan);
  font-weight: bold;
  font-size: 0.9rem;
}

.eq-container {
  display: flex;
  gap: 4px;
  height: 30px;
  align-items: flex-end;
  padding: 0 10px;
}

.eq-bar {
  width: 8px;
  height: 5px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
  transition: height 0.05s ease;
  border-radius: 2px 2px 0 0;
}

.eq-bar:nth-child(even) {
  background: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink);
}

.audio-ctrl {
  background: #222;
  border: 1px solid var(--neon-yellow);
  color: var(--neon-yellow);
  padding: 5px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(255, 251, 0, 0.3);
  animation: pulse 2s infinite;
}

.audio-ctrl:hover {
  background: var(--neon-yellow);
  color: #000;
  box-shadow: 0 0 15px var(--neon-yellow);
  animation: none;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 25px;
  min-height: 480px;
  text-align: center;
}

.screen.active {
  display: flex;
}

h1 {
  text-shadow: 0 0 15px var(--neon-cyan);
  color: #fff;
  font-size: 2.5rem;
  margin: 0 0 10px 0;
}

h2 {
  color: var(--neon-yellow);
  margin: 0 0 20px 0;
  text-shadow: 0 0 8px var(--neon-yellow);
}

.btn {
  background: transparent;
  color: #fff;
  border: 2px solid var(--neon-cyan);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
  text-transform: uppercase;
}

.btn:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 25px var(--neon-cyan);
}

.btn-bribe {
  border-color: var(--terminal);
  color: var(--terminal);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.btn-bribe:hover {
  background: var(--terminal);
  color: #000;
  box-shadow: 0 0 25px var(--terminal);
}

.booth-layout {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.directory {
  width: 35%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed var(--neon-cyan);
  padding: 12px;
  border-radius: 8px;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #bbb;
}

.booth-visual-center {
  width: 25%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 220px;
}

.phone-booth {
  width: 80px;
  height: 160px;
  border: 4px solid var(--neon-cyan);
  position: relative;
  background: rgba(0, 243, 255, 0.15);
  box-shadow: 0 0 20px var(--neon-cyan), inset 0 0 15px rgba(0, 243, 255, 0.4);
  animation: floatBooth 3s ease-in-out infinite;
}

.phone-booth::before {
  content: "PHONE";
  position: absolute;
  top: -19px;
  left: -2px;
  width: 105%;
  background: #fff;
  color: #000;
  font-size: 10px;
  text-align: center;
  font-weight: bold;
  border: 1px solid var(--neon-cyan);
}

.phone-booth::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(to right, transparent 48%, rgba(0, 243, 255, 0.4) 49%, rgba(0, 243, 255, 0.4) 52%, transparent 53%),
    linear-gradient(to bottom, transparent 24%, rgba(0, 243, 255, 0.4) 25%, rgba(0, 243, 255, 0.4) 27%, transparent 28%,
      transparent 49%, rgba(0, 243, 255, 0.4) 50%, rgba(0, 243, 255, 0.4) 52%, transparent 53%,
      transparent 74%, rgba(0, 243, 255, 0.4) 75%, rgba(0, 243, 255, 0.4) 77%, transparent 78%);
}

/* Glitch Animation State */
@keyframes boothGlitch {

  0%,
  100% {
    filter: hue-rotate(0deg);
    transform: skew(0deg);
  }

  20% {
    filter: hue-rotate(180deg);
    transform: skew(10deg) scaleY(1.2);
    box-shadow: 0 0 40px var(--neon-pink);
  }

  40% {
    filter: hue-rotate(90deg);
    transform: skew(-15deg);
  }

  60% {
    filter: hue-rotate(270deg);
    transform: skew(5deg) scaleX(0.8);
  }

  80% {
    filter: hue-rotate(0deg);
    transform: skew(-5deg);
  }
}

.keypad {
  width: 35%;
  background: #111;
  border: 2px solid #333;
  padding: 15px;
  border-radius: 10px;
  box-shadow: inset 0 0 10px #000;
}

.display {
  background: #000;
  border: 2px solid var(--terminal);
  color: var(--terminal);
  padding: 10px;
  font-size: 1.8rem;
  letter-spacing: 5px;
  margin-bottom: 15px;
  border-radius: 4px;
  text-shadow: 0 0 5px var(--terminal);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.key {
  background: #252535;
  border: 1px solid #444;
  color: #fff;
  padding: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
}

.key:active {
  background: var(--neon-pink);
}

canvas {
  background: #000;
  border: 3px solid var(--neon-pink);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
  max-width: 100%;
}

.dialog-container {
  background: rgba(0, 0, 0, 0.7);
  border-left: 4px solid var(--neon-pink);
  padding: 20px;
  text-align: left;
  border-radius: 0 8px 8px 0;
  width: 100%;
  margin-bottom: 20px;
  line-height: 1.6;
}

.choices-stack {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#bark-box {
  background: #050510;
  border-top: 2px solid var(--neon-yellow);
  padding: 15px 20px;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1rem;
  box-shadow: inset 0 10px 15px -10px rgba(255, 251, 0, 0.2);
}

#bark-name {
  color: var(--neon-pink);
  font-weight: bold;
  text-shadow: 0 0 5px var(--neon-pink);
  white-space: nowrap;
}

#bark-text {
  color: var(--neon-yellow);
  font-weight: bold;
}

.ascii-card {
  background: #000;
  border: 3px dashed var(--neon-yellow);
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 25px rgba(255, 251, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  animation: pulse 1s infinite;
}

.ascii-art {
  color: var(--neon-cyan);
  font-size: 1.2rem;
  line-height: 1.1;
  text-shadow: 0 0 5px var(--neon-cyan);
  text-align: left;
  margin-bottom: 15px;
}

@keyframes floatBooth {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    box-shadow: 0 0 20px var(--neon-cyan);
  }

  50% {
    transform: translateY(-12px) rotate(2deg);
    box-shadow: 0 0 30px var(--neon-pink);
    border-color: var(--neon-pink);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}