/* src/styles/missile.css */
.wrapper {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  outline: none;
  border: 2px solid #0000;
  height: 500px;
  transition: border-color .2s;
}

.wrapper:focus {
  border-color: var(--accent);
}

.wrapper.blurred:after {
  content: "Click to focus!";
  position: absolute;
  display: flex;
  border-radius: var(--radius);
  color: var(--text-dim);
  z-index: 5;
  background: #1a1b2ecc;
  justify-content: center;
  align-items:  center;
  font-size: 18px;
  inset: 0;
}

.canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  display: flex;
  z-index: 2;
  font-family: var(--font-mono);
  pointer-events: none;
  justify-content: space-between;
  align-items:  flex-start;
  padding: 12px 20px;
  top: 0;
  left: 0;
  right: 0;
}

.hudLeft, .hudRight {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hudLabel {
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  font-size: 10px;
}

.hudValue {
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.missiles {
  display: flex;
  gap: 6px;
}

.missilePip {
  opacity: .3;
  font-size: 18px;
}

.missilePip.active {
  opacity: 1;
}

.hpPips {
  display: flex;
  gap: 4px;
}

.hpPip {
  background: var(--error);
  opacity: .25;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  transition: opacity .3s;
}

.hpPip.filled {
  opacity: 1;
  box-shadow: 0 0 6px var(--error);
}

.wordPrompt {
  position: absolute;
  background: var(--bg);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  color: var(--text);
  border: 2px solid var(--accent);
  text-align: center;
  z-index: 3;
  pointer-events: none;
  min-width: 220px;
  padding: 10px 24px;
  font-size: 22px;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.typedChar {
  color: var(--success);
}

.cursor {
  border-bottom: 2px solid var(--accent);
  animation: blink .8s step-end infinite;
}

@keyframes blink {
  50% {
    border-color: #0000;
  }
}

.progressWrap {
  position: absolute;
  z-index: 2;
  background: #ffffff0d;
  height: 6px;
  bottom: 0;
  left: 0;
  right: 0;
}

.progressFill {
  background: linear-gradient(90deg, var(--accent), var(--success));
  height: 100%;
  transition: width .4s;
}

.overlay {
  position: absolute;
  display: flex;
  z-index: 10;
  animation: fadeIn .3s ease;
  background: #1a1b2ef2;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  inset: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.overlayTitle {
  margin-bottom: 16px;
  font-size: 36px;
  font-weight: 700;
}

.overlaySubtitle {
  color: var(--text-dim);
  margin-bottom: 8px;
  font-size: 20px;
}

.newHighScore {
  color: var(--warning);
  font-weight: 600;
}

.overlayBtn {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  margin-top: 24px;
  padding: 14px 36px;
  font-size: 18px;
  font-weight: 600;
}

.shake {
  animation: shake .3s ease-out;
}

@keyframes shake {
  0%, 100% {
    transform: translate(0);
  }

  15% {
    transform: translate(-4px, 2px);
  }

  30% {
    transform: translate(4px, -2px);
  }

  45% {
    transform: translate(-3px, 3px);
  }

  60% {
    transform: translate(3px, -1px);
  }

  75% {
    transform: translate(-2px, 1px);
  }
}

.selector {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  padding: 40px 20px;
}

.selectorCard {
  background: var(--bg-card);
  border: 2px solid var(--bg-hover);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  flex: 1;
  max-width: 280px;
  padding: 32px 28px;
  transition: border-color .2s, transform .15s;
}

.selectorCard:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.selectorIcon {
  margin-bottom: 16px;
  font-size: 48px;
}

.selectorTitle {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.selectorDesc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
}
