/* Header Styles */
.header {
    background: #ffffff;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #222222;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-image {
    height: 28px;
    width: auto;
}

.logo:hover {
    opacity: 0.7;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-signed-out,
.nav-signed-in {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-signed-in {
    display: none;
}

/* Clean text navigation links */
.nav-text-link {
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    text-decoration: none;
    padding: 10px 4px;
    position: relative;
    transition: color 0.2s ease;
}

.nav-text-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 4px;
    right: 4px;
    height: 1px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-text-link:hover::after {
    transform: scaleX(1);
}

/* Mobile sign-in button */
.sign-in-btn {
    padding: 10px 16px;
    font-size: 16px;
    font-weight: 400;
    color: #1a1a1a;
    background: transparent;
    text-decoration: none;
    border: 1px solid #222222;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-in-btn:hover {
    background: #f8f9fa;
}

/* User menu - Profile picture */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-picture-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 50%;
    position: relative;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Desktop Profile Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    display: none;
    z-index: 1000;
    margin-top: 8px;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.dropdown-menu.active {
    display: flex;
    flex-direction: column;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    animation: dropdownSlide 0.3s ease-out;
}

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

.dropdown-bottom-item {
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #1a1a1a;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

/* Message notification badge for desktop */
.messages-nav-link {
    position: relative;
}

.message-notification-badge {
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Profile picture notification dot */
.profile-notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Bottom Navigation (Mobile Only) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 100;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    flex: 1;
    max-width: 80px;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    fill: #666;
    transition: fill 0.2s ease;
}

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

.bottom-nav-item:hover svg,
.bottom-nav-item:active svg {
    fill: #1a1a1a;
}

.bottom-nav-item span {
    white-space: nowrap;
}

/* Bottom nav avatar */
.bottom-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bottom-nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Bottom nav message badge */
.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive visibility classes */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header-container {
        justify-content: center;
    }
    
    .logo {
        text-align: center;
    }

    /* Show mobile elements, hide desktop elements */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex;
    }

    .bottom-nav {
        display: flex;
    }

    /* Add padding to body to account for bottom nav */
    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    /* Adjust nav structure for mobile */
    .nav-signed-out,
    .nav-signed-in {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 16px;
        height: 50px;
    }

    .logo-image {
        height: 18px;
    }

    .bottom-nav-item {
        font-size: 11px;
        padding: 6px 8px;
    }

    .bottom-nav-item svg {
        width: 22px;
        height: 22px;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
}