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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.search-input {
    width: 500px;
    padding: 15px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    width: 600px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.search-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 0 30px 30px 0;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* 工具分类样式 */
.tool-categories {
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.categories-title {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.category-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-btn:hover {
    transform: translateY(-2px);
    background: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.category-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

/* 工具网格样式 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.tool-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #667eea;
}

.tool-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.tool-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tool-link {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* 页脚样式 */
.footer {
    background: rgba(44, 62, 80, 0.95);
    color: white;
    text-align: center;
    padding: 30px;
    border-radius: 20px;
    margin-top: 50px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

.footer p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* 动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .search-input {
        width: 300px;
    }
    
    .search-input:focus {
        width: 400px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .search-input {
        width: 200px;
    }
    
    .search-input:focus {
        width: 250px;
    }
    
    .search-btn {
        padding: 15px 20px;
    }
}

/* 工具详情模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease-out;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal p {
    margin-bottom: 20px;
    color: #7f8c8d;
}

.modal iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 10px;
    margin-top: 20px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto;
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
}