/* 공통 초기화 */
body { margin: 0; padding: 0; background-color: #f8f9fa; overflow-x: hidden; font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.lucide { vertical-align: middle; }

/* ==========================================================
    [PC] Sidebar Layout (1025px ~)
   ========================================================== */
#vertical_sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; background: #fff; border-right: 1px solid #eef0f2;
    z-index: 1000; display: flex; flex-direction: column;
    padding: 32px 24px; box-sizing: border-box;
    box-shadow: 10px 0 40px rgba(0,0,0,0.015);
}

/* Logo */
.v_logo { margin-bottom: 25px; padding-left: 5px; }
.v_logo img { max-width: 200px; height: auto; display: block; }

/* PC Top Icon Group (수정됨: 배경/테두리 제거 및 아이콘 정렬) */
.v_top_icon_group {
    display: flex; align-items: center; gap: 8px; /* 간격 조정 */
    margin-bottom: 25px; width: 100%;
    padding-left: 5px; /* 로고와 라인 맞춤 */
}
.v_icon_btn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; /* 클릭 영역 확보 */
    background: transparent; /* 배경 투명 */
    border: none; /* 테두리 없음 */
    border-radius: 50%; /* 원형 클릭 영역 */
    cursor: pointer; transition: all 0.2s ease;
    text-decoration: none; padding: 0;
}
.v_icon_btn svg {
    display: block; /* SVG 하단 여백 제거 */
}
/* 호버 시 배경색 변경 없이 약간의 움직임 효과만 줌 */
.v_icon_btn:hover { 
    background: transparent; 
    border-color: transparent; 
    transform: translateY(-2px); 
    opacity: 0.8;
}

/* 검색 버튼 별도 스타일 제거 (아이콘만 남김) */
.v_icon_btn.search_btn { 
    flex: 0 0 auto; /* 늘어나지 않게 고정 */
    justify-content: center; 
    width: 40px; 
    padding: 0;
}

/* [수정됨] 알림 뱃지 스타일 */
.v_icon_btn .badge_dot {
    position: absolute;
    top: 6px;           /* 버튼 상단에서의 위치 */
    right: 6px;         /* 버튼 우측에서의 위치 */
    width: 8px;         /* 점 너비 */
    height: 8px;        /* 점 높이 */
    background: #ef4444; /* 강조된 빨간색 */
    border-radius: 50%;  /* 완전한 원형 */
    border: 2px solid #fff; /* 아이콘과 겹칠 때 구분을 위한 흰색 테두리 */
    box-sizing: content-box; /* 테두리가 크기에 포함되지 않도록 */
    z-index: 10;
}

/* Menu Area */
.v_gnb_area { flex: 1; overflow-y: auto; margin-bottom: 20px; scrollbar-width: none; }
.v_gnb_area::-webkit-scrollbar { display: none; }
.v_gnb ul { list-style: none; padding: 0; margin: 0; }
.v_gnb > ul > li { margin-bottom: 6px; }

.v_gnb_link { 
    display: flex; align-items: center; justify-content: space-between;
    font-size: 15px; font-weight: 500; color: #555; 
    text-decoration: none; padding: 11px 14px; border-radius: 12px; 
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); cursor: pointer;
}
.v_gnb_link:hover { background: #f8f9fa; color: #111; }
.v_gnb_link.active { background: #f0f4ff; color: #2563eb; font-weight: 600; }
.v_gnb_link .icon_group { display: flex; align-items: center; gap: 10px; }
.v_gnb_link .toggle_arrow { transition: transform 0.3s ease; }
.v_gnb_link.active .toggle_arrow { transform: rotate(180deg); color: #2563eb; }

/* Sub Menu */
.v_sub_menu { display: none; padding: 5px 0 10px 0; margin-top: 5px; background: #fff; padding-left: 14px; }
.v_sub_menu.open { display: block; animation: slideDown 0.3s ease forwards; }
.v_sub_menu .sub_li_item { margin-top: 10px; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.v_sub_menu li a { 
    font-size: 14px; color: #666; display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; text-decoration: none; transition: 0.2s; border-radius: 8px;
}
.v_sub_menu li a:hover, .v_sub_menu li.hover-active > a { color: #2563eb; background: #f8f9fa; }

/* PC Bottom Area */
.v_bottom_area { margin-top: auto; position: relative; padding-top: 20px; border-top: 1px solid #f3f4f6; }

.v_user_btn {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; 
    background: transparent; border: 1px solid transparent; border-radius: 14px; cursor: pointer; transition: 0.2s;
}
.v_user_btn:hover, .v_user_btn.active { background: #f8f9fa; }
.v_u_img { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #eee; flex-shrink: 0; border: 1px solid rgba(0,0,0,0.05); }
.v_u_img img { width: 100%; height: 100%; object-fit: cover; }
.v_u_info { flex: 1; text-align: left; overflow: hidden; }
.v_u_nick { font-size: 14px; font-weight: 700; color: #333; margin-bottom: 2px; }
.v_u_sub { font-size: 11px; color: #999; }

/* PC Popover */
.v_user_popover {
    position: absolute; bottom: 70px; left: 0; width: 240px; background: #fff; border: 1px solid #eef0f2; 
    border-radius: 20px; box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1); padding: 20px; box-sizing: border-box; 
    z-index: 1001; opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.2s;
}
.v_user_popover.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* Popover Content */
.vp_top_btns { display: flex; gap: 8px; margin-bottom: 12px; }
.vp_top_btns a { flex: 1; padding: 10px; background: #f1f5f9; border-radius: 10px; font-size: 13px; font-weight: 600; color: #475569; text-align: center; text-decoration: none; }
.vp_logout_btn { width: 100%; padding: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 13px; font-weight: 600; color: #1e293b; cursor: pointer; margin-bottom: 20px; }
.vp_stats_list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #f1f5f9; padding-top: 15px; }
.vp_stat_row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13px; text-decoration: none; }
.vp_stat_row .lbl { color: #94a3b8; }
.vp_stat_row .val { color: #1e293b; font-weight: 700; }
.vp_stat_row .val.highlight { color: #2563eb; }

/* Simple Login Button */
.v_simple_login { 
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 12px; background: #1e293b; color: #fff; border-radius: 12px; 
    font-size: 14px; font-weight: 600; text-decoration: none; transition: 0.2s;
}
.v_simple_login:hover { background: #334155; }

/* Mobile Profile (Hidden on PC) */
.v_mobile_profile { display: none; }

/* Wrapper & Mobile Header (Hidden on PC) */
#content_wrapper { margin-left: 280px; width: calc(100% - 280px); min-height: 100vh; }
.mobile_header { display: none; }


/* ==========================================================
    [Mobile/Tablet] (1024px 이하)
   ========================================================== */
@media (max-width: 1024px) {
    #vertical_sidebar { display: none; z-index: 2005; } 
    
    #vertical_sidebar.mobile_active {
        display: flex; width: 85%; max-width: 340px; 
        box-shadow: 100px 0 100px rgba(0,0,0,0.5);
        padding: 20px;
    }
    
    #content_wrapper { margin-left: 0; width: 100%; padding-top: 60px; }

    /* Mobile Header Fixed */
    .mobile_header { 
        display: flex; position: fixed; 
        top: 0; left: 0; width: 100%; height: 60px; 
        background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
        border-bottom: 1px solid #e5e7eb; align-items: center; justify-content: space-between; 
        padding: 0 16px; box-sizing: border-box; z-index: 2000; 
    }
    .mobile_logo img { height: 40px; }
    .m_header_right { display: flex; align-items: center; gap: 15px; }
    .btn_m_menu, .btn_m_search { background: none; border: none; padding: 0; cursor: pointer; color: #333; display: flex; }

    /* [PC Elements Hide] */
    #vertical_sidebar .v_bottom_area { margin-top: auto; padding-top: 0; border-top: none; }
    #vertical_sidebar .v_user_btn, 
    #vertical_sidebar .v_user_popover,
    .v_top_icon_group { display: none !important; }

    /* ==========================================================
       [NEW] Mobile Bento Grid Style
       ========================================================== */
    .v_mobile_profile {
        display: grid;
        grid-template-columns: repeat(4, 1fr); /* 4열 그리드 */
        gap: 8px; /* 그리드 간격 */
        width: 100%;
        box-sizing: border-box;
    }

    /* Common Card Style */
    .vb_card {
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        padding: 12px;
        display: flex; flex-direction: column; justify-content: center;
        text-decoration: none; box-sizing: border-box;
        transition: transform 0.1s ease, border-color 0.2s;
        box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    }
    .vb_card:active { transform: scale(0.97); } /* 터치 시 쫀득한 느낌 */
    
    /* 1. Profile Info (3칸 차지) */
    .vb_card.profile_info {
        grid-column: span 3;
        flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px;
        background: #f8fafc; border-color: transparent;
    }
    .vb_card.profile_info .u_img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
    .vb_card.profile_info .u_img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
    .vb_card.profile_info .u_txt strong { display: block; font-size: 15px; color: #1e293b; line-height: 1.2; }
    .vb_card.profile_info .u_txt span { font-size: 11px; color: #64748b; }

    /* 2. Logout (1칸 차지) */
    .vb_card.logout {
        grid-column: span 1;
        align-items: center;
        background: #fff0f0; border-color: #ffe4e6; color: #e11d48;
    }

    /* 3. Stats (2칸씩 차지) */
    .vb_card.stat {
        grid-column: span 2;
        align-items: flex-start; padding: 14px;
    }
    .vb_card.stat .lbl { font-size: 11px; color: #94a3b8; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
    .vb_card.stat .val { font-size: 16px; font-weight: 700; color: #334155; }
    .vb_card.stat.accent .val { color: #2563eb; }

    /* 4. Action Buttons (2칸씩 차지) */
    .vb_card.action {
        grid-column: span 2;
        flex-direction: row; align-items: center; justify-content: center; gap: 6px;
        background: #1e293b; color: #fff; border: none;
        padding: 12px;
    }
    .vb_card.action.sub { background: #fff; color: #475569; border: 1px solid #cbd5e1; }
    .vb_card.action span { font-size: 13px; font-weight: 600; }
}

/* 검색 모달 */
.search_modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.96); backdrop-filter: blur(5px);
    z-index: 999999; display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.search_modal.active { opacity: 1; visibility: visible; }
.search_input_lg {
    all: unset; box-sizing: border-box !important; width: 100% !important; max-width: 600px;
    background: transparent !important; border: none !important; border-bottom: 2px solid #e5e7eb !important;
    border-radius: 0 !important; font-size: 32px !important; font-weight: 700 !important; color: #111 !important; 
    padding: 15px 0 !important; height: auto !important; outline: none !important; text-align: center !important;
    box-shadow: none !important; line-height: 1.4 !important;
}
.search_desc { margin-top: 20px; color: #94a3b8; font-size: 14px; }
.search_close_btn { position: absolute; top: 30px; right: 30px; background: none; border: none; cursor: pointer; color: #111; }