/**
 * 全局悬浮菜单样式
 * 黑白灰配色，黑色圆角描边
 * 支持桌面端和移动端自适应
 */

/* 悬浮菜单容器 */
.floating-menu-wrapper {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

/* 菜单内容区 */
.floating-menu-content {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2.5px solid #000;
    border-radius: 16px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* 菜单列表 */
.floating-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.floating-menu-list li {
    margin: 0;
    padding: 0;
}

/* 菜单链接按钮 */
.floating-menu-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.floating-menu-list a:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.floating-menu-list a:active {
    transform: translateY(0);
}

/* 子菜单样式 */
.floating-menu-list .sub-menu {
    display: none;
}

/* 移动端样式 - 隐藏菜单，仅在PC端显示 */
@media (max-width: 768px) {
    .floating-menu-wrapper {
        display: none !important;
    }
    
    /* 以下样式保留以备将来启用移动端功能 */
    /*
    .floating-menu-wrapper {
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
    }
    */

    .floating-menu-content {
        border-radius: 20px 20px 0 0;
        border-bottom: none;
        padding: 16px;
        max-height: 70vh;
        overflow-y: auto;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* 移动端收起状态 */
    .floating-menu-wrapper.collapsed .floating-menu-content {
        transform: translateY(calc(100% - 60px));
    }

    /* 移动端展开/收起按钮 */
    .floating-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 16px;
        background: #fff;
        border: none;
        border-bottom: 2.5px solid #000;
        font-size: 16px;
        font-weight: 600;
        color: #333;
        cursor: pointer;
        position: relative;
        transition: all 0.25s ease;
    }

    .floating-menu-toggle:active {
        background: #f5f5f5;
    }

    .floating-menu-toggle::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #999;
        border-radius: 2px;
    }

    .floating-menu-toggle .toggle-icon {
        margin-left: 8px;
        transition: transform 0.3s ease;
    }

    .floating-menu-wrapper.collapsed .floating-menu-toggle .toggle-icon {
        transform: rotate(180deg);
    }

    /* 移动端菜单列表 */
    .floating-menu-list {
        flex-direction: column;
        gap: 10px;
        margin-top: 16px;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    .floating-menu-wrapper.collapsed .floating-menu-list {
        opacity: 0;
        pointer-events: none;
    }

    .floating-menu-list li {
        width: 100%;
    }

    .floating-menu-list a {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
        justify-content: flex-start;
    }
}

/* 桌面端不显示切换按钮 */
@media (min-width: 769px) {
    .floating-menu-toggle {
        display: none;
    }
}

/* 滚动时的动画效果 */
.floating-menu-wrapper.scrolled .floating-menu-content {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

/* 深色文本 */
.floating-menu-list a strong {
    color: #000;
}

/* 灰色辅助文本 */
.floating-menu-list a .text-muted {
    color: #666;
    font-size: 0.9em;
}

/* 加载动画 - 已禁用，避免刷新时的位移效果 */
/*
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.floating-menu-wrapper {
    animation: fadeInUp 0.4s ease-out;
}
*/

/* 平滑滚动条样式（移动端） */
@media (max-width: 768px) {
    .floating-menu-content::-webkit-scrollbar {
        width: 4px;
    }

    .floating-menu-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }

    .floating-menu-content::-webkit-scrollbar-thumb {
        background: #999;
        border-radius: 2px;
    }

    .floating-menu-content::-webkit-scrollbar-thumb:hover {
        background: #666;
    }
}

/* 无障碍优化 */
.floating-menu-list a:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* 打印时隐藏 */
@media print {
    .floating-menu-wrapper {
        display: none !important;
    }
}

