/* User Settings Container */
.user-settings {
    position: relative;
    display: flex;
    align-items: center;
}

/* Settings Button (Zahnrad) - ohne grünen Punkt */
.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0.7rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.settings-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.settings-btn:hover::before {
    left: 100%;
}

.settings-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.settings-icon {
    width: 20px;
    height: 20px;
    color: white;
    transition: all 0.3s ease;
}

/* Dropdown Menu - angepasst an das Website-Design */
.settings-dropdown {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    width: 320px;
    background: rgba(0, 0, 0, 0.9); /* Dunkler Hintergrund wie die Website */
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.settings-dropdown.show,
.settings-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    display: block !important;
}

.settings-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(45deg);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown Header - dunkles Design */
.dropdown-header {
    padding: 2rem 2rem 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 165, 0, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.dropdown-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #ffa500, #ff6b6b);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #ff6b6b;
    object-fit: cover;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05) rotate(5deg);
}

.username {
    font-weight: 700;
    color: #fff; /* Weiße Schrift */
    font-size: 1.3rem;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-plan {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6); /* Hellere weiße Schrift */
    margin-top: 0.2rem;
}

/* Dropdown Menu Items - dunkles Design */
.dropdown-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: rgba(255, 255, 255, 0.9); /* Weiße Schrift */
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
    transition: left 0.3s ease;
}

.dropdown-menu a:hover::before {
    left: 100%;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 165, 0, 0.2));
    color: #fff;
    transform: translateX(8px);
    border-radius: 0 25px 25px 0;
}

.dropdown-menu a:hover .menu-icon {
    transform: scale(1.2) rotate(10deg);
}

.menu-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    width: 24px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 0.5rem 1rem;
}

/* Navigation Fix - Navigation ganz rechts! */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation Links rechts vom Logo */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    margin-left: auto; /* schiebt die Navigation nach rechts */
    margin-right: 2rem; /* Abstand zum Settings-Button */
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
}

/* Logo bleibt links */
.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

/* Settings ganz rechts */
.user-settings {
    flex-shrink: 0;
}

/* Login-Only Elements */
.login-only {
    display: block;
}

.user-logged-in .login-only {
    display: none !important;
}

/* Entferne den grünen Status-Punkt komplett */
.user-status {
    display: none; /* Versteckt den grünen Punkt */
}

/* Notification Badge - optional für Benachrichtigungen */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: none; /* Standardmäßig versteckt */
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-container {
        justify-content: space-between;
    }

    .settings-dropdown {
        width: 280px;
        right: -10px;
    }

    .dropdown-header {
        padding: 1.5rem;
    }

    .user-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .username {
        font-size: 1.1rem;
    }

    .dropdown-menu a {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .settings-dropdown {
        width: 260px;
        right: -20px;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

/* Layout für größere Bildschirme optimieren */
@media (min-width: 769px) {
    .nav-container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 2rem;
    }

    .logo {
        grid-column: 1;
    }

    .nav-links {
        grid-column: 2;
        justify-self: end;
        margin-right: 0;
    }

    .user-settings {
        grid-column: 3;
    }
}

/* Weitere Verbesserungen */
.settings-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.dropdown-menu a:active {
    transform: translateX(4px) scale(0.98);
}

/* Smooth Scrolling für Dropdown */
.settings-dropdown {
    overflow-y: auto;
    max-height: 80vh;
}

.settings-dropdown::-webkit-scrollbar {
    width: 4px;
}

.settings-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.settings-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border-radius: 2px;
}

/* Glasmorphismus-Effekt für bessere Integration */
.settings-dropdown {
    background: rgba(68, 67, 67, 0.95); /* Passend zum Website-Hintergrund */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Verbesserte Hover-Effekte */
.dropdown-menu a:hover {
    background: rgba(255, 107, 107, 0.1);
    backdrop-filter: blur(10px);
}

/* Spezielle Styling für Logout-Button */
.dropdown-menu a[id="logout"]:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.dropdown-menu a[id="logout"]:hover .menu-icon {
    color: #ef4444;
}