.sidebar {
    padding: 1.5rem 0 0 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height));
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar .menu {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding-bottom: 80px; /* Footer 공간 확보 */
}

.sidebar .menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sidebar .menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .menu li {
    margin-bottom: 0.25rem;
}

.sidebar .menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: 'Noto Sans KR', 'IBM Plex Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Light mode specific styles for better visibility */
:root .sidebar .menu a {
    color: #e2e8f0;
}

:root .sidebar .menu a:hover {
    color: #f7fafc;
}

.sidebar .menu a:hover {
    background: rgba(49, 130, 206, 0.1);
    color: var(--text-secondary);
}

.sidebar .menu a i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}

.sidebar .menu a .arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
}

/* Active state for current page */
.sidebar .menu a.active {
    background: rgba(49, 130, 206, 0.15);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
}

/* Submenu Styles */
.sidebar .menu .submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: none;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid rgba(49, 130, 206, 0.3);
    margin-left: 1.5rem;
}

.sidebar .menu .submenu.expanded {
    display: block;
}

.sidebar .menu .submenu li {
    margin-bottom: 0;
}

.sidebar .menu .submenu a {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-left: none;
}

/* Light mode specific styles for better visibility */
:root .sidebar .menu .submenu a {
    color: #a0aec0;
}

:root .sidebar .menu .submenu a:hover {
    color: #cbd5e0;
}

.sidebar .menu .submenu a:hover {
    color: var(--text-muted);
    background: rgba(49, 130, 206, 0.05);
}

/* Nested submenu (for language subcategories) */
.sidebar .menu .submenu .submenu {
    margin-left: 1rem;
    border-left: 2px solid rgba(49, 130, 206, 0.2);
}

.sidebar .menu .submenu .submenu a {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Light mode specific styles for better visibility */
:root .sidebar .menu .submenu .submenu a {
    color: #718096;
}

:root .sidebar .menu .submenu .submenu a:hover {
    color: #a0aec0;
}

/* Toggle button styles */
.sidebar .menu .toggle {
    cursor: pointer;
    user-select: none;
}

.sidebar .menu .toggle.expanded .arrow {
    transform: rotate(180deg);
}

/* Footer Icons - Fixed at bottom */
.sidebar .sidebar-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 280px;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border-secondary);
    background: var(--bg-sidebar);
    z-index: 10;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, width 0.3s ease;
}

.sidebar .sidebar-footer a {
    color: var(--text-muted);
    margin: 0 0.75rem;
    font-size: 1.25rem;
    display: inline-block;
    transition: color 0.2s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

/* Light mode specific styles for better visibility */
:root .sidebar .sidebar-footer a {
    color: #a0aec0;
}

:root .sidebar .sidebar-footer a:hover {
    color: #e2e8f0;
}

.sidebar .sidebar-footer a:hover {
    color: var(--accent-primary);
    background: rgba(49, 130, 206, 0.1);
}

/* Responsive sidebar */
@media (max-width: 1024px) {
    .sidebar .sidebar-footer {
        width: 250px; /* 1024px 이하에서 사이드바 너비와 동일 */
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* 초기에는 화면 밖에 숨김 */
        width: 280px;
        height: 100vh;
        z-index: 1001;
        transform: translateX(0);
        transition: transform 0.3s ease;
        padding: 1rem 0 0 0;
    }
    
    .sidebar.mobile-open {
        transform: translateX(280px);
    }
    
    .sidebar .menu {
        padding-bottom: 70px;
    }
    
    .sidebar .menu a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .sidebar .submenu {
        margin-left: 1rem;
    }
    
    .sidebar .submenu a {
        padding: 0.5rem 1rem;
    }
    
    .sidebar .sidebar-footer {
        width: 280px; /* 모바일에서도 사이드바 너비와 동일 */
        padding: 1rem;
        height: 70px;
        position: fixed;
        bottom: 0;
        left: -280px; /* 초기에는 사이드바와 함께 숨김 */
        transition: left 0.3s ease;
    }
    
    .sidebar.mobile-open .sidebar-footer {
        left: 0; /* 사이드바가 열렸을 때만 보임 */
    }
    
    /* 사이드바가 열렸을 때 body 스크롤 방지 */
    body.sidebar-open {
        overflow: hidden;
    }
} 