:root {
    --primary-color: #e60000;
    --dark-bg: #0a0a0f;
    --darker-bg: #060608;
    --text-color: #ffffff;
    --secondary-text: #9a9a9a;
    --card-bg: #12121a;
    --success-color: #4CAF50;
    --danger-color: #cc0000;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(230, 0, 0, 0.1);
    --sidebar-width-expanded: 250px;
    --sidebar-width-collapsed: 70px;
    --sidebar-width-tablet: 220px;
    --sidebar-width-mobile: 75vw;
    --hamburger-size: 20px;
    --animation-speed: 0.3s;
    --hamburger-color: var(--text-color);
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-padding-bottom: 5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.5;
}

.main-content {
    margin-left: var(--sidebar-width-expanded);
    transition: margin-left var(--animation-speed) var(--transition-curve), 
                width var(--animation-speed) var(--transition-curve),
                transform var(--animation-speed) var(--transition-curve);
    width: calc(100% - var(--sidebar-width-expanded));
    padding: 40px;
    position: relative;
    z-index: 1;
}

.main-content.collapsed {
    margin-left: var(--sidebar-width-collapsed);
    width: calc(100% - var(--sidebar-width-collapsed));
}

#sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1000;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width-expanded);
    height: 100vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(10, 10, 15, 0.9));
    padding: 20px 20px var(--sidebar-padding-bottom) 20px;
    z-index: 1000;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    transition: all var(--animation-speed) var(--transition-curve);
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 50l-10 10 10 10 10-10-10-10zm0-20l-10 10 10 10 10-10-10-10zm0 40l-10 10 10 10 10-10-10-10z' fill='%23be0000' fill-opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(190, 0, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), transparent);
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    flex-direction: row-reverse;
}

.logo a:hover {
    transform: translateY(-2px);
}

.logo .brand-text {
    height: 25px;
    width: auto;
    max-width: 150px;
    margin-left: 10px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
    object-fit: contain;
}

.logo .brand-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.logo a:hover .brand-icon {
    transform: scale(1.1) rotate(5deg);
}

.sidebar.collapsed .logo .brand-text {
    display: none;
}

.collapse-btn {
    background: transparent;
    border: none;
    color: var(--secondary-text);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.collapse-btn:hover {
    color: var(--text-color);
    transform: scale(1.1);
}

.sidebar.collapsed .collapse-btn {
    transform: rotate(180deg);
    margin-left: 0;
    position: relative;
    left: 0;
}

.sidebar.collapsed .collapse-btn:hover {
    transform: rotate(180deg) scale(1.1);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--secondary-text);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: linear-gradient(to right, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: all 0.5s ease;
}

.nav-item:hover {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(190, 0, 0, 0.2);
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item.active {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.15), rgba(0, 0, 0, 0.2));
    color: var(--primary-color);
    border-color: rgba(190, 0, 0, 0.3);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.nav-item svg {
    min-width: 24px;
    margin-right: 15px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.1));
}

.nav-item:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

.nav-item span {
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar.collapsed .nav-item svg {
    margin-right: 0;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
}

.nav-item[data-title]:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 70px;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sidebar:not(.collapsed) .nav-item[data-title]:hover::after {
    display: none;
}

.bottom-buttons {
    margin-top: 5px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.sidebar .account-btn, .sidebar .get-started-btn, .sidebar .logout-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.sidebar .account-btn {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.15), rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(190, 0, 0, 0.3);
    color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.sidebar .account-btn:hover {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.25), rgba(0, 0, 0, 0.3));
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(190, 0, 0, 0.2);
}

.sidebar .get-started-btn {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.15), rgba(0, 0, 0, 0.2));
    border: 1px solid rgba(190, 0, 0, 0.3);
    color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.sidebar .get-started-btn:hover {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.25), rgba(0, 0, 0, 0.3));
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(190, 0, 0, 0.2);
}

.account-btn svg, .get-started-btn svg, .logout-btn svg {
    min-width: 20px;
    margin-right: 15px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.1));
    color: var(--primary-color);
}

.account-btn:hover svg, .get-started-btn:hover svg, .logout-btn:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

.sidebar .account-btn span, .sidebar .get-started-btn span, .sidebar .logout-btn span {
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar.collapsed .account-btn span, 
.sidebar.collapsed .get-started-btn span,
.sidebar.collapsed .logout-btn span {
    opacity: 0;
    width: 0;
    display: none;
}

.sidebar.collapsed .account-btn svg, 
.sidebar.collapsed .get-started-btn svg,
.sidebar.collapsed .logout-btn svg {
    margin-right: 0;
}

.sidebar.collapsed .account-btn, 
.sidebar.collapsed .get-started-btn,
.sidebar.collapsed .logout-btn {
    justify-content: center;
}

.sidebar .account-btn[data-title]:hover::after,
.sidebar .get-started-btn[data-title]:hover::after,
.sidebar .logout-btn[data-title]:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 70px;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sidebar:not(.collapsed) .account-btn[data-title]:hover::after,
.sidebar:not(.collapsed) .get-started-btn[data-title]:hover::after,
.sidebar:not(.collapsed) .logout-btn[data-title]:hover::after {
    display: none;
}

.sidebar .logout-btn {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.15), rgba(0, 0, 0, 0.2)) !important;
    border: 1px solid rgba(190, 0, 0, 0.3) !important;
    color: var(--primary-color) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
    padding: 10px 15px !important;
}

.sidebar .logout-btn:hover {
    background: linear-gradient(to right, rgba(190, 0, 0, 0.25), rgba(0, 0, 0, 0.3)) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(190, 0, 0, 0.2) !important;
}

.sidebar .logout-btn svg {
    color: var(--primary-color) !important;
}

.sidebar .account-btn.fade-in, .sidebar .get-started-btn.fade-in, .sidebar .logout-btn.fade-in {
    opacity: 1;
}


.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: var(--hamburger-size);
    height: var(--hamburger-size);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    transform: scale(1.1);
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background-color: var(--hamburger-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--primary-color);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--primary-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--animation-speed) var(--transition-curve), 
                visibility var(--animation-speed) var(--transition-curve);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}


@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-width-collapsed);
    }
    .main-content {
        margin-left: var(--sidebar-width-collapsed);
        width: calc(100% - var(--sidebar-width-collapsed));
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width-mobile);
        left: calc(-1 * var(--sidebar-width-mobile));
        padding-bottom: 10px;
        z-index: 1001;
    }
    .sidebar.active {
        left: 0;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        transition: transform var(--animation-speed) var(--transition-curve);
    }
    .main-content.sidebar-active {
        transform: translateX(var(--sidebar-width-mobile));
    }
    .hamburger-menu {
        display: flex;
        z-index: 1002;
    }
    .main-content.collapsed {
        margin-left: 0;
    }
    .overlay.active {
        z-index: 1000;
    }
    .logo .brand-text {
        height: 20px;
        max-width: 120px;
        margin-left: 8px;
    }
    
    .logo .brand-icon {
        width: 20px;
        height: 20px;
    }
}


::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(190, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(190, 0, 0, 0.4);
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(190, 0, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(190, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(190, 0, 0, 0);
    }
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    }
    100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}


.nav-item {
    animation-duration: 0.5s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-item:nth-child(6) { animation-delay: 0.35s; }
.nav-item:nth-child(7) { animation-delay: 0.4s; }
.nav-item:nth-child(8) { animation-delay: 0.45s; }

nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    margin-bottom: 0;
    padding-bottom: 10px;
}

.sidebar .account-btn.authenticated {
    border-color: rgba(76, 175, 80, 0.3);
}

.sidebar .account-btn::before, .sidebar .get-started-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: all 0.5s ease;
}

.sidebar .account-btn:hover::before, .sidebar .get-started-btn:hover::before {
    left: 100%;
}