/* header.css */

/* --- Basic Reset & Menu Layout --- */
.custom-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center; /* Center items */
    background-color: #1e1e1e;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    z-index: 1000;
    margin-bottom: 25px;
    border-bottom: solid 1px gold;
}

/* Push settings to the right */
.settings-container {
    margin-left: auto; /* Pushes settings dropdown to the right */
}

/* Menu items */
.custom-nav-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #fff;
    background: #2a2a2a;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    gap: 0.5rem; /* Space for icons */
    cursor: pointer;
}

/* Hover and active states */
.custom-nav-item:hover {
    background-color: #0084ff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Specific colors for login buttons */
.custom-nav-item[style*="background: #6441a5"] {
    background: #6441a5;
    color: white;
}
.custom-nav-item[style*="background: #00ff00"] {
    background: #00ff00;
    color: black;
}
.custom-nav-item[style*="background: #0084ff"] {
    background: #0084ff;
    color: black;
}

/* --- Dropdown Support --- */
.custom-nav .custom-dropdown {
    position: relative;
}

.custom-nav .custom-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a2a2a;
    min-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
}

/* Align settings dropdown to the right */
.custom-nav .settings-container .custom-dropdown-content {
    right: 0;
    left: auto;
}

.custom-nav .custom-dropdown:hover .custom-dropdown-content {
    display: flex;
}

.custom-nav .custom-dropdown-content a {
    padding: 0.5rem 1rem;
    color: white;
    text-decoration: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.custom-nav .custom-dropdown-content a:hover {
    background-color: #0084ff;
    color: black;
}

/* --- Icons --- */
.custom-nav-item i {
    font-size: 1.1rem;
}

/* --- Mobile / Responsive --- */
@media (max-width: 768px) {
    .custom-nav {
        flex-direction: column;
        align-items: stretch; /* Full width for mobile */
    }

    .custom-nav-item {
               max-width: 100%;
        justify-content: left;
        text-align: left;
    }

    .settings-container {
        margin-left: 0; /* Reset for mobile */
        width: 100%;
    }

    .custom-nav .custom-dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        box-shadow: none;
        width: 100%;
    }

    .custom-nav .settings-container .custom-dropdown-content {
        right: auto; /* Reset right alignment for mobile */
        left: 0;
    }

    .custom-nav .custom-dropdown:hover .custom-dropdown-content {
        display: flex;
    }
}

/* Optional: small animation */
.custom-nav-item, .custom-dropdown-content a {
    transition: all 0.2s ease;
}