/* 后台侧边菜单基础 */
.amp-menu {
    width: 220px;
    min-height: 100vh;
    color: #ecf0f1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 10px 0;
    box-sizing: border-box;
    transition: width .2s;
}
.amp-menu .amp-level-1 { list-style: none; margin: 0; padding: 0; }
.amp-menu .amp-item { position: relative; }
.amp-menu .amp-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px; color: #ecf0f1; text-decoration: none; font-size: 14px; white-space: nowrap;
}
.amp-menu .amp-link:hover { background: rgba(255,255,255,.1); }
.amp-menu .amp-arrow { transform: rotate(90deg); font-size: 16px; }
.amp-menu .amp-sub { list-style: none; margin: 0; padding: 0; display: none; background: rgba(0,0,0,.15); }
.amp-menu .amp-item:hover > .amp-sub { display: block; position: absolute; left: 100%; top: 0; min-width: 180px; z-index: 999; }
.amp-menu .amp-sub.level-3 { background: rgba(0,0,0,.25); }
.amp-menu .amp-sub .amp-link { padding-left: 28px; font-size: 13px; }

/* 前台通用 */
.amp-menu.amp-front {
    width: 100%; min-height: auto; display: flex; flex-wrap: wrap; align-items: center;
    padding: 0 10px; box-shadow: 0 2px 6px rgba(0,0,0,.2); position: relative; z-index: 1000;
}
.amp-menu.amp-front .amp-level-1 { display: flex; flex-wrap: wrap; width: 100%; list-style: none; margin: 0; padding: 0; }
.amp-menu.amp-front .amp-item { flex: 0 0 auto; position: relative; }
.amp-menu.amp-front .amp-link { padding: 14px 18px; font-size: 15px; color: #ecf0f1; text-decoration: none; display: flex; justify-content: space-between; }
.amp-menu.amp-front .amp-item:hover > .amp-sub { left: 0; top: 100%; display: block; position: absolute; min-width: 200px; list-style: none; margin: 0; padding: 0; background: rgba(0,0,0,.85); z-index: 999; }

/* 前台底部菜单 */
.amp-menu.amp-front.amp-bottom { position: relative; margin-top: 20px; }

/* 前台悬浮菜单 */
.amp-menu.amp-front.amp-float {
    position: fixed; right: 16px; bottom: 16px; width: auto; min-width: 160px;
    border-radius: 8px; flex-direction: column; padding: 6px;
}
.amp-menu.amp-front.amp-float .amp-level-1 { flex-direction: column; }
.amp-menu.amp-front.amp-float .amp-link { padding: 10px 14px; }
.amp-menu.amp-front.amp-float .amp-item:hover > .amp-sub { left: auto; right: 100%; top: 0; }

/* 平板 */
@media (max-width: 1024px) {
    .amp-menu { width: 180px; }
    .amp-menu .amp-link { padding: 10px 14px; font-size: 13px; }
}
/* 手机 */
@media (max-width: 768px) {
    .amp-menu.amp-front .amp-level-1 { flex-direction: column; }
    .amp-menu.amp-front .amp-item { width: 100%; }
    .amp-menu.amp-front .amp-link { justify-content: space-between; }
    .amp-menu.amp-front .amp-item:hover > .amp-sub { position: static; display: none; }
    .amp-menu.amp-front .amp-item.open > .amp-sub { display: block; }
    .amp-menu.amp-front.amp-float { left: 16px; right: 16px; width: auto; }
}

/* 锚点浮动菜单专属 */
.amp-anchor-float.amp-anchor { max-height: 70vh; overflow-y: auto; }
.amp-anchor-float.amp-anchor .amp-link.active { background: rgba(255,255,255,.25); font-weight: 600; }
.amp-anchor-float.amp-anchor .amp-link { font-size: 13px; padding: 8px 12px; }

/* 后台编辑器拖拽 */
.amp-enode.drag-over { outline: 2px dashed #3498db; background: rgba(52,152,219,.1); }
.amp-enode[draggable=true] { cursor: move; }
