.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #1a1f2e;
    border-right: 1px solid rgba(74, 158, 255, 0.15);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar.open {
    transform: translateX(0);
    opacity: 1;
}

@media (min-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        opacity: 0;
    }

    .sidebar.open {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo:hover {
    transform: scale(1.02);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: filter 0.3s ease;
}

.sidebar-logo:hover .logo-img {
    animation: logoShake 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 15px rgba(74, 158, 255, 0.6));
}

@keyframes logoShake {
    0% {
        transform: scale(1) rotate(0deg);
    }

    20% {
        transform: scale(1.2) rotate(0deg);
    }

    30% {
        transform: scale(1.2) rotate(-5deg);
    }

    40% {
        transform: scale(1.2) rotate(5deg);
    }

    50% {
        transform: scale(1.2) rotate(-5deg);
    }

    60% {
        transform: scale(1.2) rotate(5deg);
    }

    70% {
        transform: scale(1.2) rotate(-3deg);
    }

    80% {
        transform: scale(1.2) rotate(3deg);
    }

    90% {
        transform: scale(1.2) rotate(0deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.025em;
    transition: color 0.8s ease, text-shadow 0.8s ease;
}

.logo-disclaimer {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.sidebar-logo:hover .logo-disclaimer {
    opacity: 0.7;
}

.sidebar-logo:hover .logo-text {
    color: #4a9eff;
    text-shadow: 0 0 20px rgba(74, 158, 255, 0.6), 0 0 40px rgba(74, 158, 255, 0.3);
}

.sidebar-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.close-icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.sidebar-close:hover .close-icon {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.sidebar-close-mobile {
    display: none;
}

@media (max-width: 767px) {
    .sidebar-close-desktop {
        display: none;
    }

    .sidebar-close-mobile {
        display: flex;
    }
}

.sidebar-content {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.search-container {
    padding: 0 16px 16px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-bar:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.search-icon {
    width: 16px !important;
    height: 16px !important;
    color: #9ca3af;
    margin-right: 10px;
    transition: color 0.2s ease;
}

.search-bar svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
}

.search-bar:focus-within .search-icon {
    color: #ffffff;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 14px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-shortcut {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-bar:focus-within .search-shortcut {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 8px;
}

/* menu sections */
.menu-section {
    margin-bottom: 20px;
    position: relative;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 16px;
    right: 16px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.menu-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px 6px;
    margin-bottom: 4px;
}

/* menu items */
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 1px 8px;
    position: relative;
}

.menu-item:hover {
    background: rgba(74, 158, 255, 0.1);
    color: #4a9eff;
}

.menu-item.active {
    background: rgba(74, 158, 255, 0.15);
    color: #4a9eff;
    font-weight: 500;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: #4a9eff;
    border-radius: 0 2px 2px 0;
}

.menu-icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: currentColor;
    display: inline-block;
    line-height: 1;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

@media (max-width: 767px) {
    .sidebar {
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        height: 85%;
        max-height: 600px;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1002;
    }

    .sidebar.open {
        transform: translateY(0);
    }

    .sidebar-header {
        padding: 20px 24px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .sidebar-content {
        padding: 20px 24px;
        height: calc(100% - 80px);
        overflow-y: auto;
    }

    /* mobile section adjustments */
    @media (max-width: 767px) {
        .menu-section-title {
            padding: 6px 24px 2px;
            font-size: 10px;
        }

        .menu-item {
            padding: 10px 24px;
            margin: 2px 0;
            gap: 8px;
        }

        .menu-section:not(:last-child)::after {
            left: 24px;
            right: 24px;
        }
    }

    .sidebar-overlay {
        display: block;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .posts-wrapper.sidebar-open {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    .sidebar-overlay {
        display: none;
    }
}

.posts-wrapper {
    transition: all 0.3s ease-in-out;
}

.posts-wrapper.sidebar-open {
    margin-left: 260px;
}


.menu-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.menu-item.disabled {
    color: rgba(255, 255, 255, 0.35) !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    filter: none !important;
}

.menu-item.disabled:hover {
    background: rgba(255, 50, 50, 0.08) !important;
    color: rgba(255, 255, 255, 0.35) !important;
    transform: none !important;
    cursor: not-allowed !important;
}

.coming-soon-badge {
    font-size: 8px;
    padding: 3px 6px;
    background: rgba(255, 165, 0, 0.15);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 165, 0, 0.9);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.sidebar-footer-link {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.sidebar-footer-link:hover {
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
}

.sidebar-footer-separator {
    color: #9ca3af;
    font-size: 12px;
}