/* 底部Docker容器样式 - 精致模仿苹果Docker任务栏 */

/* 容器基础样式 */
.xk-docker-container {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    animation: dockerFadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* 淡入动画 */
@keyframes dockerFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 容器包装器 - 苹果风格磨砂玻璃效果 */
.xk-docker-wrapper {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 10px 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: auto;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* 允许删除按钮溢出显示 */
    overflow: visible !important;
    position: relative;
    z-index: 9999;
}

/* 拖放状态增强 */
.xk-docker-wrapper.dragover {
    background: rgba(100, 200, 255, 0.25);
    border-color: rgba(100, 200, 255, 0.5);
    box-shadow: 0 8px 32px rgba(100, 200, 255, 0.25);
    transform: scale(1.02);
}

/* 项目容器 */
.xk-docker-items {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 0;
    max-width: calc(100vw - 60px);
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* 允许删除按钮溢出显示 */
    overflow: visible !important;
    position: relative;
    z-index: 10000;
}

/* 滚动条美化 */
.xk-docker-items::-webkit-scrollbar {
    display: none;
}

/* 滚动时的容器效果 */
.xk-docker-items:active {
    cursor: grabbing;
}

.xk-docker-items::-webkit-scrollbar {
    display: none;
}

/* 单个项目样式 - 苹果风格图标 */
.xk-docker-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    /* 允许删除按钮超出容器 */
    overflow: visible !important;
    will-change: transform, background, border-color;
}

/* 悬停效果 - 苹果风格平滑缩放和发光效果 */
.xk-docker-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px) scale(1.08);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

/* 聚焦效果 - 键盘导航支持 */
.xk-docker-item:focus-within {
    outline: none;
    /* 移除蓝色聚焦效果 */
}

/* 拖动状态 */
.xk-docker-wrapper.dragover .xk-docker-item:not(.loading) {
    opacity: 0.7;
    transform: scale(0.95);
}

/* 链接样式 */
.xk-docker-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    outline: none;
}

/* 移除所有元素的默认聚焦样式 */
.xk-docker-item *:focus {
    outline: none;
    box-shadow: none;
}

/* 图标样式 - 精致图标效果 */
.xk-docker-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: none;
}

/* 图标悬停动画 */
.xk-docker-item:hover .xk-docker-icon {
    transform: scale(1.15);
    filter: none;
}

/* 图标占位符 - 灰色背景带问号 */
.xk-docker-icon-placeholder {
    width: 36px;
    height: 36px;
    background: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: 600;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: none;
}

/* 占位符悬停动画 */
.xk-docker-item:hover .xk-docker-icon-placeholder {
    transform: scale(1.15);
    background: #d0d0d0;
    box-shadow: none;
}

/* 暗黑模式下的占位符 */
body.dark-theme .xk-docker-icon-placeholder {
    background: #404040;
    color: #aaa;
    box-shadow: none;
}

body.dark-theme .xk-docker-item:hover .xk-docker-icon-placeholder {
    background: #505050;
    box-shadow: none;
}

/* 项目标题 - 完全隐藏 */
.xk-docker-item-title {
    display: none !important;
}

/* 删除按钮样式在文件下方定义 */

/* 暗黑模式适配 - 苹果风格暗黑主题 */
body.dark-theme .xk-docker-wrapper {
    background: rgba(30, 30, 30, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

body.dark-theme .xk-docker-item {
    background: rgba(50, 50, 50, 0.2);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .xk-docker-item:hover {
    background: rgba(60, 60, 60, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}



/* 响应式设计 - 确保在小屏幕上也能正常显示 */
@media (max-width: 768px) {
    .xk-docker-container {
        display: none; /* 手机端不显示 */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .xk-docker-items {
        gap: 12px;
    }
    
    .xk-docker-item {
        width: 52px;
        height: 52px;
    }
    
    .xk-docker-icon,
    .xk-docker-icon-placeholder {
        width: 32px;
        height: 32px;
    }
    
    /* 调整删除按钮大小，确保在中等屏幕上正常显示 */
    .xk-docker-remove {
        width: 18px;
        height: 18px;
        font-size: 12px;
        top: -5px;
        right: -5px;
    }
}

/* 加载动画 - 苹果风格精致加载 */
.xk-docker-item.loading {
    opacity: 0.7;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.xk-docker-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid rgba(100, 200, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 0 16px rgba(100, 200, 255, 0.2);
}

/* 精致旋转动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 删除按钮 - 简约风格 */
.xk-docker-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: rgba(255, 80, 80, 0.95);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 6px rgba(255, 80, 80, 0.3);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    will-change: transform, opacity, visibility;
    /* 确保删除按钮在所有元素之上 */
    z-index: 10001 !important;
    /* 确保按钮内容居中显示 */
    text-align: center;
    /* 移除默认按钮样式 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* 确保按钮文字不被截断 */
    white-space: nowrap;
    /* 移除内边距和外边距 */
    margin: 0;
    /* 确保按钮不会被裁剪 */
    box-sizing: border-box;
    pointer-events: auto;
}

/* 删除按钮显示动画 */
.xk-docker-item:hover .xk-docker-remove {
    opacity: 1;
    visibility: visible;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 80, 80, 0.4);
}

/* 删除按钮悬停效果 */
.xk-docker-remove:hover {
    background: rgba(255, 50, 50, 1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 80, 80, 0.5);
}

/* 删除按钮点击效果 */
.xk-docker-remove:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 4px rgba(255, 80, 80, 0.3);
}

/* 禁用状态 */
.xk-docker-remove:disabled {
    opacity: 0;
    visibility: hidden;
    cursor: not-allowed;
    background: rgba(150, 150, 150, 0.9);
    transform: none;
    box-shadow: none;
}

.xk-docker-remove:disabled:hover {
    transform: none;
    background: rgba(150, 150, 150, 0.9);
    box-shadow: none;
}

/* 平滑滚动效果 */
.xk-docker-items {
    scroll-behavior: smooth;
}

/* 响应式优化 */
@media (max-width: 1024px) {
    .xk-docker-item {
        width: 52px;
        height: 52px;
    }
    
    .xk-docker-icon,
    .xk-docker-icon-placeholder {
        width: 32px;
        height: 32px;
    }
    
    /* 调整删除按钮大小，确保在小屏幕上正常显示 */
    .xk-docker-remove {
        width: 18px;
        height: 18px;
        font-size: 12px;
        top: -5px;
        right: -5px;
    }
}

/* 过渡动画优化 */
* {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 自定义通知样式 - 确保通知可见 */
.xk-docker-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-align: center;
    min-width: 200px;
    max-width: 80vw;
    word-wrap: break-word;
    border: 1px solid;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 确保通知显示时的透明度 */
.xk-docker-notice { opacity: 1 !important; }
