:root {
    /* Color Variables (Light Mode Default) */
    --bg-color: #fcf9f8;
    --sidebar-bg: #ffffff;
    --text-color: #2c2a29;
    --text-desc: #888380;
    --line-color: #f3eae5;
    --point-color: #FAA381;
    /* Main Color */
    --sub-color: #F5CDA7;
    /* Sub Color */
    --card-bg: #ffffff;
    --input-bg: #fcf6f2;
    --shadow-color: rgba(250, 163, 129, 0.12);
}

body.dark-mode {
    --bg-color: #1a1817;
    --sidebar-bg: #242120;
    --text-color: #efedea;
    --text-desc: #9e9a97;
    --line-color: #383330;
    --point-color: #FAA381;
    --sub-color: #F5CDA7;
    --card-bg: #242120;
    --input-bg: #2e2a27;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Base Reset & Fonts */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.bg_them_mode {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

a:hover {
    color: var(--point-color);
}

ul,
li {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    outline: none;
}

/* Layout Grid */
#wrap {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (Left Fixed) */
.area_sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--line-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: background 0.3s, border 0.3s;
}

.sidebar_inner {
    padding: 50px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Profile Area */
.box_profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}

.img_profile {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--sub-color);
    padding: 4px;
}

.tit_blog {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 5px;
}

.txt_nickname {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--point-color);
    margin-bottom: 8px;
}

.txt_bio {
    font-size: 0.85rem;
    color: var(--text-desc);
    line-height: 1.4;
}

/* Animated Sliding Theme Toggle Switch (Image Matching) */
.box_theme {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 40px;
}

.theme-switch {
    display: inline-block;
    position: relative;
    width: 84px;
    height: 40px;
    cursor: pointer;
    border-radius: 40px;
    -webkit-tap-highlight-color: transparent;
}

.theme-switch input {
    display: none;
}

.switch-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #60c3f9;
    /* Sky blue */
    border-radius: 40px;
    transition: background-color 0.5s ease;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.clouds-bg,
.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.5s ease;
}

.clouds-bg {
    opacity: 1;
    transform: translateY(0);
}

.stars-bg {
    opacity: 0;
    transform: translateY(-20px);
}

.switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 2;
}

.sun-face,
.moon-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.sun-face {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    filter: drop-shadow(0 0 4px rgba(255, 211, 88, 0.4));
    transition: filter 0.5s ease, opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.moon-face {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
    filter: drop-shadow(0 0 6px rgba(100, 180, 255, 0));
    /* base no glow */
    transition: filter 0.5s ease, opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Hover glow effect as requested */
.theme-switch:hover input:not(:checked)~.switch-track .sun-face {
    filter: drop-shadow(0 0 8px rgba(255, 211, 88, 0.9));
}

.theme-switch:hover input:checked~.switch-track .moon-face {
    filter: drop-shadow(0 0 10px rgba(100, 180, 255, 0.9));
}

/* Dark Mode State (Checkbox Checked) */
input:checked~.switch-track {
    background-color: #111827;
    /* Dark night color matches image */
}

input:checked~.switch-track .clouds-bg {
    opacity: 0;
    transform: translateY(20px);
}

input:checked~.switch-track .stars-bg {
    opacity: 1;
    transform: translateY(0);
}

input:checked~.switch-track .switch-thumb {
    transform: translateX(44px);
}

input:checked~.switch-track .switch-thumb .sun-face {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

input:checked~.switch-track .switch-thumb .moon-face {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    filter: drop-shadow(0 0 6px rgba(100, 180, 255, 0.6));
    /* natural glow */
}

/* Category Menu */
.area_menu {
    width: 100%;
    font-size: 0.95rem;
}

.area_menu>ul>li>a {
    display: block;
    font-weight: 700;
    color: var(--point-color);
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.area_menu ul ul {
    margin-left: 10px;
    margin-bottom: 20px;
    border-left: 2px solid var(--line-color);
    padding-left: 12px;
}

.area_menu ul ul li {
    margin-bottom: 10px;
}

.area_menu ul ul li a {
    display: block;
    color: var(--text-color);
    transition: color 0.2s;
    font-size: 0.9rem;
}

.area_menu ul ul li a:hover {
    color: var(--point-color);
    font-weight: 600;
}

.sidebar_footer {
    padding: 25px 30px;
    font-size: 0.8rem;
    color: var(--text-desc);
    border-top: 1px solid var(--line-color);
    text-align: center;
}

/* Main Content Area */
#main {
    flex-grow: 1;
    margin-left: 280px;
    padding: 50px 8%;
    max-width: 1400px;
    width: 100%;
    transition: margin 0.3s, padding 0.3s;
}

/* Centered Header & Search (Trendy) */
.box_header {
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
}

.search_content .box_form {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 2px solid var(--sub-color);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: box-shadow 0.3s, border-color 0.3s;
    width: 400px;
    max-width: 100%;
}

.search_content .box_form:focus-within {
    border-color: var(--point-color);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.inp_search {
    border: none;
    background: transparent;
    padding: 14px 24px;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    flex-grow: 1;
}

.btn_submit {
    padding: 14px 20px;
    color: var(--point-color);
    font-size: 1.1rem;
}

/* List View (Trendy Cards) */
.tit_list {
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 800;
    border-bottom: 3px solid var(--point-color);
    display: inline-block;
    padding-bottom: 8px;
}

.txt_num {
    font-size: 1.1rem;
    color: var(--text-desc);
    font-weight: normal;
    margin-left: 5px;
}

.list_type_notice {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 35px;
}

.item_notice {
    background: var(--card-bg);
    border: 1px solid var(--line-color);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.item_notice:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--shadow-color);
    border-color: var(--sub-color);
}

.link_notice {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.thumb_notice img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--line-color);
}

.desc_notice {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tit_notice {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.item_notice:hover .tit_notice {
    color: var(--point-color);
}

.txt_notice {
    font-size: 0.95rem;
    color: var(--text-desc);
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.box_meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line-color);
    padding-top: 15px;
}

.txt_date {
    font-size: 0.85rem;
    color: var(--text-desc);
}

.badge_status {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--input-bg);
    color: var(--point-color);
    border-radius: 12px;
    font-weight: 600;
}

/* Article View (Detail) */
.area_view {
    background: var(--card-bg);
    border: 1px solid var(--line-color);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
}

.area_title {
    border-bottom: 2px solid var(--line-color);
    padding-bottom: 35px;
    margin-bottom: 50px;
    text-align: center;
}

.tit_article {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
    color: var(--text-color);
}

.info_article {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1rem;
    color: var(--text-desc);
}

.link_category {
    color: var(--point-color);
    font-weight: 700;
    background: var(--input-bg);
    padding: 4px 12px;
    border-radius: 16px;
}

.contents_style {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.contents_style img {
    max-width: 100%;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.contents_style h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--point-color);
    border-left: 5px solid var(--sub-color);
    padding-left: 15px;
}

.contents_style h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
}

.contents_style p {
    margin-bottom: 20px;
}

/* Tags */
.area_tag {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px dashed var(--line-color);
}

.tit_tag {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: block;
    font-weight: 700;
    color: var(--point-color);
}

.box_tag a {
    display: inline-block;
    padding: 8px 16px;
    background: var(--input-bg);
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0 10px 10px 0;
    color: var(--text-desc);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.box_tag a:hover {
    background: var(--card-bg);
    color: var(--point-color);
    border-color: var(--point-color);
    transform: translateY(-2px);
}

/* Pagination */
.area_paging {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
    padding-bottom: 40px;
}

.paging_num {
    display: flex;
    gap: 10px;
}

.link_paging,
.link_num {
    padding: 10px 18px;
    background: var(--card-bg);
    border: 1px solid var(--line-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-desc);
}

.link_paging:hover,
.link_num:hover {
    background: var(--input-bg);
    color: var(--point-color);
    border-color: var(--sub-color);
}

.no-more-prev,
.no-more-next {
    opacity: 0.4;
    pointer-events: none;
}

/* Floating TOP Button */
.top-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(20px);
}

.top-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn_top {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--point-color);
    border: none;
    box-shadow: 0 8px 25px rgba(250, 163, 129, 0.4);
    font-weight: 800;
    color: #fff;
    font-size: 1rem;
    transition: transform 0.2s, background 0.2s;
}

.btn_top:hover {
    transform: translateY(-5px) scale(1.05);
    background: #f08960;
}

/* Responsive (Mobile/Tablet) */
@media screen and (max-width: 1000px) {
    #wrap {
        flex-direction: column;
    }

    .area_sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line-color);
        overflow-y: visible;
    }

    .sidebar_inner {
        padding: 40px 20px;
    }

    #main {
        margin-left: 0;
        padding: 40px 5%;
    }

    .search_content .box_form {
        width: 100%;
    }

    .tit_article {
        font-size: 2rem;
    }

    .area_view {
        padding: 40px 25px;
    }

    .list_type_notice {
        grid-template-columns: 1fr;
    }
}

/* Comments & Guestbook Area */
.area_reply {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px dashed var(--line-color);
}

.tit_reply, .tit_guestbook {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--point-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Write Form */
.reply_write, .guest_write {
    background: var(--input-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 40px;
    border: 1px solid var(--line-color);
}

.box_guest {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.inp_guest {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--line-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.inp_guest:focus {
    border-color: var(--point-color);
}

.box_secret {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-desc);
    display: flex;
    align-items: center;
    gap: 6px;
}

.box_textarea {
    position: relative;
    border: 1px solid var(--line-color);
    border-radius: 12px;
    background: var(--card-bg);
    overflow: hidden;
}

.tf_reply, .tf_guest {
    width: 100%;
    min-height: 100px;
    padding: 20px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    resize: none;
    outline: none;
}

.btn_reply, .btn_guest {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 8px 20px;
    background: var(--point-color);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.btn_reply:hover, .btn_guest:hover {
    background: #f08960;
}

/* List Items */
.list_reply > li, .list_guest > li {
    padding: 25px 0;
    border-bottom: 1px solid var(--line-color);
}

.list_reply > li:last-child, .list_guest > li:last-child {
    border-bottom: none;
}

.list_reply2, .list_guest2 {
    margin-top: 20px;
    padding-left: 50px;
    border-left: 2px solid var(--line-color);
}

.list_reply2 > li, .list_guest2 > li {
    padding: 20px 0 0;
    border-top: 1px dashed var(--line-color);
    margin-top: 20px;
}

.list_reply2 > li:first-child, .list_guest2 > li:first-child {
    border-top: none;
    margin-top: 0;
}

.reply_head, .guest_head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.reply_head .img_profile, .guest_head .img_profile {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--line-color);
    padding: 0;
    margin: 0;
    object-fit: cover;
}

.txt_name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
}

.reply_body .txt_desc, .guest_body .txt_desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 15px;
    word-break: break-all;
    white-space: pre-wrap;
}

.reply_foot, .guest_foot {
    display: flex;
    gap: 15px;
}

.link_modify, .link_reply {
    font-size: 0.85rem;
    color: var(--text-desc);
    font-weight: 500;
}

.link_modify:hover, .link_reply:hover {
    color: var(--point-color);
}

@media screen and (max-width: 600px) {
    .box_guest {
        flex-direction: column;
        gap: 10px;
    }
    
    .list_reply2, .list_guest2 {
        padding-left: 20px;
    }
}