/* Дополнительные стили для vanilla JS приложения */

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  line-height: 1.6;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-weight: 400;
}

/* Анимация загрузки */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Стили для drag and drop */
.drag-over {
  border-color: #3b82f6 !important;
  background-color: #eff6ff;
}

/* Стили для кнопок */
.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #2563eb;
}

.btn-primary:disabled {
  background-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

.btn-success {
  background-color: #10b981;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #059669;
}

.btn-success:disabled {
  background-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

/* Стили для изображений */
.image-container {
  position: relative;
  overflow: hidden;
}

.image-container img {
  transition: opacity 0.3s ease;
}

/* Стили для информации о трассах */
.traces-info {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 1rem;
}

.traces-info h4 {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.traces-info .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.traces-info .info-label {
  color: #6b7280;
  font-size: 0.875rem;
}

.traces-info .info-value {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: #1f2937;
}

/* Стили для инструкции */
.instruction {
  background-color: #eff6ff;
  border-radius: 0.5rem;
  padding: 1rem;
}

.instruction h3 {
  font-weight: 500;
  color: #1e40af;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.instruction ol {
  color: #1d4ed8;
  font-size: 0.875rem;
  line-height: 1.5;
}

.instruction li {
  margin-bottom: 0.25rem;
}

/* Фиксированная ширина левой панели */
.lg\\:w-80 {
  width: 300px;
  max-width: 300px;
}

/* Улучшенная типографика */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  font-weight: 700;
  letter-spacing: -0.05em;
}

/* Стили для моноширинного текста */
.font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
  font-weight: 500;
}

/* Улучшенные стили для кнопок */
button {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.025em;
}

/* Стили для полей ввода */
input, textarea, select {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* Стили для лейблов */
label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.025em;
}

/* Современные карточки */
.bg-white {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

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

/* Улучшенные кнопки */
button {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

button:hover:before {
  left: 100%;
}

/* Улучшенные поля ввода */
input, textarea, select {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  transition: all 0.3s ease;
  border: 2px solid #e5e7eb;
}

input:focus, textarea:focus, select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Улучшенная зона загрузки */
#drop-zone {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

#drop-zone:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  transform: scale(1.02);
}

/* Анимации для изображений */
.image-container {
  transition: all 0.3s ease;
}

.image-container:hover {
  transform: scale(1.02);
}

/* Адаптивность */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .flex-col.lg\\:flex-row {
    flex-direction: column;
  }
  
  .grid-cols-1.md\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .grid-cols-2.md\\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Адаптивная шапка */
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  header nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  header h1 {
    font-size: 2rem;
  }
}

/* Стили для состояний загрузки */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Стили для уведомлений */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  color: white;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background-color: #10b981;
}

.notification.error {
  background-color: #ef4444;
}

.notification.info {
  background-color: #3b82f6;
}

