/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ================= 全局 CSS 变量 ================= */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    
    --bg-color: #f8fafc;
    /* 多角度微光晕背景 */
    --bg-gradient: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
    
    --text-main: #0f172a;
    --text-sub: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --header-bg: rgba(255, 255, 255, 0.75);
    --menu-bg: rgba(255, 255, 255, 0.95);
    --hover-bg: #f1f5f9;
    
    /* 多层阴影系统 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 20px var(--primary-glow);
    --radius-md: 14px;
    --radius-lg: 22px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-color: #0b1120;
    --bg-gradient: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.08) 0px, transparent 50%);
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --card-bg: #1e293b;
    --border-color: #334155;
    --header-bg: rgba(11, 17, 32, 0.75);
    --menu-bg: rgba(30, 41, 59, 0.95);
    --hover-bg: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.2);
}

/* ================= 基础重置 ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-sans);
    background-color: var(--bg-color); 
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main); 
    line-height: 1.6; 
    transition: background-color 0.5s, color 0.5s; 
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ================= 顶部导航 ================= */
.header { 
    background: var(--header-bg); 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; top: 0; z-index: 100; 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px); 
    transition: var(--transition);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; height: 72px; }

/* Logo 图片适配样式 */
.logo { display: flex; align-items: center; text-decoration: none; transition: var(--transition); }
.logo img { height: 40px; width: auto; display: block; }
.logo:hover { opacity: 0.85; transform: scale(1.02); }

.nav { display: flex; gap: 32px; }
.nav a { 
    text-decoration: none; color: var(--text-sub); font-size: 0.95rem; font-weight: 600; 
    padding: 24px 0; transition: var(--transition); position: relative;
    letter-spacing: -0.01em;
}
.nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
    background: var(--primary-color); border-radius: 3px 3px 0 0;
    transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease;
}
.nav a:hover { color: var(--primary-color); }
.nav a.active { color: var(--primary-color); }
.nav a.active::after, .nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ================= 右上角操作区 ================= */
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main); 
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: var(--transition);
}
.icon-btn:hover { background: var(--hover-bg); transform: scale(1.05); border-color: var(--primary-color); box-shadow: var(--shadow-glow); }
.icon-btn svg { width: 20px; height: 20px; }

/* 主题切换 */
.theme-switcher { position: relative; }
.theme-btn { 
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main); 
    width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: var(--transition); 
}
.theme-btn:hover { background: var(--hover-bg); transform: scale(1.05); border-color: var(--primary-color); box-shadow: var(--shadow-glow); }
.theme-btn svg { width: 20px; height: 20px; display: none; }
[data-theme="light"] .theme-btn .icon-sun { display: block; color: #f59e0b; }
[data-theme="dark"] .theme-btn .icon-moon { display: block; color: #60a5fa; }
[data-theme="system"] .theme-btn .icon-system { display: block; color: var(--text-sub); }

.theme-menu {
    position: absolute; right: 0; top: calc(100% + 12px); 
    background: var(--menu-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color); border-radius: var(--radius-md); 
    padding: 8px; min-width: 180px; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: var(--transition);
    display: flex; flex-direction: column; gap: 4px; z-index: 200;
}
.theme-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-option {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; 
    border: none; background: transparent; color: var(--text-main); 
    font-size: 0.9rem; font-weight: 500; border-radius: 8px; cursor: pointer; 
    transition: var(--transition); text-align: left; font-family: var(--font-sans); white-space: nowrap;
}
.theme-option:hover { background: var(--hover-bg); }
.theme-option svg { width: 18px; height: 18px; color: var(--text-sub); flex-shrink: 0; }
.theme-option .check-icon { margin-left: auto; width: 16px; height: 16px; color: var(--primary-color); opacity: 0; transform: scale(0.5); transition: var(--transition); }
.theme-option.active { color: var(--primary-color); font-weight: 600; }
.theme-option.active .check-icon { opacity: 1; transform: scale(1); }
.theme-option.active svg:not(.check-icon) { color: var(--primary-color); }

/* ================= 搜索弹窗 ================= */
.search-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; z-index: 1000;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.search-modal.show { opacity: 1; visibility: visible; }
.search-modal-content {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 32px;
    width: 90%; max-width: 600px; box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 1px solid var(--border-color); transform: translateY(30px) scale(0.95);
    transition: var(--transition); position: relative;
}
.search-modal.show .search-modal-content { transform: translateY(0) scale(1); }
.close-btn {
    position: absolute; top: 16px; right: 16px; background: transparent; border: none; color: var(--text-sub);
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.close-btn:hover { background: var(--hover-bg); color: var(--text-main); transform: rotate(90deg); }
.close-btn svg { width: 20px; height: 20px; }
.modal-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.modal-icon {
    width: 52px; height: 52px; background: rgba(16, 185, 129, 0.1); color: var(--primary-color);
    border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.modal-title-group h3 { font-size: 1.4rem; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.modal-title-group p { font-size: 0.9rem; color: var(--text-sub); }
.modal-search-box {
    display: flex; background: var(--bg-color); border: 1px solid var(--border-color); 
    border-radius: var(--radius-md); overflow: hidden; transition: var(--transition);
}
.modal-search-box:focus-within { border-color: var(--primary-color); box-shadow: 0 0 0 4px var(--primary-glow); }
.modal-search-box input { 
    flex: 1; padding: 16px 20px; border: none; background: transparent; 
    color: var(--text-main); font-size: 1rem; outline: none; font-family: var(--font-sans);
}
.modal-search-box button { 
    background: var(--primary-color); color: #fff; border: none; padding: 0 32px; 
    font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: var(--font-sans);
}
.modal-search-box button:hover { background: var(--primary-hover); }

/* ================= 主体内容 ================= */
.main-content { padding: 48px 0; min-height: calc(100vh - 150px); }

/* 首页 Hero 区域（居中） */
.home-hero { text-align: center; margin-bottom: 24px; animation: fadeIn 0.5s ease; }
.hero-logo { font-size: 3.2rem; font-weight: 800; color: var(--primary-color); line-height: 1.1; letter-spacing: -1px; margin-bottom: 4px; }
.hero-title { font-size: 3rem; font-weight: 900; color: var(--text-main); line-height: 1.2; letter-spacing: -1.5px; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-sub); line-height: 1.6; }

/* 搜索框 */
.search-wrap { max-width: 720px; margin: 32px auto 48px; animation: fadeIn 0.4s ease; }
.search-box { 
    display: flex; background: var(--card-bg); border: 1px solid var(--border-color); 
    border-radius: 50px; overflow: hidden; box-shadow: var(--shadow-md); transition: var(--transition); 
}
.search-box:focus-within { box-shadow: var(--shadow-glow), var(--shadow-lg); border-color: var(--primary-color); transform: scale(1.015); }
.search-box input { flex: 1; padding: 18px 28px; border: none; background: transparent; color: var(--text-main); outline: none; font-size: 1.05rem; font-family: var(--font-sans); }
.search-box input::placeholder { color: var(--text-sub); opacity: 0.7; }
.search-box button { 
    background: var(--primary-color); color: white; border: none; padding: 0 40px; 
    font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition); font-family: var(--font-sans);
}
.search-box button:hover { background: var(--primary-hover); }

/* 分类页标题（居中） */
.category-header { margin-bottom: 8px; text-align: center; }
.category-header h2 { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; letter-spacing: -0.5px; line-height: 1.3; }
.category-header p { font-size: 1.15rem; color: var(--text-sub); line-height: 1.7; }

/* 搜索结果横幅 */
.search-result-header { text-align: center; margin-bottom: 8px; }
.search-result-header h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.search-result-header p { color: var(--text-sub); font-size: 0.95rem; }
.highlight-number { color: var(--primary-color); font-size: 2rem; font-weight: 900; margin: 0 4px; }
.highlight-text { background: rgba(16, 185, 129, 0.15); color: var(--primary-color); padding: 2px 8px; border-radius: 6px; }

/* ================= 工具卡片网格 ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.card { 
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 30px; 
    border: 1px solid var(--border-color); transition: var(--transition); 
    text-decoration: none; color: inherit; display: flex; flex-direction: column; 
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), transparent 60%);
    opacity: 0; transition: var(--transition); pointer-events: none;
}
.card:hover { transform: translateY(-8px) scale(1.01); box-shadow: var(--shadow-lg), var(--shadow-glow); border-color: var(--primary-color); }
.card:hover::before { opacity: 1; }
.card-icon { 
    width: 58px; height: 58px; 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.1)); 
    color: var(--primary-color); border-radius: 16px; display: flex; align-items: center; justify-content: center; 
    font-size: 1.7rem; margin-bottom: 22px; transition: var(--transition);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 4px 6px -1px rgba(0,0,0,0.05);
}
.card:hover .card-icon { transform: scale(1.12) rotate(6deg); }
.card h3 { margin-bottom: 10px; font-size: 1.25rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.02em; }
.card p { color: var(--text-sub); font-size: 0.9rem; flex: 1; margin-bottom: 0; line-height: 1.7; }

/* ================= 工具页面沉浸式美化 ================= */
.tool-page-header {
    display: flex; align-items: center; gap: 20px; max-width: 1000px;
    margin: 0 auto 32px; animation: fadeIn 0.4s ease;
}
.tool-page-icon {
    width: 64px; height: 64px; background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.1));
    color: var(--primary-color); border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), var(--shadow-sm);
}
.tool-page-title h1 { font-size: 1.8rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; margin-bottom: 6px; }
.tool-page-title p { font-size: 0.95rem; color: var(--text-sub); line-height: 1.6; }

/* 工具面板 */
.tool-panel { 
    position: relative; background: var(--card-bg); border-radius: var(--radius-lg); padding: 32px; 
    border: 1px solid var(--border-color); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(16, 185, 129, 0.05); 
    max-width: 1000px; margin: 0 auto; overflow: hidden;
}
.tool-panel::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6); opacity: 0.8;
}
.tool-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.tool-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }

/* 输入输出区域 */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 10px; }
.tool-col { display: flex; flex-direction: column; gap: 10px; }
.tool-col label { 
    font-size: 0.9rem; font-weight: 700; color: var(--text-sub); 
    display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color);
}

/* 文本框 */
textarea { 
    width: 100%; min-height: 320px; padding: 20px; background: var(--bg-color); 
    border: 1px solid var(--border-color); border-radius: var(--radius-md); 
    color: var(--text-main); font-family: 'Fira Code', 'Consolas', 'Monaco', monospace; 
    font-size: 14px; line-height: 1.7; resize: vertical; outline: none; transition: var(--transition); 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02); 
}
textarea::-webkit-scrollbar { width: 8px; height: 8px; }
textarea::-webkit-scrollbar-track { background: transparent; }
textarea::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
textarea::-webkit-scrollbar-thumb:hover { background: var(--text-sub); }
textarea:focus { 
    border-color: var(--primary-color); 
    box-shadow: 0 0 0 4px var(--primary-glow), inset 0 2px 4px rgba(0,0,0,0.02); 
    background: var(--card-bg); 
}
.tool-output { 
    background: rgba(16, 185, 129, 0.02) !important; 
    color: var(--text-main); cursor: text; border-color: rgba(16, 185, 129, 0.2);
}
.tool-output:focus { box-shadow: 0 0 0 4px var(--primary-glow), inset 0 2px 4px rgba(0,0,0,0.02); border-color: var(--primary-color); }

/* 工具操作按钮区 */
.tool-actions { 
    display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; 
    justify-content: center; padding-top: 24px; border-top: 1px dashed var(--border-color); 
}

/* 按钮 */
.btn { 
    padding: 12px 28px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; 
    cursor: pointer; border: 1px solid transparent; transition: var(--transition); 
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; 
    font-family: var(--font-sans); letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--primary-color); color: #fff; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { background: var(--hover-bg); border-color: var(--text-sub); transform: translateY(-2px); }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: none; }
.btn-danger:hover { background: #ef4444; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3); }

/* 状态提示 */
.status-bar { font-size: 0.85rem; padding: 8px 16px; border-radius: 8px; display: none; font-weight: 600; font-family: var(--font-sans); }
.status-success { background: rgba(16, 185, 129, 0.15); color: var(--primary-color); display: block; animation: fadeIn 0.3s; }
.status-error { background: rgba(239, 68, 68, 0.15); color: #ef4444; display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* ================= 工具页 SEO 内容区 ================= */
.tool-seo-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 36px;
    max-width: 1000px;
    margin: 32px auto 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
    color: var(--text-main);
    animation: fadeIn 0.5s ease;
}
.tool-seo-content h2 {
    font-size: 1.5rem; font-weight: 800; margin-bottom: 20px;
    padding-bottom: 12px; border-bottom: 2px solid var(--border-color);
    color: var(--primary-color);
}
.tool-seo-content h3 {
    font-size: 1.15rem; font-weight: 700; margin-top: 28px; margin-bottom: 12px; color: var(--text-main);
}
.tool-seo-content p { margin-bottom: 14px; color: var(--text-sub); font-size: 0.95rem; }
.tool-seo-content ul, .tool-seo-content ol { margin-bottom: 16px; padding-left: 24px; color: var(--text-sub); font-size: 0.95rem; }
.tool-seo-content li { margin-bottom: 8px; }
.tool-seo-content strong { color: var(--text-main); }
.tool-seo-content .faq-item {
    margin-bottom: 16px; padding: 16px; background: var(--bg-color);
    border-radius: var(--radius-md); border-left: 4px solid var(--primary-color);
}
.tool-seo-content .faq-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
.tool-seo-content .faq-item p { margin-bottom: 0; }
.tool-seo-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
}
.tool-seo-content a:hover { border-bottom-style: solid; }
.tool-seo-content code {
    background: var(--hover-bg); padding: 2px 6px; border-radius: 4px;
    font-family: ui-monospace, monospace; font-size: 13px; color: var(--primary-hover);
}

/* ================= 相关工具推荐 ================= */
.related-tools-section {
    max-width: 1000px;
    margin: 48px auto 0;
    animation: fadeIn 0.6s ease;
}
.related-tools-section h3 {
    font-size: 1.3rem; font-weight: 800; margin-bottom: 20px;
    color: var(--text-main); display: flex; align-items: center; gap: 8px;
}
.related-tools-section .grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ================= 空状态美化 ================= */
.empty-state {
    text-align: center; padding: 80px 20px; background: var(--card-bg);
    border-radius: var(--radius-lg); border: 1px dashed var(--border-color);
    max-width: 600px; margin: 0 auto; animation: fadeIn 0.5s ease;
}
.empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.6; filter: grayscale(20%); }
.empty-state h3 { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
.empty-state p { color: var(--text-sub); font-size: 1rem; margin-bottom: 8px; }

/* ================= 静态页面内容排版 ================= */
.page-content {
    background: var(--card-bg); border-radius: var(--radius-lg); padding: 48px;
    border: 1px solid var(--border-color); box-shadow: var(--shadow-md);
    max-width: 860px; margin: 0 auto; line-height: 1.8; color: var(--text-main); animation: fadeIn 0.4s ease;
}
.page-content h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--border-color); color: var(--primary-color); }
.page-content h3 { font-size: 1.25rem; font-weight: 700; margin-top: 32px; margin-bottom: 12px; }
.page-content p { margin-bottom: 16px; color: var(--text-sub); }
.page-content ul { margin-bottom: 16px; padding-left: 20px; color: var(--text-sub); }
.page-content li { margin-bottom: 8px; }
.page-content strong { color: var(--text-main); }
.page-content a { color: var(--primary-color); text-decoration: none; border-bottom: 1px dashed var(--primary-color); }
.page-content a:hover { border-bottom-style: solid; }
.page-content code { background: var(--hover-bg); padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 13px; color: var(--primary-hover); }

/* 搜索高亮 */
.highlight { background: #fef08a; color: #854d0e; padding: 0 4px; border-radius: 4px; }
[data-theme="dark"] .highlight { background: #a16207; color: #fef08a; }

/* ================= 404页面 ================= */
.error-page { text-align: center; padding: 120px 20px; }
.error-page h1 { font-size: 8rem; font-weight: 900; background: linear-gradient(135deg, var(--primary-color), #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; letter-spacing: -0.05em; }
.error-page p { font-size: 1.2rem; color: var(--text-sub); margin-bottom: 32px; }

/* ================= 回到顶部按钮 ================= */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}
.back-to-top svg { width: 22px; height: 22px; transition: transform 0.3s ease; }
.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
}
.back-to-top:hover svg { transform: translateY(-2px); }
.back-to-top:active { transform: translateY(-2px) scale(0.95); }
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

/* ================= 复制功能视觉反馈 ================= */
/* 复制成功/失败的按钮状态 */
.btn.copy-success {
    background: #10b981 !important;
    color: #fff !important;
    border-color: #10b981 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
    transform: none !important;
}
.btn.copy-error {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4) !important;
    transform: none !important;
}
.btn:disabled { cursor: default; opacity: 0.9; }

/* 全局 Toast 提示 */
.copy-toast {
    position: fixed;
    top: 88px;
    left: 50%;
    transform: translate(-50%, -30px);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}
.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.copy-toast.success {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-lg), 0 0 20px var(--primary-glow);
}
.copy-toast.error {
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(239, 68, 68, 0.25);
}

/* ================= 页脚（强制统一样式） ================= */
.footer { 
    border-top: 1px solid var(--border-color); 
    padding: 36px 0; 
    margin-top: 80px; 
    background: var(--card-bg); 
    color: var(--text-sub);
    font-size: 0.9rem; 
}
.footer-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 16px; 
}

/* 强制版权文字和链接文字样式完全一致 */
.footer-inner p,
.footer-links a { 
    color: var(--text-sub) !important;
    font-weight: 400 !important;
    font-size: 0.9rem !important;
    text-decoration: none; 
    transition: var(--transition); 
}

/* 只有鼠标悬停时才变主色并加下划线 */
.footer-links a:hover { 
    color: var(--primary-color) !important; 
    text-decoration: underline; 
}

.footer-links .divider { 
    margin: 0 12px; 
    color: var(--border-color); 
    opacity: 0.6;
}

/* ================= 计算结果卡片样式 ================= */
.result-panel {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.result-group {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
}
.result-group-title {
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 700;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 0.9rem;
    gap: 12px;
}
.result-item .label {
    color: var(--text-sub);
    flex-shrink: 0;
}
.result-item .value {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
    word-break: break-all;
}
/* 结果卡片中的高亮行：覆盖全局 .highlight 样式 */
.result-item.highlight {
    background: transparent !important;
    color: inherit !important;
    padding: 12px 0 6px !important;
    margin-top: 4px;
    border-top: 2px solid var(--primary-color);
    border-radius: 0 !important;
}
.result-item.highlight .label {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
}
.result-item.highlight .value {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    font-weight: 900;
}
.result-value-green { color: #10b981 !important; }
.result-value-orange { color: #f59e0b !important; }
.result-value-red { color: #ef4444 !important; }
.result-value-blue { color: #3b82f6 !important; }

@media (max-width: 768px) {
    .result-panel { padding: 12px; }
    .result-group { padding: 12px 14px; }
    .result-item { font-size: 0.85rem; }
    .result-item.highlight .value { font-size: 1.25rem; }
}

/* ================= 数据表格样式（用于财务/数据类工具） ================= */

/* 关键修复：允许 Grid 子项收缩，防止表格撑破容器 */
.tool-grid > .tool-col {
    min-width: 0;
}

.table-container {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    min-height: 320px;
    max-height: 480px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    box-sizing: border-box;
}
.table-container::-webkit-scrollbar { width: 8px; height: 8px; }
.table-container::-webkit-scrollbar-track { background: transparent; }
.table-container::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.table-container::-webkit-scrollbar-thumb:hover { background: var(--text-sub); }

.data-table {
    /* 关键修复：表格宽度跟随内容，内容宽时横向滚动，内容窄时撑满容器 */
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    font-family: var(--font-sans);
}
.data-table thead {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
    box-shadow: 0 1px 0 var(--border-color);
}
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.85rem;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 16px;
    color: var(--text-sub);
    border-bottom: 1px solid var(--border-color);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    white-space: nowrap; /* 关键：禁止单元格内容换行 */
}
.data-table td:first-child {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--text-main);
}
.data-table tr:hover td {
    background: var(--hover-bg);
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table .highlight-row td {
    color: var(--primary-color);
    font-weight: 700;
    border-top: 2px solid var(--primary-color);
}
.data-table .positive { color: #10b981; font-weight: 700; }
.data-table .negative { color: #ef4444; font-weight: 700; }
.data-table .muted { color: var(--text-sub); }

@media (max-width: 768px) {
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 8px 12px; }
    .table-container { max-height: 360px; border-radius: 12px; }
}

/* ================= 响应式适配 ================= */

/* 平板及以下（≤ 992px）的过渡优化 */
@media (max-width: 992px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
    .nav { gap: 22px; }
}

/* 移动端主适配（≤ 768px） */
@media (max-width: 768px) {
    /* ---------- Header 移动端重排 ---------- */
    .header-inner { 
        flex-wrap: wrap; 
        height: auto; 
        padding: 14px 0 8px; 
        gap: 12px; 
    }
    
    .logo { flex-shrink: 0; }
    .logo img { height: 32px; }
    
    /* 右上角按钮固定到右侧，并增加右侧内边距 */
    .header-actions { 
        margin-left: auto; 
        gap: 8px; 
        padding-right: 8px;
    }
    
    /* 图标按钮在移动端稍微缩小 */
    .icon-btn, .theme-btn {
        width: 40px;
        height: 40px;
    }
    .icon-btn svg, .theme-btn svg { width: 18px; height: 18px; }
    
    /* 导航栏横向滑动（增加左右内边距，让"首页"不贴边） */
    .nav { 
        width: 100%; 
        overflow-x: auto; 
        gap: 24px;
        padding: 6px 16px 12px;
        order: 3; 
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    }
    .nav::-webkit-scrollbar { display: none; }
    .nav a { 
        white-space: nowrap; 
        padding: 8px 0;
        font-size: 0.95rem;
    }
    .nav a::after { height: 3px; border-radius: 3px; }
    
    /* ---------- 主体内容 ---------- */
    .main-content { padding: 28px 0 40px; }
    
    /* ---------- Hero 区域（增加顶部间距） ---------- */
    .home-hero { 
        margin-top: 20px; 
        margin-bottom: 24px; 
    }
    .hero-logo { font-size: 2.2rem; letter-spacing: -0.5px; }
    .hero-title { font-size: 2rem; letter-spacing: -1px; margin-bottom: 12px; }
    .hero-subtitle { font-size: 0.92rem; line-height: 1.6; padding: 0 8px; }
    
    /* ---------- 搜索框 ---------- */
    .search-wrap { margin: 20px auto 32px; padding: 0 4px; }
    .search-box input { padding: 14px 20px; font-size: 0.95rem; }
    .search-box button { padding: 0 22px; font-size: 0.9rem; }
    
    /* ---------- 分类标题（增加顶部间距） ---------- */
    .category-header { 
        margin-top: 20px; 
        margin-bottom: 4px; 
        padding: 0 4px; 
    }
    .category-header h2 { font-size: 1.7rem; margin-bottom: 10px; }
    .category-header p { font-size: 1rem; line-height: 1.6; }
    
    /* ---------- 搜索结果横幅 ---------- */
    .search-result-header h2 { font-size: 1.25rem; line-height: 1.5; }
    .highlight-number { font-size: 1.6rem; }
    .search-result-header p { font-size: 0.88rem; }
    
    /* ---------- 工具卡片 ---------- */
    .grid { grid-template-columns: 1fr; gap: 16px; }
    .card { padding: 22px; border-radius: 18px; }
    .card-icon { width: 50px; height: 50px; border-radius: 14px; font-size: 1.5rem; margin-bottom: 16px; }
    .card h3 { font-size: 1.15rem; margin-bottom: 8px; }
    .card p { font-size: 0.88rem; line-height: 1.6; margin-bottom: 0; }
    .card:hover { transform: none; }
    .card:active { transform: scale(0.98); transition: transform 0.15s ease; }
    .card:hover .card-icon { transform: none; }
    
    /* ---------- 工具页沉浸式头部（增加顶部间距） ---------- */
    .tool-page-header { 
        flex-direction: column; text-align: center; gap: 12px; 
        margin-top: 20px;
        margin-bottom: 24px; 
        padding: 0 4px;
    }
    .tool-page-icon { width: 56px; height: 56px; font-size: 1.7rem; }
    .tool-page-title h1 { font-size: 1.5rem; }
    .tool-page-title p { font-size: 0.88rem; line-height: 1.6; }
    
    /* ---------- 工具面板 ---------- */
    .tool-panel { padding: 20px; border-radius: 18px; }
    .tool-title { font-size: 1.15rem; margin-bottom: 16px; }
    .tool-header { margin-bottom: 20px; gap: 12px; }
    
    /* 输入输出区域：移动端上下堆叠 */
    .tool-grid { grid-template-columns: 1fr; gap: 18px; }
    .tool-col label { font-size: 0.85rem; padding-bottom: 6px; }
    textarea { 
        min-height: 180px; padding: 14px 16px; font-size: 13px; line-height: 1.6; border-radius: 12px;
    }
    
    /* 按钮全宽，触摸友好 */
    .tool-actions { flex-direction: column; gap: 10px; margin-top: 20px; padding-top: 20px; }
    .btn { 
        width: 100%; padding: 14px 20px; font-size: 0.95rem; border-radius: 12px; justify-content: center;
    }
    .btn:active { transform: scale(0.97); }
    .btn-primary:hover, .btn-outline:hover, .btn-danger:hover { transform: none; }
    
    /* ---------- 状态提示 ---------- */
    .status-bar { font-size: 0.8rem; padding: 6px 12px; }
    
    /* ---------- 空状态 ---------- */
    .empty-state { padding: 60px 20px; margin: 0 4px; border-radius: 18px; }
    .empty-icon { font-size: 3.2rem; }
    .empty-state h3 { font-size: 1.3rem; }
    .empty-state p { font-size: 0.9rem; }
    
    /* ---------- SEO 内容区 ---------- */
    .tool-seo-content { padding: 24px 20px; margin: 24px auto 0; border-radius: 18px; font-size: 0.9rem; }
    .tool-seo-content h2 { font-size: 1.25rem; margin-bottom: 16px; }
    .tool-seo-content h3 { font-size: 1.05rem; margin-top: 24px; margin-bottom: 10px; }
    .tool-seo-content p, .tool-seo-content li { font-size: 0.88rem; line-height: 1.75; }
    .tool-seo-content ul, .tool-seo-content ol { padding-left: 20px; }
    .tool-seo-content .faq-item { padding: 14px; }
    .tool-seo-content .faq-item h4 { font-size: 0.95rem; }
    
    /* ---------- 相关工具推荐 ---------- */
    .related-tools-section { margin: 36px auto 0; }
    .related-tools-section h3 { font-size: 1.15rem; margin-bottom: 16px; }
    .related-tools-section .grid { grid-template-columns: 1fr; gap: 14px; }
    
    /* ---------- 静态页面 ---------- */
    .page-content { padding: 24px 20px; border-radius: 18px; }
    .page-content h2 { font-size: 1.4rem; margin-bottom: 20px; padding-bottom: 12px; }
    .page-content h3 { font-size: 1.1rem; margin-top: 24px; }
    .page-content p, .page-content li { font-size: 0.9rem; line-height: 1.75; }
    
    /* ---------- 搜索弹窗 ---------- */
    .search-modal-content { padding: 24px 20px; width: calc(100% - 32px); max-width: 100%; border-radius: 18px; }
    .modal-icon { width: 44px; height: 44px; font-size: 1.3rem; border-radius: 12px; }
    .modal-title-group h3 { font-size: 1.15rem; }
    .modal-title-group p { font-size: 0.82rem; }
    .modal-search-box input { padding: 13px 16px; font-size: 0.95rem; }
    .modal-search-box button { padding: 0 20px; font-size: 0.9rem; }
    .close-btn { top: 12px; right: 12px; }
    
    /* ---------- 主题下拉菜单 ---------- */
    .theme-menu { right: -6px; top: calc(100% + 8px); min-width: 160px; padding: 6px; }
    .theme-option { padding: 10px 12px; font-size: 0.88rem; }
    
    /* ---------- 复制功能 Toast ---------- */
    .copy-toast {
        top: 76px;
        padding: 10px 18px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    /* ---------- 页脚（移动端保持一致性） ---------- */
    .footer { padding: 24px 0; margin-top: 60px; }
    .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
    .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; }
    .footer-links .divider { display: none; }
    .footer-inner p, .footer-links a {
        font-size: 0.82rem !important;
        color: var(--text-sub) !important;
    }
    
    /* ---------- 回到顶部按钮 ---------- */
    .back-to-top {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        width: 44px;
        height: 44px;
    }
    .back-to-top svg { width: 20px; height: 20px; }
    
    /* ---------- 404 页面 ---------- */
    .error-page { padding: 80px 20px; }
    .error-page h1 { font-size: 5rem; }
    .error-page p { font-size: 1rem; }
}

/* ================= 小屏手机专属优化（≤ 480px） ================= */
@media (max-width: 480px) {
    .container { padding: 0 14px; }
    
    /* ---------- Header 更紧凑 ---------- */
    .header-inner { padding: 12px 0 6px; gap: 10px; }
    .logo img { height: 28px; }
    .icon-btn, .theme-btn { width: 36px; height: 36px; }
    .icon-btn svg, .theme-btn svg { width: 16px; height: 16px; }
    
    /* 右上角按钮保持右侧呼吸空间 */
    .header-actions {
        padding-right: 6px;
    }
    
    /* 导航栏滑动内边距优化 */
    .nav { 
        gap: 18px; 
        padding: 6px 12px 10px;
    }
    .nav a { font-size: 0.85rem; }
    
    /* ---------- 主视觉区域（首页 Hero） ---------- */
    .home-hero { 
        margin-top: 16px; 
        margin-bottom: 20px;
    }
    .hero-logo { font-size: 1.9rem; }
    .hero-title { font-size: 1.7rem; }
    .hero-subtitle { font-size: 0.85rem; }
    
    /* ---------- 分类页标题 ---------- */
    .category-header { 
        margin-top: 16px; 
    }
    .category-header h2 { font-size: 1.5rem; }
    .category-header p { font-size: 0.92rem; }
    
    /* ---------- 搜索框 ---------- */
    .search-wrap { padding: 0 2px; }
    .search-box input { padding: 12px 16px; font-size: 0.9rem; }
    .search-box button { padding: 0 18px; font-size: 0.85rem; }
    
    /* ---------- 搜索结果横幅 ---------- */
    .search-result-header h2 { font-size: 1.15rem; }
    .highlight-number { font-size: 1.4rem; }
    
    /* ---------- 工具卡片 ---------- */
    .card { padding: 18px; }
    .card-icon { width: 44px; height: 44px; font-size: 1.35rem; margin-bottom: 14px; }
    .card h3 { font-size: 1.05rem; }
    .card p { font-size: 0.85rem; }
    
    /* ---------- 工具页 ---------- */
	    /* ---------- 工具页头部 ---------- */
    .tool-page-header {
        margin-top: 16px;
        margin-bottom: 20px;
    }
    .tool-page-icon { width: 48px; height: 48px; font-size: 1.5rem; }
    .tool-page-title h1 { font-size: 1.3rem; }
    .tool-page-title p { font-size: 0.82rem; }
    .tool-panel { padding: 16px; }
    textarea { min-height: 150px; padding: 12px 14px; }
    
    /* ---------- SEO 内容区 ---------- */
    .tool-seo-content { padding: 20px 16px; }
    .tool-seo-content h2 { font-size: 1.15rem; }
    .tool-seo-content h3 { font-size: 1rem; }
    .tool-seo-content p, .tool-seo-content li { font-size: 0.85rem; }
    
    /* ---------- 相关工具推荐 ---------- */
    .related-tools-section h3 { font-size: 1.05rem; }
    
    /* ---------- 搜索弹窗 ---------- */
    .search-modal-content { padding: 20px 16px; }
    .modal-icon { width: 40px; height: 40px; font-size: 1.2rem; }
    .modal-title-group h3 { font-size: 1.05rem; }
    .modal-search-box input { padding: 12px 14px; font-size: 0.9rem; }
    .modal-search-box button { padding: 0 16px; font-size: 0.85rem; }
    
    /* ---------- 主题下拉菜单 ---------- */
    .theme-menu { min-width: 150px; right: -8px; }
    .theme-option { padding: 9px 10px; font-size: 0.84rem; gap: 10px; }
    
    /* ---------- 页脚 ---------- */
    .footer-links { gap: 6px 10px; }
    .footer-inner p, .footer-links a { font-size: 0.78rem !important; }
    
    /* ---------- 回到顶部按钮 ---------- */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 12px;
    }
    .back-to-top svg { width: 18px; height: 18px; }
    
    /* ---------- 404 页面 ---------- */
    .error-page h1 { font-size: 4rem; }
}

/* ================= 触摸设备优化（去掉 hover 残留效果） ================= */
@media (hover: none) and (pointer: coarse) {
    /* 触摸屏下禁用所有 hover 的上浮/缩放残留 */
    .card:hover,
    .btn:hover,
    .btn-primary:hover,
    .btn-outline:hover,
    .btn-danger:hover,
    .icon-btn:hover,
    .theme-btn:hover,
    .nav a:hover,
    .search-box button:hover,
    .modal-search-box button:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* 保留卡片和按钮的阴影基础值，避免点击后阴影消失 */
    .card:hover {
        box-shadow: var(--shadow-sm) !important;
        border-color: var(--border-color) !important;
    }
    .btn-primary:hover {
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
        background: var(--primary-color) !important;
    }
    .btn-outline:hover {
        background: transparent !important;
        border-color: var(--border-color) !important;
    }
    .btn-danger:hover {
        background: rgba(239, 68, 68, 0.1) !important;
        color: #ef4444 !important;
    }
    .icon-btn:hover,
    .theme-btn:hover {
        background: transparent !important;
        border-color: var(--border-color) !important;
        box-shadow: none !important;
    }
    .search-box button:hover,
    .modal-search-box button:hover {
        background: var(--primary-color) !important;
    }
    
    /* 用 :active 提供按下反馈 */
    .card:active { transform: scale(0.985); transition: transform 0.15s ease; }
    .btn:active { transform: scale(0.97); }
    .icon-btn:active, .theme-btn:active { transform: scale(0.92); }
    .nav a:active { color: var(--primary-color); }
}

/* ================= 秒表 / 倒计时显示自适应字号 ================= */
#swDisplay,
#cdDisplay {
    font-size: clamp(1.6rem, 8.5vw, 4rem) !important;
    letter-spacing: clamp(1px, 0.5vw, 4px) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移动端进一步缩小 */
@media (max-width: 480px) {
    #swDisplay,
    #cdDisplay {
        font-size: clamp(1.4rem, 7.5vw, 2.8rem) !important;
        letter-spacing: 1px !important;
    }
}

/* 额外显示：小字历史记录也自适应 */
#swLaps,
#cdDisplay + div {
    word-break: break-word;
}

/* ================= 加载更多组件 ================= */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease;
}
#load-more-btn {
    padding: 12px 48px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}
#load-more-btn:hover:not(.btn-disabled) {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-2px);
}
#load-more-btn.btn-disabled {
    border-color: var(--border-color);
    color: var(--text-sub);
    background: var(--hover-bg);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 移动端全宽 */
@media (max-width: 768px) {
    #load-more-btn {
        width: 100%;
        padding: 14px 20px;
    }
}
/* 移动端稍微缩小 */
@media (max-width: 768px) {
    .page-btn { min-width: 36px; height: 36px; font-size: 0.85rem; padding: 0 10px; }
    .pagination { gap: 6px; margin-top: 32px; }
}

/* ================= PC 端鼠标悬停效果 ================= */
@media (hover: hover) and (pointer: fine) {
    #load-more-btn:hover:not(.btn-disabled) {
        background: var(--primary-color);
        color: #ffffff;
        box-shadow: 0 4px 12px var(--primary-glow);
        transform: translateY(-2px);
    }
}

/* ================= 移动端触摸防残留（禁用 hover 变绿） ================= */
@media (hover: none) and (pointer: coarse) {
    #load-more-btn:hover:not(.btn-disabled),
    #load-more-btn:active:not(.btn-disabled),
    #load-more-btn:focus:not(.btn-disabled) {
        background: transparent !important;
        color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
        box-shadow: none !important;
        transform: none !important;
    }
}

/* ================= 加载完毕后的禁用状态（必须保留） ================= */
#load-more-btn.btn-disabled {
    color: var(--text-sub) !important;
    background: var(--hover-bg) !important;
    border-color: var(--border-color) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}