/* Биология: Образовательные стили для интерактивного модуля */

/* Основные цвета для биологических элементов */
:root {
  --cell-membrane: #fbbf24;
  --cytoplasm: #a78bfa;
  --nucleus-color: #ef4444;
  --mitochondria-color: #10b981;
  --chloroplast-color: #22c55e;
  --er-color: #3b82f6;
  --golgi-color: #f59e0b;
  --vacuole-color: #06b6d4;
  --organelle-hover: #fef3c7;
}

/* Анимации для органелл */
@keyframes pulse-organelle {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes float-organelle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Интерактивная клетка */
.cell-container {
  position: relative;
  width: 600px;
  height: 400px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center, var(--cytoplasm) 0%, #8b5cf6 100%);
  border: 4px solid var(--cell-membrane);
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cell-container:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* Органеллы */
.organelle {
  position: absolute;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.organelle:hover {
  animation: pulse-organelle 1s infinite;
  z-index: 10;
  transform: scale(1.2);
}

.organelle.selected {
  box-shadow: 0 0 20px rgba(255,255,255,0.8);
  border: 3px solid white;
}

/* Специфические стили органелл */
.nucleus {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--nucleus-color), #dc2626);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mitochondria {
  width: 40px;
  height: 25px;
  background: var(--mitochondria-color);
  border-radius: 15px;
}

.chloroplast {
  width: 35px;
  height: 35px;
  background: var(--chloroplast-color);
  border-radius: 20px;
}

.er {
  width: 60px;
  height: 20px;
  background: var(--er-color);
  border-radius: 10px;
}

.golgi {
  width: 45px;
  height: 30px;
  background: var(--golgi-color);
  border-radius: 8px;
}

.vacuole {
  width: 50px;
  height: 50px;
  background: var(--vacuole-color);
  border-radius: 25px;
}

/* Информационные панели */
.info-panel {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  margin: 20px 0;
  border-left: 5px solid var(--edu-blue);
  transition: all 0.3s ease;
}

.info-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.info-panel.active {
  border-left-color: var(--edu-green);
  background: #f0fdf4;
}

/* Drag and Drop зоны */
.drop-zone {
  min-height: 100px;
  border: 3px dashed #d1d5db;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  background: #f9fafb;
}

.drop-zone.drag-over {
  border-color: var(--edu-blue);
  background: #eff6ff;
  transform: scale(1.02);
}

.drop-zone.correct {
  border-color: var(--edu-green);
  background: #f0fdf4;
}

.drop-zone.incorrect {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Draggable элементы */
.draggable {
  cursor: grab;
  user-select: none;
  padding: 12px 16px;
  margin: 8px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.draggable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border-color: var(--edu-blue);
}

.draggable.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
}

/* Кнопки уровней сложности */
.level-button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 8px;
}

.level-button.basic {
  background: #22c55e;
  color: white;
}

.level-button.intermediate {
  background: #f59e0b;
  color: white;
}

.level-button.advanced {
  background: #ef4444;
  color: white;
}

.level-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.level-button.active {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Прогресс бар */
.progress-container {
  width: 100%;
  height: 20px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--edu-green), var(--edu-blue));
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Модальные окна для пояснений */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Викторина стили */
.quiz-option {
  padding: 16px;
  margin: 8px 0;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.quiz-option:hover {
  border-color: var(--edu-blue);
  background: #eff6ff;
}

.quiz-option.selected {
  border-color: var(--edu-blue);
  background: #dbeafe;
}

.quiz-option.correct {
  border-color: var(--edu-green);
  background: #f0fdf4;
}

.quiz-option.incorrect {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Адаптивность */
@media (max-width: 768px) {
  .cell-container {
    width: 90%;
    height: 300px;
  }
  
  .organelle {
    font-size: 10px;
  }
  
  .nucleus {
    width: 60px;
    height: 60px;
  }
  
  .mitochondria {
    width: 30px;
    height: 20px;
  }
  
  .modal-content {
    width: 95%;
    padding: 20px;
  }
}

/* Анимация появления */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Специальные эффекты для обучения */
.highlight {
  animation: highlight-pulse 2s infinite;
}

@keyframes highlight-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(34, 197, 94, 0);
  }
}