/* Импорт шрифта */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

/* Переменные цветов */
:root {
  /* Основные цвета */
  --primary: #FF6B35;
  --primary-hover: #FF5722;
  --primary-light: #FFE0B2;

  /* Акцентные цвета */
  --accent-yellow: #FFD93D;
  --accent-blue: #4FC3F7;
  --accent-purple: #BA68C8;

  /* Состояния */
  --success: #6BCF7F;
  --warning: #FFB74D;
  --error: #FF6B6B;
  --disabled: #E0E0E0;

  /* Нейтральные */
  --text-primary: #2E3338;
  --text-secondary: #777C7E;
  --bg-primary: #FFFFFF;
  --bg-secondary: #FFF8F3;
  --border: #E5E5E5;
}

/* Базовые стили */
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-secondary);
}

/* Утилитарные классы */
.btn-primary {
  background: linear-gradient(to right, #FF6B35, #FF5722);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: bold;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.btn-secondary {
  background: white;
  border: 2px solid #FF6B35;
  color: #FF6B35;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #FFF8F3;
  transform: scale(1.05);
}

.btn-ghost {
  color: #6B7280;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  color: #374151;
  background: #F3F4F6;
}

/* Анимации */
@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes wag-tail {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

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

@keyframes check-mark {
  0% { transform: scale(0) rotate(0deg); }
  50% { transform: scale(1.2) rotate(360deg); }
  100% { transform: scale(1) rotate(360deg); }
}

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

@keyframes fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes jump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Классы анимаций */
.animate-bounce-slow {
  animation: bounce-slow 2s ease-in-out infinite;
}

.animate-wag-tail {
  animation: wag-tail 0.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 3s ease-in-out infinite;
  animation-delay: 1.5s;
}

.animate-check-mark {
  animation: check-mark 0.5s ease-out;
  animation-fill-mode: both;
}

.modal-enter {
  animation: modalEnter 0.3s ease-out;
}

.animate-fall {
  animation: fall 3s ease-in-out infinite;
}

.animate-jump {
  animation: jump 0.5s ease-out;
}

.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

/* Tooltip стили */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Улучшенные тени */
.shadow-glow {
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.shadow-glow-hover:hover {
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

/* Градиентные тексты */
.gradient-text {
  background: linear-gradient(135deg, #FF6B35 0%, #FFD93D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Стили для Buddy */
#buddy {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

#buddyTooltip {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Улучшение фокуса для accessibility */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Плавные переходы для всех интерактивных элементов */
button, a, input, select, textarea {
  transition: all 0.3s ease;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FF6B35 0%, #FFD93D 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #FF5722 0%, #FFC107 100%);
}

/* Стили для header */
header {
  animation: slideDown 0.5s ease-out;
}

/* Стили для табов */
.tab-button {
  color: #6B7280;
  transition: all 0.3s ease;
}

.tab-button:hover {
  background-color: #F3F4F6;
}

.tab-button.active {
  background: linear-gradient(to right, #FF6B35, #FF5722);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Улучшенные поля ввода */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #FF6B35;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

/* Карточки с эффектом наведения */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Прогресс бары */
.progress-bar {
  height: 0.25rem;
  background-color: #E5E7EB;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, #FF6B35, #FFD93D);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* Медиа-запросы для reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
