:root {
  --icon-gap: 4px;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
}

header, footer, #legend {
  padding: 10px;
  text-align: center;
}

main#rockets {
  background-color: white;
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  overflow: auto;
  gap: var(--icon-gap);
  padding: var(--icon-gap);
  direction: rtl; 
}

header, footer {
  text-align: center;
  background-color: #f2f2f2;
  font-weight: bold;
}

footer {
  text-align: center;
  padding: 0.5rem;
  background-color: #f2f2f2;
  font-weight: normal;
  font-size: 0.8rem
}

main img {
  width: 24px;
  height: 24px;
}

#legend {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #fafafa;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-item img {
  width: 24px;
  height: 24px;
}

.icon.used {
  /* opacity: 0.6; */
  pointer-events: none;
}

.laser-beam {
  position: fixed;
  width: 3px;
  background: red;
  transform-origin: 0 0;
  z-index: 999;
  animation: beam-fade 0.3s ease-out forwards;
}

@keyframes beam-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.explosion-flash {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.0) 80%);
  pointer-events: none;
  z-index: 998;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.mute-icon {
  position: absolute;
  left: 2em;
  cursor: pointer;
  font-size: 1.2em;
  user-select: none;
}