/* ==========================================================================
   RESPONSIVE BOTTOM MENU STYLES - Optimized 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: 8px 20px;
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    min-height: 60px;
}

/* ========== LOGO SECTION ========== */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: all var(--transition-smooth);
}

.logo-icon {
    width: 80px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    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(1.05);
}

/* ========== NAVIGATION LINKS ========== */
.nav {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

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

.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);
}

/* ========== SEARCH SECTION ========== */
.search-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    margin-right: 20px;
}

.search-container {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.search-form-display {
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-input-display {
    flex: 1;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(250, 230, 53, 0.3);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-smooth);
}

.search-input-display:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.search-input-display::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit-btn-display {
    width: 36px;
    height: 36px;
    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);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}

.search-submit-btn-display:hover {
    background: var(--primary-color);
    color: var(--text-dark);
}

/* ========== USER SECTION ========== */
.user-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 6px 12px;
    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.8rem;
    white-space: nowrap;
}

.logout-btn,
.auth-btn {
    width: 36px;
    height: 36px;
    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;
    flex-shrink: 0;
}

.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 ========== */

/* Large Desktop (2560px+) */
@media (min-width: 2560px) {
    .logo-icon {
        width: 150px;
        height: 50px;
    }

    .nav-link {
        font-size: 3rem;
        padding: 10px 16px;
    }

    .bottom-menu {
        padding: 10px 30px;
        min-height: 65px;
    }
}

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .logo-icon {
        width: 160px;
        height: 70px;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 10px 16px;
    }

    .bottom-menu {
        padding: 10px 30px;
        min-height: 65px;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) {
    .logo-icon {
        width: 85px;
        height: 34px;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 8px 14px;
        gap: 0.25rem;
    }
}

/* Tablet Large (1024px - 1199px) */
@media (max-width: 1199px) {
    .logo-icon {
        width: 100px;
        height: 50px;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 8px 6px;
    }

    .nav {
        gap: 0.2rem;
    }

    .search-container {
        width: 250px;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .logo-icon {
        width: 70px;
        height: 28px;
    }

    .nav-link {
        font-size: 0.5rem;
        padding: 7px 4px;
    }

    .nav {
        gap: 0.1rem;
        padding: 0 3px;
    }

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

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

    .search-section {
        margin-right: 15px;
    }

    .search-container {
        width: 200px;
    }

    .search-input-display {
        font-size: 12px;
        padding: 6px 12px;
    }

    .search-submit-btn-display {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Tablet Small (640px - 767px) */
@media (max-width: 767px) {
    .logo-icon {
        width: 65px;
        height: 26px;
    }

    .nav-link {
        font-size: 0.65rem;
        padding: 6px 8px;
        letter-spacing: 0.2px;
    }

    .nav {
        gap: 0.1rem;
    }

    .user-info {
        padding: 5px 10px;
        gap: 0.5rem;
    }

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

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

    .search-container {
        width: 180px;
    }

    .search-submit-btn-display {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

/* Mobile - Hamburger Menu (< 640px) */
@media (max-width: 639px) {
    .bottom-menu {
        padding: 8px 15px;
        justify-content: space-between;
    }

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

    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav {
        display: none;
        position: fixed;
        bottom: 60px;
        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 - 120px);
        overflow-y: auto;
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
    }

    @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.9rem;
        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 {
        gap: 0.5rem;
    }

    .user-info {
        padding: 4px 8px;
    }
}

/* Mobile Small (< 480px) */
@media (max-width: 479px) {
    .bottom-menu {
        padding: 6px 10px;
        min-height: 55px;
    }

    .logo-icon {
        width: 55px;
        height: 22px;
    }

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

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

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

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

    .search-container {
        width: 150px;
    }

    .search-input-display {
        font-size: 11px;
        padding: 5px 10px;
    }

    .search-submit-btn-display {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

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

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

    .logo-icon {
        width: 50px;
        height: 20px;
    }

    .mobile-menu-toggle {
        width: 46px;
        height: 46px;
        right: 10px;
        bottom: 60px;
    }

    .hamburger span {
        width: 18px;
        height: 2px;
    }

    .user-name {
        display: none;
    }

    .user-info {
        padding: 4px;
    }

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

    .search-container {
        width: 140px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .bottom-menu {
        min-height: 45px;
        padding: 4px 15px;
    }

    .logo-icon {
        width: 55px;
        height: 22px;
    }

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

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

    .nav-link {
        padding: 10px;
    }
}

/* 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,
.search-submit-btn-display: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);
}
