/* 색상 변수 (필요시 수정) */
:root {
    --primary: #000;    /* 제니스타 포인트 컬러 (보라빛 블루) */
    --bg-gray: #F6F7F9;    /* 박스 배경색 */
    --text-gray: #767676;  /* 약관 텍스트 회색 */
    --border: #DDDDDD;     /* 체크박스 테두리 */
}

/* ==========================================================================
   (로그인/회원가입 유지)
   ========================================================================== */
body, html {
    background-color: #f5f5f8;
    margin: 0;
    padding: 0;
    font-family: 'Pretendard Variable', Pretendard, sans-serif; /* 폰트 예시 */
}

.brand-title {
    color: var(--primary);
    font-size: 22px;
    font-weight: 700;
    display: block;
}

.member-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 5vh 20px;
    box-sizing: border-box;
}

.form-wrapper {
    width: 100%;
    max-width: 440px;
    background-color: #ffffff;
    padding: 50px;
    box-sizing: border-box;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding-bottom: 100px;
}

/* 모바일 반응형 */
@media (max-width: 767px) {
    body, html {
        background-color: #fff;
    }
    .member-container .form-wrapper {
        padding: 20px !important;
        box-shadow: none;
        max-width: 100%;
    }
}

h1, h2 { font-size: 22px; font-weight: 700; color: #212529; margin: 0 0 40px 0; line-height: 1.5; }

.input-group { margin-top: 10px; margin-bottom: 5px; position: relative; }
.form-input {
    width: 100%; padding: 12px 0; border: none; border-bottom: 1px solid #ced4da;
    font-size: 18px; font-weight: 600; outline: none; transition: all 0.2s;
    box-sizing: border-box; background-color: transparent; letter-spacing: -.044rem;
}
.form-input::placeholder { color: #757575; }
.form-input:focus { border-bottom: 2px solid #343a40; }
.form-input:focus::placeholder { color: transparent; }

.submit-btn {
    width: 100%; padding: 14px; font-size: 18px; font-weight: 700; color: #ffffff;
    background-color: #212529; border: none; border-radius: 8px; cursor: pointer;
    transition: background-color 0.2s; margin-top: 20px;
}
.submit-btn:hover { background-color: #7416e6; }

.input-with-button { display: flex; align-items: center; gap: 10px; }
.check-btn {
    padding: 10px 15px; font-size: 14px; font-weight: 500; color: #ffffff;
    background-color: #212529; border-radius: 5px; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.login_title { margin-bottom: 50px; }
.social-logins { display: flex; justify-content: space-between; gap: 15px; margin-top: 30px; }
.social-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    padding: 12px; border-radius: 8px; border: 1px solid #dee2e6; background-color: #ffffff;
    cursor: pointer; font-size: 15px; font-weight: 500; transition: background-color 0.2s;
}
.social-btn svg { width: 20px; height: 20px; margin-right: 10px; }
.google-btn:hover { background-color: #f8f9fa; }
.kakao-btn { background-color: #FEE500; border-color: #FEE500; }
.kakao-btn:hover { background-color: #F2D800; }
.help-text { height: 18px; font-size: 14px; color: #868e96; margin-top: 5px; display: flex; align-items: center; letter-spacing: -.044rem; }
.help-icon {
    display: inline-block; width: 16px; height: 16px; line-height: 16px; text-align: center;
    background-color: #e9ecef; color: #868e96; border-radius: 50%; font-size: 12px; font-weight: bold; margin-left: 5px; cursor: pointer;
}
.error { color: red; font-size: 14px; display: block; padding: 10px 0; }
.form-input.success { border-bottom-color: #28a745; background-color: #f0fff4; }
.check-btn.success { background-color: #28a745; color: #ffffff; border-color: #28a745; }
.divider { display: flex; align-items: center; text-align: center; color: #adb5bd; margin: 40px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #dee2e6; }
.divider span { padding: 0 15px; font-size: 13px; text-transform: uppercase; font-weight: 500; }
.login-link { margin-top: 50px; text-align: center; font-size: 15px; color: #495057; }
.login-link a { color: #212529; font-weight: 500; text-decoration: none; transition: text-decoration 0.2s; }
.login-link a:hover { text-decoration: underline; }


/* ==========================================================================
  약관 동의 페이지 전용
   ========================================================================== */

/* 1. 헤더 영역 스타일 재정의 */
.terms-header {
    margin-bottom: 40px;
    text-align: left;
}
/* 기존 h2 스타일을 덮어쓰지 않고 약관 페이지용 클래스로 제어 */
.terms-header .page-title {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    line-height: 1.35;
    margin-top: 20px;
}

/* 2. 원형 체크박스 (Custom Checkbox) 디자인 */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
    width: 100%;
    margin: 0;
}

/* 실제 input은 숨김 처리 */
.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* 체크박스 모양 (동그라미) */
.checkmark {
    display: inline-block;
    height: 24px;
    width: 24px;
    min-width: 24px; /* Flexbox 찌그러짐 방지 */
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
}

/* 라벨 텍스트 스타일 */
.label-text {
    font-size: 16px;
    color: #000;
    font-weight: 500;
    line-height: 1.4;
}
.label-text.gray {
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 400;
}
.label-text.bold {
    font-weight: 700;
}

/* [체크 상태] 테두리 색상 변경 */
.custom-checkbox input:checked ~ .checkmark {
    border-color: var(--primary);
    background-color: transparent;
}

/* [체크 상태] V 표시 그리기 (CSS로 그림) */
.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 6px;
    height: 10px;
    border: solid var(--primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 체크되었을 때 V 표시 보이기 */
.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

/* 3. '필수 약관 모두 동의' 박스 */
.agree-all-box {
    background-color: var(--bg-gray);
    padding: 24px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

/* 4. 약관 리스트 그룹 */
.term-group {
    margin-bottom: 40px;
}
.term-group .group-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
}

/* 5. 리스트 아이템 (체크박스 + 화살표) */
.term-list {
    list-style: none;
    padding: 0 20px; /* 좌우 여백 20px 추가 (위쪽 박스와 동일하게 맞춤) */
    margin: 0;
}

.term-list li {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 양쪽 끝 정렬 */
    margin-bottom: 20px;
}
.term-list li:last-child {
    margin-bottom: 0;
}

/* 오른쪽 화살표 버튼 */
.btn-detail {
    color: #ccc;
    font-size: 14px;
    padding: 5px;
    text-decoration: none;
    transition: color 0.2s;
}
.btn-detail:hover {
    color: var(--primary);
}

/* 6. 하단 버튼 수정 (기존 submit-btn 재활용 및 조정) */
.bottom-action {
    margin-top: 20px;
}
.bottom-action .submit-btn {
    margin-top: 0;
    background-color: #747474; /* 초기 비활성 느낌 */
}
/* 폼 검증 통과 시 JS로 active 클래스 추가한다고 가정 */
.bottom-action .submit-btn.active {
    background-color: var(--primary);
}
.bottom-action .submit-btn:hover {
    background-color: #555;
}


/* 모달 배경 */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
}

/* 모달 박스 */
.modal-box {
    background: #fff; width: 90%; max-width: 500px;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; max-height: 80vh; /* 화면 높이의 80%까지만 */
}

/* 헤더 */
.modal-header {
    padding: 15px 20px; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; font-size: 18px; color: #333; }
.modal-header button { background: none; border: none; font-size: 24px; cursor: pointer; }

/* 본문 (스크롤 가능하게) */
.modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    color: #333;

    /* ⭐ 핵심 추가: 텍스트 파일의 줄바꿈과 공백을 그대로 유지 */
    white-space: pre-wrap;

    /* 선택 사항: 텍스트 파일 느낌을 살리려면 고정폭 글꼴 사용 (필수 아님) */
    /* font-family: 'Courier New', Courier, monospace; */
}

/* 본문 내부 스타일 */
.modal-body h3 { margin-top: 20px; font-size: 16px; color: #222; }
.modal-body ol { padding-left: 20px; }

/* 푸터 */
.modal-footer { padding: 15px; border-top: 1px solid #eee; text-align: right; }
.confirm-btn {
    background: var(--primary); color: #fff; border: none;
    padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold;
}
