body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f0f0f0;
  margin: 0;
  font-family: Arial, sans-serif;
}

.game-container {
  display: flex;
  justify-content: space-between;
  width: 65%; /* reduced from 80% */
  position: relative;
  padding-top: 60px;
  gap: 10px;
}

.column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 48%; /* slightly narrower to reduce width */
  gap: 8px;
}

.word, .sentence {
  margin: 6px;
  padding: 14px 16px; /* reduced padding */
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 0.95rem; /* slightly smaller text */
}

.word {
  background-color: #d1c4e9;
}

.sentence {
  background-color: #bbdefb;
}

.matched {
  background-color: #a5d6a7 !important;
  pointer-events: none;
}

.line {
  position: absolute;
  height: 2px;
  background-color: #000;
  transform-origin: 0 0;
}

.instructions {
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-align: center;
}

/* Voice button inside game-container */
.voice-button-inside {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

#voiceButton {
  background-color: green;
  color: white;
  border: none;
  padding: 10px 26px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 0 12px green;
  animation: blink 1s infinite;
  transition: background-color 0.3s ease;
}

@keyframes blink {
  0%, 100% {
    box-shadow: 0 0 22px green;
    background-color: green;
  }
  50% {
    box-shadow: 0 0 8px blue;
    background-color: blue;
  }
}

.custom-alert {
  display: none;
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  background-color: white;
  border: 2px solid #444;
  border-radius: 10px;
  padding: 16px;
  z-index: 1000;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.custom-alert-content {
  text-align: center;
}

#custom-alert-button {
  margin-top: 15px;
  padding: 8px 16px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#custom-alert-button:hover {
  background-color: #45a049;
}

/* Responsive adjustments */
@media screen and (max-width: 600px) {
  .game-container {
    flex-direction: column;
    align-items: center;
    width: 95%;
  }

  .column {
    width: 100%;
  }

  .instructions {
    font-size: 1rem;
  }

  .voice-button-inside {
    top: 5px;
    right: 5px;
  }

  #voiceButton {
    font-size: 1rem;
    padding: 8px 20px;
  }

  .word, .sentence {
    font-size: 0.9rem;
    padding: 12px 14px;
  }
}
