/* Mobile Bottom Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    display: none;
}

.mobile-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 60px;
    position: relative;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: #1a1a1a;
    text-decoration: none;
    transform: translateY(-2px);
}

.mobile-nav-item.active {
    color: #1a1a1a;
    background: rgba(26, 26, 26, 0.08);
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-item:hover .mobile-nav-icon {
    transform: scale(1.1);
}

.mobile-nav-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
}

/* Mobile Logo */
.mobile-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    display: none;
}

.mobile-logo img {
    height: 80px;
    width: auto;
    max-width: 250px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Show mobile elements only on mobile */
@media (max-width: 768px) {
    .mobile-nav {
        display: block;
    }
    
    .mobile-logo {
        display: block;
    }
    
    /* Hide desktop logo on mobile auth pages */
    .auth-logo-container {
        display: none !important;
    }
    
    /* Adjust auth container for mobile nav */
    .auth-container {
        padding-bottom: 80px;
    }
    
    .auth-right {
        padding-top: 80px;
    }
}

/* Modern Icons using SVG */
.nav-icon-home {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'/%3E%3C/svg%3E");
}

.nav-icon-login {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1'/%3E%3C/svg%3E");
}

.nav-icon-register {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z'/%3E%3C/svg%3E");
}

.nav-icon-join {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z'/%3E%3C/svg%3E");
}

/* Active state icons */
.mobile-nav-item.active .nav-icon-home {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231a1a1a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'/%3E%3C/svg%3E");
}

.mobile-nav-item.active .nav-icon-login {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231a1a1a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1'/%3E%3C/svg%3E");
}

.mobile-nav-item.active .nav-icon-register {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231a1a1a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z'/%3E%3C/svg%3E");
}

.mobile-nav-item.active .nav-icon-join {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231a1a1a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z'/%3E%3C/svg%3E");
}

.mobile-nav-icon {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-nav {
        background: rgba(17, 24, 39, 0.95);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-nav-item {
        color: #9ca3af;
    }
    
    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: #f9fafb;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Smooth animations */
.mobile-nav-item {
    animation: fadeInUp 0.3s ease-out;
}

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

/* Active page indicator */
.mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #1a1a1a;
    border-radius: 50%;
}

@media (prefers-color-scheme: dark) {
    .mobile-nav-item.active::before {
        background: #f9fafb;
    }
}

/* Safe area adjustments for newer phones */
@supports (padding: max(0px)) {
    .mobile-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Haptic feedback simulation */
.mobile-nav-item:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Improved accessibility */
.mobile-nav-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state for navigation */
.mobile-nav-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mobile-nav-item.loading .mobile-nav-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Badge for notifications (future use) */
.mobile-nav-item .nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Smooth page transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}
