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

body {
  font-family: 'Inter', sans-serif;
  /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
  min-height: 100vh;
  padding: 40px 20px;
}

.main-container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.6s ease-out;
}

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

h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 24px;
  line-height: 1.3;
}

.instruction-text {
  font-size: 16px;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 16px;
}

.pseudocode-block {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  border: 2px solid #fbbf24;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.pseudocode-block pre {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #78350f;
}

#sortable-container {
  background: #f7fafc;
  border: 3px dashed #cbd5e0;
  border-radius: 16px;
  padding: 20px;
  min-height: 120px;
  margin: 24px 0;
  transition: all 0.3s ease;
}

#sortable-container:hover {
  border-color: #667eea;
  background: #edf2f7;
}

.sortable-item {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  font-weight: 500;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  cursor: grab;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.sortable-item::before {
  /*content: '⋮⋮';*/
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e0;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sortable-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  border-color: #667eea;
}

.sortable-item:hover::before {
  opacity: 1;
}

.sortable-item:active {
  cursor: grabbing;
}

.sortable-item.dragging {
  opacity: 0.6;
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
  border-color: #667eea;
  z-index: 1000;
}

.sortable-item.drag-over {
  border-top: 3px solid #667eea;
  animation: pulse 0.6s ease-in-out infinite;
}

.sortable-item.drag-over-bottom {
  border-bottom: 3px solid #667eea;
  animation: pulse 0.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.congratulation-block {
  border: 2px solid #10b981;
  padding: 24px;
  margin: 24px 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  font-weight: 400;
  color: #065f46;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.incorrect-order-block {
  border: 2px solid #ef4444;
  padding: 24px;
  margin: 24px 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  font-weight: 400;
  color: #991b1b;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
  animation: shake 0.5s ease-out;
}

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

.check-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 18px;
  font-weight: 600;
  padding: 16px 48px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  font-family: 'Inter', sans-serif;
}

.check-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.check-button:active {
  transform: translateY(0);
}

pre code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 100%;
  font-weight: 600;
}

pre {
  margin-bottom: 0 !important;
}