/* 现代化链接管理系统样式 */

/* SVG通用样式 - 最简配置 */
svg {
    display: block;
}

/* Ionicons样式 */
ion-icon {
    font-size: 20px;
    vertical-align: middle;
    pointer-events: none;
}

/* 旋转动画 */
.spin-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========== 全局样式 ========== */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --success-color: #10b981;
    --success-hover: #059669;
    --warning-color: #f59e0b;
    --warning-hover: #d97706;
    --secondary-color: #6b7280;
    --secondary-hover: #4b5563;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --border-radius: 16px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局字体优化 */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-variant-ligatures: common-ligatures;
}

/* 针对不同语言的字体优化 */
:lang(zh-CN) {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans CN', 'Noto Sans CJK SC', sans-serif;
}

:lang(en) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans CN', 'Noto Sans CJK SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans GB", "Heiti SC", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 粒子背景 - 已禁用以提升性能 */
/*
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}
*/

/* ========== 容器样式 ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(150%); /* 优化: 减少模糊程度 */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 40px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    will-change: transform; /* 启用GPU加速 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 头部区域 ========== */
.header {
    margin-bottom: 36px;
}

.header-title {
    text-align: center;
    margin-bottom: 24px;
}

.header-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 12px;
    font-weight: 500;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

.title-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    letter-spacing: -0.5px;
    animation: fadeIn 0.8s ease;
}

/* ========== 统计面板 ========== */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
    animation: fadeIn 0.8s ease 0.3s both;
}

.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 优化: 只过渡必要属性 */
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px); /* 优化: 减少模糊 */
    will-change: transform; /* GPU加速 */
}

/* 玻璃态效果 */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* SVG图标样式 - 简化版本 */
.stat-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

/* 悬停时图标动画 */
.stat-card:hover .stat-icon svg {
    transform: scale(1.1);
}

/* 图标背景圆形 */
.stat-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(103, 126, 234, 0.15) 100%);
    border-radius: 12px;
    z-index: 0;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

/* 悬停时图标动画 */
.stat-card:hover .stat-icon svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.3));
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 链接计数徽章 */
.link-count-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 38px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 700;
    color: white !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 19px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    animation: pulse 2s ease-in-out infinite;
    -webkit-text-fill-color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.link-count-badge:empty {
    display: inline-flex !important;
    min-width: 56px;
}

.link-count-badge:empty::after {
    content: '0';
    color: white !important;
    -webkit-text-fill-color: white !important;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    }
}

/* ========== 控制区域 ========== */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 300px;
}

/* 搜索输入框 */
#search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

#search-input::placeholder {
    color: var(--text-secondary);
}

/* 排序选择框 */
#sort-select,
#category-filter {
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    background-color: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

#sort-select:focus,
#category-filter:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

#sort-select:hover,
#category-filter:hover {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.02);
}

/* ========== 按钮样式 ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn i,
.btn .btn-icon {
    width: 18px;
    height: 18px;
}

/* 按钮SVG图标样式 - 简化版本 */
.btn svg {
    width: 18px;
    height: 18px;
}

/* 按钮中的Ionicons样式 */
.btn ion-icon {
    font-size: 20px;
}

.btn-sm ion-icon {
    font-size: 18px;
}

/* Ionicons旋转动画已在顶部定义 */

/* 操作按钮SVG图标样式 - 简化版本 */
.action-btn svg {
    width: 16px;
    height: 16px;
}

/* 操作按钮中的Ionicons样式 */
.action-btn ion-icon {
    font-size: 18px;
}

/* 操作按钮悬停效果 */
.action-btn:hover svg,
.action-btn:hover ion-icon {
    transform: scale(1.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-hover) 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-hover) 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-hover) 100%);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-hover) 100%);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ========== 批量操作栏 ========== */
.bulk-actions {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(103, 126, 234, 0.1) 100%);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid rgba(79, 70, 229, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bulk-info input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.bulk-info label {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.selected-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.selected-count strong {
    color: var(--primary-color);
    font-size: 16px;
}

.bulk-buttons {
    display: flex;
    gap: 12px;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-hover) 100%);
    color: white;
}

/* ========== 表格样式 ========== */
.link-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px auto 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.link-table thead {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.link-table th {
    padding: 18px 24px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.link-table th:first-child {
    border-top-left-radius: 12px;
}

.link-table th:last-child {
    border-top-right-radius: 12px;
}

.link-table td {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.link-table tbody tr {
    background-color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 斑马纹效果 */
.link-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.link-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, rgba(255, 255, 255, 1) 100%) !important;
    transform: translateX(6px) scale(1.01);
    box-shadow: -6px 0 0 0 var(--primary-color), 0 4px 16px rgba(99, 102, 241, 0.15);
}

.link-table tbody tr:last-child td {
    border-bottom: none;
}

.link-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.link-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.link-table td a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding-bottom: 2px;
}

.link-table td a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    transition: width 0.3s ease;
}

.link-table td a:hover {
    color: var(--primary-hover);
}

.link-table td a:hover::after {
    width: 100%;
}

/* 表格列宽 */
.col-checkbox {
    width: 50px;
    text-align: center;
}

.col-index {
    width: 70px;
    text-align: center;
    font-weight: 600;
}

.col-url {
    width: auto;
    min-width: 250px;
    max-width: 400px;
}

.col-desc {
    width: auto;
    min-width: 200px;
}

.col-category {
    width: 140px;
}

.col-date {
    width: 180px;
    white-space: nowrap;
}

.col-actions {
    width: 180px;
    text-align: center;
}

/* 表格单元格样式 */
.link-table td input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
    border-radius: 4px;
}

.link-table th input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: white;
}

.link-table .index-cell {
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 15px;
}

/* 日期单元格 */
.date-cell {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* 操作按钮 */
.action-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn-copy {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.15));
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.action-btn-copy:hover {
    background: linear-gradient(135deg, var(--success-color), var(--success-hover));
    color: white;
    border-color: var(--success-color);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.action-btn-edit {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(67, 56, 202, 0.15));
    color: var(--primary-color);
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.action-btn-edit:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
}

.action-btn-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.15));
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-btn-delete:hover {
    background: linear-gradient(135deg, var(--danger-color), var(--danger-hover));
    color: white;
    border-color: var(--danger-color);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* 批量编辑提示 */
.bulk-edit-hint {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(79, 70, 229, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.bulk-edit-hint strong {
    color: var(--primary-color);
    font-size: 18px;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px !important;
    font-style: italic;
    font-size: 16px;
}

/* ========== 模态框样式 ========== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px) saturate(120%);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 36px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 520px;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 28px;
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .container {
        padding: 24px;
    }

    h1 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 20px;
        border-radius: 8px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        flex-direction: column;
        min-width: 100%;
    }

    #search-input,
    #sort-select {
        width: 100%;
    }

    .controls > div {
        width: 100%;
        justify-content: stretch;
    }

    .controls > div .btn {
        flex: 1;
        justify-content: center;
    }

    .link-table {
        font-size: 13px;
    }

    .link-table th,
    .link-table td {
        padding: 12px 10px;
    }

    .date-cell {
        font-size: 12px;
    }

    .modal-content {
        padding: 24px;
        width: 95%;
    }

    .link-count-badge {
        font-size: 12px;
        min-width: 40px;
        height: 28px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .link-table th,
    .link-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .link-table td a {
        word-break: break-all;
    }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* ========== 加载动画 ========== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* ========== 特殊效果 ========== */
.actions-cell {
    text-align: center;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.btn-icon:hover {
    background-color: rgba(79, 70, 229, 0.1);
    transform: scale(1.1);
}

.btn-edit {
    color: var(--primary-color);
}

/* ========== 分类标签 ========== */
.category-tag {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(129, 140, 248, 0.15));
    border-radius: 20px;
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.category-tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(129, 140, 248, 0.25));
    border-color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

/* ========== 工具提示 ========== */
[title] {
    position: relative;
}

/* ========== 导出模态框样式 ========== */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.export-option-btn {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.export-option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.export-option-btn i,
.export-option-btn .export-icon {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    stroke: currentColor;
}

/* 导出选项SVG图标样式 - 简化版本 */
.export-option-btn svg {
    width: 40px;
    height: 40px;
    stroke: var(--primary-color);
}

/* 导出选项悬停效果 */
.export-option-btn:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.export-option-btn strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.export-option-btn small {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========== 打印样式 ========== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        padding: 0;
    }

    .controls,
    .btn,
    .bulk-actions,
    .stats-panel {
        display: none;
    }

    .link-table {
        box-shadow: none;
    }

    .col-checkbox,
    .col-actions {
        display: none;
    }
}
