@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
@import url('https://cdn.jsdelivr.net/npm/xeicon@2.3.3/xeicon.min.css');

/* Variables */
:root {
    --bg-color: #f1f3f5;
    --content-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #868e96;
    --zzan-neon: #3b5bdb; /* layout.html에서 오버라이드 됨 */
    --primary-hover: #364fc7;
    --border-color: #dee2e6;
    --header-bg: #ffffff;
    --footer-bg: #343a40;
    --sidebar-width: 320px; /* layout.html에서 오버라이드 됨 */
}

[data-theme="dark"] {
    --bg-color: #1a1a1b;
    --content-bg: #272729;
    --text-color: #d7dadc;
    --text-muted: #818384;
    --primary-hover: #74c0fc;
    --border-color: #343536;
    --header-bg: #1a1a1b;
    --footer-bg: #121212;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color); 
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
ul { list-style: none; }

.zzan_inner { margin: 0 auto; width: 100%; max-width: var(--layout-max-width); padding: 0 20px; }

/* Header Layout */
#zzan_header { border-bottom: 1px solid var(--border-color); }
.zzan_container[data-menu-style="boxed"] #zzan_header { border-bottom: none; }

/* Header Top Area */
.zzan_header_top { height: var(--header-height); border-bottom: 1px solid var(--border-color); background-color: var(--header-top-bg); transition: height 0.3s; }
.zzan_container[data-menu-style="boxed"] .zzan_header_top { background-color: transparent; border-bottom: none; }
.zzan_header_top .zzan_inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }

.zzan_logo { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.zzan_logo img { max-height: 50px; display: block; }

.zzan_utl_menu { display: flex; gap: 20px; align-items: center; font-size: 14px; font-weight: 500; }
.zzan_utl_menu li a:hover { color: var(--zzan-neon); }

.zzan_dark_toggle { background: none; border: none; cursor: pointer; color: var(--text-color); font-size: 20px; padding: 5px; }

/* Notification System */
.zzan_notify_wrapper { position: relative; }
.zzan_notify_btn { position: relative; background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 5px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.zzan_notify_btn:hover { color: var(--zzan-neon); }
.zzan_notify_btn .count { 
    position: absolute; top: -2px; right: -2px; background: #fa5252; color: #fff; 
    font-size: 10px; padding: 1px 4px; border-radius: 10px; font-weight: 700; line-height: 1; min-width: 14px;
}

.zzan_notify_layer { 
    position: absolute; right: 0; top: 100%; padding-top: 15px; width: 280px; display: none; z-index: 1010;
}
.zzan_notify_layer .layer_inner {
    background: var(--content-bg); border: 1px solid var(--border-color); border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); overflow: hidden;
}
.zzan_notify_layer .layer_head { background: var(--bg-color); padding: 12px 15px; font-size: 13px; font-weight: 800; border-bottom: 1px solid var(--border-color); }
.notify_list { max-height: 300px; overflow-y: auto; }
.notify_list li { border-bottom: 1px solid var(--border-color); }
.notify_list li a { display: block; padding: 12px 15px; font-size: 13px; line-height: 1.4; color: var(--text-color); }
.notify_list li a:hover { background: var(--bg-color); color: var(--zzan-neon); }
.notify_list li .date { display: block; font-size: 11px; color: var(--text-muted); margin-top: 4px; padding: 0 15px 10px; }
.no_notify { padding: 30px 15px; text-align: center; color: var(--text-muted); font-size: 13px; }
.zzan_notify_layer .view_all { display: block; padding: 12px; text-align: center; font-size: 12px; font-weight: 700; background: var(--bg-color); color: var(--text-muted); }
.zzan_notify_layer .view_all:hover { color: var(--zzan-neon); }

/* Responsive Visibility */
.m_only { display: none !important; }
@media (max-width: 1024px) {
    .m_only { display: block !important; }
    .pc_only { display: none !important; }
}

/* User Profile */
.zzan_user_profile { position: relative; }
.zzan_user_trigger { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.zzan_user_trigger img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-color); }
.zzan_user_layer { 
    position: absolute; right: 0; top: 100%; padding-top: 15px; background: transparent; 
    width: 220px; display: none; z-index: 1001;
}
.zzan_user_layer_inner {
    background: var(--content-bg); border: 1px solid var(--border-color); border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); overflow: hidden;
}
.zzan_user_profile:hover .zzan_user_layer { display: block; animation: fadeInDown 0.2s ease-out; }

.layer_header { background: var(--bg-color); padding: 15px; border-bottom: 1px solid var(--border-color); }
.layer_header strong { display: block; font-size: 15px; margin-bottom: 4px; }
.layer_header span { font-size: 12px; color: var(--zzan-neon); font-weight: 700; }

.layer_menus li a { display: flex; align-items: center; gap: 10px; padding: 12px 15px; font-size: 14px; border-bottom: 1px solid var(--border-color); }
.layer_menus li a:hover { background: var(--bg-color); color: var(--zzan-neon); }

/* GNB Area */
.zzan_gnb_bar { height: 56px; position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 10px rgba(0,0,0,0.1); background-color: var(--gnb-bg); }
.zzan_gnb_bar .zzan_inner { display: flex; align-items: center; height: 100%; justify-content: space-between; position: relative; }

/* Mobile Menu Button - Hidden on PC */
.zzan_m_nav_open { display: none !important; background: transparent; border: none; box-shadow: none; font-size: 24px; color: var(--text-color); cursor: pointer; padding: 5px; margin-left: 10px; vertical-align: middle; position: relative; z-index: 1000; outline: none; transition: 0.2s; }
.zzan_m_nav_open:hover { color: var(--zzan-neon); }
.zzan_m_nav_open svg { display: block; }

/* Logo Display Logic */
.zzan_logo .logo_dark { display: none; }
[data-theme="dark"] .zzan_logo .logo_light { display: none; }
[data-theme="dark"] .zzan_logo .logo_dark { display: block; }

.zzan_main_menu { display: flex; gap: 5px; height: 100%; align-items: stretch; margin: 0; padding: 0; list-style: none !important; }
.zzan_main_menu > li { position: relative; display: flex; list-style: none !important; }
.zzan_main_menu > li::before, .zzan_main_menu > li::after { display: none !important; content: none !important; }
.zzan_main_menu > li > a { 
    padding: 0 20px; display: flex; align-items: center; 
    font-weight: 700; font-size: 15px; color: inherit; opacity: 0.95; height: 100%;
}
.zzan_main_menu > li:hover > a { opacity: 1; background: rgba(0,0,0,0.1); }

/* Menu Style Variants Logic */
.zzan_container[data-menu-style="full"] .zzan_gnb_bar { border-radius: 0; }
.zzan_container[data-menu-style="boxed"] .zzan_gnb_bar .zzan_inner { border-radius: 12px; margin-top: 6px; margin-bottom: 6px; height: calc(100% - 12px); background-color: var(--gnb-bg); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.zzan_container[data-menu-style="boxed"] .zzan_gnb_bar { background-color: transparent; box-shadow: none; border: none; }

/* Login Form Styles Fix */
.login_footer { margin-top: 15px; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.login_footer a { color: var(--text-muted); }
.login_footer a:hover { color: var(--zzan-neon); text-decoration: underline; }
.input_row input { width: 100%; padding: 12px 12px 12px 35px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-color); color: var(--text-color); font-size: 14px; box-sizing: border-box; }

/* Depth Menus */
.depth2 { 
    position: absolute; top: 100%; left: 0; background: var(--content-bg); 
    border: 1px solid var(--border-color); min-width: 200px; padding: 10px 0; 
    display: none; border-radius: 0 0 8px 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 1002;
}
.zzan_main_menu > li:hover > .depth2 { display: block; animation: fadeInUp 0.2s ease-out; }
.depth2 li { position: relative; list-style: none !important; }
.depth2 li a { display: block; padding: 10px 20px; font-size: 14px; color: var(--text-color); }
.depth2 li a:hover { background: var(--bg-color); color: var(--zzan-neon); }

/* 3rd Depth Fixed */
.depth3 { 
    position: absolute; top: -10px; left: 100%; background: var(--content-bg); 
    border: 1px solid var(--border-color); min-width: 200px; padding: 10px 0; 
    display: none; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.depth2 > li:hover > .depth3 { display: block; animation: fadeInRight 0.2s ease-out; }
.depth3 li { list-style: none !important; }
.depth3 li a { display: block; padding: 8px 20px; font-size: 13px; color: var(--text-color); }
.depth3 li a:hover { background: var(--bg-color); color: var(--zzan-neon); }

@keyframes fadeInRight { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

/* Main Content Area */
#zzan_body { margin: 30px auto; min-height: 800px; width: 100%; max-width: var(--layout-max-width); }
.zzan_content_wrapper { display: flex; gap: 24px; align-items: flex-start; }

#content { 
    flex: 1; background: var(--content-bg); padding: 32px; border-radius: 12px; 
    border: 1px solid var(--border-color); min-width: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Sidebar & Widgets */
#zzan_sidebar { width: var(--sidebar-width); flex: 0 0 var(--sidebar-width); transition: width 0.3s; }
.zzan_widget { background: var(--content-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }

/* Sidebar Submenu (LNB) */
.sidebar_menu_widget { overflow: hidden; }
#zzan_sidebar .zzan_lnb { margin: -1px -24px -24px; padding: 0; list-style: none !important; width: calc(100% + 48px); box-sizing: border-box; }
 #zzan_sidebar .zzan_lnb .depth2 { position: static; display: block; border: none; box-shadow: none; padding: 0; margin: 0; background: none; list-style: none !important; width: 100%; }
#zzan_sidebar .zzan_lnb .depth2 > a { display: block; padding: 12px 24px; font-size: 15px; font-weight: 700 !important; border-bottom: 1px solid var(--border-color); color: var(--text-color); transition: 0.2s; box-sizing: border-box !important; }
#zzan_sidebar .zzan_lnb .depth2:last-child > a { border-bottom: none; }

/* Active & Hover Menu Style - Important should win over default */
#zzan_sidebar .zzan_lnb .depth2.active > a { background-color: var(--zzan-neon); color: #fff !important; border-bottom-color: rgba(255,255,255,0.1); }
#zzan_sidebar .zzan_lnb .depth2:hover > a { background-color: var(--bg-color); color: var(--zzan-neon) !important; padding-left: 29px; }
#zzan_sidebar .zzan_lnb .depth2.active:hover > a { background-color: var(--zzan-neon); color: #fff !important; filter: brightness(1.05); }

#zzan_sidebar .zzan_lnb .depth3 { position: static; display: block; border: none; box-shadow: none; padding: 5px 24px 15px; background: none; list-style: none !important; }
.zzan_lnb .depth3 li { list-style: none !important; margin-bottom: 2px; }
.zzan_lnb .depth3 li:last-child { margin-bottom: 0; }
.zzan_lnb .depth3 li a { display: block; padding: 8px 15px; font-size: 13px; color: var(--text-muted); transition: 0.2s; border-radius: 6px; }
.zzan_lnb .depth3 li a:hover, .zzan_lnb .depth3 li.active a { background: rgba(0,0,0,0.03); color: var(--zzan-neon); padding-left: 18px; }
.zzan_lnb .depth3 li.active a { font-weight: 700; }
.widget_title { font-size: 16px; font-weight: 800; padding-bottom: 12px; margin: 0 -24px 18px -24px; padding-left: 24px; padding-right: 24px; border-bottom: 2px solid var(--zzan-neon); }
.sidebar_menu_widget .widget_title { margin-bottom: 0; }

/* Sidebar Login Form */
.zzan_login_form .input_group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; }
.input_row { position: relative; }
.input_row i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input_row input { width: 100%; padding: 12px 12px 12px 40px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-color); color: var(--text-color); font-size: 14px; }
.zzan_btn_primary { width: 100%; padding: 14px; background: var(--zzan-neon); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 800; font-size: 15px; transition: 0.2s; }
.zzan_btn_primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Sidebar User Card */
.zzan_user_card .card_header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.profile_img { width: 60px; height: 60px; border-radius: 50%; background: var(--bg-color); display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--text-muted); border: 2px solid var(--zzan-neon); overflow: hidden; }
.profile_img img { width: 100%; height: 100%; object-fit: cover; }
.user_info .nick_row { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.user_info .nick { display: block; font-size: 18px; font-weight: 800; }
.user_info .group { font-size: 12px; color: var(--zzan-neon); font-weight: 700; }

/* Level & Point Box */
.zzan_point_box { background: var(--bg-color); border-radius: 10px; margin-bottom: 20px; overflow: hidden; border: 1px solid var(--border-color); }
.zzan_point_box .point_info { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid var(--border-color); background: var(--content-bg); }
.zzan_point_box .point_info .label { font-size: 13px; color: var(--text-muted); font-weight: 700; }
.zzan_point_box .point_info .value { font-size: 16px; font-weight: 900; color: var(--text-color); }

.zzan_point_box .level_progress { padding: 15px; }
.zzan_point_box .level_info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.zzan_point_box .level_info .lv { color: var(--zzan-neon); font-size: 14px; font-weight: 800; }
.zzan_point_box .level_info .pct { color: var(--text-muted); }
.zzan_point_box .progress_bar { width: 100%; height: 6px; background: var(--border-color); border-radius: 3px; overflow: hidden; position: relative; }
.zzan_point_box .progress_bar .bar_inner { height: 100%; background: var(--zzan-neon); border-radius: 3px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
.zzan_point_box .progress_bar .bar_inner::after {
    content: ''; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    animation: barShimmer 2s infinite;
}

@keyframes barShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.card_menu li a { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--border-color); font-weight: 500; }
.card_menu li a:hover { color: var(--zzan-neon); padding-left: 5px; }

/* Footer */
#zzan_footer { background: var(--footer-bg); color: rgba(255,255,255,0.7); padding: 80px 0; margin-top: 80px; }
.footer_top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.footer_logo { filter: brightness(0) invert(1); opacity: 0.8; }
.footer_nav { display: flex; gap: 30px; }
.footer_nav a { font-size: 15px; font-weight: 700; }
.footer_bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 40px; font-size: 14px; text-align: center; }

/* Menu Tone Adjustments */
.tone_light .zzan_main_menu > li > a { color: #fff !important; }
.tone_light .zzan_main_menu > li:hover > a { background: rgba(255,255,255,0.15); }
.tone_dark .zzan_main_menu > li > a { color: #212529 !important; }
.tone_dark .zzan_main_menu > li:hover > a { background: rgba(0,0,0,0.05); }

/* Animations */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Navigation (Drawer) */
.zzan_mobile_overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2000; display: none; }
.zzan_mobile_drawer { position: fixed; top: 0; right: -300px; width: 300px; height: 100%; background: var(--content-bg); z-index: 2001; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: -5px 0 20px rgba(0,0,0,0.1); overflow-y: auto; display: flex; flex-direction: column; }
.zzan_mobile_drawer.active { right: 0; }

.drawer_header { padding: 30px 20px; background: var(--bg-color); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: flex-start; }
.user_info_mini strong { display: block; font-size: 18px; margin-bottom: 5px; }
.user_info_mini span { font-size: 13px; color: var(--zzan-neon); font-weight: 700; }
.zzan_m_nav_close { background: none; border: none; font-size: 24px; color: var(--text-color); cursor: pointer; }

.m_menu_list { flex: 1; padding: 20px 0; }
.m_link_wrap { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; border-bottom: 1px solid rgba(0,0,0,0.03); }
.m_depth1 { display: block; padding: 15px 0; font-size: 16px; font-weight: 700; flex: 1; color: var(--text-color); }
.m_sub_toggle { background: none; border: none; padding: 10px; font-size: 18px; color: var(--text-muted); cursor: pointer; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; }
.m_sub_toggle.active { transform: rotate(180deg); color: var(--zzan-neon); }
.m_sub_toggle svg { transition: transform 0.3s; }

.m_depth2_list { background: rgba(0,0,0,0.02); display: none; padding: 5px 0; }
.m_depth2_list .m_depth2 { display: block; padding: 12px 0 12px 20px; font-size: 14px; color: var(--text-color); flex: 1; font-weight: 600; }
.m_depth2_list .m_link_wrap { padding: 0 20px 0 20px; border-bottom: none; }

.m_depth3_list { background: rgba(0,0,0,0.02); display: none; padding: 5px 0; }
.m_depth3_list li a { display: block; padding: 10px 20px 10px 55px; font-size: 13px; color: var(--text-muted); position: relative; }
.m_depth3_list li a::before { content: '-'; position: absolute; left: 40px; top: 50%; transform: translateY(-50%); opacity: 0.5; }

.drawer_footer { padding: 20px; border-top: 1px solid var(--border-color); }
.drawer_footer ul { display: flex; gap: 15px; }
.drawer_footer ul li a { font-size: 14px; font-weight: 600; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
    .zzan_header_top { height: 60px !important; overflow: visible !important; }
    .zzan_logo img { max-height: 36px; }
    
    /* Hide Menu Bar on Mobile */
    .zzan_gnb_bar { display: none !important; }
    
    .zzan_utl_menu { gap: 12px; display: flex !important; align-items: center; overflow: visible !important; }
    .zzan_m_nav_open { display: inline-flex !important; min-width: 44px; min-height: 44px; background: transparent; border: none; color: var(--text-color); position: relative; z-index: 1000; opacity: 1; visibility: visible; align-items: center; justify-content: center; }
    [data-theme="dark"] .zzan_m_nav_open { color: var(--text-color); }
    
    .zzan_content_wrapper { flex-direction: column; gap: 20px; padding: 0 15px; width: 100%; box-sizing: border-box; }
    #zzan_sidebar { width: 100%; order: 2; flex: none; }
    #content { order: 1; padding: 20px; width: 100%; box-sizing: border-box; flex: none; }
    
    .zzan_user_profile .zzan_nick { display: none; } /* Hide nickname on small mobile to save space */

    #zzan_body { margin: 15px auto; padding: 0; }
    .zzan_inner { padding: 0 15px; }
}
