/* 全局变量 */
:root {
    --primary: #0078d4;
    --primary-light: #1e88e5;
    --primary-dark: #005a9e;
    --success: #107c10;
    --warning: #ff8c00;
    --danger: #d13438;
    --text-primary: #323130;
    --text-secondary: #605e5c;
    --text-muted: #a19f9d;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f2f1;
    --bg-tertiary: #e1dfdd;
    --border-color: #8a8886;
    --border-light: #c8c6c4;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-full: 50px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.16);
}

.dark-mode {
    --text-primary: #ffffff;
    --text-secondary: #f3f2f1;
    --text-muted: #d2d0ce;
    --bg-primary: #292929;
    --bg-secondary: #3b3a39;
    --bg-tertiary: #484746;
    --border-color: #605e5c;
    --border-light: #8a8886;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    font-size: 14px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-light);
}

/* 容器 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.logo svg {
    width: 32px;
    height: 32px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.nav-link:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.theme-toggle-btn,
.qr-code-icon {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover,
.qr-code-icon:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.theme-toggle-btn svg,
.qr-code-icon svg {
    color: var(--text-secondary);
}

.theme-toggle-btn:hover svg,
.qr-code-icon:hover svg {
    color: var(--primary);
}

/* 分类标签区域 */
.category-section {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 48px;
    z-index: 900;
}

.category-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    position: relative;
}

.category-tab::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.15s ease;
}

.category-tab:hover {
    color: var(--text-primary);
}

.category-tab.active {
    color: var(--primary);
    font-weight: 500;
}

.category-tab.active::after {
    width: 100%;
}

/* 搜索框区域 */
.search-section {
    padding: 24px 0;
}

.search-container {
    max-width: 640px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    box-shadow: var(--shadow-sm);
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    font-size: 15px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    border-width: 2px;
    padding: 13px 19px 13px 47px;
}

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-icon svg {
    width: 20px;
    height: 20px;
}

/* 搜索建议 */
.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border-light);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover {
    background: var(--bg-secondary);
}

.suggestion-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.suggestion-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.suggestion-desc {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 快捷访问区域 */
.quick-access-section {
    margin-top: 32px;
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.quick-access-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-access-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.quick-access-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quick-access-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.quick-access-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 工具卡片区域 */
.tools-section {
    padding: 32px 0 60px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.tool-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-card:hover .tool-favorite-btn {
    opacity: 1;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.tool-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.tool-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.tool-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.tool-category {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-secondary);
}

.tool-hot-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 2px;
}

.tool-favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0;
    z-index: 10;
}

.tool-favorite-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
}

.tool-favorite-btn.active {
    opacity: 1;
    background: #fff5f5;
    border-color: var(--danger);
}

.tool-favorite-btn.active svg {
    fill: var(--danger);
    color: var(--danger);
}

.tool-favorite-btn svg {
    width: 16px;
    height: 16px;
    transition: all 0.15s ease;
}

.tool-card:hover .tool-hot-badge {
    display: none;
}

.tool-card:has(.tool-favorite-btn.active) .tool-favorite-btn {
    opacity: 1;
}

/* 内容页面列表 */
.content-list {
    padding: 40px 0;
}

.content-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.15s ease;
}

.content-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.content-item h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.content-item p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.content-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 24px 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.copyright {
    color: var(--text-secondary);
    font-size: 12px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 400;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    font-family: inherit;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.btn-success:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 16px;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 100px;
}

/* 工具页面 */
.tool-page-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.tool-page-title {
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 600;
}

.tool-page-description {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--primary);
}

.tool-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 60px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    font-size: 14px;
    color: var(--text-primary);
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.15s ease;
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    border-width: 2px;
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 100px;
}

.result-box {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    min-height: 150px;
}

.result-box pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    font-family: 'Segoe UI Consolas', 'Consolas', monospace;
    font-size: 13px;
    line-height:  1.6;
}

.result-box textarea {
    width: 100%;
    min-height: 130px;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Segoe UI Consolas', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
}

.result-box textarea:focus {
    outline: none;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--border-light);
    position: relative;
}

.close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: color 0.15s ease;
}

.close:hover {
    color: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .tool-container {
        padding: 20px;
    }
    
    .category-tabs {
        padding: 8px 0;
    }

    .category-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .quick-access-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .quick-access-item {
        padding: 10px;
    }

    .quick-access-icon {
        width: 28px;
        height: 28px;
    }

    .quick-access-icon svg {
        width: 14px;
        height: 14px;
    }

    .quick-access-name {
        font-size: 12px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 设置按钮 */
.settings-btn {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.settings-btn svg {
    color: var(--text-secondary);
}

.settings-btn:hover svg {
    color: var(--primary);
}

/* 设置模态框 */
.settings-section {
    margin-bottom: 20px;
}

.settings-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.settings-item {
    margin-bottom: 16px;
}

.settings-item:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 4px;
}

.settings-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 紧凑模式 */
.compact-mode .tool-card {
    padding: 12px;
}

.compact-mode .tool-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
}

.compact-mode .tool-name {
    font-size: 14px;
    margin-bottom: 4px;
}

.compact-mode .tool-description {
    font-size: 11px;
    margin-bottom: 8px;
}

.compact-mode .tool-category {
    font-size: 10px;
    padding: 3px 8px;
}

/* 工具卡片大小调整 */
.card-small .tool-card {
    padding: 12px;
}

.card-small .tool-icon {
    width: 32px;
    height: 32px;
}

.card-small .tool-name {
    font-size: 13px;
}

.card-small .tool-description {
    font-size: 11px;
}

.card-large .tool-card {
    padding: 24px;
}

.card-large .tool-icon {
    width: 48px;
    height: 48px;
}

.card-large .tool-name {
    font-size: 18px;
}

.card-large .tool-description {
    font-size: 14px;
}

/* 工具推荐系统 */
.recommendation-section {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}

.recommendation-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.recommendation-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.recommendation-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.recommendation-reason {
    font-size: 11px;
    color: var(--warning);
    margin-bottom: 4px;
    font-weight: 500;
}

/* 数据可视化 */
.usage-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100px;
    margin: 16px 0;
}

.usage-bar {
    flex: 1;
    background: var(--primary);
    border-radius: var(--radius-sm);
    position: relative;
    transition: height 0.3s ease;
    min-height: 4px;
}

.usage-bar:hover {
    background: var(--primary-light);
}

.usage-bar::after {
    content: attr(data-label);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 工具使用热力图 */
.heatmap-section {
    padding: 16px 0;
}

.heatmap-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.heatmap-cell {
    aspect-ratio: 1;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    cursor: pointer;
}

.heatmap-cell:hover {
    background: var(--primary);
    color: white;
}

.heatmap-cell.high {
    background: rgba(16, 124, 212, 0.1);
    color: var(--success);
}

.heatmap-cell.medium {
    background: rgba(255, 140, 0, 0.05);
    color: var(--warning);
}

.heatmap-cell.low {
    background: rgba(0, 120, 212, 0.05);
    color: var(--primary);
}

/* 骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
    width: 60%;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
    width: 40%;
}

/* 工具推荐系统 */
.recommendation-section {
    padding: 16px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.recommendation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.recommendation-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.recommendation-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.recommendation-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--success);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.recommendation-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.recommendation-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.recommendation-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.recommendation-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-state-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--text-muted);
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state-description {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 统计徽章 */
.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.stats-badge svg {
    width: 14px;
    height: 14px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.tag:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tag-primary {
    background: rgba(0, 120, 212, 0.1);
    border-color: rgba(0, 120, 212, 0.2);
    color: var(--primary);
}

.tag-success {
    background: rgba(16, 124, 16, 0.1);
    border-color: rgba(16, 124, 16, 0.2);
    color: var(--success);
}

.tag-warning {
    background: rgba(255, 140, 0, 0.1);
    border-color: rgba(255, 140, 0, 0.2);
    color: var(--warning);
}

.tag-danger {
    background: rgba(209, 52, 56, 0.1);
    border-color: rgba(209, 52, 56, 0.2);
    color: var(--danger);
}

/* 统计列表 */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
}

.stats-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.stats-rank {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.stats-item:nth-child(1) .stats-rank {
    background: var(--warning);
}

.stats-item:nth-child(2) .stats-rank {
    background: var(--text-muted);
}

.stats-item:nth-child(3) .stats-rank {
    background: var(--border-color);
}

.stats-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-icon svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.stats-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-count {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* 工具分享按钮 */
.tool-share-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0;
    z-index: 10;
}

.tool-card:hover .tool-share-btn {
    opacity: 1;
}

.tool-share-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.tool-share-btn:hover svg {
    fill: white;
    color: white;
}

.tool-share-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--text-secondary);
    transition: all 0.15s ease;
}