/* Top Marquee */
.top-header-marquee {
    background: #1a1a1a;
    color: #fff;
    height: 44px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 100;
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    animation: marquee 25s linear infinite;
    align-items: center;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.marquee-item i,
.marquee-item img {
    width: 18px;
    height: 18px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
    flex-shrink: 0;
}

.marquee-item img {
    object-fit: contain;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Main Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 48px !important;
    width: auto !important;
    object-fit: contain;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.search-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
}

.search-form {
    display: flex;
    align-items: center;
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border-radius: 20px;
    position: absolute;
    right: 0;
    padding: 0;
}

.header-search.active .search-form {
    width: 300px;
    padding: 5px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-search.active .search-toggle {
    display: none;
}

.search-form input {
    border: none;
    background: none;
    padding: 5px 10px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.search-submit {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

/* The original .header-search input:focus and .header-search i rules are removed as they are replaced by the new search bar structure. */

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-btn {
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.header-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.header-icon {
    font-size: 24px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 2050;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    overflow-y: auto;
}

.sidebar-overlay.active {
    transform: translateX(0);
}

.sidebar-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 30px;
    cursor: pointer;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 25px;
}

.sidebar-menu a {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-menu a:hover {
    color: #7b42f6;
}

@media (max-width: 991px) {
    .header-search {
        display: none !important;
    }

    .header-container {
        padding: 0 15px;
    }

    .header-logo img {
        height: 36px !important;
    }
}

/* Profile Dropdown */
.profile-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-dropdown {
    position: fixed;
    top: 75px;
    right: 20px;
    width: 320px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    z-index: 2100;
    display: none;
    overflow: hidden;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.profile-dropdown.active {
    display: block;
}

.dropdown-header {
    background: #f8f9fa;
    padding: 30px 20px 20px;
    text-align: center;
    position: relative;
    border-radius: 24px 24px 0 0;
}

.dropdown-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: color 0.2s;
}

.dropdown-close:hover {
    color: #000;
}

.dropdown-avatar {
    width: 80px;
    height: 80px;
    background: #eee;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dropdown-avatar i {
    font-size: 50px;
    color: #999;
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-header-text {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.4;
    margin: 0;
    font-weight: 500;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    display: block !important;
}

.dropdown-body {
    padding: 24px 20px;
}

.dropdown-btn-green {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #2e9d6d 0%, #76c053 100%);
    color: #fff;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    width: 100%;
}

.dropdown-btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(50, 160, 100, 0.3);
    color: #fff;
}

.dropdown-btn-green i {
    font-size: 1.4rem;
}

.dropdown-footer {
    padding: 10px 20px 30px;
    text-align: center;
}

.dropdown-footer-link {
    color: #666;
    text-decoration: underline;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-footer-link:hover {
    color: #2e9d6d;
}

/* Logged in styles */
.profile-links {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.profile-links li {
    margin-bottom: 5px;
}

.profile-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: background 0.2s;
}

.profile-links a:hover {
    background: #f4f0ff;
    color: #7b42f6;
}

.dropdown-btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: #dc3545;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    border: 2px solid #dc3545;
    width: 100%;
    transition: all 0.2s;
    cursor: pointer;
}

.dropdown-btn-logout:hover {
    background: #dc3545;
    color: #fff;
}

@media (max-width: 768px) {
    .profile-dropdown {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: none;
        /* Changed from block to none to prevent persistent visibility */
        opacity: 1;
        animation: none;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    }

    .profile-dropdown.active {
        display: block;
        /* Show only when active */
        transform: translateY(0);
    }
}

/* Global Overlay for Desktop & Mobile Sidebar/Profile */
.fuxx-global-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1050;
    display: none;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.fuxx-global-overlay.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Sticky "Made in Germany" Badge */
.made-in-germany-badge {
    display: flex;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    background: #faf8ff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1.5px rgba(0, 0, 0, 0.06);
    padding: 10px 16px;
    cursor: default;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: migSlideIn 0.6s ease-out 1s both;
}

.made-in-germany-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.badge-flag {
    width: 44px;
    height: 30px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.badge-text-group {
    display: flex;
    flex-direction: column;
    margin-left: 14px;
}

.badge-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #1a1a1a;
    line-height: 1.2;
}

.badge-points-horizontal {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #777;
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
}

.point-sep {
    color: #ccc;
    font-weight: bold;
    font-size: 1rem;
    line-height: 0;
    position: relative;
    top: -1px;
}

@media (max-width: 768px) {
    .made-in-germany-badge {
        bottom: 20px;
        right: 15px;
        padding: 8px 18px 8px 10px;
    }

    .badge-flag {
        width: 36px;
        height: 24px;
    }

    .badge-title {
        font-size: 0.85rem;
    }

    .badge-points-horizontal {
        font-size: 0.75rem;
        gap: 4px;
    }

    .badge-text-group {
        margin-left: 10px;
    }
}