/* 1. 全局变量 */
:root {
    /* 颜色 */
    --primary: #045cb7;
    --primary-hover: #0468d7;
    --danger: #ef4444;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #fff;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    
    /* 透明度颜色 */
    --white-10: rgba(255, 255, 255, 0.1);
    --white-90: rgba(255, 255, 255, 0.9);
    
    /* 动画 */
    --trans: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ease: cubic-bezier(0.19, 1, 0.22, 1);
    
    /* 阴影 */
    --shadow: 0 8px 25px rgba(4, 92, 183, 0.15);
    
    /* 间距 */
    --gap-sm: 8px;
    --gap: 16px;
    --gap-lg: 24px;
    
    /* 圆角 */
    --radius: 12px;
}/* 1. 在文件开头添加全局变量和通用过渡 */
:root {
    /* 颜色系统 */
    --primary-color: #045cb7;
    --primary-hover: #0468d7;
    --primary-light: #f0f7ff;
    --danger-color: #ef4444;
    --danger-light: #fef2f2;
    
    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    
    /* 背景颜色 */
    --bg-primary: #fff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* 边框颜色 */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* 动画 */
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    
    /* 阴影 */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 25px rgba(4, 92, 183, 0.15);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* 字体大小 */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-md: 16px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    
    /* 层级 */
    --z-modal: 1000;
    --z-overlay: 999;
    --z-dropdown: 100;
    --z-header: 50;
    --z-base: 1;
    
    /* 动画时间 */
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.4s;
    
    /* 新增透明度颜色 */
    --white-15: rgba(255, 255, 255, 0.15);
    --white-20: rgba(255, 255, 255, 0.2);
    --black-50: rgba(0, 0, 0, 0.5);
    --primary-10: rgba(4, 92, 183, 0.1);
    --danger-10: rgba(239, 68, 68, 0.1);
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #045cb7 0%, #057ade 100%);
    --gradient-white: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.9));
    
    /* 添加新的变量 */
    /* 布局 */
    --header-height: 80px;
    --container-width: 1200px;
    --thumb-width: 200px;
    --thumb-height: 140px;
    
    /* 动画曲线 */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 滤镜 */
    --blur-sm: blur(4px);
    --blur-md: blur(8px);
    
    /* 堆叠顺序 */
    --z-negative: -1;
    --z-elevate: 2;
    --z-sticky: 100;
    --z-drawer: 200;
    --z-popover: 400;
    --z-maximum: 999;
}
.page-item {
    transition: var(--transition-normal);
}/* 基础变量 */
:root {
    --primary-color: #2B5DE0;
    --secondary-color: #5C7CE0;
    --accent-color: #1E40AF;
    --text-color: #333333;
    --light-gray: #F5F7FA;
    --border-color: #E5E7EB;
    --transition-normal: all 0.3s ease;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 页面基础样式 */
.main-content {
    padding-top: 60px;
    min-height: calc(100vh - 60px);
    background: #F8FAFC;
    margin-top: 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 页面标题样式 */
.page-header {
    background: var(--primary-color);
    padding: 30px 0;
    color: white;
    position: relative;
    overflow: hidden;
    margin-top: -60px;
    text-align: center;
}

/* 添加背景动效 */
.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.page-title i {
    font-size: 24px;
}

.page-description {
    margin: 6px auto 0;
    opacity: 0.8;
    font-size: 15px;
    max-width: 600px;
}

/* 添加标题下划线装饰 */
.page-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* 标签筛选器样式 */
.tag-filters {
    margin-top: 0;
    background: white;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.filter-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn i {
    font-size: 16px;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(43, 93, 224, 0.04);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 搜索框样式 */
.tag-search {
    position: relative;
    margin-left: auto;
}

.search-input {
    padding: 8px 16px 8px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    width: 240px;
    transition: var(--transition-normal);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(43, 93, 224, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

/* 标签云容器 */
.tags-container {
    padding: 40px 0;
}

.tags-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* 标签项样式 */
.tag-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.04);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform-origin: center;
    animation: tagAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.tag-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.tag-icon i {
    font-size: 20px;
    color: var(--primary-color);
    transition: var(--transition-smooth);
}

.tag-hover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--primary-color), transparent);
    color: white;
    padding: 30px 20px 15px;
    transform: translateY(100%);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
}

.hover-title {
    font-size: 14px;
    font-weight: 500;
}

/* 悬浮效果 */
.tag-item:hover,
.tag-item.hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(43, 93, 224, 0.12);
    border-color: rgba(43, 93, 224, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
}

.tag-item:hover .tag-icon,
.tag-item.hover .tag-icon {
    background: var(--primary-color);
    transform: scale(1.1) rotate(-5deg);
}

.tag-item:hover .tag-icon i,
.tag-item.hover .tag-icon i {
    color: white;
    transform: scale(1.1);
}

.tag-item:hover .tag-hover-info,
.tag-item.hover .tag-hover-info {
    transform: translateY(0);
    opacity: 1;
}

/* 添加点击效果 */
.tag-item:active {
    transform: translateY(-2px) scale(0.98);
}

/* 添加标签出现动画 */
@keyframes tagAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 为每个标签添加不同的动画延迟 */
.tag-item:nth-child(1) { animation-delay: 0.1s; }
.tag-item:nth-child(2) { animation-delay: 0.15s; }
.tag-item:nth-child(3) { animation-delay: 0.2s; }
.tag-item:nth-child(4) { animation-delay: 0.25s; }
.tag-item:nth-child(5) { animation-delay: 0.3s; }
/* 继续添加更多延迟... */

.tag-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0 8px;
    transition: var(--transition-normal);
}

.tag-item:hover .tag-name {
    color: var(--primary-color);
}

.tag-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #94a3b8;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-item i {
    font-size: 14px;
}

/* 分页样式优化 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-xl) 0;
}
.pagination a{
    text-decoration: none;
}

.page-item {
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-light);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: var(--trans);
    padding: 0 var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

.page-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.page-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.page-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg);
    font-weight: 500;
    box-shadow: 0 4px 12px var(--primary-10);
}

/* 省略号样式 */
.page-item.dots {
    border: none;
    padding: 0 4px;
    cursor: default;
    background: transparent;
}

.page-item.dots:hover {
    transform: none;
    color: var(--text-light);
}

/* 上一页/下一页按钮 */
.page-item i {
    font-size: var(--font-size-md);
    transition: transform 0.3s var(--ease);
}

.page-item:hover i {
    transform: translateX(2px);
}

.page-item[title="上一页"]:hover i {
    transform: translateX(-2px);
}

/* 禁用状态 */
.page-item:disabled,
.page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .pagination {
        gap: var(--spacing-xs);
    }
    
    .page-item {
        min-width: 36px;
        height: 36px;
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 480px) {
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-item {
        min-width: 32px;
        height: 32px;
    }
    
    /* 在小屏幕上隐藏部分页码 */
    .page-item:not(.active):not([title]):not(.dots) {
        display: none;
    }
} 

/* 响应式设计优化 */
@media (max-width: 992px) {
    .tags-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 25px 0;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-title i {
        font-size: 20px;
    }
    
    .page-description {
        font-size: 14px;
        margin: 4px auto 0;
    }

    /* 筛选器移动端优化 */
    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-group {
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        display: flex;
        gap: 8px;
    }
    
    .filter-group::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .filter-btn i {
        font-size: 14px;
    }

    .filter-divider {
        display: none;
    }
    
    /* 标签卡片移动端优化 */
    .tags-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 4px;
    }
    
    .tag-item {
        padding: 16px;
        gap: 8px;
    }
    
    .tag-icon {
        width: 32px;
        height: 32px;
    }
    
    .tag-icon i {
        font-size: 16px;
    }
    
    .tag-name {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .tag-meta {
        font-size: 12px;
        gap: 8px;
    }
    
    .meta-item i {
        font-size: 12px;
    }
    
    .tag-hover-info {
        padding: 25px 16px 12px;
    }
    
    .hover-title {
        font-size: 13px;
    }

    /* 分页移动端优化 */
    .pagination {
        gap: 4px;
    }
    
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .page-numbers {
        gap: 4px;
    }
    
    /* 隐藏部分页码 */
    .page-numbers .page-btn:nth-child(n+4):not(:last-child):not(.active) {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 20px 0;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-title i {
        font-size: 18px;
    }
    
    .page-description {
        font-size: 13px;
    }
    
    .filter-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    /* 标签卡片进一步优化 */
    .tags-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tag-item {
        padding: 14px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .tag-icon {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
    
    .tag-content {
        flex: 1;
        min-width: 0;
    }
    
    .tag-name {
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .tag-meta {
        flex-wrap: wrap;
    }
    
    .tag-hover-info {
        display: none; /* 移动端移除悬浮效果 */
    }
    
    /* 添加触摸反馈 */
    .tag-item:active {
        transform: scale(0.98);
        background: var(--light-gray);
    }

    /* 优化分页 */
    .page-btn.first,
    .page-btn.last {
        display: none; /* 隐藏首页末页按钮 */
    }
    
    .page-numbers .page-btn:not(.active) {
        display: none; /* 只显示当前页和相邻页 */
    }
    
    .page-numbers .page-btn.active + .page-btn,
    .page-btn.active + .page-dots + .page-btn:last-child {
        display: flex;
    }
}

/* 添加暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e2e8f0;
        --light-gray: #1a2234;
        --border-color: #2d3748;
    }
    
    body {
        background: #0f172a;
    }
    
    .tag-item {
        background: #1e293b;
        border-color: rgba(255,255,255,0.1);
    }
    
    .filter-btn {
        background: #1e293b;
        color: #e2e8f0;
    }
    
    .tag-meta {
        color: #64748b;
    }
}

/* 添加header固定样式 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 调整进度条层级，确保显示在最上层 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 1001;
    transition: width 0.2s ease;
}

/* 标签统计信息 */
.tags-stats {
    margin-bottom: 20px;
    color: #64748b;
    font-size: 14px;
    text-align: right;
}

/* 添加标签数量徽章 */
.tag-count {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(43, 93, 224, 0.1);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition-normal);
}

.tag-item:hover .tag-count {
    background: var(--primary-color);
    color: white;
}

/* 优化空状态展示 */
.tags-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.tags-empty i {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 16px;
} 