/*
Theme Name: AI导航中心
Theme URI: https://example.com/ai-nav-theme
Author: AI Nav Team
Author URI: https://example.com
Description: 一比一复刻AI导航中心页面的WordPress主题，支持暗色/柔和亮色主题切换、侧边栏导航、卡片网格布局、搜索过滤、批量导入、拖拽排序、自定义分类名称、网站品牌设置、底部信息弹窗、多搜索引擎切换等功能。
Version: 1.7.4
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-nav-theme
Tags: one-column, custom-colors, custom-menu, featured-images, theme-options
*/

/* ========================================
   CSS Variables - Refined Design System
   ======================================== */
:root {
    /* 暗色模式 - 默认主色调 */
    --primary: #007AFF;
    --primary-hover: #0056CC;
    --primary-glow: rgba(0, 122, 255, 0.2);
    --secondary: #5856D6;
    --accent: #FF2D55;
    --success: #34C759;
    
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    --bg-card: rgba(20, 20, 22, 0.95);
    --bg-hover: rgba(40, 40, 45, 0.8);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-tertiary: rgba(255, 255, 255, 0.4);
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    --sidebar-width: 240px;
    --header-height: 56px;
    --card-min-width: 220px;
    --card-max-width: 260px;
    
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 亮色模式 - 柔和护眼莫兰迪色系 */
[data-theme="light"] {
    /* 品牌主色调：低饱和度清新色系 */
    --primary: #0ea5e9;           /* 清新天蓝 */
    --primary-hover: #0284c7;     /* 悬停深天蓝 */
    --primary-glow: rgba(14, 165, 233, 0.12);
    --secondary: #8b5cf6;         /* 柔和丁香紫 */
    --accent: #f43f5e;            /* 柔和玫瑰粉 */
    --success: #10b981;           /* 护眼薄荷绿 */
    
    /* 背景色系：极浅蓝灰护眼纸白色调 */
    --bg-primary: #f4f7f9;        /* 整体大背景：极其通透的极浅蓝灰 */
    --bg-secondary: #ffffff;      /* 侧边栏/顶部导航：纯白 */
    --bg-tertiary: #eef2f6;       /* 输入框/小按钮背景：柔和云雾灰 */
    --bg-card: #ffffff;           /* 卡片背景：纯白 */
    --bg-hover: #f0f4f8;          /* 悬停背景色：温和过度 */
    
    /* 文字色系：高级石板灰，彻底摒弃刺眼纯黑 */
    --text-primary: #334155;      /* 主标题文字：深石板灰 */
    --text-secondary: #64748b;    /* 正文描述文字：中等石板灰 */
    --text-tertiary: #94a3b8;     /* 辅助信息：浅石板灰 */
    
    /* 边框和线条：极度柔和化 */
    --border-color: rgba(51, 65, 85, 0.06);
    --border-hover: rgba(51, 65, 85, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ========================================
   WordPress Reset & Compatibility
   ======================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-image figcaption {
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}

/* ========================================
   Layout
   ======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 200;
    transition: transform var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.logo-text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShimmer 3s ease-in-out infinite;
}

@keyframes logoShimmer {
    0%, 100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.2);
    }
}

.logo-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.logo-description {
    font-size: 10px;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: 4px;
    padding-left: 52px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-glow);
    color: var(--primary);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-tertiary);
    opacity: 0.6;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-info-item {
    font-size: 10px;
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: 12px;
}

.footer-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.footer-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.footer-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

/* Search Engine Selector */
.search-box {
    position: relative;
    width: 320px;
    display: flex;
    align-items: center;
}

.search-engine-selector {
    position: relative;
}

.search-engine-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.search-engine-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-engine-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

.search-engine-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10;
}

.search-engine-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-engine-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-size: 13px;
}

.search-engine-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.search-engine-item.active {
    background: var(--primary-glow);
    color: var(--primary);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    transition: left var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
}

.sidebar.collapsed ~ .main-content .site-header,
.sidebar.collapsed ~ .site-header {
    left: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

/* 手机端顶部 Logo（桌面端默认隐藏） */
.header-logo-mobile {
    display: none;
    text-decoration: none;
    color: var(--text-primary);
}

.header-logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), #5856D6);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.header-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 7px;
}

/* 如果 has_custom_logo 输出 <a> 标签需要重置 */
.header-logo-icon .custom-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.header-logo-icon .custom-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-logo-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.toggle-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.toggle-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.view-toggle {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0;
}

.view-btn {
    flex: 1;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.25s ease;
    text-align: center;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.view-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.view-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.view-btn.active {
    background: rgba(0, 122, 255, 0.15);
    color: #4da3ff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    width: 320px;
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.search-engine-name {
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 0 8px;
    cursor: pointer;
    transition: color var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    min-width: 45px;
}

.search-engine-name:hover {
    color: var(--primary);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    transition: all var(--transition-fast);
    text-align: left;
    min-width: 0;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    transition: margin-left var(--transition-base);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
}

.content-area {
    padding: 20px;
    max-width: 1800px;
    margin: 0 auto;
}

/* Category Section */
.category-section {
    margin-bottom: 32px;
    scroll-margin-top: 80px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-count {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.category-more {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.category-more:hover {
    background: var(--primary-glow);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr));
    gap: 12px;
}

/* ========================================
   Card Styles - Refined
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 0) 0%, 
        rgba(88, 86, 214, 0) 50%,
        rgba(255, 45, 85, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--secondary) 50%,
        var(--accent) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* 暗色模式专属悬停效果 */
[data-theme="dark"] .card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Card Content */
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.card-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    overflow: hidden;
}

.card-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.card:hover .card-icon {
    background: rgba(14, 165, 233, 0.08);
}

.card:hover .card-icon svg {
    color: var(--primary);
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
    color: var(--text-primary);
}

.card-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 6px;
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary);
    font-size: 9px;
    font-weight: 500;
    border-radius: 3px;
    z-index: 1;
}

.card-tag.hot {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent);
}

.card-tag.new {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.card-tag.free {
    background: rgba(255, 171, 0, 0.12);
    color: #ffab00;
}

.card-description {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.card-stats {
    display: flex;
    gap: 12px;
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--text-tertiary);
}

.card-action {
    padding: 4px 10px;
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* 暗色模式专属按钮悬停效果 */
[data-theme="dark"] .card:hover .card-action {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}
[data-theme="dark"] .card-action:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* View Transition */
.view-transitioning .card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cards-grid {
    transition: gap 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Simple View */
.simple-view .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.simple-view .card {
    flex-direction: row;
    align-items: center;
    padding: 10px;
}

.simple-view .card-header {
    margin-bottom: 0;
    flex: 1;
}

.simple-view .card-icon {
    width: 28px;
    height: 28px;
}

.simple-view .card-description,
.simple-view .card-footer,
.simple-view .card-tag {
    display: none;
}

/* ========================================
   Mobile Overlay
   ======================================== */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 150;
    transition: all var(--transition-base);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Theme Toggle */
.theme-toggle {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--primary);
}

/* ========================================
   Single Tool Page
   ======================================== */
.single-ai-tool {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.single-tool-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.single-tool-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.single-tool-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.single-tool-title {
    font-size: 24px;
    font-weight: 700;
}

.single-tool-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.single-tool-meta span {
    font-size: 12px;
    color: var(--text-tertiary);
}

.single-tool-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.single-tool-content p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.single-tool-visit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.single-tool-visit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* ========================================
   Archive / Category Pages
   ======================================== */
.archive-header {
    padding: 30px 0 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.archive-title {
    font-size: 20px;
    font-weight: 600;
}

.archive-description {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.no-results h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ========================================
   Comments (WordPress)
   ======================================== */
.comments-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
}

.comments-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.comment-list {
    list-style: none;
}

.comment-body {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
}

.comment-content p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

#respond {
    margin-top: 20px;
}

#respond .comment-form input,
#respond .comment-form textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 12px;
    width: 100%;
    font-size: 13px;
}

#respond .comment-form input:focus,
#respond .comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

#respond .comment-form .submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    width: auto;
}

#respond .comment-form .submit:hover {
    background: var(--primary-hover);
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding-bottom: 40px;
}

.page-numbers {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   404 Page
   ======================================== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.error-404 p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.error-404 a {
    color: var(--primary);
    text-decoration: none;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content,
    .site-header {
        margin-left: 0;
        left: 0;
    }

    .search-box {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .search-box {
        display: none;
    }

    .search-engine-dropdown {
        right: 0;
        left: auto;
    }

    /* 手机端顶部显示 Logo，绝对定位居中 */
    .header-logo-mobile {
        display: flex;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        align-items: center;
        gap: 8px;
        pointer-events: auto;
    }

    .view-btn span {
        display: none;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .single-tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .single-tool-meta {
        justify-content: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========================================
   亮色模式专属高级视觉优化 (柔和悬停、弥散阴影)
   ======================================== */
[data-theme="light"] .card {
    /* 默认状态下极淡的底座呼吸感阴影 */
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.02);
}

[data-theme="light"] .card:hover {
    /* 悬停时去除粗糙黑边，替换为清新的淡天蓝边框 */
    border-color: rgba(14, 165, 233, 0.3);
    /* 大面积柔和弥散阴影，提升高级感 */
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    /* 悬停上浮效果 */
    transform: translateY(-3px);
}

/* 优化搜索框，增加极淡的内凹感 */
[data-theme="light"] .search-input {
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.02);
}

/* 优化详情/访问按钮，让它在悬停时更灵动 */[data-theme="light"] .card-action {
    background: #f8fafc;
    border-color: rgba(51, 65, 85, 0.08);
    color: #64748b;
}

[data-theme="light"] .card:hover .card-action {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}
code
CSS
/* ========================================
   极致柔和的主题切换动效 (交叉溶解)
   ======================================== */

/* 1. 现代浏览器原生支持的无缝交叉淡入淡出 (核心体验) */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.8s; /* 0.8秒的超长渐变，肉眼感觉极其舒适 */
    animation-timing-function: ease-in-out;
}

/* 2. 旧版浏览器（如老版本Safari）的降级平滑保护方案 */
.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *:before,
.theme-transitioning *:after {
    transition: background-color 0.8s ease-in-out,
                border-color 0.8s ease-in-out,
                color 0.8s ease-in-out,
                box-shadow 0.8s ease-in-out,
                fill 0.8s ease-in-out,
                stroke 0.8s ease-in-out !important;
    transition-delay: 0s !important;
}
/* ========================================
   暗色模式专属：卡片访问按钮高亮优化
   ======================================== */

/* 1. 暗色模式下按钮的初始状态 */
[data-theme="dark"] .card-action {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-tertiary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. 当鼠标划过“整张卡片”时，按钮边框微亮，显现出主色调 */
[data-theme="dark"] .card:hover .card-action {
    border-color: rgba(0, 122, 255, 0.4); /* 主色调淡化版边框 */
    color: var(--text-secondary);
}

/* 3. 当鼠标直接划过“访问按钮”本身时，实现充满感的高亮 */
[data-theme="dark"] .card-action:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important; /* 悬停时文字强制变白，保证清晰 */
    box-shadow: 0 4px 12px var(--primary-glow); /* 增加一层淡蓝色的霓虹发光感 */
    transform: scale(1.05); /* 按钮轻微放大，增加交互感 */
}

/* 4. 适配：亮色模式下的按钮再次加固（确保两者逻辑一致） */
[data-theme="light"] .card-action {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.05);
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .card:hover .card-action {
    border-color: rgba(14, 165, 233, 0.3);
}

[data-theme="light"] .card-action:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: scale(1.05);
}
/* ========================================
   优化增强样式 v2.0
   ======================================== */

/* ========================================
   AI 导航主题 - 优化增强样式 v2.0
   包含：骨架屏、面包屑、回到顶部、收藏功能等
   ======================================== */

/* ========================================
   骨架屏加载动画
   ======================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-hover) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.skeleton-title {
    width: 70%;
    height: 14px;
}

.skeleton-description {
    width: 100%;
    height: 12px;
    margin-top: 4px;
}

.skeleton-description.short {
    width: 60%;
}

/* ========================================
   面包屑导航
   ======================================== */
.breadcrumbs {
    padding: 12px 0;
    margin-bottom: 16px;
    font-size: 12px;
}

.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
}

.breadcrumb-item:not(.active) a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item:not(.active) a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item:not(:last-child):after {
    content: '/';
    color: var(--text-tertiary);
    font-size: 10px;
}

/* ========================================
   回到顶部按钮
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   收藏/点赞按钮
   ======================================== */
.favorite-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-tertiary);
    font-size: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.favorite-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.favorite-btn.active {
    background: rgba(244, 63, 94, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.favorite-btn svg {
    width: 14px;
    height: 14px;
}

.favorite-btn.active svg {
    fill: var(--accent);
}

/* ========================================
   「我的收藏」按钮
   ======================================== */
.favorites-toggle-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    user-select: none;
}

.favorites-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.favorites-toggle-btn .favorites-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 8px;
    line-height: 1;
}

/* ========================================
   收藏面板
   ======================================== */
.favorites-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 360px;
    max-height: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.favorites-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.favorites-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-color);
}

.favorites-panel-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.favorites-panel-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.favorites-panel-close:hover {
    color: var(--text-primary);
}

.favorites-panel-body {
    overflow-y: auto;
    flex: 1;
    padding: 6px 0;
}

.favorites-panel-body::-webkit-scrollbar {
    width: 4px;
}

.favorites-panel-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.favorites-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    text-align: center;
    gap: 8px;
}

.favorites-empty svg {
    opacity: 0.3;
}

.favorites-empty p {
    margin: 0;
    font-size: 13px;
}

.favorites-empty-hint {
    font-size: 12px !important;
    opacity: 0.6;
}

.favorites-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.favorites-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.favorites-item:hover {
    background: var(--bg-hover);
}

.favorites-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.favorites-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.favorites-item-icon svg {
    color: var(--text-tertiary);
}

.favorites-item-info {
    flex: 1;
    min-width: 0;
}

.favorites-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorites-item-desc {
    font-size: 11px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.favorites-item-arrow {
    color: var(--text-tertiary);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.favorites-item:hover .favorites-item-arrow {
    opacity: 1;
}

/* 响应式 */
@media (max-width: 768px) {
    .favorites-panel {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - var(--header-height));
        border-radius: 0;
    }
}

/* ========================================
   外部链接跳转提示
   ======================================== */
.external-link-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
}

.external-link-modal.active {
    display: flex;
}

.external-link-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.external-link-content h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.external-link-content p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.external-link-url {
    background: var(--bg-tertiary);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-tertiary);
    word-break: break-all;
    margin-bottom: 20px;
}

.external-link-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.external-link-btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.external-link-btn.cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.external-link-btn.cancel:hover {
    background: var(--bg-hover);
}

.external-link-btn.confirm {
    background: var(--primary);
    color: white;
}

.external-link-btn.confirm:hover {
    background: var(--primary-hover);
}

/* ========================================
   工具状态指示器
   ======================================== */
.tool-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 500;
}

.tool-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.tool-status.inactive {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent);
}

.tool-status svg {
    width: 10px;
    height: 10px;
}

/* ========================================
   搜索建议下拉
   ======================================== */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: var(--bg-hover);
}

.search-suggestion-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.search-suggestion-desc {
    font-size: 11px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   工具提交表单
   ======================================== */
.submit-tool-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.submit-tool-form h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 5px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   批量编辑工具（后台）
   ======================================== */
.bulk-edit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    display: none;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.bulk-edit-bar.active {
    display: flex;
}

.bulk-edit-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.bulk-edit-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.bulk-edit-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.bulk-edit-btn.primary {
    background: var(--primary);
    color: white;
}

.bulk-edit-btn.primary:hover {
    background: var(--primary-hover);
}

.bulk-edit-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.bulk-edit-btn.secondary:hover {
    background: var(--bg-hover);
}

/* ========================================
   访问统计图表（后台）
   ======================================== */
.stats-chart {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.stats-chart h4 {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 150px;
    padding: 10px 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-hover) 100%);
    border-radius: 4px 4px 0 0;
    min-width: 20px;
    position: relative;
    transition: opacity var(--transition-fast);
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.chart-bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================
   响应式优化
   ======================================== */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .breadcrumbs {
        font-size: 11px;
    }
    
    .external-link-content {
        padding: 20px;
    }
    
    .submit-tool-form {
        padding: 20px;
    }
}

/* ========================================
   暗色模式专属优化
   ======================================== */
[data-theme="dark"] .skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
}

[data-theme="dark"] .back-to-top {
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

[data-theme="dark"] .back-to-top:hover {
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.5);
}

/* ========================================
   亮色模式专属优化
   ======================================== */
[data-theme="light"] .back-to-top {
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

[data-theme="light"] .back-to-top:hover {
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}
