:root {
    --primary-color: #4F46E5;
    --primary-light: #EEF2FF;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6B7280;
    --bg-main: #F9FAFB;
    --bg-card: #FFFFFF;
    --border-color: #E5E7EB;
    --sidebar-width: 280px;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: var(--text-primary);
    line-height: 1.6;
}

/* --- 布局 --- */
.main-layout { display: flex; }
.content-area { width: 100%; padding: 5rem 0.5rem 1.5rem 0.5rem; }
.container { max-width: 1600px; margin: 0 auto; padding: 0 1rem; }

/* --- 侧边栏 (移动端优先: 默认隐藏) --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0; left: 0; height: 100vh;
    padding-top: 1.5rem;
    overflow-y: auto;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform var(--transition-fast);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.sidebar.open { 
    transform: translateX(0); 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.1); 
}
.sidebar-header { padding: 0 1.5rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.sidebar-title { 
    font-size: 1.5rem; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    flex-direction: column;
    align-items: flex-start;
}
.sidebar-title > div:first-child {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-subtitle { 
    color: var(--text-muted); 
    font-size: 0.75rem;
    font-weight: 400;
    margin-top: 0.125rem;
    margin-left: 0;
}
.nav-menu { list-style: none; }
.nav-link { display: flex; align-items: center; padding: 0.75rem 1.5rem; text-decoration: none; color: var(--text-secondary); font-weight: 500; transition: all var(--transition-fast); }
.nav-link:hover { background-color: #f3f4f6; color: var(--primary-color); }
.nav-icon { margin-right: 0.75rem; }
.nav-text { flex-grow: 1; }
.nav-count { background-color: #E5E7EB; color: var(--text-secondary); padding: 0.1rem 0.5rem; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.nav-external-icon { 
    margin-left: 0.5rem; 
    font-size: 0.875rem; 
    opacity: 0.7; 
    transition: opacity var(--transition-fast);
}
.nav-link:hover .nav-external-icon {
    opacity: 1;
}
.sidebar-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
}
.sidebar-backdrop.active { opacity: 1; visibility: visible; }

/* --- 移动端顶部栏 --- */
.mobile-header { 
    display: flex; 
    align-items: center; 
    padding: 1rem 1rem 1rem; 
    margin: -1.5rem -1rem;
    border-bottom: 1px solid var(--border-color); 
    margin-bottom: 1.5rem; 
    background: var(--bg-card);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.mobile-menu-btn { background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-menu-btn span { display: block; width: 20px; height: 2px; background: var(--text-primary); margin: 4px 0; }
.mobile-logo-section { display: flex; align-items: center; margin-left: 1rem; }
.mobile-logo-icon { width: 32px; height: 32px; margin-right: 0.75rem; }
.mobile-title-group { display: flex; flex-direction: column; }
.mobile-title { font-size: 1.25rem; font-weight: 600; line-height: 1.2; margin: 0; }
.mobile-subtitle { font-size: 0.875rem; color: var(--text-muted); line-height: 1.2; margin: 0; }

/* --- 主内容 Header --- */
.header { text-align: center; margin-bottom: 3rem; display: none; }
.header h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; display: flex; justify-content: center; align-items: center; gap: 1rem; }
.header p { font-size: 1.125rem; color: var(--text-muted); }
.header-logo-icon { width: 48px; height: 48px; }
.sidebar .header-logo-icon { width: 36px; height: 36px; }

/* --- 页面顶部渐变背景 --- */
.content-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: linear-gradient(180deg, 
        rgba(102, 126, 234, 0.12) 0%, 
        rgba(118, 75, 162, 0.08) 25%,
        rgba(255, 107, 107, 0.06) 50%,
        rgba(78, 205, 196, 0.08) 75%,
        rgba(241, 243, 247, 0.06) 100%);
    pointer-events: none;
    z-index: -1;
}
.content-area {
    position: relative;
    padding-top: 2rem;
    min-height: 100vh;
}

/* --- 搜索与消息 --- */
.search-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.search-input {
    background-color: var(--bg-card); /* 确保背景色为白色 */
}
.search-section { max-width: 800px; margin: 0 auto 3rem; }
.search-container { 
    position: relative; 
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.15);
}
.search-icon { 
    position: absolute; 
    left: 1.25rem; 
    color: var(--text-muted); 
    z-index: 2;
}
.search-input { 
    flex: 1;
    padding: 0.75rem 1rem 0.75rem 3rem; 
    font-size: 1rem; 
    border: none;
    outline: none; 
    background: transparent;
    border-radius: 50px;
}
.search-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-left: 0.5rem;
}
.search-btn:hover {
    background: #3730a3;
    transform: translateY(-1px);
}
.search-suggestions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.suggestion-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}
.suggestion-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.suggestion-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}
.no-results { 
    text-align: center; 
    padding: 2rem; 
    background-color: #fef2f2; 
    border: 1px solid #fecaca; 
    color: #991b1b; 
    border-radius: var(--border-radius); 
    margin-bottom: 2rem; 
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* --- 数据概览 (全新样式) --- */
.overview-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.overview-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.overview-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.overview-icon {
    font-size: 1.5rem;
}
.overview-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.overview-item {
    display: flex;
    flex-direction: column;
}
.overview-number {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}
.overview-label {
    font-size: 0.875rem; /* 14px */
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* --- 分类与卡片 --- */
.category-section { 
    margin-bottom: 2.5rem; 
}
.category-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.category-title { font-size: 1.25rem; font-weight: 600; }
.category-content { padding: 0; display: block; }
.view-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: none; /* 暂时隐藏查看更多按钮 */
}
.view-more-btn:hover {
    background: #3730a3;
    transform: translateY(-1px);
}
.tools-grid { 
    display: grid
;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    font-size: 0; /* 消除网格项之间的空白 */
}
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}
.tool-card:hover { 
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.tool-header { 
    display: flex; 
    align-items: flex-start; 
    gap: 0.75rem; 
    margin-bottom: 0.75rem; 
}
.tool-logo {
    width: 32px; 
    height: 32px;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; 
    font-weight: 500; 
    flex-shrink: 0;
}
/* 图片版卡片logo */
.tool-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}
.tool-info { flex-grow: 1; }
.tool-name { 
    font-size: 1rem; 
    font-weight: 600; 
    margin: 0;
    color: var(--text-primary);
    line-height: 1.2;
}
.tool-company { 
    font-size: 0.875rem; 
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.tool-description { 
    color: var(--text-secondary); 
    margin-bottom: 0.75rem; 
    flex-grow: 1; 
    font-size: 0.875rem;
    line-height: 1.4;
}
.tool-features { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.375rem; 
    margin-bottom: 0.75rem; 
}
.feature-tag { 
    background-color: #F4F4F5; 
    color: var(--text-secondary); 
    padding: 0.25rem 0.5rem; 
    border-radius: 4px; 
    font-size: 0.75rem; 
    font-weight: normal;
}
.tool-pricing { 
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}
.pricing-item { 
    display: flex; 
    gap: 0.375rem;
    color: var(--text-muted);
}
.pricing-item span:last-child { 
    color: var(--text-primary); 
}
.tool-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    gap: 1rem;
}

.visit-link-btn, .visit-website-btn {
    font-size: 0.875rem;
    font-weight: normal;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.visit-link-btn {
    color: var(--primary-color);
}

.visit-website-btn {
    color: #10B981;
}

.visit-link-btn:hover {
    color: #5B21B6;
}

.visit-website-btn:hover {
    color: #059669;
}

/* --- 图片AI筛选器 --- */
.image-ai-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.filter-btn { padding: 0.5rem 1rem; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); background-color: #f3f4f6; border: 1px solid transparent; border-radius: 99px; cursor: pointer; transition: all var(--transition-fast); }
.filter-btn:hover { background-color: #e5e7eb; color: var(--text-primary); }
.filter-btn.active { background-color: var(--primary-color); color: white; box-shadow: var(--shadow-sm); }

/* --- 返回顶部按钮 --- */
#back-to-top {
    display: none; position: fixed; bottom: 1.5rem; right: 1.5rem; width: 48px; height: 48px; background-color: var(--primary-color); color: white; border: none; border-radius: 50%; font-size: 1.5rem; cursor: pointer; box-shadow: var(--shadow-md); transition: all var(--transition-fast); z-index: 999;
}
#back-to-top:hover { background-color: #5B21B6; transform: scale(1.1); }

/* --- 桌面端适配 (`min-width: 1024px`) --- */
@media (min-width: 1024px) {
    .sidebar { transform: translateX(0); }
    .content-area { margin-left: var(--sidebar-width); padding: 2.5rem 1rem 1.5rem 1rem; }
    .mobile-header { display: none; }
    .header { display: block; }
    .tools-grid { 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    }
}

/* --- 移动端适配 --- */
@media (max-width: 767px) {
    .content-area { 
        padding: 5rem 0.75rem 1rem 0.75rem; 
    }
    .container {
        padding: 0 0.5rem;
    }
    .search-section {
        margin-bottom: 2rem;
        max-width: 100%;
    }
    .search-container {
        padding: 0.375rem;
    }
    .search-input {
        padding: 0.625rem 0.75rem 0.625rem 2.75rem;
        font-size: 0.9rem;
    }
    .search-icon {
        left: 1rem;
        width: 16px;
        height: 16px;
    }
    .search-btn {
        padding: 0.625rem 1rem;
        margin-left: 0.25rem;
    }
    .search-btn svg {
        width: 14px;
        height: 14px;
    }
    .search-suggestions {
        margin-top: 0.75rem;
        gap: 0.5rem;
    }
    .suggestion-tag {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    .category-section {
        margin-bottom: 2rem;
    }
    .category-header {
        padding: 0.75rem 0;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: flex-start;
    }
    .category-title {
        font-size: 1.125rem;
        flex: 1;
        min-width: 0;
        margin: 0;
    }
    .view-more-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
        flex-shrink: 0;
        margin-top: 0.25rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .tool-card {
        padding: 0.875rem;
        border-radius: 8px;
    }
    .tool-header {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .tool-logo-img {
        width: 32px;
        height: 32px;
    }
    .tool-name {
        font-size: 1rem;
        line-height: 1.3;
    }
    .tool-company {
        font-size: 0.8rem;
    }
    .tool-description {
        font-size: 0.875rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    .tool-features {
        gap: 0.375rem;
        margin-bottom: 0.75rem;
    }
    .feature-tag {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    .tool-pricing {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }
    .tool-buttons {
        gap: 0.5rem;
        flex-direction: column;
    }
    .visit-link-btn,
    .visit-website-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
    /* 移动端侧边栏优化 */
    .sidebar {
        width: 85vw;
        max-width: 320px;
    }
    .mobile-header {
        padding: 0.75rem 1rem;
        margin-bottom: 1.5rem; 
    }
    .mobile-logo-icon {
        width: 28px;
        height: 28px;
        margin-right: 0.5rem;
    }
    .mobile-title {
        font-size: 1.125rem;
    }
    .mobile-subtitle {
        font-size: 0.8rem;
    }
    /* 移动端返回顶部按钮 */
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    /* 移动端页面顶部渐变背景调整 */
    .content-area::before {
        height: 100vh;
    }
    .content-area {
        padding-top: 1rem;
        min-height: 100vh;
    }
    /* 移动端数据概览优化 */
    .overview-section {
        margin-bottom: 2rem;
    }
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .overview-item {
        padding: 0.75rem;
    }
    .overview-number {
        font-size: 1.25rem;
    }
    .overview-label {
        font-size: 0.8rem;
    }
}

/* --- 平板端适配 --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .content-area { padding: 1.5rem 1rem; }
    .tools-grid { 
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .category-header {
        padding: 1rem 0;
    }
    .view-more-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* 桌面端适配 */
@media (min-width: 768px) {
    .overview-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- 主页卡片链接样式 --- */
.tools-grid a {
    text-decoration: none;
}

.tool-card {
    cursor: pointer;
    height: 100%;
    position: relative;
}

.tool-card:hover {
    border-color: var(--primary-color);
}

/* 详情页专属样式 */
.detail-page-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    position: relative;
}

.detail-content {
    padding-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .detail-header {
        padding: 1rem;
    }
    
    .tool-title {
        font-size: 2rem;
    }
    
    .tool-meta {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .tool-tagline {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .tool-actions {
        flex-wrap: wrap;
    }
}
.detail-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.back-to-home {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.5);
}
.back-to-home:hover {
    color: var(--primary-color);
    transform: translateX(-4px);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.back-to-home::before {
    content: "←";
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
.back-to-home:hover::before {
    transform: translateX(-2px);
}
.detail-main-content {
    padding: 2.5rem 0rem;
    max-width: 1280px;
    margin: 0 auto;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr 320px;
    }
}
/* 左侧内容 */
.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}
.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.breadcrumb .separator {
    color: var(--text-muted);
    opacity: 0.5;
}
.tool-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.tool-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.tool-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}
.tool-meta span:hover {
    color: var(--primary-color);
}
.tool-tagline {
    font-size: 1.35rem;
    color: var(--text-secondary);
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--border-radius);
    margin-bottom: 2.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}
.tool-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn:hover::before {
    left: 100%;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5b21b6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.35);
}
.btn-icon {
    padding: 0.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.btn-icon:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.tag {
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    color: #4338CA;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}
.tag:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.detail-section {
    margin-bottom: 2.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.detail-section h2 {
    font-size: 1.375rem; /* 与首页分区标题更接近 */
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    color: var(--primary-color);
    font-weight: 700;
}
.detail-section ul, .detail-section ol {
    padding-left: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.detail-section li {
    margin-bottom: 0.75rem;
    position: relative;
}
.detail-section li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* 详情页段落的换行与字体设置（与首页风格一致） */
.detail-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-line;
    word-break: break-word;
}

/* 调整副标题的行高，提升中文长句的可读性 */
.tool-tagline { line-height: 1.8; }

/* 右侧边栏卡片 */
.detail-sidebar .sidebar-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    position: sticky;
    top: 2rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}
.detail-sidebar .sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}
.sidebar-card .card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-card .card-logo {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #8B5CF6 100%);
    color: white;
    display: grid; place-items: center;
    font-size: 1.5rem; font-weight: 700;
    box-shadow: var(--shadow-md);
}
/* 图片版详情页侧栏logo */
.sidebar-card .card-logo-img {
    width: 48px; height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}
.sidebar-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}
.sidebar-card .card-body {
    padding: 1.5rem;
}
.sidebar-card h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}
.pricing-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.pricing-info-item:last-child {
    border-bottom: none;
}
.pricing-info-item .label {
    color: var(--text-muted);
    font-weight: 500;
}
.pricing-info-item .value {
    font-weight: 600;
    color: var(--text-primary);
}
.detail-footer {
    text-align: center;
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    margin-top: 2rem;
}

/* 加载动画 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    min-height: 60vh;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(109, 40, 217, 0.1);
    border-radius: 50%;
    border-left: 4px solid var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-container {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 0 auto;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ef4444;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.prompt-tips-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.prompt-tip-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.prompt-tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tip-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.tip-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tip-example {
    background: var(--primary-light);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

.prompt-engineering-info {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

/* AI Agent 优化样式 */
.agent-intro-section {
    margin-bottom: 2.5rem;
}

.agent-intro-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-definition-card {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0f4ff 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--primary-color);
    border-opacity: 0.2;
}

.agent-definition-card p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.agent-definition-card p:last-child {
    margin-bottom: 0;
}

.agent-platforms-section,
.mcp-section,
.agent-scenarios-section,
.agent-trends-section {
    margin-bottom: 2.5rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    opacity: 0.8;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* MCP 协议样式 */
.mcp-content-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.mcp-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mcp-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mcp-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.mcp-card ul {
    padding-left: 1.5rem;
}

.mcp-card ul li {
    margin-bottom: 0.5rem;
}

/* 应用场景样式 */
.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.scenario-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.scenario-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 8px;
}

.scenario-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.scenario-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* 发展趋势样式 */
.trends-content-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.trends-content-card p {
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0;
}

.trends-highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mcp-content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .scenarios-grid {
        grid-template-columns: 1fr;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .scenario-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .scenario-icon {
        align-self: center;
    }
}

/* 平板端适配 */
@media (min-width: 769px) and (max-width: 1023px) {
    .mcp-content-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* 移动端小屏幕适配 */
@media (max-width: 480px) {
    .mcp-content-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .platforms-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* 页面底部样式 */
.page-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.6;
}

/* 响应式底部 */
@media (max-width: 768px) {
    .page-footer {
        padding: 1rem 0;
        margin-top: 2rem;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-content p {
        font-size: 0.8rem;
    }
    
    .prompt-tips-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .prompt-tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 搜索结果页面样式 */
.search-results-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.search-results-title {
    margin-bottom: 2rem;
}

.search-results-title h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.search-query-display {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
}

.search-results-stats {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.search-results-content {
    min-height: 400px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-result-card {
    position: relative;
}

.tool-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    z-index: 1;
}

.search-suggestions-help {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.search-suggestions-help p {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    color: var(--text-primary);
}

.search-suggestions-help ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    list-style: disc;
}

.search-suggestions-help li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}



/* 优化无结果提示 */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.back-to-home-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* 搜索结果页面响应式设计 */
@media (max-width: 768px) {
    .search-results-title h1 {
        font-size: 1.5rem;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tool-category-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* 加载动画样式 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 300px;
    width: 100%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
    display: block;
}

.loading-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0 auto 0.75rem auto;
    white-space: nowrap;
    display: block;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 加载状态的响应式设计 */
@media (max-width: 768px) {
    .loading-container {
        padding: 3rem 1.5rem;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .loading-text {
        font-size: 1rem;
    }
}