/* OneNav 最近访问下拉面板样式（从子主题 style.css 第七段提取，614-1050 行） */
/* ================================================
   七、头部最近访问下拉面板
   ================================================ */
.nav-recent {
    position: relative;
    display: flex;
    align-items: center;
}
.nav-recent > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #4b5563;
    font-size: 17px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.nav-recent > a:hover {
    background: #f3f4f6;
    color: #4f8ff7;
}
.io-black-mode .nav-recent > a {
    color: #9ca3af;
}
.io-black-mode .nav-recent > a:hover {
    background: #2a2f3a;
    color: #7aa7ff;
}
.nav-recent .recent-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    background: #f1404b;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid #fff;
}
.io-black-mode .nav-recent .recent-badge {
    border-color: #22262f;
}
/* 下拉面板 */
.nav-recent .recent-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .2s cubic-bezier(.3, 0, .3, 1);
    z-index: 300;
    overflow: hidden;
}
.nav-recent:hover .recent-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.io-black-mode .nav-recent .recent-dropdown {
    background: #2a2f3a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
}
.nav-recent .recent-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.io-black-mode .nav-recent .recent-header {
    border-bottom-color: #333a4a;
}
.nav-recent .recent-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-recent .recent-title i {
    color: #4f8ff7;
    font-size: 14px;
}
.io-black-mode .nav-recent .recent-title {
    color: #e5e7eb;
}
.nav-recent .recent-clear {
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    transition: color .2s;
}
.nav-recent .recent-clear:hover {
    color: #f1404b;
}
/* 标题栏右侧容器（清空+本地存储提示） */
.nav-recent .recent-header-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}
.nav-recent .recent-storage-tip {
    font-size: 10px;
    color: #c0c4cc;
    line-height: 1;
    margin-top: 3px;
    white-space: nowrap;
}
.io-black-mode .nav-recent .recent-storage-tip {
    color: #4a5160;
}
/* 分类筛选标签 */
.nav-recent .recent-filters {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-recent .recent-filters::-webkit-scrollbar { display: none; }
.nav-recent .filter-tag {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    cursor: pointer;
    transition: all .2s;
    border: 1px solid transparent;
    white-space: nowrap;
}
.nav-recent .filter-tag:hover {
    background: #e5e7eb;
}
.nav-recent .filter-tag.active {
    background: #fff;
    color: #f1404b;
    border-color: #f1404b;
    font-weight: 500;
}
.io-black-mode .nav-recent .filter-tag {
    background: #2a2f3a;
    color: #9ca3af;
}
.io-black-mode .nav-recent .filter-tag:hover {
    background: #333a47;
}
.io-black-mode .nav-recent .filter-tag.active {
    background: #262c3a;
}
/* 列表项分类标签 */
.nav-recent .recent-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
.nav-recent .recent-type-tag {
    font-size: 10px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.io-black-mode .nav-recent .recent-type-tag {
    background: #2a2f3a;
    color: #6b7280;
}
/* 单独删除按钮 */
.nav-recent .recent-delete {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #d1d5db;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
    opacity: 0;
    line-height: 1;
}
.nav-recent .recent-item:hover .recent-delete {
    opacity: 1;
}
.nav-recent .recent-delete:hover {
    background: #fee2e2;
    color: #ef4444;
}
.io-black-mode .nav-recent .recent-delete {
    color: #4a5160;
}
.io-black-mode .nav-recent .recent-delete:hover {
    background: #3a2a2a;
    color: #ef4444;
}
/* 删除动画 */
.nav-recent .recent-item.removing {
    opacity: 0;
    transform: translateX(20px);
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* 列表项改为可点击 div */
.nav-recent .recent-item {
    cursor: pointer;
}
/* 底部"查看更多" */
.nav-recent .recent-view-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    transition: all .2s;
    border-top: 1px solid #f5f6f8;
    gap: 4px;
}
.nav-recent .recent-view-more:hover {
    color: #4f8ff7;
    background: #f8f9fb;
}
.nav-recent .recent-view-more i {
    font-size: 14px;
    font-style: normal;
    transition: transform .2s;
    font-weight: 700;
}
.nav-recent .recent-view-more:hover i {
    transform: translateX(2px);
}
.io-black-mode .nav-recent .recent-view-more {
    border-top-color: #2d3340;
    color: #6b7280;
}
.io-black-mode .nav-recent .recent-view-more:hover {
    color: #4f8ff7;
    background: #262c3a;
}
.nav-recent .recent-list {
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #e53935 #f5f5f5;
}
.nav-recent .recent-list::-webkit-scrollbar {
    width: 8px;
}
.nav-recent .recent-list::-webkit-scrollbar-track {
    background: #f8f8f8;
    border-radius: 4px;
    margin: 4px 0;
}
.nav-recent .recent-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ef5350, #e53935);
    border-radius: 4px;
    border: 2px solid #f8f8f8;
    min-height: 32px;
}
.nav-recent .recent-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e53935, #c62828);
}
.io-black-mode .nav-recent .recent-list {
    scrollbar-color: #e53935 #2a2f3a;
}
.io-black-mode .nav-recent .recent-list::-webkit-scrollbar-track {
    background: #2a2f3a;
}
.io-black-mode .nav-recent .recent-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ef5350, #e53935);
    border-color: #2a2f3a;
}

/* 底部"还有更多"渐变箭头提示 */
.nav-recent .recent-more-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.92) 45%, #fff 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}
.nav-recent .recent-more-hint.visible {
    opacity: 1;
}
.nav-recent .recent-more-hint .arrow-down {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(229,57,53,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e53935;
    font-size: 12px;
    animation: recent-arrow-bounce 1.5s ease-in-out infinite;
}
.io-black-mode .nav-recent .recent-more-hint {
    background: linear-gradient(180deg, rgba(33,37,46,0) 0%, rgba(33,37,46,0.92) 45%, #21252e 100%);
}
.io-black-mode .nav-recent .recent-more-hint .arrow-down {
    background: #2a2f3a;
    box-shadow: 0 2px 10px rgba(229,57,53,0.4);
}
@keyframes recent-arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}
.nav-recent .recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
}
.nav-recent .recent-item:hover {
    background: #f8f9fb;
}
.io-black-mode .nav-recent .recent-item:hover {
    background: #333a4a;
}
.nav-recent .recent-favicon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
    overflow: hidden;
}
.io-black-mode .nav-recent .recent-favicon {
    background: #333a4a;
    color: #9ca3af;
}
.nav-recent .recent-favicon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.nav-recent .recent-info {
    flex: 1;
    min-width: 0;
}
.nav-recent .recent-name {
    font-size: 13px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.io-black-mode .nav-recent .recent-name {
    color: #e5e7eb;
}
.nav-recent .recent-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}
.nav-recent .recent-empty {
    padding: 32px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.nav-recent .recent-empty i {
    font-size: 32px;
    color: #d1d5db;
}
.io-black-mode .nav-recent .recent-empty i {
    color: #3a4152;
}
.nav-recent .recent-loading {
    padding: 24px 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}
/* 移动端隐藏最近访问 */
@media (max-width: 992px) {
    .nav-recent {
        display: none;
    }
}
