/* ========================================
   通用悬浮导航栏样式
   适用于所有页面
   ======================================== */

/* 容器需要设置 position: relative */
.container, .chat-container {
    position: relative;
}

/* 导航栏容器 - 固定在标题栏左上角 */
.nav-container {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 100;
}

/* 导航按钮 */
.nav-toggle {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    color: white;
    font-size: 1.3em;
}

.nav-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* 导航菜单 */
.nav-bar {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-15px);
    transition: all 0.3s ease;
}

/* 悬停显示菜单 */
.nav-container:hover .nav-bar {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 导航链接 */
.nav-link {
    color: #667eea;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    white-space: nowrap;
}

.nav-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-container {
        top: 12px;  /* 移动端也放在左上角 */
        left: 10px;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .nav-bar {
        padding: 10px;
        min-width: 140px;
        gap: 5px;
    }

    .nav-link {
        padding: 7px 10px;
        font-size: 0.75em;
        gap: 5px;
    }
}
