.site-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 70px;
    background: linear-gradient(180deg, #1c1f25 0%, #181b20 100%);
    border-right: 1px solid rgba(251, 191, 36, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 999;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
}

.site-sidebar:hover,
.site-sidebar.expanded {
    width: 280px;
    border-right-color: rgba(251, 191, 36, 0.15);
}

.site-sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 20px 14px;
    text-decoration: none;
    border-bottom: 1px solid rgba(251, 191, 36, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.site-sidebar-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 14px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.site-sidebar-close:hover {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.site-sidebar-close svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .site-sidebar-close {
        display: flex;
    }
}

.site-sidebar-logo-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    transition: width 0.3s ease;
}

.site-sidebar:hover .site-sidebar-logo-link::after,
.site-sidebar.expanded .site-sidebar-logo-link::after {
    width: 90%;
}

.site-sidebar:hover .site-sidebar-logo-link,
.site-sidebar.expanded .site-sidebar-logo-link {
    gap: 12px;
    padding-left: 20px;
}

.site-sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.2));
}

.site-sidebar:hover .site-sidebar-logo,
.site-sidebar.expanded .site-sidebar-logo {
    transform: rotate(360deg);
}

.site-sidebar-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.site-sidebar:hover .site-sidebar-name,
.site-sidebar.expanded .site-sidebar-name {
    opacity: 1;
}

.site-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 0 20px 0;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
}

.site-sidebar-nav::after {
    content: '';
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.2), transparent);
    margin: 8px 12px 0 12px;
}

.site-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.site-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.site-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.site-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px 14px;
    margin: 0 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    min-height: 44px;
    height: 44px;
    justify-content: flex-start;
}

.site-sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    border-radius: 0 2px 2px 0;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-sidebar:hover .site-sidebar-item,
.site-sidebar.expanded .site-sidebar-item {
    gap: 0;
    padding-left: 14px;
}

.site-sidebar-item svg,
.site-sidebar-item img {
    min-width: 22px;
    width: 22px;
    height: 22px;
}

.site-sidebar:hover .site-sidebar-item svg,
.site-sidebar:hover .site-sidebar-item img,
.site-sidebar.expanded .site-sidebar-item svg,
.site-sidebar.expanded .site-sidebar-item img {
    margin-right: 24px;
}

.site-sidebar-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    display: block;
}

.site-sidebar-item img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    transition: all 0.2s ease;
    display: block;
}

.site-sidebar-streak-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
    transition: all 0.2s ease;
    display: block;
}

.site-sidebar-item span {
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
    min-width: 0;
    padding-left: 0;
}

.site-sidebar:hover .site-sidebar-item span,
.site-sidebar.expanded .site-sidebar-item span {
    opacity: 1;
    padding-left: 12px;
}

.site-sidebar-item:hover {
    background: rgba(251, 191, 36, 0.06);
    border-color: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    transform: translateX(2px);
}

.site-sidebar-item:hover::before {
    height: 50%;
}

.site-sidebar-item:hover svg {
    transform: translateY(-1px);
    color: #fbbf24;
}

.site-sidebar-item:hover img {
    transform: translateY(-1px) scale(1.05);
}

.site-sidebar-item:active {
    transform: scale(0.96);
}

.site-sidebar-badge {
    display: none !important;
}

.site-sidebar:not(:hover):not(.expanded) .site-sidebar-badge {
    position: absolute;
    top: 6px;
    left: 30px;
    margin-left: 0;
}

.site-sidebar-user {
    padding: 12px 8px;
    border-top: 1px solid rgba(251, 191, 36, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: linear-gradient(180deg, transparent, rgba(251, 191, 36, 0.02));
}

.site-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
}

.site-sidebar:hover .site-sidebar-profile,
.site-sidebar.expanded .site-sidebar-profile {
    gap: 0;
}

.site-sidebar-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.site-sidebar:hover .site-sidebar-profile img,
.site-sidebar.expanded .site-sidebar-profile img {
    margin-right: 24px;
}

.site-sidebar-profile span {
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.site-sidebar:hover .site-sidebar-profile span,
.site-sidebar.expanded .site-sidebar-profile span {
    opacity: 1;
    padding-left: 12px;
}

.site-sidebar-profile:hover {
    background: rgba(251, 191, 36, 0.06);
    border-color: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    transform: translateX(2px);
}

.site-sidebar-profile:hover img {
    border-color: #fbbf24;
    transform: scale(1.05);
}

.site-sidebar-signout {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.site-sidebar:hover .site-sidebar-signout,
.site-sidebar.expanded .site-sidebar-signout {
    gap: 0;
}

.site-sidebar-signout svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    min-width: 20px;
}

.site-sidebar:hover .site-sidebar-signout svg,
.site-sidebar.expanded .site-sidebar-signout svg {
    margin-right: 24px;
}

.site-sidebar-signout span {
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
    min-width: 0;
}

.site-sidebar:hover .site-sidebar-signout span,
.site-sidebar.expanded .site-sidebar-signout span {
    opacity: 1;
    padding-left: 12px;
}

.site-sidebar-signout:hover {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    transform: translateX(2px);
}

.site-sidebar-signout:hover svg {
    transform: translateX(1px);
    color: #ef4444;
}

.site-sidebar-item[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 75px;
    background: linear-gradient(135deg, #2a2d31, #24272b);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.site-sidebar:not(:hover) .site-sidebar-item:hover[data-tooltip]::before {
    opacity: 1;
    left: 70px;
}

.site-sidebar:hover .site-sidebar-item[data-tooltip]::before,
.site-sidebar.expanded .site-sidebar-item[data-tooltip]::before {
    opacity: 0;
}

.site-sidebar-signout[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 75px;
    background: linear-gradient(135deg, #2a2d31, #24272b);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.site-sidebar:not(:hover) .site-sidebar-signout:hover[data-tooltip]::before {
    opacity: 1;
    left: 70px;
}

.site-sidebar:hover .site-sidebar-signout[data-tooltip]::before,
.site-sidebar.expanded .site-sidebar-signout[data-tooltip]::before {
    opacity: 0;
}

.main_content {
    margin-left: 70px;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .site-sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 9999;
    }
    
    .site-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .site-sidebar.mobile-open .site-sidebar-name,
    .site-sidebar.mobile-open .site-sidebar-item span,
    .site-sidebar.mobile-open .site-sidebar-profile span,
    .site-sidebar.mobile-open .site-sidebar-signout span,
    .site-sidebar.mobile-open .sidebar-xp-title,
    .site-sidebar.mobile-open .sidebar-xp-info,
    .site-sidebar.mobile-open .sidebar-xp-monthly {
        opacity: 1;
        max-width: 200px;
        max-height: 100px;
    }
    
    .site-sidebar.mobile-open .site-sidebar-logo-link {
        gap: 12px;
        padding-left: 20px;
    }
    
    .site-sidebar.mobile-open .site-sidebar-item,
    .site-sidebar.mobile-open .site-sidebar-profile,
    .site-sidebar.mobile-open .site-sidebar-signout {
        gap: 0;
    }
    
    .site-sidebar.mobile-open .site-sidebar-item svg,
    .site-sidebar.mobile-open .site-sidebar-item img {
        margin-right: 24px;
    }
    
    .site-sidebar.mobile-open .site-sidebar-profile img {
        margin-right: 24px;
    }
    
    .site-sidebar.mobile-open .site-sidebar-signout svg {
        margin-right: 24px;
    }
    
    .site-sidebar.mobile-open .site-sidebar-item span,
    .site-sidebar.mobile-open .site-sidebar-profile span,
    .site-sidebar.mobile-open .site-sidebar-signout span {
        padding-left: 12px;
    }
    
    .site-sidebar.mobile-open .sidebar-xp-title,
    .site-sidebar.mobile-open .sidebar-xp-info,
    .site-sidebar.mobile-open .sidebar-xp-monthly {
        opacity: 1;
        max-width: 200px;
        max-height: 100px;
    }
    
    .site-sidebar.mobile-open .sidebar-xp-icon {
        width: 24px;
        height: 24px;
    }
    
    .site-sidebar.mobile-open .sidebar-xp-icon img {
        width: 24px;
        height: 24px;
    }
    
    .main_content {
        margin-left: 0;
    }
}


.site-sidebar-xp {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 14px;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.04));
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.site-sidebar:not(:hover):not(.expanded) .site-sidebar-xp {
    padding: 12px 14px;
    margin: 0 0 8px 0;
    gap: 0;
}

.site-sidebar-xp::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.site-sidebar-xp:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.06));
    border-color: rgba(251, 191, 36, 0.25);
    transform: translateX(2px);
}

.sidebar-xp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.site-sidebar:not(:hover):not(.expanded) .sidebar-xp-header {
    gap: 0;
    justify-content: center;
}

.sidebar-xp-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-xp-icon img {
    width: 24px;
    height: 24px;
    display: block;
    transition: all 0.3s ease;
    filter: brightness(0) saturate(100%) invert(79%) sepia(61%) saturate(425%) hue-rotate(359deg) brightness(102%) contrast(96%);
}

.sidebar-xp-level {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    border: 1.5px solid #1a1d21;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

.sidebar-xp-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.site-sidebar:not(:hover):not(.expanded) .sidebar-xp-title {
    max-width: 0;
    opacity: 0;
}

.sidebar-xp-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.site-sidebar:not(:hover):not(.expanded) .sidebar-xp-info {
    max-height: 0;
    opacity: 0;
}

.sidebar-xp-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-xp-current {
    font-weight: 500;
}

.sidebar-xp-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.sidebar-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

.sidebar-xp-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 3px 3px 0 0;
}

.sidebar-xp-monthly {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(251, 191, 36, 0.1);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    max-height: 50px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease, padding-top 0.3s ease;
}

.site-sidebar:not(:hover):not(.expanded) .sidebar-xp-monthly {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
}

.sidebar-xp-monthly svg {
    width: 14px;
    height: 14px;
    color: #fbbf24;
}

.sidebar-xp-monthly-text {
    flex: 1;
}

.sidebar-xp-rank {
    font-weight: 600;
    color: #fbbf24;
}

.site-sidebar:not(:hover):not(.expanded) .sidebar-xp-icon {
    width: 28px;
    height: 28px;
}

.site-sidebar:not(:hover):not(.expanded) .sidebar-xp-icon img {
    width: 28px;
    height: 28px;
}



/* Admin/Moderator Panel Buttons */
.site-sidebar-user .site-sidebar-item {
    margin: 0 8px;
    padding: 10px 14px;
}

.site-sidebar-user .site-sidebar-item svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    flex-shrink: 0;
}

.site-sidebar:not(:hover):not(.expanded) .site-sidebar-user .site-sidebar-item {
    justify-content: center;
    padding: 10px;
}

.site-sidebar:hover .site-sidebar-user .site-sidebar-item svg,
.site-sidebar.expanded .site-sidebar-user .site-sidebar-item svg {
    margin-right: 24px;
}

.site-sidebar:hover .site-sidebar-user .site-sidebar-item span,
.site-sidebar.expanded .site-sidebar-user .site-sidebar-item span {
    opacity: 1;
    padding-left: 0;
}

.site-sidebar-user .site-sidebar-item:hover {
    background: rgba(129, 140, 248, 0.06);
    border-color: rgba(129, 140, 248, 0.15);
    color: #818cf8;
}

.site-sidebar-user .site-sidebar-item:hover svg {
    color: #818cf8;
}
