* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}

body {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2340&q=80') center/cover no-repeat;
    color: #fff;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* 简约侧边栏 */
.floating-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 56px;
}

.sidebar-item {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.sidebar-item i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-item.active i {
    color: white;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-item:hover i {
    color: white;
}

.sidebar-tooltip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.sidebar-tooltip::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.8);
}

.sidebar-item:hover .sidebar-tooltip {
    opacity: 1;
    visibility: visible;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 8px 0;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 76px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 顶部信息栏 */
.top-info {
    text-align: center;
    margin: 20px auto 10px;
    padding: 10px 20px;
}

.datetime {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 优化搜索框 */
.search-container {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 700px;
    width: 90%;
    position: relative;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.search-engine-selector {
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input-container {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-btn {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 搜索浮动层 */
.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    padding: 16px;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.search-overlay.active {
    display: block;
}

.search-overlay-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-overlay-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-engine-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.search-engine-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

.search-engine-card.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.history-card {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.history-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

.suggestion-card {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 页面容器 - 支持鼠标滚动 */
.pages-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page {
    display: none;
    width: 100%;
    height: 100%;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 40px 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 24px;
    max-width: 1200px;
    width: 100%;
    justify-items: center;
}

/* 优化站点样式 */
.site-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 12px;
    cursor: grab;
    transition: all 0.2s ease;
    border-radius: 16px;
    position: relative;
    user-select: none;
    background: transparent;
    border: none;
    width: 100px;
    min-height: 120px;
}

.site-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
}

.site-item:active {
    cursor: grabbing;
}

.site-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: white;
    aspect-ratio: 1 / 1;
}

.site-item:hover .site-icon {
    transform: scale(1.1);
}

.site-title {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 文件夹样式 */
.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 16px;
    position: relative;
    user-select: none;
    background: transparent;
    border: none;
    width: 100px;
    min-height: 120px;
}

.folder-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.05);
}

.folder-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}

.folder-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    padding: 4px;
}

.folder-preview-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.folder-item:hover .folder-icon {
    transform: scale(1.1);
}

/* 添加快捷方式按钮 */
.add-site-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 16px;
    background: transparent;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    width: 100px;
    min-height: 120px;
    color: rgba(255, 255, 255, 0.7);
}

.add-site-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.add-site-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.add-site-btn:hover .add-site-icon {
    transform: scale(1.1);
}

/* Sortable 样式 */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    transform: rotate(3deg) scale(1.02);
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(3deg) scale(1.05);
    z-index: 10000;
}

/* 控制按钮 */
.floating-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.control-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.control-tooltip::before {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.control-btn:hover .control-tooltip {
    opacity: 1;
    visibility: visible;
}

/* 手机风格的文件夹模态框 */
.folder-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    z-index: 1000;
    padding: 0;
    min-width: 500px;
    max-width: 90vw;
    max-height: 70vh;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.folder-modal.active {
    display: block;
    animation: modalSlideIn 0.3s ease;
}

.folder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 20px 24px 16px;
    background: transparent;
}

.folder-header h3 {
    font-size: 1.3rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.folder-header h3 i {
    font-size: 1.2rem;
    color: #ffd700;
}

.close-folder {
    cursor: pointer;
    font-size: 1.3rem;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}

.close-folder:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.folder-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    margin: 0 16px 16px;
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal h2 {
    margin-bottom: 24px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.icon-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.icon-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-option.selected {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.icon-preview {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.1);
}

.icon-name {
    font-size: 0.8rem;
    text-align: center;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-btn.primary {
    background: rgba(255, 255, 255, 0.2);
}

.modal-btn.primary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 动画 */
@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .floating-sidebar {
        left: 15px;
    }
    
    .floating-controls {
        right: 15px;
    }
    
    .main-content {
        margin-left: 66px;
    }
    
    .search-container {
        margin: 0 auto 30px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .floating-sidebar {
        left: 10px;
    }
    
    .floating-controls {
        right: 10px;
    }
    
    .main-content {
        margin-left: 56px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 16px;
    }
    
    .site-item, .folder-item, .add-site-btn {
        width: 80px;
        min-height: 110px;
    }
    
    .site-icon, .folder-icon, .add-site-icon {
        width: 70px;
        height: 70px;
        font-size: 24px;
    }
}