/*
 * [NEW] 인증 페이지 (Login / Signup) 전용 스타일
 * 
 * Liquid Glassmorphism 디자인 적용
 * 심플하지만 인터랙티브한 동적 무빙 배경 및 둥근 모서리 UI 제공
 * 포인트 컬러: #19065a (네이비), #f05cfa (핑크), #d76750 (오렌지)
 *
 * @author gayul.kim
 * @since 2026-03-06
 */

/* 인증 페이지의 기초 Base */
body.auth-body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; /* 내용이 길 경우 스크롤 허용 */
    font-family: "Suit", sans-serif;
    color: #19065a;
    
    /* 심플하고 밝은 화이트톤 무빙 그라데이션 배경 */
    background: linear-gradient(120deg, #ffffff, #f8f9fa, #ffffff, #e9ecef);
    background-size: 300% 300%;
    animation: bgGradientMove 20s ease infinite;
}

@keyframes bgGradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 메인 컨테이너 정렬 */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* Floating 빛 반사 효과 오브젝트 (심플한 인테리어 포인트) */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    opacity: 0.4;
    animation: floatGlow 10s ease-in-out infinite alternate;
}

.ambient-glow.pink {
    background: #f05cfa;
    width: 400px;
    height: 400px;
    top: -100px;
    left: 10%;
}

.ambient-glow.orange {
    background: #d76750;
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: 10%;
    animation-delay: -5s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Liquid Glass Panel 디자인 */
.glass-panel-auth {
    background: rgba(255, 255, 255, 0.6); /* 밝은 화이트 글래스 기반 */
    backdrop-filter: blur(30px) saturate(130%);
    -webkit-backdrop-filter: blur(30px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(25, 6, 90, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    padding: 3rem 3.5rem;
    width: 100%;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.glass-panel-auth::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shineLight 6s infinite;
}

@keyframes shineLight {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.glass-panel-auth.panel-login { max-width: 420px; }
.glass-panel-auth.panel-signup { max-width: 520px; }

/* 폼 헤더 및 텍스트 */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-weight: 800;
    font-size: 2rem;
    color: #19065a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-weight: 300;
    font-size: 1rem;
    color: #6b5c8c;
}

/* 입력 필드 (Input) 디자인 */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #19065a;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.form-label .required {
    color: #d76750;
    margin-left: 2px;
}

/* Liquid Input */
.form-control-liquid {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(25, 6, 90, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: #19065a;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

/* Select Box 리퀴드 처리 */
select.form-control-liquid {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2319065a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select.form-control-liquid option {
    background: #ffffff;
    color: #19065a;
}

.form-control-liquid:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: #f05cfa;
    box-shadow: 0 0 0 4px rgba(240, 92, 250, 0.15);
}

.form-control-liquid:disabled {
    background: rgba(255, 255, 255, 0.3); /* 비활성화 상태 배경 */
    color: #888;
    cursor: not-allowed;
    border-color: rgba(25, 6, 90, 0.1);
}

.form-control-liquid::placeholder {
    color: rgba(25, 6, 90, 0.4);
}

/* 인풋 폼 옆 버튼이 있을 경우의 Flexbox (이메일 인증 등) */
.input-group-liquid {
    display: flex;
    gap: 0.5rem;
}

.input-group-liquid .form-control-liquid {
    flex: 1;
}

/* 작은 크기의 서브 버튼 (이메일 인증 등) */
.btn-verify {
    background: rgba(25, 6, 90, 0.05);
    border: 1px solid rgba(25, 6, 90, 0.15);
    color: #19065a;
    border-radius: 12px;
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-verify:hover:not(:disabled) {
    background: rgba(215, 103, 80, 0.8); /* #d76750 orange point */
    border-color: #d76750;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(215, 103, 80, 0.3);
}

.btn-verify:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: rgba(25, 6, 90, 0.1);
}

/* ReCAPTCHA Mock 영역 */
.recaptcha-mock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 4px;
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
}

.recaptcha-mock .rc-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recaptcha-mock input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.recaptcha-mock span {
    color: #2c2c2c;
    font-size: 0.9rem;
    font-weight: 500;
}

.recaptcha-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.recaptcha-icon img {
    height: 30px;
    opacity: 0.8;
}
.recaptcha-icon small {
    font-size: 0.6rem;
    color: #555;
    margin-top: 2px;
}

/* 개인정보 동의 체크박스 */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.terms-check input[type="checkbox"] {
    margin-top: 4px;
    cursor: pointer;
    accent-color: #f05cfa;
}

.terms-check label {
    font-size: 0.85rem;
    color: #6b5c8c;
    line-height: 1.4;
    cursor: pointer;
}

.terms-check a {
    color: #f05cfa;
    text-decoration: none;
}
.terms-check a:hover {
    text-decoration: underline;
}

/* Liquid 버튼 디자인 (Welcome과 동기화, 약간 더 꽉찬 100% 느낌) */
.btn-liquid-auth {
    width: 100%;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 0.9rem;
    border-radius: 12px; /* 디자인 통일성을 위해 모서리를 라운드 처리 */
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

/* Login - Pink to Orange Gradient */
.btn-liquid-login {
    background: linear-gradient(135deg, #19065a, #2e106b);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(25, 6, 90, 0.4);
}

.btn-liquid-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #2e106b, #19065a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 6, 90, 0.6);
}

/* Signup - Pink to Orange Gradient */
.btn-liquid-signup {
    background: linear-gradient(135deg, #f05cfa, #d76750);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(240, 92, 250, 0.3);
}

.btn-liquid-signup:hover:not(:disabled) {
    background: linear-gradient(135deg, #d76750, #b24b37);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(215, 103, 80, 0.5);
}

.btn-liquid-auth:active:not(:disabled) {
    transform: scale(0.98);
}

/* 비활성화 상태 공통 */
.btn-liquid-auth:disabled {
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05); /* 흐리게 */
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.5);
    transform: none;
}

/* 하단 텍스트 링크 */
.auth-footer {
    margin-top: 1.5rem;
    text-align: left;
    font-size: 0.85rem;
    color: #6b5c8c;
}
.auth-footer-center {
    text-align: center;
}

.auth-link {
    color: #f05cfa;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.2rem;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #d76750;
    text-decoration: underline;
}

.auth-link-alt {
    color: #6b5c8c;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.auth-link-alt:hover {
    color: #19065a;
    text-decoration: underline;
}

.wait-approval-text {
    font-size: 0.8rem;
    color: #d76750;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

/* [NEW] 모달 오버레이 및 팝업 창 (JS 연동) */
.auth-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    
    /* 기본적으로 화면 밖 숨김 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    max-width: 450px;
    padding: 2.5rem 3rem;
    /* 나타날 때 살짝 아래에서 올라옴 */
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.auth-modal-overlay.active .auth-modal-content {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #6b5c8c;
    cursor: pointer;
    transition: color 0.2s;
}
.auth-modal-close:hover {
    color: #19065a;
}


/* 반응형 모바일 */
@media (max-width: 576px) {
    .glass-panel-auth {
        padding: 2.5rem 1.5rem;
        border-radius: 20px;
    }
    .auth-wrapper {
        padding: 1rem;
    }
    .auth-modal-content {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
}
