:root {
    --sidebar-width-collapsed: 80px;
    --sidebar-width-expanded: 200px;

    --bg-sidebar: linear-gradient(86deg, #9694f730, #2021375c);
    --bg-sidebar-hover: linear-gradient(264deg, #302dc230, #bdbdbd0d);
    --sidebar-hover: #52527b7d;
    --sidebar-accent: #6d7cff;
    --sidebar-text-color: #5995ff;
}

body {
    margin: 0;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
	overflow-y: auto;
}

.global-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto 0;
    height: 500px;
    width: var(--sidebar-width-collapsed);
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 10px;
    padding: 50px 0 50px 0;
    z-index: 2;
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.1s ease;
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}

.global-sidebar:hover {
    width: var(--sidebar-width-expanded);
    background: var(--bg-sidebar-hover);
}

.sidebar-items, .sidebar-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-footer {
    margin-top: auto;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    padding-bottom: 10px;
    transition: background-color 0.2s ease;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 60px;
    color: var(--sidebar-accent);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-item:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
    justify-content: flex-start;
    margin-left: 5px;
}

.sidebar-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-left: 24px;
    margin-right: 12px;
}

.sidebar-icon.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.sidebar-item.active {
    border-left: 3px solid var(--accent);
    background-color: rgba(96, 123, 247, 0.15);
    color: var(--accent);
}

.sidebar-text {
    color: white;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    max-width: 0;
    overflow: hidden;
    display: inline-block;
}

.global-sidebar:hover .sidebar-text {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    max-width: 200px;
}

.unread-badge {
    position: absolute;
    top: -5px;
    right: 4px;
    background: #ff4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 16px;
}

.main-wrapper {
    margin-left: var(--sidebar-width-collapsed);
    width: calc(100% - var(--sidebar-width-collapsed));
    transition: margin-left 0.3s, width 0.3s;
    display: flex;
    flex-direction: column;
}

.dropdown {
    position: relative;
    display: inline-block;
    z-index: 1001;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
}

.dropdown-content {
    position: fixed;
    top: 0;
    left: 0;
    background: rgb(52 57 81 / 75%);
    backdrop-filter: blur(3px);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
}
.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
}
.dropdown-item:hover {
    background: rgb(147 180 255 / 20%);
    color: #ffffff;
}
.dropdown-icon {
    opacity: 1;
    filter: invert(1) brightness(1);
    transition: filter 0.3s ease;
}

.mini-player {
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: slideInLeft 0.3s ease forwards;
    width: 450px;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mini-player.hiding {
    animation: slideOutLeft 0.3s ease forwards;
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.mini-player-parts {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mini-player-info {
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.mini-player-title {
    color: white;
    font-size: 14px;
    margin-right: 5px;
}

.mini-player-playlist {
    font-size: 11px;
    color: var(--border-color);
}

.mini-player-controls {
    display: flex;
    gap: 8px;
}

.mini-player-btn {
    background: rgb(165 174 255 / 30%);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mini-player-btn:hover {
    background: rgb(83 126 225 / 75%);
}

.mini-player-icon {
    filter: invert(1) brightness(2);
    width: 20px;
    height: 20px;
}

.mini-player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.mini-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--border-color);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.mini-time {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    font-family: monospace;
}

.mini-player-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.mini-player-close:hover {
    color: #ff8b8b;
    transform: rotate(90deg);
}

.mini-player-toggle {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    color: var(--accent);
}

.mini-player-toggle:hover {
    transform: rotate(-20deg);
}

.mini-player-toggle.hiding {
    animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.mini-volume-wrapper {
    position: relative;
    width: 80px;
    height: 4px;
    margin: 0px 5px;
}

.mini-volume-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    pointer-events: none;
}

.mini-volume-fill {
    width: 0%;
    height: 100%;
    background: var(--border-color, #6acb65);
    border-radius: 2px;
}

.mini-volume-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    z-index: 1;
}

.mini-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--border-color, #6acb65);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
    position: relative;
    z-index: 2;
}

.mini-volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
}

#notifications-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.notifications-modal-content {
    background: #1e1e2a;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

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

.notifications-modal-header h3 {
    margin: 0;
    color: #fff;
}

.notifications-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.notifications-modal-close:hover {
    background: #ff4444;
    transform: rotate(90deg);
}

.notifications-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    max-height: 50vh;
}

.notifications-modal-body .loader {
    text-align: center;
    padding: 30px;
    color: #888;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.15s;
}

.notification-item:hover {
    background: rgba(255,255,255,0.05);
}

.notification-item.unread {
    border-left: 3px solid #607bf7;
}

.notification-item .notif-title {
    color: #fff;
    font-weight: 500;
    margin-bottom: 4px;
}

.notification-item .notif-content {
    color: #aaa;
    font-size: 0.9em;
}

.notification-item .notif-time {
    color: #666;
    font-size: 0.75em;
}

.notifications-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.notifications-modal-footer .btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.notifications-modal-footer .btn-sm {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.notifications-modal-footer .btn-sm:hover {
    background: rgba(255,255,255,0.2);
}

.notifications-modal-footer .btn-danger {
    background: rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.notifications-modal-footer .btn-danger:hover {
    background: rgba(220, 53, 69, 0.5);
}

.siteTitle {
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease-out;
}

.siteTitle:hover {
    transform: scale(1.2);
    color: var(--accent);
}

@media (max-width: 768px) {
    .global-sidebar {
        width: 0;
        padding: 0;
    }
    .global-sidebar:hover {
        width: 200px;
    }
    .main-wrapper {
        margin-left: 0;
        width: 100%;
        height: calc(100vh - 40px);
    }

    .dropdown-content {
        right: -50px;
        min-width: 200px;
    }

    .mobile-footer-terms {
        position: absolute;
        bottom: 80px;
        margin: 10px;
        display: flex;
        flex-direction: column;
    }

    .mini-player {
        display: none;
    }

    .mini-player-toggle {
        display: none;
    }

    body .profile-wrapper {
        max-width: 100%;
        padding: 10px;
        margin: 0;
    }

    #profile-stats-summary {
        display: flex;
        gap: 5px;
        margin-bottom: 5px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 0.9em;
        color: #ccc;
        align-items: center;
        flex-direction: column;
    }

    #profile-game-search {
        width: 60%;
    }

    body #profile-content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    main {
        padding: 0;
        padding-top 0;
    }
}