/* ==========================================================================
   RESPONSIVE BOTTOM MENU STYLES - Enhanced Version
   ========================================================================== */

:root {
    --primary-color: #fae635;
    --primary-rgb: 250, 230, 53;
    --text-primary: #ffffff;
    --text-dark: #000000;
    --bg-dark: rgba(0, 0, 0, 0.95);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --z-fixed: 100;
    --z-modal: 400;
}

/* ========== BOTTOM MENU CONTAINER ========== */
.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: var(--z-fixed);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    min-height: 70px;
}

/* ========== LOGO SECTION (FLOATING) ========== */
.logo {
    position: absolute;
    top: -55px;
    left: 10%;
    transform: translateX(-50%);
    z-index: calc(var(--z-fixed) + 10);
    transition: all var(--transition-smooth);
}

.logo-icon {
    width: 300px;
    height: 100px;
    background: transparent;
    border: none;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo:hover .logo-icon {
    transform: scale(0.8);
}

/* ========== NAVIGATION LINKS ========== */
.nav {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex: 1;
    justify-content: center;
    margin-left: 200px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 16px;
    border-radius: 8px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(250, 230, 53, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover {
    background: var(--primary-color);
    color: var(--text-dark);
    border-radius: 50px;
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(250, 230, 53, 0.15);
    border: 1px solid rgba(250, 230, 53, 0.3);
}

/* ========== USER SECTION ========== */
.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 8px 16px;
    background: rgba(250, 230, 53, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(250, 230, 53, 0.3);
}

.user-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.logout-btn,
.auth-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 230, 53, 0.1);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
}

.logout-btn:hover,
.auth-btn:hover {
    background: var(--primary-color);
    color: var(--text-dark);
}

/* ========== MOBILE MENU TOGGLE ========== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    background: var(--bg-dark);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    z-index: calc(var(--z-modal) + 10);
    transition: all var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(250, 230, 53, 0.3);
}

.mobile-menu-toggle:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(250, 230, 53, 0.5);
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all var(--transition-smooth);
    transform-origin: center;
}

.mobile-menu-toggle:hover .hamburger span {
    background: var(--text-dark);
}

.mobile-menu-toggle.active {
    background: var(--primary-color);
}

.mobile-menu-toggle.active .hamburger span {
    background: var(--text-dark);
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========== MOBILE OVERLAY ========== */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: calc(var(--z-modal) - 10);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

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

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Desktop Large */
@media (max-width: 1400px) {
    .logo {
        left: 10%;
    }

    .logo-icon {
        width: 280px;
        height: 90px;
    }

    .nav {
        margin-left: 180px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .nav {
        gap: 0.6rem;
        margin-left: 160px;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .logo {
        left: 6%;
    }

    .logo-icon {
        width: 250px;
        height: 80px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .bottom-menu {
        padding: 10px 20px;
    }

    .logo {
        left: 6%;
    }

    .nav {
        gap: 0.5rem;
        margin-left: 140px;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .logo-icon {
        width: 240px;
        height: 80px;
    }
}

/* Tablet Small */
@media (max-width: 768px) {
    .logo {
        left: 8%;
        top: -50px;
    }

    .logo-icon {
        width: 220px;
        height: 75px;
    }

    .nav {
        margin-left: 120px;
        gap: 0.4rem;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 7px 10px;
    }

    .user-name {
        font-size: 0.85rem;
    }

    .logout-btn,
    .auth-btn {
        width: 36px;
        height: 36px;
    }
}

/* Mobile - Hamburger Menu Active */
@media (max-width: 640px) {
    .bottom-menu {
        padding: 10px 15px;
        justify-content: center;
        background: rgba(0, 0, 0, 0.92) !important;
    }

    .logo {
        left: 50%;
        top: -45px;
        transform: translateX(-50%);
    }

    .logo-icon {
        width: 180px;
        height: 60px;
    }

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: var(--bg-dark) !important;
    }

    .nav {
        display: none;
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-top: 2px solid var(--primary-color);
        z-index: var(--z-modal);
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        margin-left: 0;
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    .nav.mobile-open {
        display: flex !important;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 16px;
        border-bottom: 1px solid rgba(250, 230, 53, 0.2);
        margin-bottom: 5px;
        border-radius: 12px;
        font-size: 0.95rem;
        background: rgba(250, 230, 53, 0.05);
    }

    .nav-link:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .nav-link:hover {
        background: rgba(250, 230, 53, 0.15);
        transform: translateX(5px);
    }

    .user-section {
        margin-left: 0;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .logo-icon {
        width: 150px;
        height: 50px;
    }

    .mobile-menu-toggle {
        width: 50px;
        height: 50px;
        right: 15px;
        bottom: 75px;
    }

    .hamburger span {
        width: 20px;
        height: 2.5px;
    }

    .user-info {
        padding: 6px 12px;
    }

    .user-name {
        font-size: 0.8rem;
    }

    .logout-btn,
    .auth-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .nav-link {
        padding: 14px;
        font-size: 0.9rem;
    }
}

/* Mobile Extra Small */
@media (max-width: 380px) {
    .bottom-menu {
        padding: 8px 10px;
        min-height: 60px;
    }

    .logo {
        top: -40px;
    }

    .logo-icon {
        width: 130px;
        height: 45px;
    }

    .mobile-menu-toggle {
        width: 46px;
        height: 46px;
        right: 12px;
        bottom: 68px;
    }

    .hamburger span {
        width: 18px;
    }

    .user-name {
        display: none;
    }

    .logout-btn,
    .auth-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .logo {
        top: -25px;
    }

    .logo-icon {
        width: 120px;
        height: 40px;
    }

    .bottom-menu {
        min-height: 50px;
        padding: 6px 15px;
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        bottom: 56px;
    }

    .nav {
        max-height: calc(100vh - 100px);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.nav-link:focus,
.logout-btn:focus,
.auth-btn:focus,
.mobile-menu-toggle:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Scrollbar for mobile menu */
.nav::-webkit-scrollbar {
    width: 6px;
}

.nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.nav::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.nav::-webkit-scrollbar-thumb:hover {
    background: rgba(250, 230, 53, 0.8);
}
