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

body {
    font-family: "Microsoft YaHei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

a {
    text-decoration: none;
    color: #2c7dfa;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    font-size: 24px;
    margin: 0;
}

.logo a {
    color: #333;
    font-weight: bold;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: #333;
    font-weight: 500;
}

nav ul li a:hover {
    color: #2c7dfa;
}

/* 搜索框样式 */
.search-container {
    background-color: #2c7dfa;
    padding: 40px 0;
    color: #fff;
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.search-box h2 {
    margin-bottom: 20px;
    font-size: 28px;
}

#search-form {
    display: flex;
    margin-bottom: 10px;
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

#search-form button {
    padding: 12px 25px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

#search-form button:hover {
    background-color: #ff5252;
}

.search-tips {
    font-size: 14px;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    padding: 40px 0;
    background-color: #fff;
    border-radius: 5px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.popular-section, .tools-section, .intro-section {
    margin-bottom: 40px;
    padding: 0 20px;
}

.popular-section h3, .tools-section h3, .intro-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.popular-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.popular-items a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
}

.popular-items a:hover {
    background-color: #2c7dfa;
    color: #fff;
}

/* 工具区域 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tool-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tool-item h4 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

.tool-item p {
    color: #666;
    font-size: 14px;
}

/* 介绍区域 */
.intro-section p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

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

.footer-col ul li a {
    color: #bbb;
}

.footer-col ul li a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #bbb;
    font-size: 14px;
}

.copyright a {
    color: #bbb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .search-box h2 {
        font-size: 24px;
    }
    
    #search-form {
        flex-direction: column;
    }
    
    #search-input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    #search-form button {
        border-radius: 4px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* 字典详情页样式 */
.word-detail {
    padding: 30px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.word-header {
    margin-bottom: 30px;
}

.word-title {
    font-size: 48px;
    margin-bottom: 15px;
    color: #333;
}

.word-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
}

.word-info span {
    display: inline-block;
    margin-right: 15px;
}

.meaning-list {
    margin-bottom: 30px;
}

.meaning-item {
    margin-bottom: 20px;
}

.meaning-item h4 {
    color: #2c7dfa;
    margin-bottom: 10px;
    font-size: 18px;
}

.example-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.example-words a {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
}

.example-words a:hover {
    background-color: #2c7dfa;
    color: #fff;
}

/* 搜索结果页样式 */
.search-result-list {
    margin-top: 20px;
}

.result-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-type {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.result-item h3 {
    margin-bottom: 10px;
}

.result-pinyin {
    color: #666;
    margin-bottom: 10px;
}

.result-definition {
    color: #333;
    line-height: 1.8;
}

.no-results {
    padding: 30px;
    text-align: center;
    color: #666;
}

.loading {
    padding: 30px;
    text-align: center;
    color: #666;
}

/* 部首查字页面样式 */
.bushou-grid, .bihua-grid, .pinyin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.bushou-item, .bihua-item, .pinyin-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
}

.bushou-item:hover, .bihua-item:hover, .pinyin-item:hover {
    background-color: #2c7dfa;
    color: #fff;
}

/* 多音字和同音字页面样式 */
.duoyinzi-search, .tongyinzi-search {
    margin-bottom: 30px;
}

.pinyin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.pinyin-list a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
}

.pinyin-list a:hover {
    background-color: #2c7dfa;
    color: #fff;
}

.common-duoyinzi, .common-tongyinzi {
    margin-bottom: 30px;
}

.duoyinzi-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.duoyinzi-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.duoyinzi-item a {
    font-size: 18px;
    margin-right: 10px;
}

.pinyin {
    color: #666;
    font-size: 14px;
}

.duoyinzi-category, .tongyinzi-tips {
    margin-bottom: 30px;
}

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

.category-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.category-item h4 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

.duoyinzi-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.duoyinzi-tips, .tongyinzi-tips {
    padding: 20px;
    background-color: #f0f7ff;
    border-radius: 4px;
    margin-top: 30px;
}

.tips-content p {
    margin-bottom: 10px;
}

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

/* 同音字页面特有样式 */
.pinyin-table {
    margin-top: 20px;
    margin-bottom: 30px;
}

.pinyin-table table {
    width: 100%;
    border-collapse: collapse;
}

.pinyin-table th {
    background-color: #f0f0f0;
    padding: 10px;
    text-align: center;
}

.pinyin-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #eee;
}

.tongyinzi-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tongyinzi-group {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.tongyinzi-group h4 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

.zi-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.zi-list a {
    display: inline-block;
    padding: 5px 10px;
    background-color: #fff;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
}

.zi-list a:hover {
    background-color: #2c7dfa;
    color: #fff;
}

.tongyinzi-examples {
    margin-top: 30px;
}

.example-list {
    margin-top: 15px;
}

.example-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 15px;
}

.example-item h4 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

.example-note {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

/* 多音字详情页特有样式 */
.duoyinzi-section {
    margin-bottom: 30px;
}

.duoyinzi-reading {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.duoyinzi-reading h3 {
    color: #2c7dfa;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.duoyinzi-examples {
    margin-top: 30px;
}

.related-words, .related-tongyinzi {
    margin-top: 30px;
}

.related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.related-list a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    color: #333;
    transition: all 0.3s;
}

.related-list a:hover {
    background-color: #2c7dfa;
    color: #fff;
}

/* 同音字详情页特有样式 */
.tongyinzi-section {
    margin-bottom: 30px;
}

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

.tongyinzi-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 20px;
}

.zi-card {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.zi {
    font-size: 36px;
    margin-right: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.zi-info {
    color: #666;
    font-size: 14px;
}

.zi-meaning {
    margin-bottom: 15px;
}

.zi-meaning p {
    margin-bottom: 5px;
}

.zi-examples {
    color: #666;
    font-size: 14px;
}

/* 历史记录样式 */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.search-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.search-history, .search-history-widget {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 30px;
}

.search-history h3, .search-history-widget h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.history-list {
    margin-bottom: 15px;
}

.history-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.history-date {
    color: #999;
    font-size: 12px;
}

.btn-clear {
    display: block;
    width: 100%;
    padding: 8px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clear:hover {
    background-color: #e0e0e0;
}

.featured-content {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.featured-content h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.featured-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-item {
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.featured-item h4 {
    color: #2c7dfa;
    margin-bottom: 5px;
}

.featured-item p {
    color: #666;
    font-size: 14px;
}

/* 关于我们页面样式 */
.about-page {
    padding: 30px;
}

.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    color: #2c7dfa;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.timeline {
    margin-top: 30px;
}

.timeline-item {
    display: flex;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 120px;
    top: 0;
    bottom: -30px;
    width: 2px;
    background-color: #eee;
}

.timeline-item:last-child:before {
    display: none;
}

.timeline-date {
    width: 120px;
    font-weight: bold;
    padding-right: 30px;
    position: relative;
}

.timeline-date:after {
    content: '';
    position: absolute;
    right: 10px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2c7dfa;
    z-index: 1;
}

.timeline-content {
    flex: 1;
    padding-left: 30px;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: #333;
}

.team-list {
    list-style: disc;
    padding-left: 20px;
    margin-top: 15px;
}

.team-list li {
    margin-bottom: 10px;
}

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

.feature-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.feature-item h3 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

.contact-info {
    margin-top: 20px;
}

/* 联系我们页面样式 */
.contact-page {
    padding: 30px;
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-info-section h2, .contact-form-section h2, .faq-section h2 {
    color: #2c7dfa;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

.contact-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.contact-item h3 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

.contact-form, .feedback-form {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.form-tip {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.submit-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #2c7dfa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #0056b3;
}

.faq-list {
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.faq-item h3 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

/* 意见反馈页面样式 */
.feedback-page {
    padding: 30px;
}

.feedback-intro {
    margin-bottom: 30px;
}

.feedback-intro p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.feedback-form-section {
    margin-bottom: 40px;
}

.feedback-tips, .feedback-faq {
    margin-bottom: 40px;
}

.feedback-tips h2, .feedback-faq h2 {
    color: #2c7dfa;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

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

.tip-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.tip-item h3 {
    color: #2c7dfa;
    margin-bottom: 10px;
}

.tip-item ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.tip-item ul li {
    margin-bottom: 5px;
}

/* 组词页面样式 */
.zuci-section {
    margin-bottom: 40px;
}

.zuci-tips, .zuci-usage {
    padding: 20px;
    background-color: #f0f7ff;
    border-radius: 4px;
    margin-bottom: 40px;
}

.zuci-tips h3, .zuci-usage h3 {
    color: #2c7dfa;
    margin-bottom: 15px;
}

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

.zuci-example-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.zuci-example-item h4 {
    color: #2c7dfa;
    margin-bottom: 15px;
    font-size: 20px;
}

.zuci-header {
    margin-bottom: 30px;
}

.zuci-title {
    font-size: 36px;
    margin-bottom: 15px;
    color: #333;
}

.zuci-info {
    color: #666;
    margin-bottom: 20px;
}

.zuci-info span {
    display: inline-block;
    margin-right: 15px;
}

.zuci-category {
    margin-bottom: 40px;
}

.zuci-category h3 {
    color: #2c7dfa;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.zuci-word-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.zuci-word-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.zuci-word-item h4 {
    margin-bottom: 10px;
}

.word-pinyin {
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.word-definition {
    color: #333;
    line-height: 1.6;
}

/* 响应式设计补充 */
@media (max-width: 992px) {
    .content-layout, .search-content, .contact-section {
        grid-template-columns: 1fr;
    }
    
    .sidebar, .search-sidebar {
        order: -1;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-item:before {
        left: 10px;
    }
    
    .timeline-date {
        width: 100%;
        padding-left: 30px;
        margin-bottom: 10px;
    }
    
    .timeline-date:after {
        left: 10px;
        right: auto;
    }
    
    .timeline-content {
        padding-left: 30px;
    }
}

@media (max-width: 576px) {
    .tongyinzi-list, .category-list, .tips-list, .zuci-word-list, .zuci-example-list {
        grid-template-columns: 1fr;
    }
    
    .word-title, .zuci-title {
        font-size: 36px;
    }
    
    .zi {
        font-size: 28px;
        width: 50px;
        height: 50px;
    }
    
    .about-page, .contact-page, .feedback-page {
        padding: 15px;
    }
}