* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  /* box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); */
  max-width: 800px;
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  color: #333;
  font-size: 2rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
  color: #666;
  font-size: 1.1rem;
}

.game-board {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

.word-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 5px;
  border-radius: 15px;
}

.word-column:hover {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.word-column.dragging {
  background: rgba(102, 126, 234, 0.2);
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.letter-slot {
  width: 50px;
  height: 70px;
  background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
  border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.letter-slot:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.15);
}

.letter-slot.dragging {
  transform: scale(1.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.2);
  background: linear-gradient(145deg, #e8e8e8, #d8d8d8);
}

.letter-slot.correct {
  background: linear-gradient(145deg, #4caf50, #45a049);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(76, 175, 80, 0.3);
}

.letter {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: none;
}

.letter-slot.correct .letter {
  background-color: rgb(11, 212, 75);
  color: white;
}

/* Half success - word found but not in correct position */
.letter-slot.half-correct {
  background: linear-gradient(145deg, #ffa726, #ff9800);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(255, 167, 38, 0.3);
}

.letter-slot.half-correct .letter {
  background-color: #ffa726;
  color: white;
}

/* Full success - word found in correct position */
.letter-slot.full-correct {
  background: linear-gradient(145deg, #4caf50, #45a049);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(76, 175, 80, 0.3);
}

.letter-slot.full-correct .letter {
  background-color: #31e339;
  color: white;
}

/* Dummy slot styling */
.letter-slot.dummy-slot {
  opacity: 0.3;
  background: linear-gradient(145deg, #d0d0d0, #c0c0c0);
  border: 2px dashed #999;
}

.letter-slot.dummy-slot .letter {
  color: #666;
  font-size: 1.5rem;
}

/* Playable slot highlighting */
.letter-slot.playable-slot {
  background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
  border: 2px solid #667eea;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(102, 126, 234, 0.2);
}

.letter-slot.playable-slot:hover {
  background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
  transform: translateY(-2px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 6px 12px rgba(102, 126, 234, 0.3);
}

.letter-slot.dragging .letter {
  color: #555;
  font-weight: 700;
}

/* Vertical scrolling animations with directional sliding */
.letter-slot.scrolling-up .letter {
  animation: slideOutDown 0.2s ease-out, slideInDown 0.2s ease-in 0.2s;
}

.letter-slot.scrolling-down .letter {
  animation: slideOutUp 0.2s ease-out, slideInUp 0.2s ease-in 0.2s;
}

@keyframes slideOutUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(-40px);
    opacity: 0;
  }
}

@keyframes slideInUp {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(40px);
    opacity: 0;
  }
}

@keyframes slideInDown {
  0% {
    transform: translateY(-40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.letter-slot.changing .letter {
  animation: letterChange 0.3s ease-in-out;
}

@keyframes letterChange {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.controls {
  /* display: flex; */
  display: none;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.status {
  text-align: center;
}

.message {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  min-height: 30px;
}

.message.success {
  color: #4caf50;
}

.message.error {
  color: #f44336;
}

.message.info {
  color: #2196f3;
}

.score {
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 10px;
  }

  header h1 {
    font-size: 2rem;
  }

  .letter-slot {
    width: 50px;
    height: 70px;
  }

  .letter {
    font-size: 1.5rem;
  }

  .word-column {
    gap: 8px;
  }

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

  .btn {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .letter-slot {
    width: 45px;
    height: 60px;
  }

  .letter {
    font-size: 1.3rem;
  }

  .word-column {
    gap: 6px;
  }
}

/* Success animation */
@keyframes success {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.letter-slot.correct {
  animation: success 0.6s ease-in-out;
}

.green-underline {
  border-bottom: 4px solid #31e339;
  border-radius: 2px;
  padding-bottom: 2px;
}

.hide-dummy {
  visibility: hidden !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}
