/* 容器固定在右下角 */
.fab-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 9999;
    opacity: 0;          /* 默认隐藏 */
    visibility: hidden;  /* 默认不可点击 */
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 打开时显示 */
.fab-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* 顶部右上角容器（用于“明”按钮） */
.fab-top-right {
    position: fixed;
    top: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

/* 基础 FAB 样式 */
.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: Arial, sans-serif;
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    padding: 0;
    outline: none;
}

/* 悬停效果 */
.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

/* 点击反馈 */
.fab:active {
    transform: scale(0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 去掉 Firefox 内阴影 */
.fab::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.fab:focus {
    outline: none;
}

/* 不同颜色 */
.fab-red { background: #e74c3c; }
.fab-blue { background: #1976d2; }
.fab-green { background: #2ecc71; }
.fab-yellow { background: #ffe60f; }
.fab-cyan { background: #00ffff; }
.fab-orange { background: #f5900c; }
.fab-tomato { background: #ff6347; }


/* 覆盖层（点击关闭菜单） */
.fab-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.fab-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* 菜单开关按钮 ☰ */
.fab-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1976d2;
    color: white;
    font-size: 24px;
    border: none;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s ease;
}
.fab-toggle.open {
    background: #e74c3c;
    transform: rotate(135deg); /* 变成 × */
}

/* toast样式 */
.fab-container .toast {
    position: fixed;
}

.fab-button {
    display: none;
}

.drawer-menu {
    position: fixed;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.5);
}

.drawer-menu.open {
    transform: translateX(0);
}

.drawer-menu .fab-button {
    display: block;
    margin: 15px;
}
