/* 기본 스타일 초기화 및 폰트 설정 */
body {
    margin: 0;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    min-height: 100vh;
    box-sizing: border-box; 
    background: linear-gradient(135deg, #fff5e1 0%, #ffe9cc 100%); /* 그라데이션 배경 복원 */
    display: flex;
    flex-direction: column; /* 자식 요소들을 세로로 쌓아 푸터를 하단에 고정 */
}

/* 모든 페이지의 메인 콘텐츠를 감싸는 컨테이너 */
.main-container {
    background-color: #ffffff !important;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    margin-bottom: 30px;
}

/* 로그인, 계정찾기, 회원가입 페이지의 body 중앙 정렬 */
.login-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- 새로운 분할 화면 레이아웃 --- */
.split-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.split-left {
    flex-basis: 50%;
    background: linear-gradient(135deg, #ff8a5c 0%, #ff7e36 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}

.welcome-content {
    max-width: 450px;
    text-align: left;
}

.welcome-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.welcome-content p {
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.9;
}

.welcome-content ul {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    font-size: 16px;
    line-height: 2;
}

.split-right {
    flex-basis: 50%;
    display: flex;
    justify-content: center; /* 수직 중앙 정렬 */
    align-items: center;
}

/* --- 오른쪽 폼 컨테이너 --- */
.form-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px; /* 모서리를 더 둥글게 */
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05); /* 입체적인 그림자 */
    width: 100%;
    max-width: 400px;
    text-align: left;
}

.form-container h2 {
    font-size: 28px;
    color: #ff7e36; /* 대표 색상으로 변경 */
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 10px; /* 버튼 사이 간격 */
    margin-top: 10px;
}

.btn-register {
    display: block;
    padding: 12px;
    background-color: #28a745; /* 초록색 계열 */
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}
.btn-register:hover {
    background-color: #218838;
}

.find-account-link {
    display: block;
    margin-top: 25px;
    font-size: 14px;
    color: #606770;
    text-align: center;
}

/* 헤더 (로고) */
header h1 {
    color: #ff7e36; /* 캐롯(당근) 색상 */
    margin: 0;
    font-size: 42px; /* 로고 크기 키움 */
}

header p {
    color: #606770;
    margin-bottom: 30px;
}

/* 입력 필드 그룹 */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box; /* 패딩이 너비에 포함되도록 설정 */
    font-size: 16px;
    font-weight: 500; /* 글자 굵기를 약간 굵게 */
    color: #1c1e21; /* 글자 색상을 더 진하게 */
    transition: border-color 0.2s ease-in-out; /* 부드러운 전환 효과 */
}

/* 입력창 포커스 시 테두리 색상 변경 */
.input-group input:focus {
    outline: none;
    border-color: #ff7e36;
}

/* 로그인 버튼 */
.btn-login {
    padding: 12px;
    background-color: #ff7e36;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out; /* 부드러운 전환 효과 */
}

.btn-login:hover {
    background-color: #e66a26; /* 호버 색상 유지 */
}

/* form-actions 내부 버튼 공통 스타일 */
.form-actions .btn-login,
.form-actions .btn-register {
    flex: 1; /* 공간을 동일하게 나누어 가짐 */
}

/* 보조 액션 버튼 (취소, 뒤로가기 등) */
.btn-secondary {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #6c757d;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

/* 게시물 목록 스타일 */
.post-list {
    width: 100%;
    border-collapse: collapse;
}

.post-list th, .post-list td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.post-list th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.post-list .title {
    text-align: left;
}

.post-list .title a {
    text-decoration: none;
    color: #333;
}

/* --- 반응형 디자인 (모바일) --- */
@media (max-width: 768px) {
    /* 로그인/회원가입 분할 화면 세로 정렬 */
    .split-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .split-left {
        flex-basis: auto;
        min-height: auto; /* 고정 높이 제거 */
        padding: 10px 20px; /* 상하 여백을 더 축소하여 간결하게 만듦 */
    }
    .welcome-logo {
        display: none; /* 모바일에서 로고 숨기기 */
    }
    .split-right {
        flex-basis: auto;
        padding: 20px;
        /* 로그인 폼이 남은 공간을 채우도록 설정 */
        flex-grow: 1;
        display: flex;
        align-items: center;
    }
    .welcome-content h1 {
        margin-top: 0; /* 제목의 기본 상단 마진 제거 */
        font-size: 32px; /* 제목 크기 축소 */
    }
    .welcome-content p {
        font-size: 16px; /* 본문 크기 축소 */
    }
    .form-container {
        padding: 0 20px 20px; /* 상단 패딩 0, 좌우 20px, 하단 20px */
        box-shadow: none;
    }
    /* 모바일에서 로그인 박스 내부 여백 축소 */
    .form-container h2 {
        margin-top: 10px; /* 제목 상단 여백 축소 */
        margin-bottom: 15px; /* 제목 하단 여백 축소 */
    }
    .input-group { margin-bottom: 15px; }
    .remember-me { margin-top: 10px; }
    .find-account-link { margin-top: 20px; }
    hr { margin: 15px 0; }

    /* 회원가입 페이지 모바일에서 소개 영역 숨기기 */
    .register-page .split-left {
        display: none;
    }

    }

    /* 테이블 가로 스크롤을 위한 래퍼 */
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* iOS에서 부드러운 스크롤 */
        border: 1px solid #eee;
        border-radius: 8px;
    }

    /* 페이지네이션 버튼 크기 축소 */
    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* 모바일 하단 네비게이션 */
    .mobile-footer-nav {
        display: flex;
        width: 100%;
        max-width: 450px; /* PC에서 너비 제한 */
        argin: 0 auto 10px; /* PC에서 하단 여백 및 중앙 정렬 */
        border-radius: 12px; /* PC에서 모서리 둥글게 */
        overflow: hidden; /* border-radius 적용을 위해 */
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .footer-nav-btn {
        flex: 1;
    position: relative; /* 배지 위치의 기준점 */
        padding: 12px 5px;
        text-align: center;
        text-decoration: none;
        color: #495057;
        font-weight: 600;
        font-size: 14px;
        background-color: #f8f9fa;
        border-top: 1px solid #dee2e6;
    }
    .footer-nav-btn.main-action {
        background-color: #007bff;
        color: white;
    }
    /* 푸터 네비게이션 버튼 내의 알림 배지 위치 조정 */
    .footer-nav-btn .notification-badge {
        /* position: absolute; top, right 속성 제거하여 텍스트 옆에 인라인으로 배치 */
        vertical-align: super; /* 기본 notification-badge 스타일 적용 */
        margin-left: 4px; /* 기본 notification-badge 스타일 적용 */
        border: 1px solid white;
    }
}
   
@media (max-width: 768px) {
    .mobile-footer-nav {
        max-width: 412px;
        margin: 0 auto;
        border-radius: 0;
        box-shadow: none;
    }
    .site-footer-inner {
        display: none; /* PC용 푸터 내용은 모바일에서 숨김 */
    }
}
