/* -------------------------------------
   1. 모달 (#auth-modal) 스타일
   ------------------------------------- */

#auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#auth-modal.show {
    opacity: 1;
    visibility: visible;
}

/* 모달 내부 박스 (로그인 폼 영역) */
.modal-content {
    background: white;
    padding: 30px;
    padding-top: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 350px;
    position: relative;
}

/* 닫기 버튼 */
.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 5px;
    right: 15px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover,
.close-btn:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* 모달 제목 */
#auth-title {
    font-size: 20px;
    font-weight: 400;
    color: #777;
    margin-bottom: 25px;
    text-align: center;
}

/* 인증 폼 컨테이너 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 입력 필드 (Input) */
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    padding: 12px;
    border: 1px solid var(--line, #d5d7db);
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

/* 주 버튼 (로그인/회원가입) */
#auth-main-btn {
    font-weight: 600;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
    background-color: var(--primary-blue, #0a3c8a);
    color: white;
    width: 100%;
}

#auth-main-btn:hover {
    background-color: #082d68;
}

/* 구분선 (또는) */
.divider {
    text-align: center;
    margin: 10px 0;
    color: #999;
    font-size: 14px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #eee;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Google 로그인 버튼 */
.google-signin-btn {
    background-color: white;
    color: #444;
    border: 1px solid #ccc;
    font-weight: 600;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.google-signin-btn:hover {
    background-color: #f7f7f7;
}

.google-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* 토글 텍스트 (회원가입/로그인 전환) */
.auth-toggle {
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
    color: #666;
}

.auth-toggle a {
    color: var(--primary-blue, #0a3c8a);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* -------------------------------------
   2. 토스트 메시지 (#toast) 스타일 (⭐ 수정: 중앙 정렬 및 border-radius 삭제)
   ------------------------------------- */

#toast {
    position: fixed;
    /* ⭐ 변경: 중앙 정렬을 위한 설정 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 정확한 중앙 정렬 */

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 15px 25px; /* 패딩 증가 */
    color: white;
    z-index: 10000;
    /* ⭐ border-radius 삭제 */
    min-width: 200px;
    text-align: center;
    font-size: 16px;
    /* 중앙에 뜰 때 초기 위치를 위한 transform 삭제 */
}

#toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%); /* 중앙 유지 */
}

#toast.success {
    background-color: #005b09; /* 성공 색상 유지 */
}

#toast.error {
    background-color: #570000; /* 오류 색상 유지 */
}

/* -------------------------------------
   3. 푸터 (footer) 스타일
   ------------------------------------- */
footer {
    width: 100%;
    padding: 60px 0;
    background-color: #000000;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
}

.footer-wrap {
    max-width: 1280px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-info {
    flex-grow: 1;
}

.footer-info p {
    margin: 0;
    line-height: 2;
}

/* 관리자 모드 버튼 스타일 */
.admin-mode-btn {
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    background-color: transparent;
    color: white;
    border: 1px solid white;
    display: flex;
    align-items: center;
    gap: 8px; /* 아이콘이 없으므로 큰 의미는 없지만 유지 */
    white-space: nowrap;
}

.admin-mode-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


/* -------------------------------------
   추가: 비밀번호 보기 토글 기능 CSS (⭐ 수정: 아이콘 대신 텍스트로 변경)
   ------------------------------------- */

/* 비밀번호 필드와 아이콘을 감싸는 컨테이너 */
.password-wrapper {
    position: relative;
    width: 100%;
}

/* 비밀번호 입력 필드 (텍스트 공간 확보를 위해 오른쪽 패딩 조정) */
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding: 12px 60px 12px 12px; /* 오른쪽 패딩을 더 넓게 설정 */
    border: 1px solid var(--line, #d5d7db);
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

/* 눈 아이콘 스타일 (⭐ 수정: 텍스트 스타일로 변경) */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 12px; /* 텍스트 크기 조정 */
    font-weight: 600;
    padding: 5px;
    transition: color 0.2s;
    z-index: 10;
}

.toggle-password:hover {
    color: #333;
}


/* -------------------------------------
   4. 모바일 반응형 스타일 (max-width: 768px)
   ------------------------------------- */
@media (max-width: 768px) {
    footer {
        padding: 30px 0;
    }

    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .footer-info {
        width: 100%;
        order: 2;
    }

    .footer-info p {
        font-size: 13px;
    }

    .admin-link {
        width: 100%;
        order: 1;
    }

    .admin-mode-btn {
        width: 100%;
        padding: 10px 15px;
        font-size: 15px;
        justify-content: center;
    }
}