/* 팝업 스타일 */
.welcome-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* 오버레이 (배경) */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 팝업 컨테이너 */
.popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 95%;
    max-height: 95vh;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 100000;
}

.welcome-popup.active .popup-container {
    transform: scale(1);
}

/* 닫기 버튼 (X) */
.popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 100001;
    padding: 0;
    line-height: 1;
}

.popup-close i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 팝업 콘텐츠 */
.popup-content {
    position: relative;
    overflow: hidden;
}

.popup-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
}

.popup-content a {
    display: block;
    border: none;
}

.popup-content a:hover .popup-image {
    opacity: 0.95;
}

/* 팝업 푸터 - 활성화됨 */
.popup-footer {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    background: #ffffff;
    border-top: 2px solid #e9ecef;
    min-height: 60px;
}

/* 체크박스 - 활성화됨 */
.popup-checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 5px;
}

.popup-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
    accent-color: #5e42a6;
    margin: 0;
}

.popup-checkbox span {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

/* 닫기 버튼 - 제거됨 */
.popup-close-btn {
    display: none;
}

/* 반응형 디자인 */
@media screen and (max-width: 768px) {
    .popup-container {
        max-width: 98%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .popup-image {
        max-height: 65vh;
    }
    
    .popup-close {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .popup-container {
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .popup-image {
        max-height: 60vh;
    }
    
    .popup-checkbox span {
        font-size: 13px;
    }
}

/* 애니메이션 */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.welcome-popup.active .popup-container {
    animation: popupFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 접근성: 모션 민감성 사용자 대응 */
@media (prefers-reduced-motion: reduce) {
    .welcome-popup,
    .popup-container,
    .popup-close,
    .popup-close-btn {
        transition: none !important;
        animation: none !important;
    }
    
    .popup-close:hover {
        transform: none !important;
    }
}