/* === Hamburger Navbar === */
.hamburger-navbar {
    display: flex;
    justify-content: space-between; /* flush left + right */
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    font-family: 'Noto Sans JP', sans-serif;
}

/* Left side: logo + hamburger button inline */
.hamburger-navbar-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Logo size */
.hamburger-logo img {
    height: 40px;
}

/* Hamburger button */
.hamburger-btn {
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Right-side buttons */
.hamburger-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0; /* prevent shrinking */
    white-space: nowrap;
    margin-right: 30px;
}

/* Prevent elements shrinking oddly */
.hamburger-balance-box,
.hamburger-logout-btn,
.hamburger-login-btn {
    flex-shrink: 0;
}

/* Balance box */
.hamburger-balance-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

/* Top-up link */
.hamburger-top-up {
    color: #4caf50;
    text-decoration: none;
    font-weight: bold;
}

/* Login / Logout buttons */
.hamburger-logout-btn,
.hamburger-login-btn {
    color: white;
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    font-weight: bold;
}

/* === Mobile menu === */
#hamburger-mobile-links {
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    background: rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 60px;   /* below navbar */
    left: 0;
    width: 100%;
    z-index: 900;
}

#hamburger-mobile-links li {
    margin: 0;
    padding: 0;
    width: 100%;
}

#hamburger-mobile-links li a {
    display: flex;
    padding: 1rem;
    width: 100%;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    justify-content: center;
    padding-right: 40px;
}

#hamburger-mobile-links li a:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Dropdown inside mobile */
.hamburger-dropdown-content {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.6);
}

.hamburger-dropdown:hover .hamburger-dropdown-content {
    display: flex;
}

/* Animate dropdown */
#hamburger-mobile-links.show {
    display: flex;
    animation: slideDown 0.3s ease-in-out;
}

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

/* === Responsive === */
@media (max-width: 768px) {
    #desktop-navbar { display: none; }
    #hamburger-navbar { display: flex; }  /* ✅ keep flex, not block */

    /* prevent content being hidden under fixed nav */
    body {
        padding-top: 60px;
    }
}

/* Desktop: hide mobile wrapper */
#mobile-navbar {
    display: none;
}

/* Mobile: show mobile wrapper */
@media (max-width: 768px) {
    #desktop-navbar {
        display: none !important;
    }

    #mobile-navbar {
        display: block !important;
    }

    #hamburger-navbar {
        display: flex !important;
    }

    body {
        padding-top: 60px;
    }
}

.hamburger-vip-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
}

.hamburger-vip-badge[data-vip="bronze"] {
    background: linear-gradient(135deg, #b87333, #6b3516);
}

.hamburger-vip-badge[data-vip="silver"] {
    background: linear-gradient(135deg, #e5e7eb, #7d8590);
}

.hamburger-vip-badge[data-vip="gold"] {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #2b1a00;
}

.hamburger-vip-badge[data-vip="diamond"] {
    background: linear-gradient(135deg, #7df9ff, #b794ff);
}

.hamburger-vip-badge[data-vip="black"] {
    background: linear-gradient(135deg, #111, #555);
}

.hamburger-vip-badge[data-vip="koripavip"] {
    background: linear-gradient(270deg, #ff80b3, #20f0d0, #ffb6c1);
    background-size: 400% 400%;
    animation: vipShimmer 4s ease infinite;
}

@keyframes vipShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* === Labelled mobile navigation === */
@media (max-width: 760px) {
    body {
        padding-top: 78px !important;
    }

    #mobile-koripa-nav .mobile-topbar {
        height: 78px;
        gap: 5px;
        padding: 0 6px;
    }

    #mobile-koripa-nav .mobile-logo,
    #mobile-koripa-nav .mobile-menu-btn {
        flex: 0 0 auto;
    }

    #mobile-koripa-nav .mobile-logo img {
        width: 44px;
        height: 44px;
    }

    #mobile-koripa-nav .mobile-menu-btn {
        width: 40px;
        height: 48px;
        border-radius: 14px;
    }

    #mobile-koripa-nav .mobile-main-icons {
        min-width: 0;
        height: 60px;
        gap: 0;
        justify-content: stretch;
        padding: 2px;
    }

    #mobile-koripa-nav .mobile-nav-icon {
        width: auto;
        min-width: 0;
        height: 54px;
        flex: 1 1 0;
        flex-direction: column;
        gap: 3px;
        padding: 4px 1px 3px;
        box-sizing: border-box;
        border-radius: 12px;
    }

    #mobile-koripa-nav .mobile-nav-icon img {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
    }

    #mobile-koripa-nav .mobile-charge-link img {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
    }

    #mobile-koripa-nav .mobile-nav-label {
        display: block;
        max-width: 100%;
        overflow: hidden;
        color: rgba(255,255,255,0.64);
        font-size: 9px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #mobile-koripa-nav .mobile-nav-icon.active .mobile-nav-label {
        color: #fff;
        text-shadow: 0 0 8px currentColor;
    }

    #mobile-koripa-nav .mobile-nav-icon.active::after {
        bottom: 0;
        width: 26px;
        height: 2px;
    }

    #mobile-koripa-nav .mobile-nav-icon.active::before {
        display: none;
    }

    #mobile-koripa-nav .mobile-auth-cta {
        position: relative;
        min-width: 106px;
        max-width: 115px;
        height: 48px;
        flex: 0 0 115px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0 8px;
        box-sizing: border-box;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.30);
        border-radius: 16px;
        color: #fff;
        text-decoration: none;
        background: linear-gradient(120deg, #ef73bd 0%, #c990e8 48%, #58d9f5 100%);
        box-shadow:
            0 0 18px rgba(255,105,210,0.24),
            0 0 20px rgba(95,231,255,0.16),
            inset 0 1px 0 rgba(255,255,255,0.38);
        transition: transform .18s ease, filter .18s ease;
    }

    #mobile-koripa-nav .mobile-auth-cta::after {
        content: "";
        position: absolute;
        inset: 1px;
        border-radius: 15px;
        background: linear-gradient(110deg, rgba(255,255,255,.16), transparent 42%);
        pointer-events: none;
    }

    #mobile-koripa-nav .mobile-auth-cta:active {
        transform: scale(.97);
        filter: brightness(1.08);
    }

    #mobile-koripa-nav .mobile-auth-person {
        position: relative;
        z-index: 1;
        width: 17px;
        height: 19px;
        flex: 0 0 17px;
    }

    #mobile-koripa-nav .mobile-auth-person::before,
    #mobile-koripa-nav .mobile-auth-person::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        background: #fff;
        box-shadow: 0 0 8px rgba(255,255,255,.28);
    }

    #mobile-koripa-nav .mobile-auth-person::before {
        top: 0;
        width: 8px;
        height: 8px;
        border-radius: 50%;
    }

    #mobile-koripa-nav .mobile-auth-person::after {
        bottom: 0;
        width: 17px;
        height: 9px;
        border-radius: 9px 9px 4px 4px;
    }

    #mobile-koripa-nav .mobile-auth-text {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        font-size: 10px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: -.02em;
        white-space: nowrap;
    }

    #mobile-koripa-nav .mobile-auth-text strong,
    #mobile-koripa-nav .mobile-auth-text small {
        font: inherit;
    }

    #mobile-koripa-nav .mobile-auth-text small {
        color: rgba(255,255,255,.78);
        font-size: 8px;
        letter-spacing: .08em;
    }

    #mobile-koripa-nav .drawer-login-btn {
        border-color: rgba(255,255,255,.26);
        background: linear-gradient(120deg, #ef73bd 0%, #c990e8 48%, #58d9f5 100%);
        box-shadow:
            0 0 22px rgba(255,105,210,.22),
            0 0 24px rgba(95,231,255,.14),
            inset 0 1px 0 rgba(255,255,255,.36);
    }
}

@media (max-width: 360px) {
    #mobile-koripa-nav .mobile-topbar {
        gap: 4px;
        padding: 0 4px;
    }

    #mobile-koripa-nav .mobile-logo img {
        width: 40px;
        height: 40px;
    }

    #mobile-koripa-nav .mobile-menu-btn {
        width: 36px;
        height: 44px;
    }

    #mobile-koripa-nav .mobile-main-icons {
        padding-inline: 3px;
    }

    #mobile-koripa-nav .mobile-nav-label {
        font-size: 8.5px;
    }

    #mobile-koripa-nav .mobile-auth-cta {
        min-width: 94px;
        max-width: 96px;
        flex-basis: 96px;
        gap: 4px;
        padding-inline: 6px;
    }

    #mobile-koripa-nav .mobile-auth-person {
        width: 14px;
        height: 17px;
        flex-basis: 14px;
    }

    #mobile-koripa-nav .mobile-auth-person::before {
        width: 7px;
        height: 7px;
    }

    #mobile-koripa-nav .mobile-auth-person::after {
        width: 14px;
        height: 8px;
    }

    #mobile-koripa-nav .mobile-auth-text {
        font-size: 8.5px;
    }
}
