/**
 * Bottom Navigation Bar for Mobile
 * Modern iOS/Android style bottom navigation
 */

/* Bottom Navigation Bar (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 999;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5), 0 -2px 20px rgba(139, 92, 246, 0.3);
    display: none;

}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    gap: 0.25rem;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    max-width: 80px;
}

.bottom-nav-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bottom-nav-item-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
}

.bottom-nav-item-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-item.active {
    color: var(--primary-yellow);
}

.bottom-nav-item.active .bottom-nav-item-icon {
    transform: translateY(-2px);
}

/* Hero Button - Center, Larger, Elevated */
.bottom-nav-item-hero {
    position: relative;
    margin: 0 0.5rem;
    padding: 0;
    flex: 0 0 auto;
}

.bottom-nav-item-hero .bottom-nav-hero-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--yellow-400), var(--yellow-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 24px rgba(252, 211, 77, 0.4),
        0 0 40px rgba(252, 211, 77, 0.3),
        inset 0 2px 8px rgba(255, 255, 255, 0.3);
    border: 3px solid var(--primary-black);
    position: relative;
    top: -30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item-hero .bottom-nav-hero-btn::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet-500), var(--violet-600));
    z-index: -1;
    opacity: 0.5;
}

.bottom-nav-item-hero:active .bottom-nav-hero-btn {
    transform: scale(0.9) translateY(2px);
    box-shadow:
        0 4px 12px rgba(252, 211, 77, 0.4),
        0 0 20px rgba(252, 211, 77, 0.3);
}

.bottom-nav-item-hero .bottom-nav-item-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-black);
}

.bottom-nav-item-hero .bottom-nav-item-label {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary-yellow);
    font-size: 0.625rem;
    white-space: nowrap;
    font-weight: 700;
}

/* Mobile Menu Overlay for Bottom Nav */
.bottom-nav-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bottom-nav-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-nav-menu {
    position: fixed;
    bottom: 70px;
    right: 1rem;
    background: var(--surface-glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    min-width: 280px;
    max-width: 90vw;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl), var(--glow-purple);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bottom-nav-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.bottom-nav-menu-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--primary-yellow);
    text-transform: uppercase;
    margin: 0;
}

.bottom-nav-menu-close {
    width: 32px;
    height: 32px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    cursor: pointer;
    transition: all 0.3s ease;
}

.bottom-nav-menu-close:hover {
    background: var(--primary-purple);
    color: var(--text-light);
    transform: rotate(90deg);
}

.bottom-nav-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bottom-nav-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.bottom-nav-menu-link:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary-purple);
    color: var(--primary-yellow);
    transform: translateX(5px);
}

.bottom-nav-menu-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.bottom-nav-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

/* Language selector in bottom menu */
.bottom-nav-language-selector {
    padding: 0.5rem 0;
}

.bottom-nav-language-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.bottom-nav-language-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.bottom-nav-language-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s ease;
}

.bottom-nav-language-option:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary-purple);
}

.bottom-nav-language-option.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.3));
    border-color: var(--primary-yellow);
}

.bottom-nav-language-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    overflow: hidden;
}

.bottom-nav-language-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bottom-nav-language-code {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-gray);
}

.bottom-nav-language-option.active .bottom-nav-language-code {
    color: var(--primary-yellow);
}

/* Responsive Bottom Navigation */

/* Mobile: Only core buttons (5 buttons) */
@media (max-width: 968px) {
    .bottom-nav {
        display: block;
    }

    /* Add margin to last section to prevent content from being hidden behind bottom nav */
    body > *:last-child,
    footer {
        margin-bottom: 80px;
    }
    
    /* Remove body padding if exists */
    body {
        padding-bottom: 0 !important;
    }
    
    /* Add scroll padding to account for bottom nav when using anchor links */
    html {
        scroll-padding-bottom: 100px;
    }
    
    /* Hide tablet+ buttons on mobile */
    .bottom-nav-item-tablet,
    .bottom-nav-item-large-tablet {
        display: none !important;
    }
    
    /* Core buttons always visible */
    .bottom-nav-item-core {
        display: flex;
    }
}

/* Small Tablet: Add Airdrop & Roadmap (7 buttons) */
@media (min-width: 600px) and (max-width: 968px) {
    .bottom-nav-item-tablet {
        display: flex !important;
    }
    
    .bottom-nav-container {
        max-width: 700px;
    }
}

/* Large Tablet: Add Whitepaper & Login (9 buttons) */
@media (min-width: 768px) and (max-width: 968px) {
    .bottom-nav-item-large-tablet {
        display: flex !important;
    }
    
    .bottom-nav-container {
        max-width: 900px;
    }
    
    .bottom-nav-item {
        max-width: 90px;
    }
}

/* Hide menu items when they're visible in bottom nav */

/* Hide Airdrop & Roadmap from menu on tablet+ (600px+) */
@media (min-width: 600px) and (max-width: 968px) {
    .bottom-nav-menu-hide-tablet {
        display: none !important;
    }
}

/* Hide Whitepaper & Login from menu on large tablet+ (768px+) */
@media (min-width: 768px) and (max-width: 968px) {
    .bottom-nav-menu-hide-large-tablet {
        display: none !important;
    }
}
