:root {
    --primary-color: #4a90e2;
    --bg-color: #f5f7fa;
    --sidebar-bg: #2c3e50;
    --card-bg: #ffffff;
    --text-main: #333;
    --text-sec: #666;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* 深色模式 */
body.dark-mode {
    --bg-color: #1a1a1a;
    --sidebar-bg: #0f0f0f;
    --card-bg: #2d2d2d;
    --text-main: #e0e0e0;
    --text-sec: #999;
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body.dark-mode .search-input,
body.dark-mode .form-input,
body.dark-mode .form-textarea,
body.dark-mode .edit-input {
    background: #3d3d3d;
    border-color: #555;
    color: #e0e0e0;
}

/* 暗色模式下拉框 */
body.dark-mode .search-select {
    background: #3d3d3d;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .banner {
    background: #2d2d2d;
}

/* 深色模式下的网盘搜索按钮 */
body.dark-mode .netdisk-search-btn {
    background: #2d2d2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .netdisk-search-btn:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
}
body { 
    font-family: 'Segoe UI', system-ui, sans-serif; 
    background: var(--bg-color); 
    min-height: 100vh; 
    display: flex; 
    color: var(--text-main);
    overflow-x: hidden; /* 禁止横向滚动 */
}

/* 应用容器 - 左右布局 */
.app-container {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 100vh;
}

/* 隐藏移动端专属及冗余元素 */
.mobile-nav, 
.category-drawer, 
.drawer-overlay, 
.search-buttons-mobile, 
.mobile-float-btns,
.category-tabs {
    display: none;
}

/* 内容包装器 - 包含主内容和底部 */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 侧边栏 */
.sidebar { 
    width: 240px; 
    background: var(--sidebar-bg); 
    color: #ecf0f1; 
    display: flex; 
    flex-direction: column; 
    flex-shrink: 0; 
    transition: 0.3s; 
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}
.sidebar h2 { text-align: center; padding: 25px 0; font-size: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.category-list { list-style: none; overflow-y: auto; flex: 1; }
.category-item { 
    padding: 15px 25px; 
    cursor: pointer; 
    transition: 0.2s; 
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
}
.category-item:hover, .category-item.active { background: rgba(255,255,255,0.1); border-left-color: var(--primary-color); }
.category-drag-item { cursor: move; }
.category-drag-item:hover { background: rgba(74, 144, 226, 0.3); }
.category-drag-handle { 
    display: inline-block !important;
    flex-shrink: 0;
}

/* 编辑模式下，拖拽手柄与分类文本之间的间距 */
.category-item .category-drag-handle {
    margin-right: 8px;
}

/* 一级分类(带子分类) */
.category-parent {
    padding: 15px 25px;
    cursor: pointer;
    transition: 0.2s;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
}
.category-parent:hover, .category-parent.active {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--primary-color);
}
.category-parent .category-name {
    flex: 1;
}
.category-parent .category-arrow {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.2s;
    margin-left: auto;
}

/* 二级分类列表 */
.subcategory-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.15);
}

/* 二级分类项 */
.subcategory-item {
    padding: 12px 25px 12px 45px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
    border-left: 4px solid transparent;
}
.subcategory-item:hover, .subcategory-item.active {
    background: rgba(255,255,255,0.08);
    border-left-color: var(--primary-color);
}

/* 主内容 */
.main-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    padding: 20px; 
    position: relative; 
}

/* 搜索栏 */
.search-container { 
    background: var(--card-bg); 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    margin-bottom: 30px;
}

/* 搜索输入区域 */
.search-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

/* 搜索输入框容器(包含输入框和主题按钮) */
.search-input-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    height: 42px;
}

.search-buttons-mobile { 
    display: none; 
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    opacity: 0;
}
.mobile-float-btns { display: none; }

/* 内联主题切换按钮 */
.theme-toggle-inline {
    position: absolute;
    right: 10px;
    padding: 6px 8px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* 搜索清空按钮 */
.search-clear-btn {
    position: absolute;
    right: 40px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    z-index: 2;
    transition: color 0.2s;
    line-height: 1;
}

.search-clear-btn:hover {
    color: var(--primary-color);
}

body.dark-mode .search-clear-btn {
    color: #666;
}

body.dark-mode .search-clear-btn:hover {
    color: #6db3f2;
}

.theme-toggle-inline:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: scale(1.15);
}

body.dark-mode .theme-toggle-inline:hover {
    background: rgba(109, 179, 242, 0.15);
}

/* Banner 区域 */
.banner {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f7fa;
    padding: 60px 40px;
    text-align: center;
    color: var(--text-main);
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.banner.has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner.has-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Banner 时间显示 */
.banner-time {
    position: absolute;
    bottom: 20px;
    right: 30px;
    text-align: right;
    color: white;
    z-index: 3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.time-clock {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    line-height: 1;
    margin-bottom: 5px;
}

.time-date {
    font-size: 1rem;
    opacity: 0.9;
}
.search-select { 
    padding: 0 15px; 
    height: 42px;
    border: 1px solid #ddd; 
    border-radius: 8px; 
    outline: none; 
    background: #fff; 
    text-align: center;
}

/* 修复下拉选项左对齐 */
.search-select option {
    text-align: left;
}
.search-input { 
    flex: 1; 
    height: 42px;
    padding: 0 45px 0 15px; 
    border: 2px solid #ddd; 
    border-radius: 8px; 
    outline: none; 
    font-size: 16px; 
    transition: all 0.3s ease;
    width: 100%;
}
.search-input:focus { 
    border-color: var(--primary-color); 
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
}
.search-btn { 
    padding: 0 24px; 
    height: 42px;
    background: var(--primary-color); 
    color: white; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 500; 
    font-size: 15px;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    z-index: 10;
}
.search-btn:hover { 
    background: #357abd; 
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* 网盘搜索按钮 - 简约黑色 */
.netdisk-search-btn {
    padding: 0 20px;
    height: 42px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: visible; /* 允许角标超出 */
    flex-shrink: 0;
    z-index: 5;
}

.netdisk-search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.15), 
        transparent
    );
    transition: left 0.5s ease;
    z-index: 1; /* 在文字下方 */
    /* 限制伪元素不超出按钮边界 */
    clip-path: inset(0 0 0 0);
}

.netdisk-search-btn:hover::before {
    left: 100%;
}

.netdisk-search-btn:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.netdisk-search-btn:active {
    transform: translateY(0);
}

.netdisk-search-btn .btn-text {
    white-space: nowrap;
    position: relative;
    z-index: 2; /* 在伪元素上方 */
}

/* HOT 角标 - 右上角定位 */
.netdisk-search-btn .btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    animation: badgePulse 1.5s infinite;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.5);
    line-height: 1;
    letter-spacing: 0.3px;
    pointer-events: none;
    z-index: 3; /* 在最上层 */
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.95;
    }
}

/* 卡片网格 */
.card-grid { 
    padding-bottom: 40px; 
}

/* 子分类标签页 */
.subcategory-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
}

/* “全部”模式下的标签页组间距 */
.subcategory-tabs + .card-row {
    margin-bottom: 40px;
}

.subcategory-tab {
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-sec);
    transition: color 0.2s ease;
    box-shadow: none;
    border-radius: 0;
    position: relative;
    line-height: 1.4;
}

/* 一级分类文字左侧竖线 */
.subcategory-tab:first-child::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
    opacity: 0.7;
}

.subcategory-tab:hover {
    color: var(--primary-color);
}

.subcategory-tab.active {
    background: transparent;
    color: var(--primary-color);
}

/* 滑动下划线指示器 - 简洁流畅 */
.underline-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
    pointer-events: none;
    transform: translateX(0);
    transition: transform 0.25s ease-out,
                width 0.25s ease-out;
    will-change: transform, width;
    /* 确保从容器左侧开始计算 */
    left: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .underline-indicator {
        height: 2px;
        transition: transform 0.2s ease-out,
                    width 0.2s ease-out;
    }
}

.category-section {
    margin-bottom: 30px;
}

.category-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-main);
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
}

.card-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* 卡片 */
.card { 
    background: var(--card-bg); 
    border-radius: 10px; 
    padding: 15px; 
    box-shadow: var(--shadow); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; 
    flex-direction: column; 
    position: relative; 
    border: 1px solid transparent;
    min-height: 98px;
}
.card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: rgba(74, 144, 226, 0.2);
}
.card.editing { border: 2px dashed var(--primary-color); background: #fafafa; }
body.dark-mode .card.editing {
    background: #3d3d3d;
    border-color: #6db3f2;
}

.card-header { display: flex; align-items: center; margin-bottom: 6px; position: relative; }
.card-icon { 
    width: 36px; 
    height: 36px; 
    border-radius: 8px; 
    background: #f0f2f5; 
    color: var(--primary-color); 
    margin-right: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 18px; 
    font-weight: bold; 
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    display: block;
    transition: opacity 0.15s ease;
    opacity: 1;
}

.card-icon span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--text-main); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.share-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    opacity: 0.6;
    transition: 0.2s;
}

.share-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}
.card-desc { 
    font-size: 0.85rem; 
    color: var(--text-sec); 
    line-height: 1.35;
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
    max-width: 100%;
}
.card-link { margin-top: 15px; font-size: 0.8rem; color: var(--primary-color); text-decoration: none; word-break: break-all; opacity: 0.8; }
.card-link:hover { opacity: 1; }

/* 编辑模式控件 */
.edit-controls { 
    position: fixed; 
    top: 20px; 
    right: 20px; 
    background: #fff; 
    padding: 12px; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    z-index: 1000; 
    display: none; 
    min-width: 180px;
    max-width: 220px;
}
body.dark-mode .edit-controls {
    background: #2d2d2d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body.dark-mode .edit-controls .controls-title {
    color: #e0e0e0;
    border-bottom-color: #444;
}
.edit-controls.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.edit-controls .controls-title {
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.edit-controls .btn-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-input { width: 100%; padding: 8px 10px; margin-bottom: 8px; border: 1px solid #ddd; border-radius: 6px; outline: none; font-size: 14px; }
.edit-input:focus { border-color: var(--primary-color); }
.action-btn { 
    border: none; 
    padding: 8px 12px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: 500; 
    transition: 0.2s;
    white-space: nowrap;
}
.btn-add { background: #4a90e2; color: white; } /* 蓝色 */
.btn-netdisk-config { background: #1a1a1a; color: white; } /* 黑色 */
.btn-check-links { background: #f39c12; color: white; } /* 橙色 */
.btn-refresh-icons { background: #2ecc71; color: white; } /* 绿色 */
.btn-export { background: #9b59b6; color: white; } /* 紫色 */
.btn-import { background: #34495e; color: white; } /* 深灰色 */
.btn-save { background: #e74c3c; color: white; } /* 红色 */
.btn-cancel { background: #95a5a6; color: white; } /* 浅灰色 */

.btn-open { background: #1890ff; color: white; flex: 1; }
.btn-delete { background: #ff4d4f; color: white; flex: 1; }
.btn-confirm { background: #2ecc71; color: white; flex: 1; }
.btn-cancel-form { background: #95a5a6; color: white; flex: 1; }

.action-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 提示框 */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: white; padding: 12px 24px; border-radius: 30px; opacity: 0; transition: 0.3s; pointer-events: none; z-index: 2000; font-size: 14px; }
.toast.show { opacity: 1; bottom: 50px; }

/* 添加网址表单 */
.add-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.add-form-overlay.active {
    display: flex;
}

.add-form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s;
}

body.dark-mode .add-form-container {
    background: #2d2d2d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .add-form-container h3 {
    color: #e0e0e0;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.add-form-container h3 {
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-sec);
    font-size: 0.9rem;
    font-weight: 500;
}

body.dark-mode .form-group label {
    color: #aaa;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

body.dark-mode .form-hint {
    color: #777;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

body.dark-mode .loading-spinner {
    border-color: #444;
    border-top-color: #6db3f2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 最近访问 */
.recent-list {
    list-style: none;
    padding: 10px 15px;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    aspect-ratio: 1;
}

.recent-item:hover {
    transform: scale(1.15);
}

.recent-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 14px;
    font-weight: bold;
    color: #4a90e2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

/* 防止 renderIcon 的文字泄漏到侧边栏 */
.recent-icon .icon-text,
.recent-icon span:not(:has(img)) {
    font-size: 14px;
}

/* 确保侧边栏不显示图标文字 */
.category-item span,
.category-parent span,
.subcategory-item span {
    font-size: inherit;
    font-weight: inherit;
}

.recent-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

/* 死链标记 */
.card.dead-link {
    opacity: 0.6;
    border: 2px solid #ff4d4f;
}

.dead-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4d4f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

/* 搜索高亮 */
mark {
    background: #fff566;
    padding: 2px 4px;
    border-radius: 2px;
}

body.dark-mode mark {
    background: #d4b106;
    color: #000;
}

body.dark-mode .recent-icon {
    background: rgba(255, 255, 255, 0.15);
}

/* 拖拽相关样式 */
.card.dragging { opacity: 0.4; cursor: grabbing; }
.card[draggable="true"] { cursor: grab; }
.card[draggable="true"]:active { cursor: grabbing; }

/* 分类拖拽相关样式 */
.category-drag-item { 
    cursor: move; 
    position: relative; 
}

.category-drag-item:hover { 
    background: rgba(74, 144, 226, 0.3); 
}

.category-drag-handle { 
    display: inline-block !important;
    margin-right: 8px;
    cursor: move;
    opacity: 0.6;
    user-select: none;
    font-size: 14px;
    flex-shrink: 0;
}

.category-drag-handle:hover {
    opacity: 1;
}

/* 一级分类(带子分类) - 确保拖拽手柄有间距 */
.category-parent .category-name {
    flex: 1;
}

/* 编辑模式下，拖拽手柄与分类名称之间的间距 */
.category-parent .category-drag-handle + .category-name {
    margin-left: 8px;
}

/* 二级分类拖拽样式 */
.subcategory-drag-item {
    cursor: move;
    position: relative;
}

.subcategory-drag-item:hover {
    background: rgba(74, 144, 226, 0.2);
}

.subcategory-drag-handle {
    display: inline-block !important;
    margin-right: 6px;
    cursor: move;
    opacity: 0.5;
    user-select: none;
    font-size: 12px;
    flex-shrink: 0;
}

.subcategory-drag-handle:hover {
    opacity: 1;
}

/* 拖拽中的视觉效果 */
.category-item.dragging,
.category-parent.dragging,
.subcategory-item.dragging {
    opacity: 0.4;
}

/* 底部信息 */
.site-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: var(--bg-color);
    flex-shrink: 0;
}

.friend-links {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.friend-links-title {
    font-size: 0.9rem;
    color: var(--text-sec);
}

.friend-links-list {
    display: inline-flex;
    gap: 15px;
}

.friend-links-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.friend-links-list a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-sec);
}

/* 快捷键提示 */
.shortcut-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    color: var(--text-sec);
    z-index: 100;
    display: flex;
    gap: 12px;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.shortcut-hint:hover {
    opacity: 1;
}
.shortcut-hint kbd {
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    border: 1px solid #ddd;
    margin-right: 4px;
}

/* 返回顶部按钮 */
.scroll-top-btn {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 8px;
    padding: 0;
    line-height: 1;
}

.scroll-top-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

body.dark-mode .scroll-top-btn {
    background: #6db3f2;
}

body.dark-mode .scroll-top-btn:hover {
    background: #5a9fd8;
}
