@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Rajdhani", sans-serif;
}

:root {
    /* Apex Legends Color Palette */
    --apex-red: #DA292E;
    --apex-dark-red: #B91C1C;
    --apex-orange: #FF6B35;
    --apex-yellow: #FFB700;
    --apex-dark: #0A0E1A;
    --apex-darker: #050811;
    --apex-gray: #1A1F2E;
    --apex-light-gray: #8B92A3;
    --apex-white: #F0F0F0;
    --apex-accent: #00D4FF;
    
    /* UI Colors */
    --bg-primary: var(--apex-darker);
    --bg-secondary: var(--apex-dark);
    --bg-tertiary: var(--apex-gray);
    --text-primary: var(--apex-white);
    --text-secondary: var(--apex-light-gray);
    --accent-primary: var(--apex-red);
    --accent-secondary: var(--apex-orange);
}

body {
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Modern Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 78px;
    background: linear-gradient(118deg, #050710 0%, #02020280 100%);
    padding: 6px 14px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 2px solid rgba(218, 41, 46, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.sidebar.open {
    width: 260px;
}

.sidebar .logo-details {
    height: 60px;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.apex-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .logo-details .icon {
    width: 24px;
    height: 24px;
    opacity: 0;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(218, 41, 46, 0.5));
}

.sidebar .logo-details .logo_name {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--apex-white) 0%, var(--apex-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar.open .logo-details .icon,
.sidebar.open .logo-details .logo_name {
    opacity: 1;
}

.sidebar .logo-details #btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    font-size: 24px;
    cursor: pointer;
    color: var(--apex-red);
    transition: all 0.3s ease;
}

.sidebar.open .logo-details #btn {
    text-align: right;
    right: 0px;
}

/* Navigation Items */
.sidebar .nav-list {
    margin-top: 20px;
    height: calc(100% - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar li {
    position: relative;
    margin: 8px 0;
    list-style: none;
}

.nav-item > a {
    display: flex;
    align-items: center;
    height: 50px;
    width: 100%;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.sidebar.open .nav-item > a {
    justify-content: flex-start;
}

.nav-item > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(218, 41, 46, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-item > a:hover::before {
    left: 100%;
}

.nav-item > a:hover {
    background: rgba(218, 41, 46, 0.1);
    border: 1px solid rgba(218, 41, 46, 0.3);
}

.nav-icon-wrapper {
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-item > a:hover .nav-icon-wrapper {
    color: var(--apex-red);
    transform: scale(1.1);
}

.sidebar li .links_name {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar.open li .links_name {
    opacity: 1;
    pointer-events: auto;
}

/* Tooltips */
.sidebar li .tooltip {
    position: absolute;
    top: -20px;
    left: calc(100% + 15px);
    z-index: 3;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: 0s;
    border: 1px solid rgba(218, 41, 46, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar li:hover .tooltip {
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar.open li .tooltip {
    display: none;
}

/* FIXED Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    width: calc(100% - 28px);
    margin-left: 14px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out, border 0.5s ease-in-out;
    border: 0px solid rgba(218, 41, 46, 0.3); /* Border auf 0px setzen */
    margin-top: 5px;
    position: relative;
    z-index: 50;
}

.dropdown.open .dropdown-menu {
    max-height: 500px;
    padding: 10px 0;
    border-width: 2px; /* Border nur zeigen wenn offen */
}

.dropdown-menu li {
    padding: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown.open .dropdown-menu li {
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.dropdown-menu li a:hover {
    background: rgba(218, 41, 46, 0.2);
    padding-left: 30px;
}

.dropdown-menu li a::before {
    display: none;
}

.contributor-title,
.supporter-title {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid rgba(139, 146, 163, 0.2);
    margin-top: 10px;
}

.contributor-title {
    color: var(--apex-orange);
}

.supporter-title {
    color: var(--apex-accent);
}

/* Profile Section */
.sidebar li.profile {
    position: fixed;
    height: 70px;
    width: 78px;
    left: 0;
    bottom: 0;
    padding: 10px 14px;
    transition: all 0.3s ease;
    overflow: hidden;
    border-top: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.open li.profile {
    width: 260px;
    justify-content: flex-start;
}

.sidebar .profile .name_job {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar.open .profile .name_job {
    opacity: 1;
    visibility: visible;
}

.sidebar li .profile-details {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease; /* Füge diese Zeile hinzu */
}

.sidebar.open li .profile-details {
    justify-content: flex-start;
}

.sidebar li img {
    height: 45px;
    width: 45px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(218, 41, 46, 0.3);
}

.sidebar li.profile .name,
.sidebar li.profile .job {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.sidebar li.profile .job {
    font-size: 12px;
    color: var(--text-secondary);
}

.sidebar .profile #log_out {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    color: var(--apex-red);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar .profile #log_out:hover {
    transform: translateY(-50%) scale(1.2);
    color: var(--apex-orange);
}

/* Discord Login Button */
.apex-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 20px);
    padding: 12px;
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    margin: 0 auto;
}

.sidebar.open .apex-login-btn {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.apex-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.4);
}

.apex-login-btn i {
    font-size: 20px;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    left: 10px;
    top: 10px;
    width: 45px;
    height: 45px;
    background: #11101d;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: #1d1b31;
    transform: scale(1.05);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar.open ~ .mobile-menu-btn {
        opacity: 0;
        pointer-events: none;
    }
    
    .sidebar .logo-details #btn {
        display: none;
    }

    .sidebar:not(.open) {
        left: -250px;
        width: 250px;
    }
    
    .sidebar:not(.open) #btn {
        position: fixed;
        left: 10px;
        top: 10px;
        color: #fff;
        background: #11101d;
        border-radius: 12px;
        padding: 8px;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    
    .sidebar.open {
        left: 0;
        width: 250px;
        background: #11101d;
        padding: 6px 14px;
    }
    
    .sidebar.open #btn {
        position: absolute;
        left: auto;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .sidebar:not(.open) ~ .home-section {
        left: 0;
        width: 100%;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .sidebar.open ~ .sidebar-overlay {
        display: block;
    }
}

@media (max-width: 480px) {
    .sidebar:not(.open) #btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .sidebar.open {
        width: 80%;
        max-width: 280px;
    }
}

.sidebar:not(.open) .profile-details .name_job {
    display: none;
}

.sidebar:not(.open) .profile-details img {
    margin: 0 auto;
}

.sidebar:not(.open) .profile #log_out {
    display: none;
}

/* Zeige nur das Profilbild zentriert wenn geschlossen */
.sidebar:not(.open) .profile-details {
    justify-content: center;
}