/* 메인 페이지 팝업 스타일 */

.main-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.main-popup {
  background: white;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: popupSlideIn 0.4s ease-out;
  text-align: center;
  padding: 30px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 팝업 닫기 버튼 */
.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.popup-close:hover {
  background: #f5f5f5;
  color: #333;
}

/* 팝업 이미지 */
.popup-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 20px;
  max-height: 350px;
  object-fit: cover;
}

/* 팝업 제목 */
.popup-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: inherit;
  line-height: 1.3;
}

/* 팝업 내용 */
.popup-content {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  color: inherit;
}

.popup-content p {
  margin-bottom: 12px;
}

.popup-content p:last-child {
  margin-bottom: 0;
}

/* 강조 텍스트 */
.popup-content strong {
  font-weight: 600;
}

.popup-content em {
  font-style: italic;
}

/* 팝업 버튼 */
.popup-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.popup-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.popup-btn-secondary {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .main-popup {
    margin: 20px;
    padding: 25px 20px;
    max-height: 90vh;
  }
  
  .popup-title {
    font-size: 1.3rem;
  }
  
  .popup-content {
    font-size: 0.95rem;
  }
  
  .popup-buttons {
    gap: 10px;
  }
  
  .popup-btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  
  .popup-btn-secondary {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .main-popup-overlay {
    padding: 15px;
  }
  
  .main-popup {
    margin: 0;
    padding: 20px 15px;
    max-height: 95vh;
  }
  
  .popup-close {
    top: 10px;
    right: 10px;
    font-size: 20px;
    width: 25px;
    height: 25px;
  }
  
  .popup-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }
  
  .popup-content {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  
  .popup-image {
    max-height: 250px;
    margin-bottom: 15px;
  }
  
  .popup-buttons {
    gap: 8px;
    margin-top: 15px;
  }
  
  .popup-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
  
  .popup-btn-secondary {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* 테마별 스타일 */
.main-popup.dark-theme {
  background: #1f2937;
  color: white;
}

.main-popup.dark-theme .popup-close {
  color: #9ca3af;
}

.main-popup.dark-theme .popup-close:hover {
  background: #374151;
  color: white;
}

.main-popup.dark-theme .popup-btn-secondary {
  color: #9ca3af;
  border-color: #4b5563;
}

.main-popup.dark-theme .popup-btn-secondary:hover {
  background: #374151;
  border-color: #6b7280;
  color: #d1d5db;
}

/* 특별한 팝업 타입 스타일 */
.main-popup.welcome-popup {
  border: 3px solid #fbbf24;
}

.main-popup.promotion-popup {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
  border: 2px solid #f59e0b;
}

.main-popup.event-popup {
  background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
  border: 2px solid #8b5cf6;
}

/* 로딩 애니메이션 */
.popup-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.popup-loading::after {
  content: '';
  width: 30px;
  height: 30px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}