body {
    background-color: #333;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    transition: background-image 0.5s ease-in-out;
    /* 确保在 firefox 中也有不错的滚动体验 */
    scrollbar-width: thin;
    /* 调亮 Firefox 滚动条颜色 */
    scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

/* =========================================
   Custom Scrollbar (Webkit)
   定制滚动条样式
   ========================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    /* 提高默认亮度，使其更像磨砂玻璃条 */
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    /* 通过边框透明来实现滑块与轨道之间的间距效果 */
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.2s;
    /* 添加一点淡淡的阴影，增强立体感 */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    /* 悬停时变得更亮白 */
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* =========================================
   Glass UI Components
   ========================================= */

.glass-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.modal-glass {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-glass:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.nav-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 编辑模式下的样式 */
.edit-mode .drag-handle {
    cursor: grab;
}

.edit-mode .drag-handle:active {
    cursor: grabbing;
}

.edit-mode .nav-item {
    cursor: grab;
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

/* Resize Handle 样式 */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    /* 东南方向调整光标 */
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 2px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.resize-handle:hover {
    opacity: 1;
}

.resize-handle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom-right-radius: 2px;
}

/* 隐藏状态样式 */
.is-hidden-element {
    opacity: 0.4;
    filter: grayscale(100%);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.sortable-ghost {
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed yellow;
}

.engine-active {
    background-color: rgba(255, 255, 255, 0.3) !important;
    opacity: 1 !important;
}

.input-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

.input-glass:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Checkbox Switch */
.toggle-checkbox:checked {
    right: 0;
    border-color: #10B981;
}

.toggle-checkbox:checked+.toggle-label {
    background-color: #10B981;
}

#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.3s ease-out forwards;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}