/* ========== 统一导航Header样式 ========== */

.unified-header {
    background: linear-gradient(135deg, #4a5dc9 0%, #5a3680 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    margin: 0;
}

.unified-header-container {
    width: 100%;
    margin: 0;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    box-sizing: border-box;
}

/* 左侧Logo区域 */
.unified-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.unified-header-logo {
    font-size: 32px;
    color: white;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.unified-header-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin: 0;
    white-space: nowrap;
    letter-spacing: 1px;
}

/* 中间导航菜单 */
.unified-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.unified-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.unified-nav-link i {
    font-size: 16px;
}

.unified-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

.unified-nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.unified-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: white;
    border-radius: 2px 2px 0 0;
}

/* 右侧用户信息区域 */
.unified-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.unified-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 15px;
}

.unified-user-icon {
    font-size: 24px;
}

.unified-welcome-text {
    font-weight: 400;
    opacity: 0.9;
    font-size: 17px;
}

.unified-username {
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
}

.unified-btn-settings {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
}

.unified-btn-settings:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.unified-btn-settings:active {
    transform: translateY(0);
}

.unified-btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.unified-btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.unified-btn-logout:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .unified-header-container {
        padding: 12px 20px;
        gap: 20px;
    }
    
    .unified-header-nav {
        gap: 5px;
    }
    
    .unified-nav-link {
        padding: 8px 15px;
        font-size: 16px;
    }
    
    .unified-header-title {
        font-size: 20px;
    }
}

@media (max-width: 992px) {
    .unified-header-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .unified-header-left {
        flex: 1 1 100%;
        justify-content: center;
        order: 1;
    }
    
    .unified-header-nav {
        flex: 1 1 100%;
        order: 3;
        justify-content: center;
    }
    
    .unified-header-right {
        flex: 1 1 100%;
        order: 2;
        justify-content: center;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .unified-header-container {
        padding: 10px 15px;
    }
    
    .unified-nav-link span {
        display: none;
    }
    
    .unified-nav-link {
        padding: 10px 12px;
    }
    
    .unified-nav-link i {
        font-size: 18px;
    }
    
    .unified-header-title {
        font-size: 18px;
    }
    
    .unified-header-logo {
        font-size: 28px;
    }
    
    .unified-welcome-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .unified-header-nav {
        gap: 3px;
    }
    
    .unified-nav-link {
        padding: 8px 10px;
    }
    
    .unified-btn-logout span {
        display: none;
    }
    
    .unified-username {
        max-width: 80px;
    }
}


/* 为有header的页面添加顶部padding,避免内容被固定header遮挡 */
body {
    padding-top: 60px; /* header的大致高度 */
}

.auth-page {
    padding-top: 0; /* auth-page自己处理padding */
}

.dashboard-page {
    padding-top: 60px;
}

/* 确保dashboard和compound页面的main区域不被header遮挡 */
.dashboard-main,
.compound-main-v2 {
    margin-top: 0;
}
