.app-game {
  max-width: 900px;
}

.game-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.lives-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lives-label {
  font-size: 15px;
  color: #e5e7eb;
  font-weight: 500;
}

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

.heart {
  font-size: 18px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.heart.lost {
  opacity: 0.3;
}

.restart-btn {
  padding: 6px 16px;
  font-size: 14px;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.8);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(30, 64, 175, 0.4);
}

.speed-control label {
  font-size: 14px;
  color: #e5e7eb;
  white-space: nowrap;
}

#speed-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #1e3a8a, #3b82f6);
  outline: none;
  -webkit-appearance: none;
}

#speed-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #1e40af;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

#speed-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: 2px solid #1e40af;
}

#speed-value {
  font-size: 14px;
  color: #60a5fa;
  font-weight: 500;
  min-width: 80px;
  text-align: right;
}

.game-area {
  position: relative;
  border-radius: 16px;
  background: radial-gradient(circle at top, #020617, #020617);
  border: 1px solid rgba(30, 64, 175, 0.7);
  height: 400px; /* Увеличил высоту */
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(15, 23, 42, 0.8);
}

.falling-word {
  position: absolute;
  padding: 8px 14px; /* Увеличил размер */
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(129, 140, 248, 0.9);
  color: #e5e7eb;
  font-size: 16px; /* Увеличил шрифт */
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.55);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease; /* Плавное исчезновение */
}

.falling-word.fading-out {
  opacity: 0;
}

.laser-beam {
  position: absolute;
  width: 3px;
  background: linear-gradient(to top, #38bdf8, #1d4ed8);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.9);
  border-radius: 999px;
  transform-origin: bottom center;
  animation: laser-shot 0.3s ease-out forwards;
}

.game-input-wrapper {
  display: flex;
  justify-content: center;
}

.game-input {
  width: 100%;
  max-width: 360px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  font-size: 15px;
  outline: none;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.7);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.game-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.6);
  background: rgba(15, 23, 42, 1);
}

@keyframes laser-shot {
  0% {
    opacity: 0;
    transform: scaleY(0.1);
  }
  40% {
    opacity: 1;
    transform: scaleY(1.05);
  }
  100% {
    opacity: 0;
    transform: scaleY(0.6);
  }
}

.game-over {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 100;
  border-radius: 16px;
}

.game-over h2 {
  font-size: 28px;
  color: #ef4444;
  margin: 0;
}

.game-over p {
  font-size: 16px;
  color: #e5e7eb;
  margin: 0;
}

@media (max-width: 640px) {
  .game-area {
    height: 350px;
  }

  .game-info {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .speed-control {
    flex-wrap: wrap;
  }
}