* {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar {
    position: fixed;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    width: 6.8rem;
    height: min(90vh, 760px);
    background: linear-gradient(180deg, rgba(5, 11, 22, 0.92), rgba(8, 20, 38, 0.88));
    backdrop-filter: blur(24px);
    border-radius: 28px;
    border: 1px solid rgba(130, 213, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 24px 70px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.9rem;
    transition: width 0.4s ease, box-shadow 0.4s ease;
    z-index: 10;
}

.sidebar.expanded::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at top left, rgba(83, 199, 255, 0.18), transparent 50%);
}

.sidebar-top {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.sidebar-top-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.sidebar-center {
    position: relative;
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
}

.sidebar-center-e {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 3.45rem;
    padding: 0 0.8rem;
    text-decoration: none;
    color: #ffffff;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 18px;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sidebar-center-e-img {
    width: 24px;
    height: 24px;
    filter: invert(1);
    object-fit: contain;
    position: absolute;
    left: 2.4rem;
    transform: translateX(-50%);
}

.sidebar-center-e p {
    position: absolute;
    left: 5rem;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.35s ease, left 0.35s ease;
    pointer-events: none;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
}

.sidebar:hover,
.sidebar.expanded {
    width: 20rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 26px 80px rgba(0, 0, 0, 0.34);
}

.sidebar:hover .sidebar-center-e p,
.sidebar.expanded .sidebar-center-e p {
    opacity: 1;
    pointer-events: auto;
    left: 6rem;
}

.sidebar-center-e:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(130, 213, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    width: 3rem;
    height: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(130, 213, 255, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(18px);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
    margin: 3px 0;
    box-shadow: 0 6px 0 rgba(255, 255, 255, 0.65), 0 -6px 0 rgba(255, 255, 255, 0.65);
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    border-color: #53c7ff;
    background: rgba(83, 199, 255, 0.18);
}

@media (max-width: 980px) {
    .sidebar {
        left: -110%;
        opacity: 0;
        width: min(90vw, 320px);
        max-height: calc(100vh - 2rem);
        top: 1rem;
        transform: none;
        transition: left 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    }

    .sidebar.open {
        left: 1rem;
        opacity: 1;
    }

    .sidebar:hover,
    .sidebar.expanded {
        width: min(90vw, 320px);
    }

    .sidebar-center-e p {
        opacity: 0;
        left: 5rem;
    }

    .sidebar.open .sidebar-center-e p {
        opacity: 1;
        pointer-events: auto;
        left: 6rem;
    }

    .sidebar-toggle {
        display: flex;
    }
}

/* Keep navigation present without making it another large content card. */
* {
    font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
}

.sidebar {
    width: 6.8rem;
    background: linear-gradient(145deg, rgba(11, 28, 57, 0.97), rgba(5, 15, 32, 0.97));
    border: 1px solid rgba(130, 213, 255, 0.24);
    border-left: 2px solid rgba(83, 199, 255, 0.62);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
}

.sidebar:hover,
.sidebar.expanded {
    width: 20rem;
    box-shadow: 14px 22px 65px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar-center-e {
    border-radius: 16px;
    color: #f4f8ff;
}

.sidebar-center-e:hover {
    background: linear-gradient(90deg, rgba(83, 199, 255, 0.16), rgba(83, 199, 255, 0.04));
    border-color: rgba(130, 213, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sidebar-toggle {
    border-radius: 16px;
    border: 1px solid rgba(130, 213, 255, 0.28);
    background: linear-gradient(180deg, rgba(11, 28, 57, 0.96), rgba(5, 15, 32, 0.96));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

