/* 다크모드 변수 정의 */
:root {
    --light-bg: #ffffff;
    --light-text: #000000;
    --dark-bg: #1a1a1a;
    --dark-secondary-bg: #2d2d2d;
    --dark-text: rgba(255,255,255,0.9);
    --dark-border: rgba(255,255,255,0.1);
}

/* 라이트모드 (기본) 스타일 */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
    background: var(--light-bg);
    color: var(--light-text);
}

/* 최상단 영역 - 라이트모드 */
#hd {
    background: #fff !important;
}

#hd #tnb {
    border-bottom: 1px solid #eee !important;
    background: #f8f8f8 !important;
}

#hd #tnb .inner {
    background: #f8f8f8 !important;
}

#hd #tnb a {
    color: #666 !important;
    transition: color 0.3s ease;
}

#hd #tnb a:hover {
    color: #333 !important;
}

#hd #hd_define {
    border-right: 1px solid #eee !important;
}

#hd #hd_define li {
    border-right: 1px solid #eee !important;
}

#hd #hd_define li.active a {
    background: #fff !important;
    color: #333 !important;
}

#hd #hd_qnb li {
    border-left: 1px solid #eee !important;
}

#hd #hd_qnb a {
    color: #666 !important;
}

#hd #hd_qnb a:hover {
    color: #333 !important;
}

#hd #theme-toggle-btn {
    color: #666 !important;
}

#hd #theme-toggle-btn:hover {
    color: #333 !important;
}

/* 헤더 래퍼 영역 - 라이트모드 */
#hd_wrapper {
    background: #fff !important;
    border-bottom: 1px solid #ddd;
}

.hd_sch_wr {
    background: #fff;
    padding: 15px 0;
}

#hd_sch {
    border: 1px solid #ddd;
    background: #fff;
    display: flex;
    align-items: stretch;
    height: 40px;
    box-sizing: border-box;
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 4px;
}

#sch_stx {
    background: #fff;
    color: #333;
    border: 0;
    flex: 1;
    height: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    font-size: 14px;
}

#sch_stx::placeholder {
    color: #999;
}

#sch_submit {
    background: none;
    color: #666;
    border: 0;
    min-width: 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    transition: color 0.3s ease;
}

#sch_submit:hover {
    color: #333;
}

/* 로그인 영역 - 라이트모드 */
.hd_login {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 10px 0;
}

.hd_login li {
    position: relative;
    padding: 0 15px;
}

.hd_login li:after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    height: 12px;
    width: 1px;
    background: #ddd;
}

.hd_login li:last-child:after {
    display: none;
}

.hd_login a {
    color: #666;
    font-size: 13px;
    transition: color 0.3s ease;
}

.hd_login a:hover {
    color: #333;
}

/* 네비게이션 */
#gnb {
    background: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

#gnb_all {
    background: #fff;
    border: 1px solid #ddd;
}

.gnb_al_ul {
    background: #fff;
}

.gnb_al_li {
    border-color: #ddd;
}

/* 다크모드 스타일 */
body.dark-mode {
    background: var(--dark-bg) !important;
    color: var(--dark-text) !important;
}

/* 헤더 영역 */
body.dark-mode #hd {
    background: #222 !important;
}

body.dark-mode #tnb {
    background: #222 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

body.dark-mode #tnb .inner {
    background: #222 !important;
}

body.dark-mode #tnb a {
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode #tnb a:hover {
    color: #fff !important;
}

body.dark-mode #hd_define {
    border-right: 1px solid rgba(255,255,255,0.1) !important;
}

body.dark-mode #hd_define li {
    border-right: 1px solid rgba(255,255,255,0.1) !important;
}

body.dark-mode #hd_define li.active a {
    background: #333 !important;
    color: #fff !important;
}

body.dark-mode #hd_qnb li {
    border-left: 1px solid rgba(255,255,255,0.1) !important;
}

body.dark-mode #hd_define .active a {
    color: #fff !important;
    font-weight: bold;
}

body.dark-mode #hd_qnb .visit-num {
    color: var(--dark-text) !important;
    background: var(--dark-bg) !important;
}

body.dark-mode #theme-toggle-btn {
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode #theme-toggle-btn:hover {
    color: #fff !important;
}

/* 헤더 래퍼 영역 - 다크모드 */
body.dark-mode #hd_wrapper {
    background: #222 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

body.dark-mode .hd_sch_wr {
    background: #222 !important;
}

body.dark-mode #hd_sch {
    border: 1px solid rgba(255,255,255,0.1) !important;
    background: #222 !important;
}

body.dark-mode #sch_stx {
    background: #333 !important;
    color: rgba(255,255,255,0.9) !important;
}

body.dark-mode #sch_stx::placeholder {
    color: rgba(255,255,255,0.5) !important;
}

body.dark-mode #sch_submit {
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode #sch_submit:hover {
    color: #fff !important;
}

/* 로그인 영역 - 다크모드 */
body.dark-mode .hd_login {
    background: #222 !important;
}

body.dark-mode .hd_login li:after {
    background: rgba(255,255,255,0.1) !important;
}

body.dark-mode .hd_login a {
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode .hd_login a:hover {
    color: #fff !important;
}

body.dark-mode #hd_wrapper .tnb_admin a {
    color: #a3c8ff !important;
}

body.dark-mode #hd_wrapper .tnb_admin a:hover {
    color: #fff !important;
}

/* 네비게이션 */
body.dark-mode #gnb {
    background: var(--dark-secondary-bg) !important;
    border-top: 1px solid var(--dark-border) !important;
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode #gnb a {
    color: var(--dark-text) !important;
}

body.dark-mode #gnb a:hover {
    color: #fff !important;
}

body.dark-mode .gnb_1dli:hover {
    background: var(--dark-border) !important;
}

/* 전체메뉴 */
body.dark-mode #gnb_all {
    background: var(--dark-secondary-bg) !important;
    border: 1px solid var(--dark-border) !important;
}

body.dark-mode .gnb_al_ul {
    background: var(--dark-secondary-bg) !important;
}

body.dark-mode .gnb_al_li {
    border-color: var(--dark-border) !important;
}

body.dark-mode .gnb_al_a {
    color: var(--dark-text) !important;
}

body.dark-mode .gnb_al_a:hover {
    color: #fff !important;
    background: var(--dark-border) !important;
}

/* 컨테이너 영역 */
body.dark-mode #container,
body.dark-mode #wrapper,
body.dark-mode #container_wr {
    background: var(--dark-bg) !important;
}

/* 푸터 영역 - 라이트모드 */
#ft {
    background: #f8f8f8 !important;
    border-top: 1px solid #eee !important;
}

#ft_wr {
    background: #f8f8f8 !important;
    border-top: 1px solid #eee !important;
    padding: 40px 0;
}

#ft_link {
    border-bottom: 1px solid #eee !important;
}

#ft_link a {
    color: #666 !important;
    transition: color 0.3s ease;
}

#ft_link a:hover {
    color: #333 !important;
}

#ft_company {
    color: #666 !important;
}

#ft_company h2 {
    color: #333 !important;
    margin-bottom: 15px;
}

.ft_info {
    color: #666 !important;
    line-height: 1.7;
}

#ft_copy {
    background: #f1f1f1 !important;
    color: #666 !important;
    border-top: 1px solid #eee !important;
}

/* 푸터 영역 - 다크모드 */
body.dark-mode #ft {
    background: var(--dark-bg) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode #ft_wr {
    background: var(--dark-bg) !important;
    border-top: 1px solid var(--dark-border) !important;
}

body.dark-mode #ft_link {
    border-bottom: 1px solid var(--dark-border) !important;
}

body.dark-mode #ft_link a {
    color: var(--dark-text) !important;
}

body.dark-mode #ft_link a:hover {
    color: #fff !important;
}

body.dark-mode #ft_company {
    color: var(--dark-text) !important;
}

body.dark-mode #ft_company h2 {
    color: #fff !important;
}

body.dark-mode .ft_info {
    color: var(--dark-text) !important;
}

body.dark-mode #ft_copy {
    background: var(--dark-secondary-bg) !important;
    color: var(--dark-text) !important;
    border-top: 1px solid var(--dark-border) !important;
}

/* 스크롤바 스타일 */
body.dark-mode::-webkit-scrollbar {
    width: 12px;
}

body.dark-mode::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

body.dark-mode::-webkit-scrollbar-thumb {
    background-color: var(--dark-secondary-bg);
    border: 3px solid var(--dark-bg);
    border-radius: 10px;
}

/* 기타 요소 */
body.dark-mode #container_title {
    color: var(--dark-text) !important;
    border-color: var(--dark-border) !important;
}

/* 로고 */
body.dark-mode #logo img {
    filter: brightness(0.9);
}

/* 게시판 영역 - 라이트모드 */
#container_title {
    color: #333;
    padding: 20px 0;
}

/* 게시판 영역 - 다크모드 */
body.dark-mode #container_title {
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode #container {
    background: #222 !important;
}

body.dark-mode #container_title span {
    color: rgba(255,255,255,0.8) !important;
}

body.dark-mode .board_title {
    color: rgba(255,255,255,0.8) !important;
}

/* 추가: 더 구체적인 게시판 제목 스타일 */
body.dark-mode #container #container_title,
body.dark-mode #container #wrapper_title,
body.dark-mode #container h1,
body.dark-mode #container h2,
body.dark-mode #container .board_title,
body.dark-mode #container .title_area {
    color: rgba(255,255,255,0.8) !important;
    text-shadow: none !important;
}

body.dark-mode #container #container_title *,
body.dark-mode #container #wrapper_title *,
body.dark-mode #container .board_title *,
body.dark-mode #container .title_area * {
    color: rgba(255,255,255,0.8) !important;
    text-shadow: none !important;
}

/* Dark Mode Styles for Tail Section */
.dark-mode {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.dark-mode a {
    color: #4a9eff !important;
}

.dark-mode a:hover {
    color: #6fb1ff !important;
}

.dark-mode .footer {
    background-color: #2d2d2d !important;
    border-top: 1px solid #404040 !important;
}

.dark-mode .footer_menu {
    background-color: #2d2d2d !important;
}

.dark-mode .footer_menu a {
    color: #ffffff !important;
}

.dark-mode .footer_menu a:hover {
    color: #4a9eff !important;
}

.dark-mode .copyright {
    color: #999999 !important;
}

.dark-mode .footer_company {
    color: #999999 !important;
}

.dark-mode .footer_company a {
    color: #999999 !important;
}

.dark-mode .footer_company a:hover {
    color: #4a9eff !important;
}

body.dark-mode .text-muted {
    color: #cccccc !important;
}
body.dark-mode .text-light {
    color: #ffffff !important;
}
body.dark-mode .footer, 
body.dark-mode #footer {
    background: #1a1a1a !important;
    color: #fff !important;
}
body.dark-mode .footer a, 
body.dark-mode #footer a {
    color: #4a9eff !important;
}
body.dark-mode .footer a:hover, 
body.dark-mode #footer a:hover {
    color: #6fb1ff !important;
} 