/* 모바일 사이드바 메뉴 스타일 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    z-index: 1060;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-sidebar.active {
    left: 0;
}

/* 사이드바 헤더 */
.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.mobile-sidebar-logo i {
    font-size: 24px;
    color: #10b981;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* 사이드바 콘텐츠 */
.mobile-sidebar-content {
    padding: 0;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

/* 사용자 정보 섹션 */
.mobile-user-section {
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-user-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.mobile-user-info {
    text-align: center;
}

.mobile-user-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mobile-user-role {
    color: #94a3b8;
    font-size: 14px;
}

/* 인증 섹션 (비로그인 사용자) */
.mobile-auth-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.mobile-login-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.mobile-login-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.mobile-register-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.mobile-register-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

/* 네비게이션 */
.mobile-nav {
    flex: 1;
    padding: 16px 0;
}

.mobile-nav-section {
    margin-bottom: 8px;
}

.mobile-nav-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px 12px 24px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-nav-title i {
    font-size: 16px;
    color: #10b981;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s;
    position: relative;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transform: translateX(4px);
}

.mobile-nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #94a3b8;
}

.mobile-nav-link:hover i {
    color: #10b981;
}

/* 링크 클릭 가능성 및 포인터 커서 보장 */
.mobile-nav-link {
    cursor: pointer;
    pointer-events: auto;
}

.mobile-nav-link:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

/* 모바일에서 링크 터치 최적화 */
@media (hover: none) and (pointer: coarse) {
    .mobile-nav-link:active {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(0.95);
    }
}

/* 뱃지 */
.mobile-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    font-weight: 600;
}

/* 사이드바 푸터 */
.mobile-sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-logout-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

/* 모바일 오버레이 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 스크롤바 스타일링 */
.mobile-sidebar::-webkit-scrollbar {
    width: 4px;
}

.mobile-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.mobile-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .mobile-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .mobile-sidebar.active {
        left: 0;
    }
    
    .mobile-sidebar-header {
        padding: 16px 20px;
    }
    
    .mobile-sidebar-logo {
        font-size: 18px;
    }
    
    .mobile-sidebar-logo i {
        font-size: 20px;
    }
    
    .mobile-user-section,
    .mobile-auth-section {
        padding: 20px;
    }
    
    .mobile-nav-title,
    .mobile-nav-link {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .mobile-sidebar-footer {
        padding: 20px;
    }
}

/* 애니메이션 */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.mobile-sidebar.active {
    animation: slideInLeft 0.3s ease-out;
}

.mobile-sidebar:not(.active) {
    animation: slideOutLeft 0.3s ease-in;
}

/* 다크모드 스타일 제거됨 */

/* 접근성 개선 */
.mobile-sidebar:focus-within {
    outline: 2px solid #10b981;
    outline-offset: -2px;
}

.mobile-nav-link:focus {
    outline: 2px solid #10b981;
    outline-offset: -2px;
    border-radius: 8px;
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .mobile-nav-link {
        padding: 16px 24px; /* 터치 영역 확대 */
    }
    
    .mobile-sidebar-close {
        padding: 12px; /* 터치 영역 확대 */
    }
    
    .mobile-auth-btn {
        padding: 16px 20px; /* 터치 영역 확대 */
    }
}

/* 모바일에서 기존 전체메뉴 숨기기 */
@media (max-width: 768px) {
    .global-menu-overlay {
        display: none !important;
    }
    
    /* 모바일에서 PC 전체메뉴 관련 요소들 숨기기 */
    .global-menu-overlay,
    .global-menu-inner,
    .global-menu-content {
        display: none !important;
    }
}

/* 모바일 링크 터치 최적화 */
@media (max-width: 768px) {
    .mobile-nav-link {
        -webkit-tap-highlight-color: rgba(16, 185, 129, 0.2);
        touch-action: manipulation;
    }
    
    .mobile-nav-link:active {
        background: rgba(16, 185, 129, 0.2) !important;
        transform: scale(0.98) !important;
    }
}
