/* ======================================
 * 사이드바 스타일
 * ====================================== */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: #ffffff;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 모바일에서 사이드바 숨김 */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.sidebar-active {
        transform: translateX(0);
    }
}

.sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.sidebar-logo a {
    font-size: 24px;
    font-weight: bold;
    color: #7C3AED;
    text-decoration: none;
}

/* 사이드바 메뉴 */
.sidebar-menu {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

.sidebar-menu-category {
    margin: 20px 0 10px;
    padding: 0 20px;
    color: #666;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu-item {
    margin: 5px 0;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu-link:hover, .sidebar-menu-link.active {
    background-color: rgba(2, 14, 226, 0.1);
    color: #020ee2;
}

.sidebar-menu-icon {
    width: 24px;
    margin-right: 12px;
    text-align: center;
}

/* 사이드바 사용자 섹션 (기존) */
.sidebar-user-section {
    margin-top: auto;
    padding: 20px;
}

.sidebar-user-card {
    background: linear-gradient(145deg, #ffffff, #f0f2f5);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(2, 14, 226, 0.1);
}

.sidebar-user-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(2, 14, 226, 0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #020ee2, #5d66ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    margin-right: 12px;
}

.user-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
}

.user-role {
    font-size: 13px;
    color: #666;
}

.sidebar-point-charge-button {
    width: 100%;
    background: linear-gradient(135deg, #020ee2, #5d66ff);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.sidebar-point-charge-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(2, 14, 226, 0.2);
}

/* 포인트 통계 */
.point-stats {
    margin-top: 15px;
}

.point-stats .stats-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
}

.point-stats .point-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    background: rgba(2, 14, 226, 0.05);
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid rgba(2, 14, 226, 0.1);
    box-shadow: 0 2px 8px rgba(2, 14, 226, 0.05);
}

.point-stats .point-value {
    font-size: 26px;
    font-weight: 700;
    color: #020ee2;
    margin-right: 5px;
}

.point-stats .point-unit {
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

/* ======================================
 * 사이드바 하단 섹션 (새로 추가)
 * ====================================== */
.sidebar-bottom-section {
    margin-top: auto;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
}

/* 외부 링크 버튼들 */
.sidebar-external-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.external-link-button {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f5f7ff, #ffffff);
    border: 1px solid rgba(2, 14, 226, 0.1);
    border-radius: 12px;
    color: #020ee2;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.external-link-button:hover {
    background: linear-gradient(135deg, #020ee2, #5d66ff);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 14, 226, 0.2);
}

.external-link-icon {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 16px;
}

.external-link-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.external-link-arrow {
    font-size: 12px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.external-link-button:hover .external-link-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* 내 정보 카드 */
.sidebar-user-info-card {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(145deg, #ffffff, #f0f2f5);
    border: 1px solid rgba(2, 14, 226, 0.1);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.sidebar-user-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(2, 14, 226, 0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.sidebar-user-info-card:hover {
    background: linear-gradient(145deg, #f5f7ff, #e8ecff);
    border-color: rgba(2, 14, 226, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 14, 226, 0.15);
}

.user-info-avatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, #020ee2, #5d66ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(2, 14, 226, 0.3);
}

.user-info-details {
    flex: 1;
    min-width: 0;
}

.user-info-label {
    font-size: 11px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.user-info-id {
    font-size: 13px;
    color: #888;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info-name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info-arrow {
    color: #020ee2;
    font-size: 14px;
    margin-left: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-user-info-card:hover .user-info-arrow {
    transform: translateX(3px);
}

/* 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ======================================
 * 헤더 스타일
 * ====================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: white;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 990;
    transition: all 0.3s ease;
}

/* 데스크톱에서 헤더 위치 조정 */
@media (min-width: 992px) {
    .header {
        left: 260px;
    }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 모바일 햄버거 버튼 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* 헤더 포인트 충전 버튼 */
.header-point-charge-button {
    background: linear-gradient(135deg, #020ee2, #5d66ff);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(2, 14, 226, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-point-charge-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(2, 14, 226, 0.3);
    background: linear-gradient(135deg, #1a26e0, #6b77ff);
}

@media (max-width: 768px) {
    .header-point-charge-button span {
        display: none;
    }
}

/* 프로필 드롭다운 */
.profile-dropdown {
    position: relative;
}

.profile-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #f5f7ff, #ffffff);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #020ee2;
    border: none;
}

.profile-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 14, 226, 0.15);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.profile-dropdown.active .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.profile-dropdown-item:hover {
    background: #f5f7ff;
    color: #020ee2;
}

.profile-dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

/* 모바일 오버레이 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.kakao-chat-button {
    display: flex;
    text-decoration: none;
}

.kakao-chat-button img {
    width: 90px;
}

/* ======================================
 * 메인 컨텐츠 스타일
 * ====================================== */
@media (min-width: 992px) {
    .main-container {
        padding-left: 280px !important;
    }
}

@media (max-width: 991px) {
    .main-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sidebar-bottom-section {
        padding-bottom: 20px;
    }
}
