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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

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

/* --- 头部与导航 --- */
.main-header {
    background-color: rgba(24, 24, 24, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

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

.main-header h1 {
    font-size: 1.5rem;
    color: #ffffff;
}

.main-header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-header nav a {
    text-decoration: none;
    color: #a0a0a0;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.main-header nav a:hover {
    color: #ffffff;
    background-color: #333;
}

/* --- 内容区域 --- */
main.container {
    padding-top: 40px;
    padding-bottom: 40px;
}

.tool-section {
    padding-top: 80px; /* 为粘性头部留出空间 */
    margin-top: -60px; /* 调整滚动定位 */
    margin-bottom: 40px;
}

.tool-section h2 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 25px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    display: inline-block;
}

/* --- 工具卡片网格 --- */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.tool-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.tool-card p {
    flex-grow: 1;
    margin-bottom: 20px;
    color: #a0a0a0;
}

.tool-card a {
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.tool-card a:hover {
    background-color: #0056b3;
}

/* --- 页脚 --- */
.main-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #333;
}

.main-footer p {
    color: #6c757d;
}

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

    .tool-section h2 {
        font-size: 1.8rem;
    }
} 