/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3498db;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #3498db;
}

.auth {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn.login {
    background-color: transparent;
    color: #3498db;
    border: 1px solid #3498db;
}

.btn.login:hover {
    background-color: #3498db;
    color: #fff;
}

.btn.register {
    background-color: #3498db;
    color: #fff;
}

.btn.register:hover {
    background-color: #2980b9;
}

.btn.search {
    background-color: #3498db;
    color: #fff;
    margin-left: 10px;
}

.btn.search:hover {
    background-color: #2980b9;
}

.btn.tool-btn {
    background-color: #3498db;
    color: #fff;
    margin-top: 10px;
}

.btn.tool-btn:hover {
    background-color: #2980b9;
}

.btn.submit {
    background-color: #3498db;
    color: #fff;
    padding: 10px 20px;
}

.btn.submit:hover {
    background-color: #2980b9;
}

/* 英雄区 */
.hero {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-box button {
    border-radius: 0 4px 4px 0;
}

/* 工具分类 */
.tools-section {
    padding: 80px 0;
    background-color: #fff;
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: #333;
}

.tool-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.category h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.tool-cards {
    display: grid;
    gap: 20px;
}

.tool-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    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-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.tool-card p {
    margin-bottom: 15px;
    color: #666;
}

/* 关于我们 */
.about-section {
    padding: 80px 0;
    background-color: #f5f5f5;
}

.about-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    color: #333;
}

.about-section p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: #666;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.feature p {
    color: #666;
    margin: 0;
}

/* 联系我们 */
.contact-section {
    padding: 80px 0;
    background-color: #fff;
}

.contact-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: #333;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #ddd;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* 工具内容样式 */
.tool-content {
    margin-top: 20px;
}

.tool-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 20px;
    min-height: 150px;
}

.tool-options {
    margin-bottom: 20px;
}

.tool-options label {
    margin-right: 20px;
}

.tool-result {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    min-height: 150px;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .nav-links li {
        margin-left: 0;
        margin-right: 20px;
        margin-bottom: 10px;
    }

    .auth {
        margin-top: 15px;
        width: 100%;
        justify-content: flex-start;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box button {
        margin-left: 0;
        margin-top: 10px;
        border-radius: 4px;
    }

    .tools-section,
    .about-section,
    .contact-section {
        padding: 60px 0;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .tool-categories {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }
}