/**
 * Netflix-Style Bottom Navigation Bar
 * Sticky bottom nav for mobile/tablet
 * Desktop: Hidden (uses existing top nav)
 */

/* Hide on desktop */
@media (min-width: 1024px) {
    .bottom-nav {
        display: none !important;
    }
    .bottom-sheet {
        display: none !important;
    }
}

/* Show on mobile/tablet */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 15, 26, 0.98), rgba(15, 15, 26, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    color: #a0a0b0;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 64px;
    cursor: pointer;
    border: none;
    background: none;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: #e94560;
}

.bottom-nav-item i,
.bottom-nav-item .icon {
    font-size: 24px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.bottom-nav-item:hover i,
.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* Add padding to body to prevent content from being hidden behind nav */
@media (max-width: 1023px) {
    body {
        padding-bottom: 70px !important;
    }
    
    /* Hide original header nav on mobile */
    .header .nav-links {
        display: none;
    }
    
    /* Keep logo and search visible */
    .header {
        padding: 12px 16px;
    }
}

/* Bottom Sheet (More Menu) */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border-radius: 20px 20px 0 0;
    z-index: 2001;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #1a1a2e;
    z-index: 10;
}

.bottom-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.bottom-sheet-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

.bottom-sheet-content {
    padding: 16px 20px 32px;
}

/* Filter Grid in Bottom Sheet */
.filter-section {
    margin-bottom: 24px;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 4px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 8px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.filter-chip:hover,
.filter-chip:active {
    background: #e94560;
    border-color: #e94560;
    transform: scale(0.98);
}

.filter-chip-icon {
    font-size: 20px;
}

/* Year List (Horizontal Scroll) */
.year-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.year-scroll::-webkit-scrollbar {
    display: none;
}

.year-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.year-chip:hover,
.year-chip:active {
    background: #e94560;
    border-color: #e94560;
}

/* Handle bar (like iOS) */
.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 12px auto 0;
}

/* Quick Actions Row */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action-btn {
    flex: 1;
    background: linear-gradient(135deg, #e94560, #c73e54);
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.quick-action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.bottom-sheet.animate-in {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-sheet-overlay.animate-in {
    animation: fadeIn 0.3s ease;
}

/* More Menu (Static Pages) */
.more-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.more-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.more-menu-item:hover,
.more-menu-item:active {
    background: rgba(233, 69, 96, 0.1);
    border-color: #e94560;
}

.more-menu-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.more-menu-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.more-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.more-menu-desc {
    font-size: 13px;
    color: #a0a0b0;
}

/* Loading State */
.filter-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
    color: #a0a0b0;
}

/* Touch feedback */
@media (hover: none) {
    .bottom-nav-item:active,
    .filter-chip:active,
    .year-chip:active,
    .more-menu-item:active {
        transform: scale(0.98);
    }
}
