/* CSS Variables for floating buttons */
:root {
  --accent-red: #FF6F64;
  --accent-red-hover: #ED5A4F;
  --white: #fff;
  --text-light: rgba(255, 255, 255, 0.8);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Контейнер для плавающих кнопок */
.floating-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

/* Главная кнопка с современным градиентом */
.main-button {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 20px rgba(255, 111, 100, 0.4), 
              0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #FF6F64 0%, #FF8A7A 50%, #FF9D8F 100%);
  border: none;
  outline: none;
}

/* Эффект пульсации через псевдоэлемент - ВКЛЮЧЕН */
.main-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(255, 111, 100, 0.3);
  animation: pulse-effect 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: -1;
  opacity: 0;
}

@keyframes pulse-effect {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Второй слой пульсации - ВКЛЮЧЕН */
.main-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(255, 111, 100, 0.2);
  animation: pulse-effect-2 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  z-index: -1;
  opacity: 0;
  animation-delay: 0.5s;
}

@keyframes pulse-effect-2 {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Отключаем пульсацию только при активном состоянии */
.main-button.active::before,
.main-button.active::after {
  animation: none;
  opacity: 0;
}

/* Эффекты при наведении работают только когда кнопка не активна */
.main-button:not(.active):hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 111, 100, 0.5), 
              0 6px 15px rgba(0, 0, 0, 0.15);
}

.main-button:not(.active):hover::before,
.main-button:not(.active):hover::after {
  animation: none;
  opacity: 0;
}

.main-button i {
  color: #FFF;
  font-size: 28px;
  position: relative;
  z-index: 1;
}

/* Второстепенные кнопки */
.secondary-buttons {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.secondary-buttons.active {
  opacity: 1;
  visibility: visible;
}

.secondary-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  background: rgba(255, 150, 140, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
      0 8px 25px rgba(255, 150, 140, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s ease;
  text-decoration: none;
  color: inherit;
  border: none;
  outline: none;
}

/* Поочередное появление кнопок снизу вверх */
.secondary-buttons.active .secondary-button:nth-child(1) {
  transition-delay: 0.1s;
  transform: translateY(0);
  opacity: 1;
}

.secondary-buttons.active .secondary-button:nth-child(2) {
  transition-delay: 0.2s;
  transform: translateY(0);
  opacity: 1;
}

.secondary-buttons.active .secondary-button:nth-child(3) {
  transition-delay: 0.3s;
  transform: translateY(0);
  opacity: 1;
}

.secondary-button:hover {
  transform: translateY(-5px) scale(1.05);
  background: rgba(255, 160, 150, 0.8);
  box-shadow: 
      0 12px 35px rgba(255, 160, 150, 0.4),
      inset 0 1px 0 rgba(255,255,255,0.5),
      inset 0 -1px 0 rgba(0,0,0,0.15);
}

.secondary-button i {
  color: #FFF;
  font-size: 20px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

.secondary-button:hover i {
  transform: scale(1.1);
}

/* Подписи к кнопкам */
.button-label {
  position: absolute;
  right: 70px;
  background-color: rgba(255, 150, 140, 0.95);
  color: #FFF;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(255, 150, 140, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 500;
  backdrop-filter: blur(5px);
}

.secondary-button:hover .button-label {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .floating-container {
    bottom: 25px;
    right: 25px;
  }
  
  .main-button {
    width: 70px;
    height: 70px;
  }
  
  .secondary-button {
    width: 60px;
    height: 60px;
  }
  
  .secondary-buttons {
    bottom: 90px;
  }
  
  .secondary-button i {
    font-size: 22px;
  }
  
  .button-label {
    font-size: 14px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .floating-container {
    bottom: 20px;
    right: 20px;
  }
  
  .main-button {
    width: 65px;
    height: 65px;
  }
  
  .main-button i {
    font-size: 26px;
  }
  
  .secondary-button {
    width: 55px;
    height: 55px;
  }
  
  .secondary-buttons {
    bottom: 85px;
  }
  
  .secondary-button i {
    font-size: 20px;
  }
  
  .secondary-buttons {
    gap: 12px;
  }
  
  .button-label {
    right: auto;
    left: 70px;
  }
}

/* Accessibility Improvements - только для пользователей с ограничениями 
@media (prefers-reduced-motion: reduce) {
  .main-button::before,
  .main-button::after {
    animation: none;
  }
}*/

/* Focus styles for accessibility */
.main-button:focus-visible,
.secondary-button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}