/* ======================
 * 快捷站点导航模块 - 优化增强版
 * ====================== */

/* ==================== 变量定义 ==================== */
:root {
    /* 尺寸变量 */
    --icon-size: 70px;
    --icon-size-md: 60px;
    --icon-size-sm: 52px;
    --icon-radius: 16px;
    --icon-radius-md: 14px;
    --icon-radius-sm: 12px;
    --text-height: 24px;
    
    /* 间距变量 */
    --row-gap: 24px;
    --row-gap-md: 20px;
    --row-gap-sm: 16px;
    --col-gap: 36px;
    --col-gap-md: 30px;
    --col-gap-sm: 24px;
    --grid-row-gap: 30px;
    --grid-col-gap: 45px;
    
    /* 布局变量 */
    --initial-columns: 7;
    --nav-category-width: 140px;
    --nav-site-card-height: 80px;
    
    /* 交互变量 */
    --link-opacity: 1;
    --link-bg-opacity: 0.95;
    --link-hover-opacity: 1;
    --link-active-scale: 0.95;
    --transition-duration: 0.25s;
    --transition-timing: cubic-bezier(0.34, 1.56, 0.64, 1);
    --squeeze-timing: cubic-bezier(0.5, 1.8, 0.5, 0.8);
}

/* ==================== 基础布局 ==================== */
.quick-links-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    position: relative;
    min-height: calc(2 * var(--icon-size) + 2 * var(--text-height) + 2 * var(--row-gap) + 80px);
    scroll-behavior: smooth;
    transition: all 0.3s ease;
	transition: margin-bottom 0.3s ease;
    overflow: visible;
}

.quick-links {
    width: auto;
    max-width: min(1280px, 96vw);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quick-links-grid {
    position: relative;
    overflow: hidden;
    display: grid;
    width: 100%;
    margin: 0 auto;
    padding: 12px;
    height: var(--grid-height, auto);
    min-height: var(--grid-height);
    max-width: min(1280px, 96vw);
    justify-content: center;
    grid-template-columns: repeat(var(--initial-columns, 7), var(--icon-size));
    gap: var(--grid-row-gap, 30px) var(--grid-col-gap, 45px);
    grid-auto-rows: calc(var(--icon-size) + var(--text-height));
    transition: height 0.3s ease, opacity 0.3s ease;
    transform-style: preserve-3d;
    contain: strict;
    will-change: transform;
    overflow: visible !important;
}

/* ==================== 链接项样式 ==================== */
.quick-link-wrapper {
    position: relative;
    display: flex;
    visibility: visible;
    opacity: 1;
    flex-direction: column;
    align-items: center;
	margin: 0 !important;
    transform: scale(1);
    transition: opacity 0.25s ease-out, transform 0.25s cubic-bezier(0.2, 0, 0, 1), visibility 0.25s step-end;
    will-change: transform, opacity;
    contain: layout;
    transform-origin: center;
}

.quick-link-wrapper.hidden {
    visibility: hidden;
    position: absolute;
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
    transition-duration: 0.2s;
}

/* 精简版动画 */
@keyframes smoothAppear {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.page-transition .quick-link-wrapper:not(.hidden) {
    animation: smoothAppear 0.35s cubic-bezier(0.21, 0.61, 0.35, 1) forwards;
}

/* 快捷链接网格 */
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-decoration: none;
    transition: transform var(--transition-duration) var(--transition-timing), opacity var(--transition-duration) ease;
    opacity: var(--link-bg-opacity);
}

.quick-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: var(--icon-radius);
    opacity: var(--link-opacity);
    background: var(--icon-bg, linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%));
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    transition: transform var(--transition-duration) var(--transition-timing), box-shadow var(--transition-duration) ease, opacity var(--transition-duration) ease;
    will-change: transform, box-shadow;
    cursor: grab;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.quick-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    border-radius: inherit;
}

.quick-icon.loading {
    background: rgba(255, 255, 255, 0.1);
    animation: pulse 1.5s infinite;
}

.quick-link-text {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--white-text);
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease, transform 0.2s ease;
    will-change: transform;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ==================== 交互状态 ==================== */
.quick-link:hover {
    opacity: var(--link-hover-opacity);
}

.quick-link:hover .quick-icon {
    transform: scale(1.08);
    box-shadow: 0 0 0 3px rgba(74, 0, 255, 0.3), 0 8px 24px rgba(74, 0, 255, 0.2);
    filter: brightness(1.05);
}

.quick-link:hover .quick-link-text {
    transform: translateY(1px);
    color: #fff;
}

.quick-link:active .quick-icon {
    transform: scale(var(--link-active-scale));
    transition-duration: calc(var(--transition-duration) * 0.5);
}

/* ==================== 错误状态 ==================== */
.quick-icon.error {
    background: var(--fallback-color, linear-gradient(135deg, #4a00ff 0%, #8e2de2 100%));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.quick-icon.error::before {
    content: attr(data-fallback);
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ==================== 状态指示器 ==================== */
.loading-spinner,
.quick-links-error,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.quick-links-error {
    color: rgba(255, 255, 255, 0.8);
    max-width: 300px;
}

.quick-links-error svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    fill: currentColor;
    opacity: 0.8;
}

.empty-state {
    color: rgba(255, 255, 255, 0.7);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    fill: currentColor;
    opacity: 0.6;
}

.empty-state p {
    margin-top: 8px;
    font-size: 15px;
}

.retry-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== 删除模式 ==================== */
.quick-link-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    padding: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.quick-link-remove .icon {
    margin: 4px;
    fill: #d81e06;
}

.removal-mode .quick-link-remove {
    opacity: 1;
    transform: scale(1);
}

.quick-link-remove:hover {
    background: #fff;
    transform: scale(1.1);
}

.quick-link-remove:active {
    transform: scale(0.95);
}

.removal-mode .quick-link {
    transform: scale(0.96);
    filter: brightness(0.92);
    transition: all 0.3s ease;
}

.removal-mode .quick-link:hover {
    transform: scale(0.98);
    cursor: default;
}

.removal-mode .quick-links-grid {
    transform: scale(0.98);
    transition: all 0.3s ease;
}

.removal-mode .quick-link-wrapper {
    --pulse-color: rgba(0, 255, 0, 0.3); /* 默认绿色 */
    animation: color-pulse 2s infinite ease-in-out;
}

.quick-link-wrapper.removing {
    animation: removeItem 0.3s forwards;
    pointer-events: none;
}

/* ==================== 分页样式 ==================== */
.pagination-container {
    position: relative;
    height: auto;
    padding: 12px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pagination-container.hidden {
    display: none;
}

.quick-links-grid.page-transition {
    opacity: 1;
    transition: opacity 0.3s ease, height 0.3s ease;
}

.pagination-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

/* 小圆点样式 */
.pagination-indicator.dots .page-btn {
    width: 10px;
    height: 10px;
    margin: 0 2px;
    border-radius: 50%;
    background: rgba(74, 0, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform, background;
    border: none;
    outline: none;
    padding: 0;
    text-indent: -9999px;
}

.pagination-indicator.dots .page-btn:hover {
    background: rgba(74, 0, 255, 0.7);
    transform: scale(1.3);
}

.pagination-indicator.dots .page-btn.active {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    transform: scale(1.4);
}

.pagination-indicator.dots .page-nav {
    display: none; /* 小圆点模式下隐藏导航按钮 */
}

/* 完整分页样式 */
.pagination-indicator.full {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-indicator.full .page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.pagination-indicator.full .page-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.pagination-indicator.full .page-nav {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.pagination-indicator.full .page-nav .icon {
    width: 16px;
    height: 16px;
}

/* ==================== 拖拽排序样式 ==================== */
.quick-link-dragging {
    opacity: 1 !important;
    filter: brightness(1.05) drop-shadow(0 4px 12px rgba(74, 0, 255, 0.3)) !important;
    z-index: 1000;
    animation: none !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, filter 0.3s ease !important;
    will-change: transform, filter;
    cursor: grabbing;
}

.sortable-ghost {
    position: relative;
    opacity: 1 !important;
    background: rgba(74, 0, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    box-shadow: none !important;
}

.sortable-fallback {
   opacity: 1 !important;
   display: none !important;
}

.sortable-ghost::after {
    content: "";
    position: absolute;
    bottom: -24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: rgba(74, 0, 255, 0.8);
    font-weight: 600;
}

/* 拖拽过程中的目标位置指示 */
.drop-target {
    position: relative;
    z-index: 10;
}

.drop-target::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--icon-radius);
    border: 2px dashed rgba(74, 0, 255, 0.6);
    pointer-events: none;
    animation: dropTargetPulse 1.5s infinite;
}

/* 拖拽过程中的挤压动画 */
.quick-link-wrapper.squeeze {
    transform: scale(0.95);
    transition: transform 0.2s ease-out;
}

.quick-link-wrapper:not(.quick-link-dragging):not(.sortable-ghost) {
    transition: filter 0.3s ease;
}

/* 拖拽过程中的页面切换样式 */
.quick-links-grid.drag-page-transition .quick-link-wrapper:not(.quick-link-dragging) {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* ==================== 拖曳跨页样式 ================= */
/* 移动按钮容器 */
.quick-link-move-container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.removal-mode .quick-link-move-container {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

/* 移动按钮 */
.quick-link-move {
    width: 22px;
    height: 22px;
    padding: 0;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 方向指示样式 */
.quick-link-move.prev {
    position: absolute;
    left: -8px;
    bottom: 0;
}

.quick-link-move.next {
    position: absolute;
    right: -8px;
    bottom: 0;
}

.quick-link-move .icon {
    width: 12px;
    height: 12px;
    fill: #333;
    transition: transform 0.1s ease;
}

.quick-link-move:hover {
    background: #fff;
    transform: scale(1.1);
}

.quick-link-move:active {
    transform: scale(0.95);
}

.quick-link-move svg {
    padding: 0;
    margin: 0;
}

/* ==================== 站点移动样式 ================= */
/* 新增批量选择相关样式 */
.quick-link-wrapper.selected {
    position: relative;
    z-index: 5;
}

/* 选中状态样式（强制覆盖） */
.removal-mode .quick-link-wrapper.selected {
    --pulse-color: rgba(128, 0, 255, 0.6) !important; /* 紫色高亮 */
    animation: color-pulse 2s infinite ease-in-out;
}

.quick-link-select {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    color: #d81e06;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-link-select svg {
    width: 12px;
    height: 12px;
    padding: 0;
    margin: 0;
    fill: currentColor;
}

.removal-mode .quick-link-select {
    opacity: 0;
    transform: translateX(-50%) scale(1);
}

.quick-link-select:hover {
    background: #fff;
    transform: translateX(-50%) scale(1);
}

.quick-link-wrapper.selected .quick-link-select {
    opacity: 1;
    color: white;
    background: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.9);
}


/* ==================== 导航容器 ==================== */

.navigation-container {
    display: flex;
    height: 100%;
    height: calc(100vh - 195px); /* 设置固定高度 */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(74, 0, 255, 0.1);
}

/* ==================== 分类侧边栏 ==================== */
.nav-categories-container {
    width: 120px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 0;
    overflow-y: auto;
    border-right: 1px solid rgba(74, 0, 255, 0.05);
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 0, 255, 0.2) transparent;
}

.nav-categories-container::-webkit-scrollbar {
    width: 4px;
}

.nav-categories-container::-webkit-scrollbar-thumb {
    background-color: rgba(74, 0, 255, 0.2);
    border-radius: 2px;
}

/* 分类列表样式 */
.nav-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    margin: 0 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    position: relative;
    background: white;
    border: 1px solid rgba(74, 0, 255, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.nav-category-item:hover {
	background-color: var(--primary-lg-light);
    color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(74, 0, 255, 0.08);
}

.nav-category-item.active {
    background-color: var(--primary-lg-light);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-category-item.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    border-left: 3px solid rgba(74, 0, 255, 0.6);
    pointer-events: none;
}

.nav-category-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-category-icon .icon, 
.nav-category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    color: currentColor;
}

.nav-category-item.active .nav-category-icon {
    color: #4a00ff;
}

.nav-category-title {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.nav-category-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(74, 0, 255, 0.1);
    color: #4a00ff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ==================== 站点内容区 ==================== */
.nav-sites-container {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: white;
    scrollbar-width: thin;
    scrollbar-color: #d1c4e9 transparent;
}

.nav-sites-container::-webkit-scrollbar {
    width: 6px;
}

.nav-sites-container::-webkit-scrollbar-thumb {
    background-color: #d1c4e9;
    border-radius: 3px;
}

.nav-sites-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 4px;
}

/* 站点卡片 */
.nav-site-card {
    position: relative;
    padding: 8px 12px;
    margin-top: 12px;
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(74, 0, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: visible;    
    width: 100%; /* 强制宽度填满父容器 */
    min-width: 0; /* 关键！允许内容收缩 */
    box-sizing: border-box; /* 防止 padding 撑大宽度 */
}


/* 卡片悬停时调整热度指示器位置 */
.nav-site-card:hover .heat-indicator {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  bottom: 14px; /* 悬停时稍微上移 */
}

.nav-site-card[style*="display: flex"] {
    display: block !important;
    flex-direction: unset !important;
}

.nav-site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 0, 255, 0.1);
    border-color: rgba(74, 0, 255, 0.2);
}

.nav-site-card.active {
    background: rgba(74, 0, 255, 0.03);
    border-color: rgba(74, 0, 255, 0.2);
}

/* ==================== 站点图标容器 ==================== */
.nav-site-icon-container {
    position: absolute;
    top: -16px;
    left: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-site-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: visible;
    z-index: 1;
    transform: translateZ(0);
}

/* 添加加载状态 */
.nav-site-icon.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite linear;
}

/* 添加错误状态 */
.nav-site-icon.error {
    background: linear-gradient(135deg, #4a00ff 0%, #8e2de2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
}

.nav-site-icon.error::before {
    content: attr(data-fallback);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* 移除原img元素的样式 */
.nav-site-icon img {
    display: none;
}

/* 添加渐变覆盖层 */
.nav-site-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    z-index: 1;
}

.added-icon {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a00ff, #8e2de2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.2),
        0 0 0 2px white;
    transition: all 0.3s ease;
}

.added-icon svg {
    width: 8px;
    height: 8px;
    stroke: white;
    stroke-width: 2.5;
    stroke-linecap: round;
    fill: #fff;
}

/* 卡片悬停效果优化 */
.nav-site-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 6px 16px rgba(74, 0, 255, 0.1),
        0 0 0 1px rgba(74, 0, 255, 0.1);
    border-color: rgba(74, 0, 255, 0.15);
}

.nav-site-card:hover .nav-site-icon {
    transform: scale(1.08) translateZ(0);
    box-shadow: 
        0 4px 12px rgba(74, 0, 255, 0.15),
        0 0 0 1px rgba(74, 0, 255, 0.1) inset;
}

.nav-site-card:hover .nav-site-icon img {
    transform: scale(1.05);
}

.nav-site-card:hover .added-icon {
    transform: scale(1.1);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 2px white;
}

/* 卡片激活状态 */
.nav-site-card.active .nav-site-icon {
    box-shadow: 
        0 0 0 2px rgba(74, 0, 255, 0.3),
        0 4px 12px rgba(74, 0, 255, 0.15);
}

.nav-site-card.active .added-icon {
    transform: scale(1.05);
    animation: bounce 0.6s ease;
}

/* 图标加载状态 */
.nav-site-icon.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite linear;
}

@keyframes loadingShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 卡片内容 */
.nav-site-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding-left: 56px;
    min-height: 24px;
    width: 100%;
    overflow: hidden;
	box-sizing: border-box;
}

.nav-site-title {
    font-size: 14px;
    font-weight: 600;
    color: #2b2d42;
    white-space: nowrap; /* 禁止换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 显示省略号 */
    flex: 1; /* 占据剩余空间 */
    min-width: 0; /* 关键！允许 Flex 子项缩小 */
    letter-spacing: -0.2px;
}


.nav-site-link {
    width: 20px;
    height: 20px;
    margin-left: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    color: #6c757d;
    flex-shrink: 0; /* 防止按钮被挤压 */
}

.nav-site-link:hover {
    opacity: 1;
    color: #4a00ff;
    transform: rotate(15deg);
}

.nav-site-desc {
    font-size: 12px;
    line-height: 1.5;
    color: #6c757d;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px; /* 确保两行高度 */
}

.nav-site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.03);
  position: relative; /* 为绝对定位的热度指示器提供参考 */
}

.heat-indicator {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(0,0,0,0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  z-index: 1;
}

/* 热度为0时不显示 */
.heat-indicator[data-heat="0"] {
  display: none;
}

.nav-site-action {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-left: auto; /* 确保按钮靠右 */
}

.nav-site-action.add {
    background: rgba(74, 0, 255, 0.05);
    color: #4a00ff;
    border: 1px solid rgba(74, 0, 255, 0.1);
}

.nav-site-action.add:hover {
    background: rgba(74, 0, 255, 0.1);
    border-color: rgba(74, 0, 255, 0.2);
}

.nav-site-action.remove {
    background-color: var(--primary-color);
    color: var(--white-text);
}

.nav-site-action.remove:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 2px 8px var(--primary-shadow);
}


/* 热度等级样式 */
/* 根据热度等级调整added-icon背景色 */
.nav-site-card.heat-level-1 .added-icon,
.nav-site-card.heat-level-2 .added-icon,
.nav-site-card.heat-level-3 .added-icon {
  background: rgba(74, 144, 226, 0.9);
}

.nav-site-card.heat-level-4 .added-icon,
.nav-site-card.heat-level-5 .added-icon,
.nav-site-card.heat-level-6 .added-icon {
  background: rgba(46, 204, 113, 0.9);
}

.nav-site-card.heat-level-7 .added-icon,
.nav-site-card.heat-level-8 .added-icon,
.nav-site-card.heat-level-9 .added-icon,
.nav-site-card.heat-level-10 .added-icon {
  background: rgba(231, 76, 60, 0.9);
}

/* 高热度站点的指示器更醒目 */
.nav-site-card.heat-level-7 .heat-indicator,
.nav-site-card.heat-level-8 .heat-indicator,
.nav-site-card.heat-level-9 .heat-indicator,
.nav-site-card.heat-level-10 .heat-indicator {
  background: rgba(231, 76, 60, 0.8);
  color: white;
  font-weight: 700;
}

/* 中热度站点的指示器 */
.nav-site-card.heat-level-4 .heat-indicator,
.nav-site-card.heat-level-5 .heat-indicator,
.nav-site-card.heat-level-6 .heat-indicator {
  background: rgba(46, 204, 113, 0.8);
  color: white;
}

/* 低热度站点的指示器 */
.nav-site-card.heat-level-1 .heat-indicator,
.nav-site-card.heat-level-2 .heat-indicator,
.nav-site-card.heat-level-3 .heat-indicator {
  background: rgba(74, 144, 226, 0.8);
  color: white;
}

/* 热度徽章 */
.heat-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff4a4a, #ff8e2d);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 0 0 2px white;
    z-index: 10;
    transition: all 0.3s ease;
}

/* 热度等级1-3 (低) */
.nav-site-card.heat-level-1 {
    border-left: 3px solid rgba(74, 144, 226, 0.5);
}
.nav-site-card.heat-level-2 {
    border-left: 3px solid rgba(74, 144, 226, 0.7);
}
.nav-site-card.heat-level-3 {
    border-left: 3px solid rgba(74, 144, 226, 0.9);
}

/* 热度等级4-6 (中) */
.nav-site-card.heat-level-4 {
    border-left: 3px solid rgba(46, 204, 113, 0.7);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.1);
}
.nav-site-card.heat-level-5 {
    border-left: 3px solid rgba(46, 204, 113, 0.9);
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.15);
}
.nav-site-card.heat-level-6 {
    border-left: 3px solid rgba(46, 204, 113, 1);
    box-shadow: 0 2px 12px rgba(46, 204, 113, 0.2);
}

/* 热度等级7-10 (高) */
.nav-site-card.heat-level-7 {
    border-left: 3px solid rgba(231, 76, 60, 0.7);
    box-shadow: 0 2px 12px rgba(231, 76, 60, 0.1);
}
.nav-site-card.heat-level-8 {
    border-left: 3px solid rgba(231, 76, 60, 0.9);
    box-shadow: 0 2px 14px rgba(231, 76, 60, 0.15);
}
.nav-site-card.heat-level-9 {
    border-left: 3px solid rgba(231, 76, 60, 1);
    box-shadow: 0 2px 16px rgba(231, 76, 60, 0.2);
}
.nav-site-card.heat-level-10 {
    border-left: 3px solid rgba(231, 76, 60, 1);
    box-shadow: 0 2px 18px rgba(231, 76, 60, 0.25);
    animation: pulseheat 2s infinite;
}

/* 悬停效果增强 */
.nav-site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* 热度卡片悬停效果 */
.nav-site-card.heat-level-4:hover,
.nav-site-card.heat-level-5:hover,
.nav-site-card.heat-level-6:hover {
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.15);
}

.nav-site-card.heat-level-7:hover,
.nav-site-card.heat-level-8:hover,
.nav-site-card.heat-level-9:hover,
.nav-site-card.heat-level-10:hover {
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.15);
}

@keyframes pulseheat {
    0% { transform: translateY(0); box-shadow: 0 2px 18px rgba(231, 76, 60, 0.25); }
    50% { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3); }
    100% { transform: translateY(0); box-shadow: 0 2px 18px rgba(231, 76, 60, 0.25); }
}

/* 空状态样式 */
.nav-no-results,
.nav-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    width: 100%;
    grid-column: 1 / -1;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 240px;
    padding: 20px;
}

.empty-state-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #4a00ff;
    margin: 16px 0 8px;
}

.empty-state-content p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.empty-icon {
    width: 48px;
    height: 48px;
    opacity: 0.8;
    color: #4a00ff;
}

.nav-no-results .empty-icon {
    color: #ff4a4a;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-no-results,
    .nav-empty-state {
        height: 200px;
    }
    
    .empty-state-content h3 {
        font-size: 16px;
    }
    
    .empty-state-content p {
        font-size: 13px;
    }
    
    .empty-icon {
        width: 36px;
        height: 36px;
    }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
    .navigation-container {
        flex-direction: column;
    }
    
    .nav-categories-container {
        width: 100%;
        max-height: 200px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-categories-list {
        display: flex;
    }
    
    .nav-category-item {
        flex-direction: column;
        align-items: center;
        padding: 0.75rem 1rem;
        min-width: 100px;
        margin: 0 0.25rem;
    }
    
    .nav-category-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .nav-category-title {
        font-size: 0.8125rem;
        text-align: center;
    }
    
    .nav-category-count {
        position: absolute;
        top: 4px;
        right: 4px;
        margin-left: 0;
    }
    
    .nav-category-item.active::after {
        right: auto;
        top: auto;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 3px;
        transform: none;
    }
    
    .nav-sites-container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-sites-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-site-card {
        height: auto;
        min-height: 70px;
    }
    
    .nav-site-icon {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .nav-category-item {
        min-width: 80px;
        padding: 0.5rem;
    }
    
    .nav-site-info {
        padding: 0.75rem;
    }
    
    .nav-site-title {
        font-size: 0.875rem;
    }
    
    .nav-site-desc {
        font-size: 0.75rem;
    }
}
/* ==================== 动画定义 ==================== */
@keyframes dropTargetPulse {
    0% { opacity: 0.3; transform: scale(0.98); }
    50% { opacity: 0.8; transform: scale(1.02); }
    100% { opacity: 0.3; transform: scale(0.98); }
}

@keyframes removeItem {
    to { 
        transform: scale(0.8); 
        opacity: 0;
        height: 0;
        margin: 0;
        padding: 0;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes color-pulse {
    0% { 
        box-shadow: 0 0 0 0 var(--pulse-color, rgba(0, 255, 0, 0.3));
        transform: scale(0.96);
    }
    50% { 
        box-shadow: 0 0 0 4px var(--pulse-color, rgba(0, 255, 0, 0.15));
        transform: scale(0.98);
    }
    100% { 
        box-shadow: 0 0 0 0 var(--pulse-color, rgba(0, 255, 0, 0));
        transform: scale(0.96);
    }
}

@keyframes pulse {
    0% { transform: scale(0.96); }
    50% { transform: scale(0.98); }
    100% { transform: scale(0.96); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 992px) {
    :root {
        --icon-size: var(--icon-size-md);
        --icon-radius: var(--icon-radius-md);
        --row-gap: var(--row-gap-md);
        --col-gap: var(--col-gap-md);
    }
    
    .quick-links {
        padding: 0 20px;
    }
    
    .quick-link-text {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    :root {
        --icon-size: var(--icon-size-sm);
        --icon-radius: var(--icon-radius-sm);
        --row-gap: var(--row-gap-sm);
        --col-gap: var(--col-gap-sm);
    }
    
    .quick-links-wrapper {
        min-height: calc(2 * var(--icon-size) + 2 * var(--text-height) + 2 * var(--row-gap) + 60px);
    }
    
    .pagination-indicator {
        padding: 6px 12px;
    }
    
    .page-dot {
        width: 8px;
        height: 8px;
    }
    
    .page-dot.active {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .quick-links {
        padding: 0 16px;
    }
    
    .quick-link-remove {
        width: 20px;
        height: 20px;
    }
    
    .empty-state svg,
    .quick-links-error svg {
        width: 40px;
        height: 40px;
    }
}
@media (max-width: 992px) {
    .navigation-container {
        flex-direction: column;
        height: auto;
    }
    
    .nav-categories-container {
        width: 100%;
        max-height: 180px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0.8rem;
        display: flex;
    }
    
    .nav-categories-list {
        display: flex;
        padding: 0;
        margin: 0;
    }
    
    .nav-category-item {
        flex-direction: column;
        align-items: center;
        padding: 0.8rem 1.2rem;
        min-width: 100px;
        margin: 0 0.3rem;
        text-align: center;
    }
    
    .nav-category-icon {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .nav-category-title {
        font-size: 0.8rem;
    }
    
    .nav-category-count {
        position: absolute;
        top: 5px;
        right: 5px;
        margin-left: 0;
    }
    
    .nav-category-item.active::after {
        right: auto;
        top: auto;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 3px;
        transform: none;
    }
    
    .nav-sites-container {
        padding: 1.2rem;
    }
}

@media (max-width: 768px) {
    .nav-sites-grid {
        gap: 1rem;
    }
    
    .nav-site-card {
        padding: 28px 16px 16px;
    }
    
    .nav-site-icon-container {
        width: 48px;
        height: 48px;
        top: -20px;
    }
    
    .nav-site-icon {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .navigation-container {
        flex-direction: column;
        width: 100%;
        height: auto;
    }
    
    .nav-categories-container {
        width: 100%;
        max-height: 160px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px;
        border-right: none;
        border-bottom: 1px solid rgba(74, 0, 255, 0.1);
    }
    
    .nav-categories-list {
        display: flex;
    }
    
    .nav-category-item {
        flex-direction: column;
        align-items: center;
        padding: 8px 12px;
        min-width: 80px;
        margin: 0 4px;
    }
    
    .nav-category-item.active::after {
        left: 0;
        bottom: 0;
        width: 100%;
        height: 3px;
    }
    
    .nav-sites-container {
        padding: 12px;
    }
}