/* Block Blast program — retro arcade styles scoped to the blast window. */

.window--blast {
  --bg-blast: #10102a;
  --neon-cyan: #00ffff;
  --neon-magenta: #ff00ff;
  --neon-green: #39ff14;
  --text-dim: #888888;
  --font-heading: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
  max-width: 660px;
}

.window--blast .window-body {
  padding: 24px;
  background: var(--bg-blast);
}

.blast-layout {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.blast-stage {
  position: relative;
  flex: 0 0 auto;
}

#blast-board {
  display: block;
  width: 320px;
  max-width: 100%;
  border: 2px solid rgba(0, 255, 255, 0.35);
  border-radius: 4px;
  touch-action: none;
  cursor: grab;
}

.blast-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(16, 16, 42, 0.9);
  border-radius: 4px;
  text-align: center;
  padding: 16px;
}

.blast-overlay.is-hidden {
  display: none;
}

.blast-overlay-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff44;
  line-height: 1.6;
}

.blast-overlay-msg {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.blast-btn {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--bg-blast);
  background: var(--neon-green);
  border: none;
  border-radius: 6px;
  padding: 12px 22px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.5);
}

.blast-btn:hover {
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.8);
}

.blast-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 120px;
  flex: 0 0 auto;
}

.blast-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 8px 10px;
}

.blast-panel-label {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  color: var(--neon-magenta);
  margin-bottom: 4px;
  letter-spacing: 0.06em;
}

.blast-panel-value {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--neon-green);
  line-height: 1.1;
}

.blast-scores {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--text-dim);
  counter-reset: rank;
}

.blast-scores li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  counter-increment: rank;
}

.blast-scores li::before {
  content: counter(rank) '.';
  color: var(--neon-cyan);
  min-width: 1.4em;
}

.blast-scores li span:first-of-type {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blast-scores li:first-child span {
  color: var(--neon-green);
}

.blast-scores li.blast-scores-empty {
  justify-content: center;
}

.blast-scores li.blast-scores-empty::before {
  content: none;
}

.blast-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.blast-submit.is-hidden {
  display: none;
}

.blast-initials {
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: var(--neon-green);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 6px;
  padding: 6px 10px;
  width: 160px;
  text-align: center;
  text-transform: uppercase;
}

.blast-initials:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.blast-btn--small {
  font-size: 0.6rem;
  padding: 9px 16px;
}

.blast-help {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .window--blast .window-body {
    padding: 16px;
  }

  .blast-layout {
    flex-direction: column;
    align-items: center;
  }

  .blast-side {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .blast-panel {
    flex: 1 1 28%;
  }

  .blast-panel--scores {
    flex: 1 1 100%;
  }

  .blast-help {
    display: none;
  }
}
