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

/* 全局变量 - 简洁克制的配色 */
:root {
    --primary-color: #2563eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-light: #f3f4f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-gray);
}

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

/* 头部 */
.header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 30px 0;
    margin-bottom: 30px;
}

.header-content {
    text-align: center;
}

.site-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.site-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* 介绍区域 */
.intro-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.intro-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.intro-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.intro-content p:last-child {
    margin-bottom: 0;
}

/* 主工作区 */
.main-workspace {
    margin-bottom: 30px;
}

/* 查询区域 */
.search-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button,
.clear-button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.search-button {
    background-color: var(--primary-color);
    color: white;
}

.search-button:hover {
    background-color: #1d4ed8;
}

.clear-button {
    background-color: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.clear-button:hover {
    background-color: var(--bg-gray);
}

/* 快速查询 */
.quick-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.quick-tag {
    padding: 6px 14px;
    font-size: 14px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 结果展示区 */
.result-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.result-section.hidden {
    display: none;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.result-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.current-word {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.result-card {
    padding: 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.result-card h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.word-list {
    min-height: 100px;
    margin-bottom: 12px;
}

.word-item {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
}

.word-count {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: right;
}

.empty-hint {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
}

/* 加载提示 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading.hidden {
    display: none;
}

/* 使用说明 */
.guide-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.guide-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.guide-content {
    display: grid;
    gap: 20px;
}

.guide-step {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.guide-step h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.guide-step p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 功能特点 */
.features-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.features-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

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

.feature-item {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* 使用示例 */
.examples-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.examples-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.example-item {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-item h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.example-item p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 常见问题 */
.faq-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.faq-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.faq-list {
    display: grid;
    gap: 16px;
}

.faq-item {
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
}

.faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* 适用场景 */
.scenarios-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.scenarios-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.scenarios-list {
    list-style: none;
    padding: 0;
}

.scenarios-list li {
    padding: 12px 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.scenarios-list li:last-child {
    border-bottom: none;
}

.scenarios-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 相关工具推荐 */
.related-tools-section {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.related-tools-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.tool-card {
    display: block;
    padding: 20px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tool-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* 页脚 */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-links span {
    color: var(--text-secondary);
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    color: var(--text-primary);
    z-index: 1000;
}

.toast.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .quick-search {
        flex-direction: column;
        align-items: flex-start;
    }
}
