/* Bottom Navigation Bar Styles with Glass Effect - 6 Menu Version */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
}

.nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding: 0 8px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 38px;
    position: relative;
    backdrop-filter: blur(5px);
    flex: 1;
    max-width: 55px;
}

.nav-item:hover {
    color: #495057;
    background: rgba(108, 117, 125, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-item.active {
    color: #007bff;
    background: rgba(0, 123, 255, 0.15);
    backdrop-filter: blur(10px);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.2);
}

.nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

.nav-item span {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    text-align: center;
    line-height: 1.1;
}

/* Expandable Menu Button - Enhanced Pokeball Style */
.expand-btn {
    position: relative;
    background: url('/images/pokeball-draw.png') no-repeat center center;
    background-size: 80%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-top: -20px;
}

.expand-btn:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    background-size: 85%;
    backdrop-filter: blur(15px);
}

.expand-btn.active {
    transform: rotate(180deg) scale(1.15);
    background-size: 85%;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.expand-btn i {
    font-size: 24px;
    transition: transform 0.4s ease;
    display: none; /* ซ่อนไอคอน + เพราะใช้รูป pokeball แทน */
}

/* Expandable Menu Items */
.expandable-menu {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.expandable-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.expand-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.expand-item:hover {
    transform: scale(1.2);
    color: #667eea;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
}

.expand-item i {
    font-size: 20px;
}

/* Enhanced Tooltip */
.expand-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.expand-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-8px);
}

/* Enhanced Backdrop overlay */
.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Animation delays for staggered effect */
.expandable-menu.active .expand-item:nth-child(1) {
    animation: slideUp 0.4s ease 0.1s both;
}

.expandable-menu.active .expand-item:nth-child(2) {
    animation: slideUp 0.4s ease 0.2s both;
}

.expandable-menu.active .expand-item:nth-child(3) {
    animation: slideUp 0.4s ease 0.3s both;
}

.expandable-menu.active .expand-item:nth-child(4) {
    animation: slideUp 0.4s ease 0.4s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .nav-item span {
        font-size: 8px;
        letter-spacing: 0.1px;
    }

    .nav-item i {
        font-size: 16px;
        margin-bottom: 1px;
    }

    .nav-item {
        padding: 5px 6px;
        min-width: 35px;
        max-width: 50px;
    }

    .nav-container {
        max-width: 100%;
        padding: 0 3px;
    }

    .expand-btn {
        width: 50px;
        height: 50px;
        margin-top: -15px;
    }

    .expand-btn:hover {
        transform: scale(1.1) translateY(-2px);
    }

    .expand-btn.active {
        transform: rotate(180deg) scale(1.1);
    }

    .expand-btn i {
        font-size: 20px;
    }
}

/* Ensure body has padding for fixed bottom nav */
body:not(.no-bottom-nav) {
    padding-bottom: 80px !important;
}

/* Hide default nav on all screens */
.navbar {
    display: none !important;
}

/* Active page indicators */
.nav-item.page-home.active {
    color: #28a745;
    background: rgba(40, 167, 69, 0.15);
}

.nav-item.page-pokedex.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

.nav-item.page-leagues.active {
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.15);
}

.nav-item.page-teams.active {
    color: #6f42c1;
    background: rgba(111, 66, 193, 0.15);
}

.nav-item.page-support.active {
    color: #fd7e14;
    background: rgba(253, 126, 20, 0.15);
}

.nav-item.page-events.active {
    color: #e91e63;
    background: rgba(233, 30, 99, 0.15);
}

.nav-item.page-support {
    cursor: pointer;
}

.nav-item.page-support:hover {
    color: #fd7e14 !important;
    background: rgba(253, 126, 20, 0.1) !important;
}

/* Language Selector Styles */
.nav-item.page-language {
    position: relative;
    cursor: pointer;
}

.nav-item.page-language.active {
    color: #6610f2;
    background: rgba(102, 16, 242, 0.15);
}

/* Enhanced Language Dropdown */
.language-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px;
    min-width: 120px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    z-index: 1001;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(-15px);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.lang-option:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    transform: translateX(2px);
    text-decoration: none;
}

.lang-option .flag {
    margin-right: 8px;
    font-size: 16px;
}

.lang-option span:last-child {
    flex: 1;
}

/* Language dropdown arrow */
.language-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* Responsive language dropdown */
@media (max-width: 480px) {
    .language-dropdown {
        min-width: 120px;
        margin-bottom: 8px;
    }
    
    .lang-option {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .lang-option .flag {
        font-size: 14px;
        margin-right: 6px;
    }
}

/* Magic Navigation Menu Indicator CSS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    padding-bottom: 100px;
}

.navigation {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 70px;
    background: linear-gradient(45deg, #2196f3, #e91e63);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    z-index: 1000;
}

.navigation ul {
    display: flex;
    width: 350px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation ul li {
    position: relative;
    width: 70px;
    height: 70px;
    z-index: 1;
}

.navigation ul li a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
    font-weight: 500;
    text-decoration: none;
}

.navigation ul li a .icon {
    position: relative;
    display: block;
    line-height: 75px;
    font-size: 1.5em;
    text-align: center;
    color: #fff;
    transition: .5s;
}

.navigation ul li.active a .icon {
    transform: translateY(-32px);
}

.navigation ul li a .text {
    position: absolute;
    color: #fff;
    font-weight: 400;
    font-size: .75em;
    letter-spacing: .05em;
    opacity: 0;
    transform: translateY(20px);
    transition: .5s;
}

.navigation ul li.active a .text {
    opacity: 1;
    transform: translateY(10px);
}

.navigation ul li a .circle {
    position: absolute;
    display: block;
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 50%;
    border: 1.8px solid #fff;
    transform: translateY(-37px) scale(0);
    transition: .5s;
}

.navigation ul li.active a .circle {
    transition: .5s;
    transition-delay: .5s;
    transform: translateY(-37px) scale(1);
}

.indicator {
    position: absolute;
    top: -50%;
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #2196f3, #e91e63);
    border: 6px solid #06021b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .5s;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-right-radius: 20px;
    box-shadow: 1px -10px 0 #06021b;
}

.indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -22px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-top-left-radius: 20px;
    box-shadow: -1px -10px 0 #06021b;
}

.navigation ul li:nth-child(1).active ~ .indicator {
    transform: translateX(calc(70px * 0));
}

.navigation ul li:nth-child(2).active ~ .indicator {
    transform: translateX(calc(70px * 1));
}

.navigation ul li:nth-child(3).active ~ .indicator {
    transform: translateX(calc(70px * 2));
}

.navigation ul li:nth-child(4).active ~ .indicator {
    transform: translateX(calc(70px * 3));
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .navigation {
        width: 350px;
    }
    
    .navigation ul {
        width: 300px;
    }
    
    .navigation ul li {
        width: 60px;
        height: 60px;
    }
    
    .indicator {
        width: 60px;
        height: 60px;
    }
    
    .navigation ul li:nth-child(1).active ~ .indicator {
        transform: translateX(calc(60px * 0));
    }
    
    .navigation ul li:nth-child(2).active ~ .indicator {
        transform: translateX(calc(60px * 1));
    }
    
    .navigation ul li:nth-child(3).active ~ .indicator {
        transform: translateX(calc(60px * 2));
    }
    
    .navigation ul li:nth-child(4).active ~ .indicator {
        transform: translateX(calc(60px * 3));
    }
}


