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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 头部样式 */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

/* 主内容样式 */
main {
    padding: 40px 0;
}

/* 首页样式 */
.hero {
    text-align: center;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.hero p {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 40px;
}

/* 工具卡片网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.tool-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.tool-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.tool-card p {
    color: #666;
    margin-bottom: 20px;
}

.tool-card a {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

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

/* 工具页面样式 */
.tool-page {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 40px;
}

.tool-page h1 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #2c3e50;
}

.tool-page p {
    color: #666;
    margin-bottom: 30px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.btn-secondary {
    background-color: #95a5a6;
}

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

/* 结果展示样式 */
.result {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.result h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.result-content {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

/* 复制按钮 */
.copy-btn {
    background-color: #27ae60;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #229954;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links li {
        margin: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 28px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-page {
        padding: 20px;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-section {
        margin-bottom: 30px;
    }
}

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

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

/* 成功提示 */
.success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
}