/* =========================================
   GÓRNA NAWIGACJA
========================================= */

.top-nav {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 1500px;
    z-index: 1603;
    padding: 14px 18px;
    border: 1px solid rgba(120, 205, 255, 0.42);
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(14, 22, 38, 0.96), rgba(6, 11, 20, 0.96)),
        linear-gradient(90deg, rgba(95, 200, 255, 0.05), rgba(214, 170, 91, 0.04));
    backdrop-filter: blur(10px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 0 2px rgba(25, 40, 60, 0.75),
        0 10px 28px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(170, 220, 255, 0.08),
        inset 0 -1px 0 rgba(214, 170, 91, 0.12),
        0 0 18px rgba(74, 194, 255, 0.12);
    transition:
        top 0.25s ease,
        width 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        clip-path 0.25s ease;
    overflow: visible;
}

.top-nav.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-left: none;
    border-right: none;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(10, 18, 30, 0.98), rgba(4, 9, 18, 0.98)),
        linear-gradient(90deg, rgba(95, 200, 255, 0.04), rgba(214, 170, 91, 0.03));
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(170, 220, 255, 0.06),
        inset 0 -1px 0 rgba(214, 170, 91, 0.10);
    overflow: visible;
}

.top-nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 1500px;
    margin: 0 auto;
    overflow: visible;
}

.top-nav-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    padding: 10px 14px 10px 16px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #f7efe0;
    background:
        linear-gradient(135deg, rgba(214, 170, 91, 0.16), rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(22, 30, 44, 0.96), rgba(10, 15, 24, 0.96));
    border: 1px solid rgba(214, 170, 91, 0.38);
    clip-path: polygon(
        12px 0,
        100% 0,
        100% calc(100% - 12px),
        calc(100% - 12px) 100%,
        0 100%,
        0 12px
    );
    text-shadow:
        0 0 10px rgba(78, 203, 255, 0.18),
        0 1px 0 rgba(0, 0, 0, 0.8);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 240, 200, 0.08),
        0 0 18px rgba(214, 170, 91, 0.10);
}

.top-nav-logo::before {
    content: "🐺";
    font-size: 15px;
    filter: drop-shadow(0 0 8px rgba(214, 170, 91, 0.45));
}

.top-nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    list-style: none;
    overflow: visible;
}

.top-nav-menu a {
    position: relative;
    display: inline-block;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #eaf6ff;
    border: 1px solid rgba(120, 205, 255, 0.26);
    background: linear-gradient(180deg, rgba(18, 28, 44, 0.96), rgba(7, 13, 24, 0.96));
    clip-path: polygon(
        10px 0,
        100% 0,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        0 100%,
        0 10px
    );
    box-shadow:
        inset 0 1px 0 rgba(180, 230, 255, 0.06),
        inset 0 -1px 0 rgba(214, 170, 91, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.top-nav-menu a:hover,
.top-nav-menu a.active {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(24, 40, 60, 0.98), rgba(10, 18, 30, 0.98));
    border-color: rgba(143, 211, 255, 0.52);
    box-shadow:
        inset 0 1px 0 rgba(200, 235, 255, 0.10),
        inset 0 -1px 0 rgba(214, 170, 91, 0.10),
        0 0 16px rgba(70, 170, 255, 0.18),
        0 0 22px rgba(214, 170, 91, 0.08);
}

.top-nav-toggle {
    display: none;
    padding: 10px 12px;
    font-size: 20px;
    color: #f3f7ff;
    cursor: pointer;
    border: 1px solid rgba(143, 211, 255, 0.45);
    background: linear-gradient(180deg, rgba(18, 28, 44, 0.98), rgba(7, 13, 24, 0.98));
    clip-path: polygon(
        10px 0,
        100% 0,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        0 100%,
        0 10px
    );
}

/* =========================================
   MENU UŻYTKOWNIKA / DROPDOWN
========================================= */

.user-menu {
    position: relative;
    overflow: visible;
}

.user-menu-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    color: #eaf6ff;
    cursor: pointer;
    border: 1px solid rgba(120, 205, 255, 0.26);
    background: linear-gradient(180deg, rgba(18, 28, 44, 0.96), rgba(7, 13, 24, 0.96));
    clip-path: polygon(
        10px 0,
        100% 0,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        0 100%,
        0 10px
    );
    box-shadow:
        inset 0 1px 0 rgba(180, 230, 255, 0.06),
        inset 0 -1px 0 rgba(214, 170, 91, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.user-menu-toggle:hover,
.user-menu.open .user-menu-toggle {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(24, 40, 60, 0.98), rgba(10, 18, 30, 0.98));
    border-color: rgba(143, 211, 255, 0.52);
    box-shadow:
        inset 0 1px 0 rgba(200, 235, 255, 0.10),
        inset 0 -1px 0 rgba(214, 170, 91, 0.10),
        0 0 16px rgba(70, 170, 255, 0.18),
        0 0 22px rgba(214, 170, 91, 0.08);
}

.user-menu-caret {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.user-menu.open .user-menu-caret {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    list-style: none;
    display: none;
    border: 1px solid rgba(120, 205, 255, 0.34);
    background:
        linear-gradient(180deg, rgba(10, 18, 30, 0.99), rgba(4, 8, 16, 0.99)),
        linear-gradient(135deg, rgba(214, 170, 91, 0.05), rgba(95, 200, 255, 0.05));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    z-index: 99999;
}

.user-menu.open .user-dropdown {
    display: block;
}

.user-dropdown li {
    width: 100%;
}

.user-dropdown a {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: #eaf6ff;
    border: 1px solid rgba(120, 205, 255, 0.18);
    background: linear-gradient(180deg, rgba(18, 28, 44, 0.92), rgba(7, 13, 24, 0.92));
    clip-path: none;
    transform: none !important;
    transition: 0.18s ease;
}

.user-dropdown li:last-child a {
    margin-bottom: 0;
}

.user-dropdown a:hover {
    background: linear-gradient(180deg, rgba(24, 40, 60, 0.98), rgba(10, 18, 30, 0.98));
    border-color: rgba(143, 211, 255, 0.52);
    box-shadow: 0 0 12px rgba(70, 170, 255, 0.16);
}

.user-dropdown a.logout-link {
    border-color: rgba(214, 170, 91, 0.35);
}

/* =========================================
   OVERLAY MOBILE DLA NAV
========================================= */

.top-nav-overlay {
    display: none;
}

/* =========================================
   RESPONSYWNOŚĆ NAV <= 900PX
========================================= */

@media (max-width: 900px) {
    .top-nav {
        top: 10px;
        width: calc(100% - 20px);
        padding: 10px 12px;
        clip-path: none;
        overflow: visible;
    }

    .top-nav.scrolled {
        width: 100%;
    }

    .top-nav-inner {
        justify-content: space-between;
        overflow: visible;
    }

    .top-nav-logo {
        font-size: 15px;
    }

    .top-nav-toggle {
        display: inline-grid;
        place-items: center;
        position: relative;
        z-index: 1604;
    }

    .top-nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px;
        border: 1px solid rgba(120, 205, 255, 0.34);
        background:
            linear-gradient(180deg, rgba(10, 18, 30, 0.99), rgba(4, 8, 16, 0.99)),
            linear-gradient(135deg, rgba(214, 170, 91, 0.05), rgba(95, 200, 255, 0.05));
        z-index: 1605;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }

    .top-nav-menu.open {
        display: flex;
    }

    .top-nav-menu li,
    .top-nav-menu a {
        width: 100%;
    }

    .top-nav-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1601;
    }

    .user-menu {
        width: 100%;
    }

    .user-menu-toggle {
        width: 100%;
        justify-content: center;
    }

    .user-dropdown {
        position: static;
        top: auto;
        right: auto;
        min-width: 100%;
        margin-top: 10px;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .user-dropdown a {
        margin-bottom: 10px;
    }
}

/* =========================================
   RESPONSYWNOŚĆ NAV <= 420PX
========================================= */

@media (max-width: 420px) {
    .top-nav-logo {
        font-size: 14px;
    }

    .top-nav-toggle {
        padding: 9px 11px;
        font-size: 18px;
    }
}