/* ************************************** */
/* 1. 메인 페이지 (배경) - 스위치 */
/* ************************************** */
/* body.modal-open 시 메인 페이지 흐림 효과 */
body.modal-open #wrapper {
    filter: blur(10px);
    transition: filter 0.3s ease-out;
    /* 나리야 빌더는 #main-page-content 대신 #wrapper 를 사용합니다. */
}


/* ************************************** */
/* 2. '인터랙티브 모달' (핵심 UI) */
/* ************************************** */

/* ⬇️ [핵심] 화면 전체를 덮는 반투명 검은색 오버레이 */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 50% 검은색 */
    z-index: 1000; /* 나리야 z-index보다 높게 */
    display: flex; /* 2단 패널을 중앙 정렬 */
    justify-content: center;
    align-items: center;
    font-family: 'Noto Sans KR', sans-serif; /* 폰트 강제 적용 */
}

/* ⬇️ 모달 중앙 컨테이너 */
.auth-container-wrapper {
    position: relative;
    width: 90%;
    max-width: 1000px;
    z-index: 101;
    perspective: 2000px;
}

/* * ⬇️ '고급 UI 패널'의 모든 CSS를 그대로 가져옴 */
.auth-container {
    display: flex;
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: authFadeIn 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative; 
}

@keyframes authFadeIn {
    /* 모달이 살짝 떠오르는 효과 */
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-panel {
    flex: 1; padding: 3.5rem 3rem; box-sizing: border-box;
    color: white; display: flex; flex-direction: column;
    position: relative; z-index: 2;
}
.guest-panel { border-right: 1px solid rgba(255, 255, 255, 0.1); }
.member-panel { background: rgba(0, 0, 0, 0.1); }

/* 모바일 반응형 */
@media (max-width: 800px) {
    .auth-modal-overlay { align-items: flex-end; padding-bottom: 5vh; }
    .auth-container-wrapper { width: 90%; }
    .auth-container { flex-direction: column; max-height: 80vh; overflow-y: auto; }
    .guest-panel { border-right: none; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .auth-panel { padding: 2rem; }
}

.auth-panel h3 {
    font-size: 2.2rem; font-weight: 700; margin: 0 0 1rem 0;
    color: #ffffff; text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.auth-panel p.description {
    font-size: 1rem; color: #ccc; line-height: 1.6;
    margin: 0 0 2rem 0; min-height: 60px;
}

/* 버튼 스타일 */
.auth-container .btn {
    display: block; width: 100%; padding: 1rem; border: none;
    border-radius: 8px; font-size: 1.1rem; font-weight: 700;
    box-sizing: border-box; cursor: pointer; text-align: center;
    text-decoration: none; transition: all 0.2s ease;
    margin-bottom: 1rem;
}
.auth-container .btn-primary {
    background-color: #007bff; color: white;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}
.auth-container .btn-primary:hover {
    background-color: #0056b3; transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}
.auth-container .btn-secondary {
    background-color: rgba(255, 255, 255, 0.1); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.auth-container .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* A. '아이콘 인풋박스' */
.auth-container .input-group-icon { position: relative; margin-bottom: 1.25rem; }
.auth-container .input-group-icon .icon {
    position: absolute; left: 15px; top: 50%;
    transform: translateY(-50%); color: #888; z-index: 1;
    width: 20px; height: 20px; fill: #888;
}
.auth-container .input-group-icon input {
    width: 100%; padding: 0.9rem 1rem 0.9rem 50px;
    font-size: 1rem; border: 1px solid #555;
    background: rgba(0,0,0,0.2); border-radius: 8px;
    box-sizing: border-box; color: white;
}
.auth-container .input-group-icon input:focus {
    background: rgba(0,0,0,0.1); border-color: #007bff;
    outline: none;
}
.auth-container .input-group-icon input::placeholder { color: #888; }

/* B. '비밀번호 보기' (아이콘 '안'에 고정) */
.auth-container #modal_mb_password { /* ⬇️ [수정] ID 충돌 방지 */
    padding-right: 50px; /* '눈' 아이콘 공간 확보 */
}
.auth-container .pw-toggle {
    position: absolute; right: 15px; top: 50%;
    transform: translateY(-50%); background: none; border: none;
    cursor: pointer; padding: 0; z-index: 1;
}
.auth-container .pw-toggle .icon { width: 22px; height: 22px; fill: #888; }
.auth-container .pw-toggle:hover .icon { fill: #ccc; }
.auth-container #eye-off { display: none; }

/* C. "박스형" ID/PW 찾기 */
.auth-container .login-options {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.9rem; margin-top: 0.5rem;
}
.auth-container .auto-login-label {
    display: flex; align-items: center; color: #ccc;
    font-weight: 300; cursor: pointer;
}
.auth-container .auto-login-label input { margin-right: 8px; }
.auth-container .find-links-boxed { display: flex; gap: 8px; }
.auth-container .find-links-boxed a {
    color: #ccc; text-decoration: none; font-size: 0.85rem; font-weight: 500;
    padding: 6px 12px; background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.auth-container .find-links-boxed a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* ⬇️ [핵심] 19+ 법적 고지 (모달과 함께 하단에 고정) */
.auth-legal-footer {
    position: fixed; /* '모달 오버레이'와 동일한 fixed */
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #ffffff;
    font-size: 23px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.7);
    z-index: 1002; /* 모달 패널(1001)보다 위에 */
}
.auth-legal-footer a { color: #ffc107; font-weight: 700; text-decoration: none; }