/* RESET BASE */
.navbar * {
    box-sizing: border-box;
    font-family: montserrat, sans-serif;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 16px;

    background: #0f172a;
    color: white;

    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* HAMBURGER */
.menu-toggle {
    font-size: 22px;
    background: transparent;
    border: none;
    color: #38bdf8;
    cursor: pointer;
    transition: 0.2s;
    z-index: 999;
}

.menu-toggle:hover {
    transform: scale(1.1);

}

/* LOGO */
.logo {
    font-family: 'Audiowide', sans-serif;
    font-size: 22px;
    color: #38bdf8;
    cursor: pointer;

    letter-spacing: 1.5px;
    text-shadow:
        0 0 3px rgba(56, 189, 248, 0.6),
        0 0 10px rgba(56, 189, 248, 0.3);
}

/* AZIONI DESTRA */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 20px;
}

/* BOTTONI ICONA */
.icon-btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;

    padding: 6px 8px;
    border-radius: 50%;
    cursor: pointer;

    transition: 0.2s;
}

.icon-btn:hover {
    background: rgba(56, 189, 248, 0.2);
}

/* USER */
.user {
    display: flex;
    align-items: center;
    gap: 8px;
    right: 10px;
}

.username {
    font-size: 14px;
    color: #e2e8f0;
}

/* LINK */
.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover {
    color: #38bdf8;
}

/* ========================= */
/* SIDEBAR */
/* ========================= */

.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    /* nascosta */
    width: 260px;
    height: 100%;

    background: #0f172a;
    color: white;

    padding: 20px;
    z-index: 2000;

    display: flex;
    flex-direction: column;
    gap: 20px;

    transition: left 0.3s ease;
}

/* APERTA */
.sidebar.open {
    left: 0;
}

/* CLOSE BTN */
.close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

.close-btn:hover {
    color: #38bdf8;
}

/* CONTENUTO */
.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* MENU */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-menu a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 15px;

    padding: 8px 10px;
    border-radius: 6px;

    transition: 0.2s;
}

.sidebar-menu a:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

/* SEZIONI */
.sidebar-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
}

.section-title {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* LISTE */
.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-section a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
}

.sidebar-section a:hover {
    color: #38bdf8;
}

/* BOTTONI */
.sidebar button {
    padding: 6px 12px;
    border-radius: 999px;

    border: 1px solid rgba(56, 189, 248, 0.5);
    background: transparent;

    color: #38bdf8;
    cursor: pointer;

    transition: 0.2s;
}

.sidebar button:hover {
    background: rgba(56, 189, 248, 0.15);
}

.search {
    position: relative;
    display: flex;
    align-items: center;
}

.search input {
    padding: 6px 12px;
    border-radius: 20px;
    border: none;
    outline: none;
}



.search-results {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);

    width: 300px;
    /* o quello che vuoi */

    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;

    opacity: 0.95;

    margin-top: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

.search-item:hover {
    background: #1a1a1a;
}

.search-thumb {
    width: 40px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-box {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    gap: 8px;

    background: #0f172a;
    padding: 6px 10px;
    border-radius: 20px;

    opacity: 0;
    pointer-events: none;
    transition: 0.3s;

    z-index: 2000;
}

.search.active .search-box {
    opacity: 1;
    pointer-events: auto;
}

.search-box input {
    background: #1e293b;
    /* blu scuro */
    color: #e2e8f0;

    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;

    padding: 6px 12px;
    font-size: 14px;

    transition: all 0.25s ease;
}

/* PLACEHOLDER */
.search-box input::placeholder {
    color: rgba(226, 232, 240, 0.6);
}

/* FOCUS */
.search-box input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

/* BOTTONE LENTE */
.search-toggle {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.4);

    color: #38bdf8;

    padding: 6px 8px;
    border-radius: 50%;

    cursor: pointer;
    transition: 0.25s;
}

/* HOVER LENTE */
.search-toggle:hover {
    background: rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* CLOSE BUTTON */
.search-close {
    color: #94a3b8;
    transition: 0.2s;
}

.search-close:hover {
    color: #38bdf8;
}

/* ========================= */
/* OVERLAY */
/* ========================= */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);

    opacity: 0;
    pointer-events: none;

    transition: 0.3s;
    z-index: 1500;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#logoutForm {
    margin-top: 20px;
}

/* ========================= */
/* ACTIVE LINK */
/* ========================= */

.activeNav {
    color: lime !important;
}

#UserLink {
    color: rgb(255, 255, 255);
    text-decoration: none;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    padding: 8px 8px;
    border-radius: 6px;

}

#UserLink:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

/* ========================= */
/* DESKTOP MIGLIORIE */
/* ========================= */

@media (min-width: 769px) {

    .navbar {
        padding: 12px 30px;
    }

    .logo {
        font-size: 26px;
    }

    .menu-toggle {
        font-size: 24px;

    }

    .sidebar {
        width: 300px;
    }

    /* NASCONDI SEARCH */
    .search {
        position: relative;
    }

    /* BOTTONE LENTE */
    .search-toggle {
        background: rgba(0, 0, 0, 0.5);
        border: none;
        color: white;
        padding: 8px;
        border-radius: 50%;
        font-size: 16px;
        cursor: pointer;
    }

    .search.active::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1500;
    }

    .nav-actions {
        padding-right: 50px;
    }

}

/* ========================= */
/* FONT */
/* ========================= */

@font-face {
    font-family: 'Audiowide';
    src: url('../fonts/Audiowide-Regular.ttf') format('truetype');
}