body {
    color: #222;
    margin: 0;
}

.board-wrap,
.board-table th,
.board-table td,
.board-header h2,
.pagination .page,
.write-btn {
    font-size: 13px;
}

.board-wrap {
    max-width: 950px;
    /*margin: 100px auto 80px;*/
    padding: 0 10px;
}

/* 상단 제목 영역 */
.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.board-header h2 {
    font-size: 20px;
    font-weight: 700;
}
.write-btn {
    background-color: #4a90e2;
    border: none;
    color: #fff;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}
.write-btn:hover {
    background-color: #357ac8;
}

/* 게시판 테이블 */
.board-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.board-table th {
    color: #444;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    padding: 1px 6px;
    text-align: center;
}
.board-table td {
    border-bottom: 1px solid #eee;
    padding: 9px 6px;
    text-align: center;
}
.board-table tr:hover {
    background-color: #f9fafc;
    cursor: pointer;
}
.board-table .title {
    text-align: left;
    color: #222;
}
.board-table .reply-count {
    color: #e44;
    font-weight: 500;
    margin-left: 4px;
}
.writer2 .nick {
    font-weight: 500;
}

/* 페이징 */
.pagination {
    text-align: center;
    margin-top: 20px;
}
.pagination .page {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    margin: 0 2px;
    color: #555;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
}
.pagination .page:hover {
    background-color: #f3f6ff;
    border-color: #4a90e2;
    color: #4a90e2;
}
.pagination .active {
    background-color: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

/* ✅ 페이징 감싸는 영역 */
.pagination-area {
    position: relative;
    margin-top: 20px;
}

/* 기존 .pagination 유지 (중앙 정렬) */
.pagination {
    text-align: center;
    margin-top: 20px;
}

/* ✅ 글쓰기 버튼 오른쪽 끝 배치 */
.write-btn.bottom {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}
.write-btn.bottom:hover {
    background-color: #357ac8;
}

/* ✅ 다크모드 스타일 */
body.dark-mode {
    background-color: #121212;
    color: #ddd;
}

/* 테이블, 박스 배경 */
body.dark-mode .board-wrap {
    /*background-color: #121212;*/
}
body.dark-mode .board-table th {
    background-color: #2a2a2a;
    color: #ccc;
    border-bottom: 1px solid #3a3a3a;
}
body.dark-mode .board-table td {
    border-bottom: 1px solid #2d2d2d;
    color: #ddd;
}
body.dark-mode .board-table tr:hover {
    background-color: #242424;
}
body.dark-mode .board-table .title {
    color: #f5f5f5;
}
body.dark-mode .board-table .reply-count {
    color: #ff7676;
}

/* 상단 제목 */
body.dark-mode .board-header h2 {
    color: #fafafa;
}

/* 페이징 */
body.dark-mode .pagination .page {
    background-color: #1c1c1c;
    border: 1px solid #333;
    color: #aaa;
}
body.dark-mode .pagination .page:hover {
    background-color: #2c2c2c;
    color: #4a90e2;
    border-color: #4a90e2;
}
body.dark-mode .pagination .active {
    background-color: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

/* 글쓰기 버튼 */
body.dark-mode .write-btn,
body.dark-mode .write-btn.bottom {
    background-color: #357ac8;
    color: #fff;
}
body.dark-mode .write-btn:hover,
body.dark-mode .write-btn.bottom:hover {
    background-color: #5aa0ff;
}

/* ✅ 기본(PC)에서는 숨김 */
.info-line {
    display: none;
}

/*.mobile-board-title {*/
/*    display: none;*/
/*}*/
.mobile-board-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}
@media (max-width: 768px) {

    body.dark-mode .mobile-board-title {
        /*background: #1b1b1b;*/
        border-color: #2a2a2a;
        color: #f5f5f5;
    }

    /* ✅ 테이블 → 리스트형 전환 */
    .board-table thead,
    .board-table td:nth-child(1),
    .board-table td:nth-child(3),
    .board-table td:nth-child(4),
    .board-table td:nth-child(5),
    .board-table td:nth-child(6) {
        display: none; /* ✅ PC 전용 열 숨김 */
    }

    .board-table,
    .board-table tbody,
    .board-table tr,
    .board-table td {
        width: 100%;
        border: none;
        text-align: left;
    }

    .board-table tr {
        border-bottom: 1px solid #e5e5e5; /* ✅ 밝은 모드에서는 연하게 */
        padding: 6px 0;
    }

    body.dark-mode .board-table tr {
        border-bottom: 1px solid #2a2a2a; /* ✅ 다크모드 유지 */
    }

    /* ✅ 제목 */
    .board-table .title {
        font-size: 13px;
        color: #111; /* ✅ 수정됨: 다크모드 아닐 땐 진한 글자색 */
        font-weight: 500;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ✅ 다크모드 전용 */
    body.dark-mode .board-table .title {
        color: #f5f5f5;
    }


    /* ✅ info-line: 작성자 / 시간 / 조회 */
    .info-line {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #555; /* ✅ 수정: 밝은 모드에서는 진한 중간 회색 */
        font-size: 11px;
        margin-top: 3px;
        line-height: 1;
        height: 16px;
    }

    /* ✅ 다크모드 전용 info-line */
    body.dark-mode .info-line {
        color: #aaa; /* ✅ 어두운 배경에서는 밝은 회색으로 */
    }

    .info-line span {
        display: inline-block;
        white-space: nowrap;
        line-height: 1; /* ✅ 동일 기준 */
        padding-top: 1px; /* ✅ 숫자와 한글 기준선 시각 보정 */
    }

    /* ✅ hover 효과 제거 */
    .board-table tr:hover {
        background: none;
    }

    /* ✅ 페이징 및 글쓰기 버튼 */
    .pagination-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        position: static;
        margin-top: -8px;
        margin-bottom: 9px;
    }

    .write-btn.bottom {
        position: static;
        transform: none;
        padding: 6px 12px;
        font-size: 12px;
        margin-top: 5px;
        margin-bottom: 8px;
    }

    /* ✅ 다크모드에서도 동일하게 유지 */
    body.dark-mode .board-table tr {
        border-bottom: 1px solid #2a2a2a;
    }
    body.dark-mode .board-table .title {
        color: #f5f5f5;
    }
    body.dark-mode .info-line {
        color: #aaa;
    }

}

.board-table th:nth-child(1),
.board-table td:nth-child(1) { width: 6%; }

.board-table th:nth-child(2),
.board-table td:nth-child(2) { width: 54%; }

.board-table th:nth-child(3),
.board-table td:nth-child(3) { width: 12%; }

.board-table th:nth-child(4),
.board-table td:nth-child(4) { width: 15%; }

.board-table th:nth-child(5),
.board-table td:nth-child(5) { width: 7%; }

.board-table th:nth-child(6),
.board-table td:nth-child(6) { width: 6%; }

/* 공지사항 행 강조 */
.notice-row {
    background-color: #fff7db;   /* 밝은 노랑톤 */
    font-weight: 600;
}

/* [공지] 라벨 */
.notice-label {
    color: #e67e22;
    font-weight: 700;
    margin-right: 5px;
}

/* 왼쪽 맨 앞 아이콘 */
.notice-mark {
    font-size: 13px;
    color: #e67e22;
}

/* 공지사항 행 (밝은 모드) */
.notice-row {
    background-color: #f5f5f5 !important;
    font-weight: 700;
}

/* 공지사항 행 텍스트 전체 Bold */
.notice-row td {
    font-weight: 700;
}

/* 다크모드 공지사항 */
body.dark-mode .notice-row {
    background-color: #2a2a2a !important;
}

.list-img-icon {
    width: 18px;
    /*height: 18px;*/
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.85;
}

/* ✅ 뉴스 게시판 제목 줄임 표시 */
.news-title {
    display: inline-block;
    max-width: 700px;     /* 화면 폭에 맞게 조정 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* ✅ 등록일 표시 */
.news-date {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

/* ✅ 뉴스 게시판 링크 색상 통일 */
.board-table a {
    color: inherit;              /* 부모 색상 상속 */
    text-decoration: none;       /* 밑줄 제거 */
}

.board-table a:hover {
    text-decoration: underline;  /* 마우스 올리면 밑줄만 표시 */
}

.news-table td {
    font-size: 12px !important;  /* Safari 확대 차단 */
    line-height: 16px !important; /* px 단위로 고정 */
    padding: 6px 4px;
    vertical-align: middle;
    word-break: keep-all;
    white-space: nowrap;
}

.news-table .news-date {
    font-size: 10px !important;
    color: #777;
}

body.dark-mode .mobile-board-title {
    color: #f5f5f5 !important;
}

.pagination a {
    padding: 6px 2px;
    /*margin: 0 2px;*/
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    background: #f5f5f5;
    font-size: 13px;
}

.pagination a.active {
    background: #4a90e2;
    color: #fff;
    font-weight: bold;
}

.pagination a:hover {
    background: #e6f0ff;
}

/*오늘*/
