/* ==================== ПОПАП РЕГИСТРАЦИИ ==================== */
:root {
  --popup-primary: #4a7c59;
  --popup-gradient: linear-gradient(135deg, #4a7c59 0%, #5d9367 100%);
  --popup-shadow: 0 25px 50px rgba(74, 124, 89, 0.3);
  --popup-border-radius: 20px;
  --popup-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Оверлей */
.registration-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.registration-popup-overlay.show-animation {
  animation: fadeInOverlay 0.4s ease-out forwards;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

/* Главный контейнер попапа */
.registration-popup {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 24px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  transform: scale(0.7) translateY(50px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.registration-popup-overlay.active .registration-popup {
  transform: scale(1) translateY(0);
}

/* Заголовок попапа */
.popup-header {
  text-align: center;
  padding: 32px 32px 20px;
  position: relative;
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  border-radius: 24px 24px 0 0;
  color: white;
  overflow: hidden;
}

.popup-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
}

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

.popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.popup-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

.popup-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-subtitle {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.4;
}

/* Контент попапа */
.popup-content {
  padding: 32px;
}

.popup-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.popup-benefits li {
  display: flex;
  align-items: flex-start;
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
}

.popup-benefits li i {
  color: #2e7d32;
  margin-right: 12px;
  margin-top: 2px;
  font-size: 16px;
  flex-shrink: 0;
}

/* Таймер уведомление */
.timer-notice {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border: 2px solid #ff9800;
  border-radius: 16px;
  padding: 16px;
  margin: 20px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.timer-notice::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff9800, #f57c00);
  animation: timerProgress 120s linear;
}

@keyframes timerProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.timer-text {
  margin: 0;
  font-size: 14px;
  color: #e65100;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.timer-icon {
  animation: tick 1s infinite;
}

@keyframes tick {
  0%, 50% { transform: scale(1); }
  25% { transform: scale(1.1); }
}

/* Кнопки */
.popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.popup-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.5s ease;
}

.popup-btn:hover::before {
  width: 300px;
  height: 300px;
}

.popup-btn-primary {
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

.popup-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(46, 125, 50, 0.4);
}

.popup-btn-secondary {
  background: linear-gradient(135deg, #1976d2 0%, #2196f3 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(25, 118, 210, 0.3);
}

.popup-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(25, 118, 210, 0.4);
  text-decoration: none;
  color: white;
}

.popup-btn-later {
  background: transparent;
  color: #666;
  border: 2px solid #e0e0e0;
  font-size: 14px;
  padding: 12px 20px;
}

.popup-btn-later:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
  color: #333;
}

/* Социальные кнопки */
.social-auth {
  border-top: 1px solid #e0e0e0;
  padding-top: 24px;
  margin-bottom: 20px;
}

.social-title {
  text-align: center;
  margin-bottom: 16px;
  position: relative;
}

.social-title span {
  background: white;
  padding: 0 16px;
  color: #666;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.social-title::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.social-buttons {
  display: flex;
  gap: 12px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  gap: 8px;
}

.social-btn.telegram {
  background: #0088cc;
  color: white;
}

.social-btn.telegram:hover {
  background: #006699;
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

.social-btn.vk {
  background: #4c75a3;
  color: white;
}

.social-btn.vk:hover {
  background: #3d5a7a;
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

/* Футер попапа */
.popup-footer {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.popup-footer p {
  margin: 0;
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}

/* Адаптивность */
@media (max-width: 600px) {
  .registration-popup {
    width: 95%;
    border-radius: 20px;
    margin: 20px;
  }
  
  .popup-header {
    padding: 24px 20px 16px;
    border-radius: 20px 20px 0 0;
  }
  
  .popup-content {
    padding: 24px 20px;
  }
  
  .popup-title {
    font-size: 20px;
  }
  
  .popup-subtitle {
    font-size: 14px;
  }
  
  .popup-benefits li {
    font-size: 14px;
  }
  
  .popup-btn {
    padding: 14px 20px;
    font-size: 15px;
  }
  
  .social-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .registration-popup {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .popup-header {
    border-radius: 0;
  }
  
  .popup-title {
    font-size: 18px;
    line-height: 1.3;
  }
  
  .popup-content {
    padding: 20px 16px;
  }
}

/* Анимации для появления элементов */
.popup-benefits li {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideInLeft 0.5s ease forwards;
}

.popup-benefits li:nth-child(1) { animation-delay: 0.1s; }
.popup-benefits li:nth-child(2) { animation-delay: 0.2s; }
.popup-benefits li:nth-child(3) { animation-delay: 0.3s; }
.popup-benefits li:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.popup-btn {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.5s ease forwards;
}

.popup-btn-primary { animation-delay: 0.5s; }
.popup-btn-secondary { animation-delay: 0.6s; }
.popup-btn-later { animation-delay: 0.7s; }

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Эффект фокуса для доступности */
.popup-btn:focus,
.popup-close:focus,
.social-btn:focus {
  outline: 3px solid rgba(46, 125, 50, 0.3);
  outline-offset: 2px;
}

/* Темная тема (если нужно) */
@media (prefers-color-scheme: dark) {
  .registration-popup {
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
    color: white;
  }
  
  .popup-benefits li {
    color: #e0e0e0;
  }
  
  .popup-btn-later {
    background: transparent;
    color: #b0b0b0;
    border-color: #555;
  }
  
  .popup-btn-later:hover {
    background: #333;
    border-color: #666;
    color: #e0e0e0;
  }
  
  .social-title::before {
    background: #555;
  }
  
  .social-title span {
    background: #2d2d2d;
    color: #b0b0b0;
  }
  
  .timer-notice {
    background: linear-gradient(135deg, #3d2914 0%, #2d1f0a 100%);
    border-color: #ff9800;
  }
  
  .popup-footer {
    border-top-color: #444;
  }
  
  .popup-footer p {
    color: #aaa;
  }
} 