.user-header {
    background: rgba(255, 255, 255, 0.95);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999; /* Aumentado para 9999 */
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 100%;
    gap: 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    flex-shrink: 1;
    min-width: 0;
    flex-grow: 0;
}

/* ESTILO APENAS PARA TEXTO - SEM REFERÊNCIAS A LOGO */
.logo-text {
    font-weight: 300;
    font-size: 1.8rem;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    transition: all 0.3s ease;
    max-width: 100%;
    line-height: 1.2;
}

.logo-text:hover {
    color: #4299e1;
}

.logo-text strong {
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.nav-link {
    text-decoration: none;
    color: #4a5568;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 8px;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.nav-link:hover {
    color: #4299e1;
    background: rgba(66, 153, 225, 0.08);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #4299e1;
    font-weight: 600;
    background: rgba(66, 153, 225, 0.1);
    position: relative;
}

/* Indicador visual melhorado para link ativo */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 3px;
    background: #4299e1;
    border-radius: 3px;
    animation: slideIn 0.3s ease;
    z-index: 1;
}

/* Indicador especial para Store ativa */
body.store-page #store-link.active::after {
    background: #27ae60;
    width: 60%;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 70%;
        opacity: 1;
    }
}

/* Separador visual entre os links (desktop) */
@media (min-width: 769px) {
    .nav-link + .nav-link::before {
        content: '';
        position: absolute;
        left: -7.5px;
        top: 50%;
        transform: translateY(-50%);
        height: 15px;
        width: 1px;
        background: rgba(74, 85, 104, 0.15);
    }
}

/* BOTÃO HAMBÚRGUER - DESKTOP ESCONDIDO */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #4a5568;
    padding: 8px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 10002;
    position: relative;
}

.mobile-menu-btn:hover {
    color: #4299e1;
    transform: scale(1.1);
}

/* RESPONSIVIDADE - TEXTO FLEXÍVEL */

/* Desktop grande */
@media (min-width: 1201px) {
    .header-container {
        max-width: 1200px;
    }
    
    .logo-text {
        font-size: 1.8rem;
    }
}

/* Desktop médio */
@media (max-width: 1200px) {
    .header-container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .logo-text {
        font-size: 1.7rem;
    }
}

/* Tablet grande */
@media (max-width: 992px) {
    .main-nav {
        gap: 12px;
    }
    
    .nav-link {
        font-size: 0.95rem;
        padding: 8px 14px;
    }
    
    .logo-text {
        font-size: 1.6rem;
    }
}

/* TABLET (768px) - MENU HAMBÚRGUER ATIVO */
@media (max-width: 768px) {
    .header-container {
        height: 70px;
        padding: 0 15px;
        position: relative;
        gap: 15px;
    }
    
    .header-logo {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 100px);
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    /* BOTÃO HAMBÚRGUER VISÍVEL */
    .mobile-menu-btn {
        display: block;
    }
    
    /* MENU PRINCIPAL - MOBILE */
    .main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        border-top: 1px solid #e2e8f0;
        z-index: 1001;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        transform: translateY(-10px);
        width: 100vw;
        margin: 0;
        gap: 8px;
    }
    
    .main-nav.active {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px 20px;
        font-size: 1.1rem;
        border-radius: 10px;
        margin: 5px 0;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(66, 153, 225, 0.1);
        transform: none;
    }
    
    .nav-link.active {
        background: rgba(66, 153, 225, 0.15);
        color: #4299e1;
        font-weight: 600;
        border: 2px solid #4299e1;
        transform: none;
    }
    
    /* Remover indicador de linha em mobile */
    .nav-link.active::after {
        display: none;
    }
    
    /* Remover separadores entre links em mobile */
    .nav-link + .nav-link::before {
        display: none;
    }
    
    /* Store ativa em mobile */
    body.store-page #store-link.active {
        background: rgba(39, 174, 96, 0.15);
        border: 2px solid #27ae60;
        color: #27ae60;
    }
}

/* Tablet pequeno / Mobile grande */
@media (max-width: 640px) {
    .header-container {
        padding: 0 12px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .mobile-menu-btn {
        font-size: 1.7rem;
        padding: 7px;
    }
    
    .main-nav {
        top: 65px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header-container {
        height: 65px;
        padding: 0 10px;
        gap: 10px;
    }
    
    .header-logo {
        max-width: calc(100% - 80px);
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .main-nav {
        top: 65px;
        padding: 15px;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 1.05rem;
    }
    
    .mobile-menu-btn {
        font-size: 1.6rem;
    }
}

/* Mobile pequeno */
@media (max-width: 360px) {
    .header-container {
        padding: 0 8px;
        gap: 8px;
    }
    
    .header-logo {
        max-width: calc(100% - 70px);
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .mobile-menu-btn {
        font-size: 1.5rem;
        padding: 6px;
    }
}

/* Mobile muito pequeno */
@media (max-width: 320px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    .header-logo {
        max-width: calc(100% - 65px);
    }
}

/* Spacing for fixed header */
body.user-profile-page {
    padding-top: 80px;
    margin: 0;
}

@media (max-width: 768px) {
    body.user-profile-page {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    body.user-profile-page {
        padding-top: 65px;
    }
}

/* Se estiver na página da store, manter ativo mesmo ao scrollar */
body.store-page #store-link.active {
    color: #27ae60 !important;
}

/* Animações */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip para nome completo quando cortado */
.logo-text {
    cursor: default;
}

/* Mostrar nome completo no hover (apenas se estiver cortado) */
@media (hover: hover) and (pointer: fine) {
    .logo-text:hover {
        position: relative;
    }
    
    .logo-text:hover::after {
        content: attr(title);
        position: absolute;
        top: 100%;
        left: 0;
        background: #2c3e50;
        color: white;
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 0.9rem;
        white-space: nowrap;
        z-index: 1001;
        margin-top: 5px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Estilo quando menu está aberto */
body.menu-open {
    overflow: hidden;
}

/* Garantir que o header fique acima de tudo */
.user-header {
    z-index: 1000 !important;
}

/* Ajustes para prevenir overflow */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

* {
    box-sizing: border-box;
}

/* Animações suaves para mobile menu */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-nav.active .nav-link {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

.main-nav.active .nav-link:nth-child(1) { animation-delay: 0.1s; }
.main-nav.active .nav-link:nth-child(2) { animation-delay: 0.15s; }
.main-nav.active .nav-link:nth-child(3) { animation-delay: 0.2s; }
.main-nav.active .nav-link:nth-child(4) { animation-delay: 0.25s; }
.main-nav.active .nav-link:nth-child(5) { animation-delay: 0.3s; }
.main-nav.active .nav-link:nth-child(6) { animation-delay: 0.35s; }