/* ========================================
   NavMenu - Navigation Bar
   ======================================== */

.nav-logo {
    height: 60px;
    min-width: 80px;
    object-fit: contain;
}

.nav-link-hover {
    position: relative;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 0.375rem;
    padding: 0.4rem 0.6rem !important;
}

.nav-link-hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0dcaf0;
    transition: width 0.25s ease, left 0.25s ease;
    border-radius: 1px;
    /* Neutralize Bootstrap's .dropdown-toggle::after triangle (it shares
       this pseudo-element on dropdown nav links). Without this reset the
       white border-top caret animates from 0 -> 60% width on hover and
       looks like a stretching white bar. We must NOT use display:none
       here -- that would also kill the animated underline below. */
    border: 0 !important;
    margin: 0 !important;
    vertical-align: baseline !important;
}

.nav-link-hover:hover::after,
.nav-link-hover.active::after {
    width: 60%;
    left: 20%;
}

.nav-link-hover:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link-hover.active {
    color: #0dcaf0 !important;
}

/* Desktop: open dropdowns on hover (lg+ only) */
@media (min-width: 992px) {
    .nav-hover-dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* SVG icons inside nav dropdown items */
.nav-dropdown-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.nav-dropdown-svg-icon .skins-menu-item {
    height: 16px;
    max-width: 22px;
    width: auto;
}

.nav-dropdown-item:hover .nav-dropdown-svg-icon {
    opacity: 1;
}

/* SVG icons in mobile nav */
.nav-mobile-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
}

.nav-mobile-svg-icon .skins-menu-item {
    height: 18px;
    max-width: 24px;
    width: auto;
}

/* Skins mega-dropdown */
.nav-mega-dropdown {
    background: rgba(15, 22, 33, 0.92) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
    padding: 0.5rem 0 !important;
    min-width: 220px;
    animation: nav-dropdown-fade 0.15s ease-out;
}

@keyframes nav-dropdown-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-header {
    font-size: 0.7rem !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45) !important;
    padding: 0.5rem 1rem 0.25rem !important;
}

.nav-dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.875rem;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease !important;
    border-radius: 0 !important;
}

.nav-dropdown-item:hover {
    background: rgba(13, 202, 240, 0.1) !important;
    color: #fff !important;
    padding-left: 1.25rem !important;
}

.nav-dropdown-icon {
    width: 18px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

.nav-dropdown-item:hover .nav-dropdown-icon {
    opacity: 1;
}

.nav-dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
    margin: 0.35rem 0.75rem !important;
}

.nav-badge-new {
    font-size: 0.6rem;
    padding: 0.2em 0.5em;
    background: linear-gradient(135deg, #0dcaf0, #0d6efd);
    color: #fff;
    border-radius: 0.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* User profile area */
.nav-profile-btn {
    transition: opacity 0.2s ease;
}

.nav-profile-btn:hover {
    opacity: 0.85;
}

.nav-profile-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: border-color 0.2s ease;
}

.nav-profile-btn:hover .nav-profile-avatar {
    border-color: rgba(13, 202, 240, 0.5);
}

.nav-profile-name {
    font-size: 0.875rem;
    line-height: 1.2;
}

.nav-profile-jewels {
    font-size: 0.8rem;
    opacity: 0.85;
}

.nav-jewel-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.nav-profile-caret {
    font-size: 0.65rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.dropdown.show .nav-profile-caret {
    transform: rotate(180deg);
}

/* User dropdown menu */
.nav-user-dropdown {
    background: rgba(15, 22, 33, 0.92) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
    padding: 0.5rem 0 !important;
    min-width: 200px;
    animation: nav-dropdown-fade 0.15s ease-out;
}

/* Mobile nav list */
.nav-mobile-list {
    width: 100%;
}

.nav-mobile-list .nav-item {
    width: 100%;
}

.nav-mobile-list .nav-link {
    padding: 0.6rem 0.75rem !important;
    border-radius: 0.5rem;
}

.nav-mobile-list .nav-link.disabled,
.nav-mobile-list span.nav-link.disabled {
    pointer-events: none;
    cursor: default;
    opacity: 0.5;
}

.nav-mobile-section-header {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Ensure toggler doesn't get squished */
.navbar-toggler {
    flex-shrink: 0;
}
