/**
 * Navigation Toolbar - Universal navigation system for all pages
 * Provides consistent navigation across the entire application
 */

/* Toolbar Container — Purple background, light neon green text */
.nav-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #2d1b4e 0%, #1a0a2e 50%, #3d2463 100%);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(0, 255, 136, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', Arial, sans-serif;
}

/* Toolbar Content — compact so content is not blocked */
.nav-toolbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    gap: 12px;
}

/* Logo/Brand — compact */
.nav-toolbar-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #00ff88;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-toolbar-brand:hover {
    color: #00d4ff;
    transform: scale(1.02);
}

.nav-toolbar-brand-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.6));
}

/* Navigation Links Container */
.nav-toolbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
}

/* Navigation Link — light neon green on purple, compact */
.nav-toolbar-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    text-decoration: none;
    color: rgba(57, 255, 20, 0.9);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border: 1px solid transparent;
}

.nav-toolbar-link:hover {
    color: #39ff14;
    background: rgba(57, 255, 20, 0.12);
    border-color: rgba(57, 255, 20, 0.4);
    transform: translateY(-2px);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.nav-toolbar-link.active {
    color: #39ff14;
    background: rgba(57, 255, 20, 0.15);
    border-color: rgba(57, 255, 20, 0.5);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.35);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
}

/* Favorite links — Battle, Trophies, Game, Generator — emphasized */
.nav-toolbar-link-favorite {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.25);
}
.nav-toolbar-link-favorite:hover {
    background: rgba(0, 255, 136, 0.18);
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}
.nav-toolbar-mobile-link-favorite {
    border-left: 3px solid rgba(0, 255, 136, 0.6);
}

.nav-toolbar-link.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: #39ff14;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
}

.nav-toolbar-link-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 4px rgba(57, 255, 20, 0.4));
}

/* User Menu (Right Side) */
.nav-toolbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.nav-toolbar-currency {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    color: #00ff88;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-toolbar-currency-icon {
    font-size: 1.1rem;
}

/* Mobile Menu Toggle */
.nav-toolbar-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.nav-toolbar-toggle:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.5);
}

/* Mobile Menu */
.nav-toolbar-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 255, 136, 0.3);
    padding: 20px;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.nav-toolbar-mobile.active {
    display: flex;
}

.nav-toolbar-mobile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-toolbar-mobile-link:hover,
.nav-toolbar-mobile-link.active {
    color: #39ff14;
    background: rgba(57, 255, 20, 0.12);
    border-color: rgba(57, 255, 20, 0.4);
}

/* Page Content Offset — compact so all content is visible and not blocked */
body {
    padding-top: 48px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .nav-toolbar-links {
        gap: 4px;
    }
    
    .nav-toolbar-link {
        padding: 5px 8px;
        font-size: 0.82rem;
    }
}

@media (max-width: 968px) {
    .nav-toolbar-toggle {
        display: block;
    }
    
    .nav-toolbar-links {
        display: none;
    }
    
    .nav-toolbar-user {
        margin-left: auto;
    }
}

@media (max-width: 640px) {
    .nav-toolbar-content {
        padding: 6px 10px;
    }
    
    .nav-toolbar-brand {
        font-size: 1rem;
    }
    
    .nav-toolbar-currency {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
    
    body {
        padding-top: 44px;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-toolbar {
    animation: slideDown 0.3s ease;
}

/* Badge/Notification */
.nav-toolbar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff0088;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 0, 136, 0.6);
}

.nav-toolbar-link {
    position: relative;
}

/* User Controls */
.nav-toolbar-user-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-toolbar-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    color: #00ff88;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1rem;
}

.nav-toolbar-control-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
}

.nav-toolbar-control-btn .nav-toolbar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

/* Dropdown Menu */
.nav-toolbar-dropdown {
    background: linear-gradient(135deg, #2d1b4e 0%, #1a0a2e 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(57, 255, 20, 0.4);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    max-width: 300px;
    padding: 8px 0;
    animation: slideDown 0.3s ease;
}

.nav-toolbar-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    color: #00ff88;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-toolbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-toolbar-dropdown-item:hover {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

.nav-toolbar-dropdown-item span:first-child {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* ===== HIDE POINT TABLES & RIGHT-SIDE BARS (user preference) ===== */
.points-display-widget,
#pointsDisplayWidget,
#points-widget,
.point-counters-section,
.point-displays-grid,
.point-display-card,
#comprehensive-points-section,
#comprehensive-points-table,
#comprehensive-points-grid,
.point-counters-grid,
.point-counter-card,
#tab-points,
#battle-points-grid,
#battle-points-table-body,
#points-table,
#points-table-body,
#points-by-category-section,
.arena-tab[data-tab="points"],
#top50-monetization-frame-container,
#top50-monetization-frame {
    display: none !important;
}

/* ===== Single "Portaler" void (home / MN_NAV_PORTAL_VOID) ===== */
.nav-toolbar--portal-void .nav-toolbar-portal-wrap {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.nav-toolbar-portal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(57, 255, 20, 0.45);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.12), rgba(0, 212, 255, 0.1));
    color: #39ff14;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-toolbar-portal-trigger:hover {
    border-color: rgba(0, 255, 136, 0.65);
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.25);
    transform: translateY(-1px);
}

.nav-toolbar-portal-trigger-icon {
    font-size: 1.15rem;
}

.nav-toolbar-portal-panel {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 48px;
    max-height: min(78vh, 640px);
    overflow-y: auto;
    z-index: 9998;
    background: linear-gradient(180deg, rgba(12, 6, 22, 0.98) 0%, rgba(18, 10, 32, 0.97) 100%);
    border-bottom: 2px solid rgba(57, 255, 20, 0.35);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    animation: mnPortalFade 0.22s ease;
}

.nav-toolbar-portal-panel.open {
    display: block !important;
}

@keyframes mnPortalFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-toolbar-portal-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 16px 20px;
}

.nav-toolbar-portal-hint {
    margin: 0 0 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.nav-toolbar-portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}

.nav-toolbar-portal-grid .nav-toolbar-portal-grid-link {
    flex-direction: column;
    text-align: center;
    padding: 12px 10px;
    font-size: 0.82rem;
    border-radius: 12px;
    white-space: normal;
}

.nav-toolbar--portal-void .nav-toolbar-mobile {
    display: none !important;
}

@media (max-width: 640px) {
    .nav-toolbar-portal-panel {
        top: 44px;
        max-height: min(82vh, 720px);
    }
}

