/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 24px;
    font-weight: 700;
}

.logo i {
    color: #3498db;
    margin-right: 10px;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: #3498db;
}

.nav-item.active {
    color: #3498db;
}

/* 英雄区域 */
.hero-section {
    padding: 60px 0;
    background-color: #333;
    color: #fff;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.hero-content .btn {
    margin-top: 10px;
}

/* 筛选区域 */
.filter-section {
    background-color: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.category-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.category-btn.active {
    background-color: #3498db;
    border-color: #3498db;
    color: #fff;
}

/* 工具网格 */
.tools-section {
    padding: 40px 0;
}

.tools-section h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2rem;
}

.tools-section > .container > p {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 1.1rem;
}

/* 工具说明区域 */
.tool-info-section {
    padding: 40px 0;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.tool-info-section h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.tool-info-section p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f0f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: #3498db;
}

.tool-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.tool-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.tool-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.tool-link:hover {
    background-color: #2980b9;
}

/* 工具详情页面 */
.tool-detail-section {
    padding: 40px 0;
}

.tool-header {
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.tool-header p {
    font-size: 16px;
    color: #666;
}

.tool-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.tool-input-section {
    margin-bottom: 20px;
}

.tool-input-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.tool-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.tool-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.tool-actions {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e9ecef;
}

.tool-result-section {
    margin-top: 20px;
}

.tool-result-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.tool-result {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    min-height: 100px;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
}

/* 相关工具 */
.related-tools {
    margin-top: 40px;
}

.related-tools h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.related-tool-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-tool-item i {
    font-size: 24px;
    color: #3498db;
    margin-bottom: 10px;
}

.related-tool-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.related-tool-item p {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

/* 面包屑导航 */
.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 5px;
}

/* 底部 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-info p {
    font-size: 14px;
    color: #ccc;
    max-width: 400px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .tool-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

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

    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-filter {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-btn {
        width: 100%;
        text-align: center;
    }
}
