/* ============================================
   HISTORY GAMES - SHARED STYLES
   ============================================ */

.game-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.game-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.game-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  text-align: center;
  color: var(--gray-400);
  margin-bottom: 2rem;
}

/* Tile Bank (where draggable tiles start) */
.tile-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 2rem;
  min-height: 70px;
  padding: 15px;
  background: rgba(38, 29, 17, 0.6);
  border-radius: 12px;
  border: 2px dashed var(--gray-600);
}

/* Draggable Tiles */
.game-tile {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 20px;
  background: var(--cyan-400);
  color: var(--white);
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.game-tile:hover {
  background: var(--cyan-300);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.game-tile:active,
.game-tile.dragging {
  cursor: grabbing;
  opacity: 0.8;
  transform: scale(1.05);
}

/* Slot List */
.slot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Individual Slots */
.game-slot {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: rgba(38, 29, 17, 0.4);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.game-slot.drag-over {
  background: rgba(4, 119, 191, 0.2);
  border-color: var(--cyan-400);
}

/* Slot Labels */
.slot-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--yellow-400);
  min-width: 130px;
  text-align: center;
  padding: 10px;
  background: var(--gray-800);
  border-radius: 8px;
  flex-shrink: 0;
}

/* Drop Zones */
.drop-zone {
  flex: 1;
  min-height: 50px;
  border: 2px dashed var(--gray-600);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.drop-zone.drag-over {
  border-color: var(--cyan-400);
  background: rgba(4, 119, 191, 0.15);
}

.drop-zone.has-item {
  border-style: solid;
  border-color: var(--gray-500);
}

.drop-zone .game-tile {
  margin: 5px;
  width: calc(100% - 10px);
  text-align: center;
}

.drop-zone-placeholder {
  color: var(--gray-500);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
}

/* Buttons */
.button-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 2rem;
}

.submit-btn, .reset-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 15px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn {
  background: var(--yellow-400);
  color: var(--black);
}

.submit-btn:hover {
  background: #d9a504;
  transform: translateY(-2px);
}

.submit-btn:disabled {
  background: var(--gray-600);
  color: var(--gray-400);
  cursor: not-allowed;
  transform: none;
}

.reset-btn {
  background: var(--gray-700);
  color: var(--white);
}

.reset-btn:hover {
  background: var(--gray-600);
}

/* Feedback Messages */
.feedback {
  text-align: center;
  margin-top: 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  padding: 15px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feedback.show {
  opacity: 1;
}

.feedback.correct {
  background: rgba(122, 140, 71, 0.3);
  color: var(--green-500);
  border: 2px solid var(--green-500);
}

.feedback.incorrect {
  background: rgba(166, 41, 13, 0.2);
  color: var(--red-300);
  border: 2px solid var(--red-500);
}

/* Animations */
@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes slideToCorrect {
  0% { opacity: 0.5; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.game-slot.correct {
  animation: correctPulse 0.5s ease;
  background: rgba(122, 140, 71, 0.2);
}

.game-slot.correct .drop-zone {
  border-color: var(--green-500);
}

.game-slot.incorrect {
  animation: shake 0.4s ease;
}

.game-tile.animating {
  animation: slideToCorrect 0.5s ease forwards;
}

/* Score Display */
.score-display {
  text-align: center;
  margin-top: 1rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--gray-400);
}

.score-display span {
  color: var(--yellow-400);
  font-weight: 600;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
  .game-container {
    padding: 15px;
  }
  
  .game-title {
    font-size: 1.5rem;
  }
  
  .game-subtitle {
    font-size: 0.9rem;
  }
  
  .game-slot {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  
  .slot-label {
    min-width: auto;
    width: 100%;
  }
  
  .drop-zone {
    width: 100%;
    min-height: 55px;
  }
  
  .game-tile {
    font-size: 0.95rem;
    padding: 10px 16px;
  }
  
  .submit-btn, .reset-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
  
  .button-container {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .game-title {
    font-size: 1.3rem;
  }
  
  .tile-bank {
    gap: 8px;
    padding: 10px;
  }
  
  .game-tile {
    font-size: 0.85rem;
    padding: 8px 14px;
  }
  
  .slot-label {
    font-size: 0.9rem;
    padding: 8px;
  }
  
  .feedback {
    font-size: 1rem;
  }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  .game-tile {
    padding: 14px 22px;
  }
  
  .drop-zone {
    min-height: 60px;
  }
}
