@import url('https://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400');

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    -webkit-backdrop-filter: blur(19px);
    backdrop-filter: blur(19px);
    background-color: rgba(227, 227, 227, 0);
    z-index: 1000;
    
}

.navbar.scrolled,
.navbar:hover,
.navbar.scrolled:hover {
    background-color: rgba(227, 227, 227, 0.385);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0;
}

.navbar nav {
    width: 75%;
    margin: 0 auto;
    height: 43px;
    padding-top: 7px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'helvetica', sans-serif;
    font-weight: 100;
}

.navbar .logo {
    display: flex;
    align-items: center;
}

.navbar .logo img {
    height: 24px;
    width: auto;
    user-select: none;
    transition: opacity 0.3s;
}

.navbar .logo img:hover {
    opacity: 0.6;
}

.navbar ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 34px;
    margin: 0;
    padding: 0;
    flex: 1;
}

.navbar ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    font-family: 'helvetica', sans-serif;
    font-weight: 300;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.navbar ul li a:hover {
    opacity: 0.5;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar ul li .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    font-family: 'helvetica', sans-serif;
    font-weight: 500;
    text-decoration: none;
}

.navbar ul li .auth-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.profile-nav {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-toggle {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s;
}

.profile-toggle:hover .profile-avatar {
    opacity: 0.75;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    background: rgba(40, 40, 40, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    display: none;
    overflow: hidden;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 2200;
}

.profile-menu.open {
    display: block;
}

.profile-menu a,
.profile-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    color: #fff;
    font-size: 14px;
    font-family: 'helvetica', sans-serif;
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
}

.profile-menu a:hover,
.profile-menu button:hover {
    background: rgba(255, 255, 255, 0.12);
}

.navbar-tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-search {
    position: relative;
    width: 220px;
}

#global-search-input {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    border-radius: 20px;
    padding: 6px 12px;
    font-family: 'Alegreya Sans', sans-serif;
    font-weight: 300;
    outline: none;
}

#global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

.search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 320px;
    color:rgb(89, 89, 89);
    overflow-y: auto;
    background-color: rgba(159, 159, 159, 0.604);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    z-index: 2000;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);

}

.search-results.active {
    display: block;
}

.search-item,
.search-empty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-family: 'Alegreya Sans', sans-serif;
    font-size: 14px;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    opacity: 0.7;
}

.search-item small {
    opacity: 0.7;
}

.navbar .menu-toggle {
    display: none;
    font-size: 1.3em;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.3s;
}

.navbar .menu-toggle:hover {
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .navbar nav {
        width: 88%;
    }

    .navbar ul {
        gap: 20px;
    }

    .navbar ul li a {
        font-size: 16px;
    }

    .navbar-search {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .navbar nav {
        width: 92%;
        padding-top: 5px;
    }

    .navbar .menu-toggle {
        display: block;
    }

    .navbar-search {
        width: 150px;
    }

    #global-search-input {
        font-size: 13px;
        padding: 6px 10px;
    }

    .navbar ul {
        position: absolute;
        top: 43px;
        right: 4%;
        width: 220px;
        background: rgb(51, 51, 51);
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        display: flex;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(100%);
        transition: transform 0.3s ease-out, visibility 0.3s;
    }

    .navbar ul.active {
        visibility: visible;
        pointer-events: all;
        transform: translateX(0);
    }

    .navbar ul li {
        width: 100%;
        margin: 6px 0;
    }

    .profile-nav {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .auth-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .navbar ul li .auth-btn {
        width: 100%;
        justify-content: flex-start;
    }

    .profile-menu {
        position: static;
        width: 100%;
        min-width: 0;
        border-radius: 8px;
    }
}
