/* English Adventure - CSS Styles */
/* Designed for ToolsKit 5-theme system */

/* ====================
   1. LAYOUT & CONTAINERS
   ==================== */

#english-adventure-app {
  min-height: 100vh;
  position: relative;
  background: linear-gradient(135deg,
    var(--bg-primary) 0%,
    color-mix(in srgb, var(--bg-primary) 90%, var(--accent) 10%) 50%,
    var(--bg-primary) 100%);
  background-attachment: fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.mode-container {
  animation: fadeIn 0.3s ease-in;
}

.mode-container.hidden {
  display: none;
}

/* ====================
   2. CARDS & COMPONENTS
   ==================== */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.mode-card {
  position: relative;
  cursor: not-allowed;
  opacity: 0.6;
}

.mode-card.clickable {
  cursor: pointer;
  opacity: 1;
}

.mode-card.clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(var(--accent-rgb, 59, 130, 246), 0.2);
  border-color: var(--accent);
}

.mode-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.unlock-badge {
  color: #10B981;
  font-weight: 600;
}

.lock-badge {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ====================
   3. BUTTONS
   ==================== */

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-icon:hover {
  transform: scale(1.1);
}

/* ====================
   4. PROGRESS BARS
   ==================== */

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  transition: width 0.5s ease;
  border-radius: 6px;
}

/* ====================
   5. OPTIONS GRID (Mode 1)
   ==================== */

.options-grid {
  max-width: 600px;
  margin: 0 auto;
}

.option-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.option-card:hover {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb, 59, 130, 246), 0.3);
}

.option-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
  border-radius: 8px;
}

.option-card.correct {
  background: #10B981;
  border-color: #059669;
  color: white;
  animation: bounce 0.5s ease;
}

.option-card.incorrect {
  animation: shake 0.5s ease;
  border-color: #EF4444;
}

/* ====================
   6. INPUT FIELDS (Mode 2)
   ==================== */

.input-field {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-align: center;
  transition: all 0.2s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 59, 130, 246), 0.1);
}

.input-field.correct {
  border-color: #10B981;
}

.input-field.incorrect {
  border-color: #EF4444;
  animation: shake 0.5s ease;
}

/* ====================
   7. DRAG & DROP (Mode 3)
   ==================== */

.drop-zone {
  min-height: 100px;
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb, 59, 130, 246), 0.1);
}

.word-tile {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: move;
  user-select: none;
  transition: all 0.2s ease;
}

.word-tile:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.word-tile.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

/* ====================
   8. STORY CARDS (Mode 4)
   ==================== */

.story-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb, 59, 130, 246), 0.2);
}

.story-card.completed {
  opacity: 0.7;
  border-color: #10B981;
}

.story-content {
  line-height: 1.8;
  font-size: 1.125rem;
}

.question-option {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.question-option:hover {
  border-color: var(--accent);
}

.question-option.correct {
  background: #10B981;
  border-color: #059669;
  color: white;
}

.question-option.incorrect {
  background: #EF4444;
  border-color: #DC2626;
  color: white;
}

/* ====================
   9. MODALS
   ==================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  animation: slideUp 0.3s ease;
}

/* ====================
   10. CONFETTI CANVAS
   ==================== */

.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ====================
   11. ANIMATIONS
   ==================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(10px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ====================
   12. RESPONSIVE DESIGN
   ==================== */

@media (max-width: 768px) {
  .mode-icon {
    font-size: 2rem;
  }

  .input-field {
    font-size: 1.25rem;
  }

  .word-tile {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }

  .story-content {
    font-size: 1rem;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

/* ====================
   13. UTILITY CLASSES
   ==================== */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.font-bold {
  font-weight: 700;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-4xl {
  font-size: 2.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.space-y-1 > * + * {
  margin-top: 0.25rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

/* ====================
   14. GAME HEADER
   ==================== */

.game-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

/* ====================
   15. STATISTICS
   ==================== */

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-item:last-child {
  border-bottom: none;
}
