/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* CSS变量 - 浅色主题 */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-color: #ffffff;
    --surface-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* 深色主题 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #60a5fa;
        --primary-hover: #3b82f6;
        --bg-color: #0f172a;
        --surface-color: #1e293b;
        --border-color: #334155;
        --text-color: #f1f5f9;
        --text-secondary: #94a3b8;
    }
    
    .tool-card {
        box-shadow: 
            0 4px 6px -1px rgba(0, 0, 0, 0.3), 
            0 2px 4px -1px rgba(0, 0, 0, 0.2),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }
    
    .tool-card:hover {
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.4),
            0 20px 25px -5px rgba(0, 0, 0, 0.25),
            0 10px 10px -5px rgba(0, 0, 0, 0.1),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    
    .tool-card:active {
        box-shadow: 
            0 10px 25px -3px rgba(0, 0, 0, 0.25),
            0 4px 6px -2px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.05);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 头部 */
.header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.lang-selector {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.875rem;
}

/* 主内容 */
.main {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 工具标题和副标题 */
.tools-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0.5rem auto 1.5rem;
    max-width: 600px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .tools-subtitle {
        font-size: 1rem;
        margin: 0.5rem auto 1rem;
        padding: 0 1rem;
    }
}

/* 工具网格 */

/* 工具网格布局 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* 响应式调整 */
@media (min-width: 1400px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
}

.tool-card {
    background: var(--surface-color);
    border: none;
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    min-height: 160px; /* 减少高度从200px到160px */
    transform: translateZ(0);
    outline: none;
}

.tool-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::after {
    opacity: 1;
}

.tool-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0; /* 确保没有额外的内边距 */
}

/* 卡片头部区域 */
.tool-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem; /* 与gap保持一致 */
    flex-shrink: 0; /* 防止头部被压缩 */
}

/* 描述区域 */
.tool-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    transition: color 0.3s ease;
    flex: 1;
    /* 与标题左对齐：图标宽度 + gap */
    margin-left: calc(2.5rem + 0.75rem);
    position: relative;
    max-height: 4.5rem; /* 约3行文本 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.description-cta {
    margin-top: 0.4rem;
}

.description-toggle {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.description-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tool-card.description-expanded .tool-description {
    max-height: none;
    -webkit-line-clamp: unset;
}

.tool-card.description-expanded .tool-description::after,
.tool-card.description-expanded .tool-description[data-full-text]::before {
    display: none;
}

/* 文本渐变淡出效果 */
.tool-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5rem;
    background: linear-gradient(to bottom, transparent, var(--surface-color));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* hover时隐藏渐变效果 */
.tool-card:hover .tool-description::after {
    opacity: 0;
}

/* 完整描述tooltip */
.tool-description[data-full-text]::before {
    content: attr(data-full-text);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    max-height: 200px;
    overflow-y: auto;
}

.tool-card:hover .tool-description[data-full-text]::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 移动端更紧凑的样式 */
@media (max-width: 768px) {
    .tool-card {
        padding: 0.875rem;
        min-height: 140px; /* 移动端稍微小一些 */
        border-radius: 0.5rem;
    }
    
    .tool-card-header {
        margin-bottom: 0.625rem;
    }
    
    .tool-description {
        margin-left: calc(2.5rem + 0.625rem); /* 与移动端的gap保持一致 */
        max-height: 3.75rem; /* 移动端减少显示行数 */
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .tool-card {
        padding: 0.75rem;
        min-height: 120px; /* 小屏幕更紧凑 */
    }
    
    .tool-card-header {
        margin-bottom: 0.5rem;
    }
    
    .tool-description {
        margin-left: calc(2.5rem + 0.5rem);
        max-height: 3rem; /* 只显示2行 */
        -webkit-line-clamp: 2;
    }
}

@media (hover: none) {
    .tool-description::after,
    .tool-description[data-full-text]::before {
        display: none;
    }
}

/* 简化的卡片悬浮效果 */
.tool-card:hover {
    transform: translateY(-12px) scale(1.02) translateZ(0);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.tool-card:active {
    transform: translateY(-6px) scale(1.01) translateZ(0);
    box-shadow: 
        0 10px 25px -3px rgba(0, 0, 0, 0.15),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.tool-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
    overflow: hidden;
    box-sizing: border-box;
}

/* 统一SVG图标大小 */
.tool-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-color);
}

/* 统一emoji图标样式 */
.tool-icon:not(.tool-icon-svg) {
    font-size: 1.5rem;
    line-height: 1;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
}

.tool-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    line-height: 1.3;
    flex: 1;
    transition: color 0.3s ease;
}

.tool-card:hover .tool-title {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-card:hover .tool-description {
    color: var(--text-color);
}

/* 工具详情页 */
.tool-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tool-title-section {
    flex: 1;
}

.tool-lang-section {
    flex-shrink: 0;
}

.tool-header h1 {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-color);
}

.tool-header p {
    margin: 0.5rem 0 0 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.back-btn {
    padding: 0.5rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

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

/* 工具详情页内容区域 */
.tool-detail-content {
    background-color: var(--surface-color);
    border-radius: 0.5rem;
    padding: 2rem;
    min-height: 400px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

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

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

/* 空状态和加载状态 */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.no-results p {
    font-size: 1rem;
    line-height: 1.6;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具卡片出现动画 */
.tool-card {
    animation: fadeInUp 0.6s ease-out;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索栏优化 */
.search-container {
    position: relative;
    margin-top: 1.5rem;
}

.search-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
    fill: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--primary-color);
}

.clear-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.clear-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;
}

.clear-btn:hover:before {
    left: 100%;
}

.clear-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.clear-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.clear-btn svg {
    width: 1.125rem;
    height: 1.125rem;
    transition: transform 0.3s ease;
}

.clear-btn:hover svg {
    transform: rotate(90deg);
}

.clear-btn span {
    font-size: 0.875rem;
    font-weight: 600;
}

/* 结果区域 */
.result-area {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    min-height: 100px;
}

.error {
    color: #dc2626;
    background-color: #fef2f2;
    border-color: #fecaca;
}

.success {
    color: #059669;
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

/* 底部 */
.footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tool-title-section {
        width: 100%;
    }
    
    .tool-lang-section {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    
    .tool-detail-content {
        padding: 1rem;
    }
    
    /* 搜索区域响应式 */
    .search-wrapper {
        flex-direction: column;
        gap: 0.75rem;
        max-width: none;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .clear-btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 0.875rem;
    }
    
    .search-icon {
        width: 1rem !important;
        height: 1rem !important;
        left: 0.875rem !important;
    }
    
    .clear-btn span {
        font-size: 0.8rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具分类标签 */
.tool-category {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    z-index: 1;
    max-width: 60px; /* 限制标签宽度 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-card:hover .tool-category {
    opacity: 1;
}

/* 搜索高亮 */
mark {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

@media (prefers-color-scheme: dark) {
    mark {
        background: linear-gradient(135deg, #451a03, #78350f);
        color: #fbbf24;
    }
}

/* 分页样式 */
.pagination-container {
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    min-width: 40px;
    text-align: center;
    user-select: none;
}

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

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

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.page-size-selector select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.page-size-selector select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 0.875rem;
}


@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 0.75rem;
        margin: 1.5rem auto;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 36px;
    }
    
    .pagination-info {
        font-size: 0.8rem;
    }
}

/* 弹性搜索动画 */
.tools-grid .tool-card.search-match {
    animation: searchPulse 0.6s ease-out;
}

@keyframes searchPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* 改进的响应式设计 */
@media (max-width: 768px) {
    .tool-category {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* SEO content sections */
.seo-content {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.04);
}

.seo-content h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.seo-content p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

/* Feature highlights styling */
.feature-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 0.75rem;
    color: white;
}

.feature-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.seo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.seo-list li {
    position: relative;
    padding-left: 1.75rem;
    color: var(--text-color);
    line-height: 1.6;
}

.seo-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.seo-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.seo-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(15, 23, 42, 0.02));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.1);
}

.seo-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.seo-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-list {
    display: grid;
    gap: 1rem;
}

.faq-item {
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--background-color);
}

.faq-item dt {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.faq-item dd {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .seo-content {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}
