html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', Arial, sans-serif;
    background: #f7f8fa;
    box-sizing: border-box;
}

/* 로그인 전체 영역을 수직 중앙 정렬 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

/* 로고가 상단 중앙에 오도록 수정 로그인 박스 있을 때 */
/*.logo-row {*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    gap: 16px;*/
/*    margin-top: 80px;*/
/*    margin-bottom: 40px;*/
/*    width: 100%;*/
/*}*/

/* 로고가 하단 중앙에 오도록 수정 습 좀 음 */
/*.logo-row {*/
/*    position: fixed;*/
/*    bottom: 0;*/
/*    left: 50%;*/
/*    transform: translateX(-50%); !* 가로 중앙 정렬 *!*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    gap: 16px;*/
/*    margin-bottom: 80px; !* 화면 끝에서 띄우기 *!*/
/*    width: auto; !* 필요시 100%로 변경 가능 *!*/
/*}*/

/* 로고가 상단 왼쪽에 오도록 수정 이것도 좀 */
/*.logo-row {*/
/*    position: fixed;*/
/*    top: 20px;*/
/*    left: 40px;*/
/*    display: flex;*/
/*    align-items: center;*/
/*    gap: 16px;*/
/*}*/

/* 로고가 왼쪽 아래에 오도록 수정 낫뱃 */
.logo-row {
    position: fixed;
    bottom: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.close-btn-mobile {
    display: none;
}

.close-btn-pc {
    display: block;
    position: absolute;  /* 화면 왼쪽 위 고정 */
    top: 20px;
    left: 20px;
    margin-left: 10px;
    font-size: 50px;     /* 크게 */
    color: #000;         /* 검은색 */
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

@media screen and (max-width: 990px) {

    .social-login-long-btn {
        width: 100% !important;
        height: 100% !important;
        max-height: 170px;
    }

    .social-login-buttons {
        position: fixed;
        bottom: 30px;
        left: 0;
        right: 0;
        margin: 0 auto 100px;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .login-title-in-box {
        display: none;
    }

    .logo-row {
        position: relative;       /* fixed 제거 */
        left: auto;       /* ← base의 left:40px 무효화 */
        right: auto;
        display: flex;
        justify-content: center;  /* 가로 가운데 */
        align-items: center;      /* 세로 정렬 */
        margin-top: 600px;
        width: fit-content;
    }

    .logo-row img {
        width: 250px;
        height: 130px;
        margin: 0 8px;
    }

    .close-btn-mobile {
        display: block;
        position: absolute;  /* 화면 왼쪽 위 고정 */
        top: 20px;
        left: 20px;
        margin-left: 10px;
        font-size: 100px;     /* 크게 */
        color: #000;         /* 검은색 */
        background: none;
        border: none;
        cursor: pointer;
        line-height: 1;
    }

    .close-btn-pc {
        display: none;
    }
}

/* 로그인 컨테이너를 중앙에 위치 */
#login_container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 400px;
    /* 화면 전체에서 로고와 소셜버튼 영역을 제외한 높이만큼 중앙정렬 */
    flex: 1 0 auto;
}

/* 로그인 박스 스타일 */
#login_box {
    width: 360px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 29, 25, 0.12), 0 1.5px 4px 0 rgba(31, 29, 25, 0.04);
    border: none;
    gap: 18px;
    margin: 0 auto;
}

/* 폼 내부를 세로로 정렬 */
#login_box form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 라벨과 인풋을 세로로 정확히 정렬 */
#login_box label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    margin-top: 0;
    display: block;
    text-align: left;
    line-height: 1.2;
}

/* 인풋 스타일 및 라벨과 인풋 간격 조정 */
#login_box input[type="email"],
#login_box input[type="password"] {
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fafbfc;
    margin-bottom: 18px; /* 라벨-인풋-라벨 간격 통일 */
    transition: border 0.2s;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* 마지막 인풋(비밀번호) 아래 여백 제거 */
#login_box input[type="password"] {
    margin-bottom: 0;
}

/* 1.5px solid #bdbdbd  border: 1.5px solid #bdbdbd;*/
#login_box input[type="email"]:focus,
#login_box input[type="password"]:focus {
    outline: none;
    border-color: #bdbdbd;
    box-shadow: 0 0 0 4px rgba(189, 189, 189, 0.1);
    background: #fff;
}

/* 에러 메시지 박스 스타일 */
.error-message-box {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    margin-bottom: 0;
    border: 1.5px solid #F04438;
    background: #FFF3F2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 0 14px;
}

.error-message-box span,
.error-message-box {
    color: #F04438;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    width: 100%;
    text-align: left;
}

.reset-password-link {
    display: inline-block;
    color: #999999;
    font-size: 0.95em;
    cursor: pointer;
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s;
}
.reset-password-link:hover {
    color: #7a7a7a;
    text-decoration: none;
}

/* 로그인 버튼: 비활성(회색), 활성(눈에 편한 빨간색) */
#input_button {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    background: #d0d5dd;
    transition: background-color 0.2s, opacity 0.2s;
    margin-top: 18px;
    margin-bottom: 18px;
}

#input_button:disabled {
    background: #d0d5dd;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}

#input_button:not(:disabled) {
    background: linear-gradient(90deg, #F04438 0%, #D92D20 100%);
    opacity: 1;
}

/* 소셜 로그인 버튼 영역 중앙 정렬 및 간격 */
.social-login-buttons {
    /*display: grid;*/
    display: flex;
    flex-direction: column; /* 버튼을 세로 배치n */
    align-items: center;    /* 수평 중앙 정렬n */
    justify-content: center;
    gap: 18px;
    /*margin-top: 40px;*/ /* 로그인 박스 갖고올 때 풀기 */
    margin-top: 130px;
    width: 100%;
}

/* 소셜 로그인 버튼 스타일 */
.social-login-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px 0 rgba(31, 29, 25, 0.06);
    cursor: pointer;
    transition: box-shadow 0.2s, background-color 0.2s;
    font-size: 1.5rem;
    padding: 0;
}

.social-login-btn:hover {
    background: #eaeaea;
    box-shadow: 0 4px 16px 0 rgba(31, 29, 25, 0.10);
}

.social-login-long-btn {
    display: block;
    width:300px;
    height:70px;
    margin-top:10px;
}

/* 로그인 타이틀 */
.login-title-in-box {
    width: 100%;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1F1D19;
    margin-bottom: 24px;
    margin-top: 245px;
}

.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}

.popup-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 320px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    text-align: center;
}

.popup-content input {
    width: 100%;
    height: 44px;
    margin-bottom: 12px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.auth-row .popup-input {
    margin-bottom: 0;
}

.popup-content button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#sendResetBtn {
    background: #F04438;
    color: #fff;
}

#closePopup {
    background: #ccc;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;

    /* 추가: 중앙 보정 */
    transform: translate(0, -1px);
}

#closePopup:hover {
    background: #999; /* 더 어두운 회색 */
}

/* 팝업 입력 기본값 */
.popup-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.auth-input {
    padding: 2px 12px 0 12px; /* 위쪽에 여유 줘서 baseline 보정 */
}

.auth-input,
.auth-btn {
    height: 44px;             /* 동일 높이 */
    box-sizing: border-box;   /* 계산 기준 통일 */
    border: 1px solid #ddd;   /* 테두리 두께 통일 */
    border-radius: 8px;
}

.auth-row {
    display: flex;
    align-items: center;  /* 세로 중앙 */
    gap: 8px;
}

/* 전송 버튼 */
.auth-btn {
    width: 70px;                /* 고정 넓이 확보 */
    height: 44px;               /* input과 동일 높이 */
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;            /* 버튼 글자 크기 조정 가능 */
    font-weight: 700;
    line-height: 1;             /* 줄간격 영향 제거 */
    white-space: nowrap;        /* 줄바꿈 금지 */

    background: #F04438;
    color: #fff;
    cursor: pointer;
}

.auth-btn:hover {
    background: #D92D20;
}

.auth-btn:disabled {
    background: #ccc;
    color: #fff;
    cursor: not-allowed;
}

/* 팝업 닫기 버튼 (오른쪽 위 X) */
.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;              /* flex로 정렬 */
    align-items: center;        /* 세로 중앙 */
    justify-content: center;    /* 가로 중앙 */
    padding: 0;                 /* 여백 제거 */
    line-height: 1;             /* 기본 줄높이 무시 */
}

.popup-content {
    position: relative; /* 닫기 버튼 위치 기준 */
}

/* 완료 버튼 */
.complete-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: #F04438;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    margin-top: 12px;   /* 필요시 위쪽만 여백 */
}

.complete-btn:hover {
    background: #D92D20;
}

.complete-btn:disabled {
    background: #ccc;
    color: #fff;
    cursor: not-allowed;
}

.input-wrapper {
    position: relative;
    width: 100%;
}
.input-wrapper .popup-input {
    padding-right: 40px; /* 버튼 공간 확보 */
}
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}
.toggle-password:hover {
    opacity: 1;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}