﻿/* ========================================
   CSS变量定义 - 设计系统
   ======================================== */
:root {
    /* 颜色系统 */
    --primary-color: #4e8cbb;
    --primary-dark: #3a7cb2;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f5f5;
    --border-color: #e6d8b6;
    --hover-color: #b89b5b;
    --section-bg: #f9f6ec;
    --card-shadow: 0 2px 12px rgba(180,160,100,0.10);
    --orange-color: #ff6b35;
    --orange-light: #ff8c69;
}

/* ========================================
   基础布局样式
   ======================================== */
.g-bd {
    background-color: var(--bg-color);
}

.cidian-layout {
    display: flex;
    gap: 5px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Courier New', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

.cidian-main {
    flex: 1;
    min-width: 0;
}

.cidian-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* ========================================
   页面头部区域
   ======================================== */
.page-header {
    background: var(--section-bg);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 5px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 24px;
    color: var(--orange-color);
    margin: 0;
    font-weight: bold;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.result-summary {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
    margin: 0;
}

.result-count {
    font-size: 16px;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
}

.result-count strong {
    color: var(--orange-color);
    font-weight: 600;
}

.filter-links {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.back-link {
    color: var(--orange-color);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--orange-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: var(--orange-color);
    color: white;
}

/* ========================================
   页面简介区域
   ======================================== */
.page-intro {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 5px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.page-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--orange-color));
    border-radius: 0 2px 2px 0;
}

.page-intro p {
    margin: 0;
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-align: justify;
    padding-left: 15px;
}

.page-intro p strong {
    color: var(--primary-color);
    font-weight: 600;
}

.page-intro p a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.page-intro p a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

/* ========================================
   搜索结果区域
   ======================================== */

/* 词语分组样式 */
.word-group-section {
    background: var(--section-bg);
    border-radius: 12px;
    margin-bottom: 5px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.word-group-header {
    padding-left: 10px;
    padding-bottom: 5px;
    padding-top: 5px;
    border-bottom: 2px solid var(--orange-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.word-group-header h2 {
    font-size: 20px;
    color: var(--orange-color);
    margin: 0;
    font-weight: bold;
    letter-spacing: 1px;
}

.group-count {
    font-size: 14px;
    color: var(--text-light);
    background: rgba(255, 107, 53, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--orange-light);
}

/* 词语网格布局 */
.words-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
}

.word-result-item {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 6px;
    padding: 15px 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 70px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.word-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.word-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 0;
    text-align: center;
    line-height: 1.2;
}

.word-result-item:hover .word-text {
    color: var(--primary-color);
    font-weight: bold;
}

.word-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
    font-size: 11px;
    color: var(--text-light);
}

.word-pinyin {
    color: #888;
    font-weight: normal;
    font-size: 12px;
    margin-bottom: 0;
}

.word-result-item:hover .word-pinyin {
    color: #666;
}

.word-type {
    color: #999;
    font-size: 10px;
    font-weight: normal;
    margin-top: 2px;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 40px 0;
}

.no-results-content h3 {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 24px;
}

.no-results-content p {
    color: #95a5a6;
    font-size: 16px;
    line-height: 1.6;
}

.no-results-content a {
    color: #3498db;
    text-decoration: none;
}

.no-results-content a:hover {
    text-decoration: underline;
}

/* ========================================
   分页导航
   ======================================== */
.pagination-container {
    margin: 40px 0;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 8px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .current {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* ========================================
   相关推荐区域
   ======================================== */
.related-section {
    background: var(--section-bg);
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.related-section .section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--orange-color);
}

.related-section .section-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--orange-color);
    font-weight: bold;
    letter-spacing: 1px;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-link {
    display: inline-block;
    padding: 6px 12px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(180,160,100,0.08);
}

.related-link:hover {
    background: var(--orange-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(180,160,100,0.2);
}

/* ========================================
   右侧边栏样式
   ======================================== */
.cidian-sidebar section {
    background: var(--section-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--orange-color);
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--orange-color);
    font-weight: bold;
    letter-spacing: 1px;
}

/* 词性分类网格 */
.word-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 8px;
}

.word-type-item {
    display: block;
    padding: 8px 6px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(180,160,100,0.08);
}

.word-type-item:hover {
    background: var(--orange-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(180,160,100,0.2);
}

/* 词式分类网格 */
.word-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 8px;
}

.word-style-item {
    display: block;
    padding: 8px 6px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(180,160,100,0.08);
}

.word-style-item:hover {
    background: var(--orange-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(180,160,100,0.2);
}

/* 字母导航网格 */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.alphabet-item {
    display: block;
    padding: 10px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(180,160,100,0.08);
}

.alphabet-item:hover {
    background: var(--orange-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(180,160,100,0.2);
}


/* 响应式设计 - 平板设备 (768px以下) */
@media (max-width: 768px) {
    /* 基础布局调整 */

    .container {
        padding: 0;
        margin: 0;
        max-width: none;
    }
    
    .cidian-layout {
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-width: none;
        margin: 0;
    }
    
    .cidian-sidebar {
        width: 100%;
        order: 1;
    }
    
    .cidian-main {
        order: 0;
    }
    
    /* 页面头部区域调整 */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .result-summary {
        justify-content: flex-start;
        gap: 15px;
        width: 100%;
    }
    
    /* 页面简介区域调整 */
    .page-intro p {
        font-size: 14px;
        line-height: 1.6;
        padding-left: 12px;
        text-align: left;
    }
    
    /* 搜索结果区域调整 */
    .search-results-container {
        padding: 0;
    }
    

    
    /* 分页区域调整 */
    .pagination-container {
        padding: 15px;
    }
    
    /* 侧边栏区域调整 */

    
    .cidian-sidebar .section-header {
        margin-bottom: 5px;
    }
    
    .cidian-sidebar section {
        margin-bottom: 5px;
    }
    
    /* 侧边栏网格调整 */
    .word-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .word-style-grid {
        grid-template-columns: 1fr;
    }
    
    .alphabet-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   响应式设计 - 手机设备 (480px以下)
   ======================================== */
@media (max-width: 480px) {
    /* 基础布局调整 */
    .g-bd {
        padding: 0;
    }
    
    .container {
        padding: 0;
        margin: 0;
        max-width: none;
    }
    
    .cidian-layout {
        padding-left: 0;
        padding-right: 0;
        gap: 0;
        max-width: none;
        margin: 5px 0 0 0;
    }
    
    .cidian-main {
        order: 0;
    }
    
    .cidian-sidebar {
        width: 100%;
        order: 1;
    }
    
    /* 页面头部区域调整 */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 15px;
        margin: 0 0 5px 0;
        background:#fff;
    }
    
    .page-header h1 {
        font-size: 18px;
    }
    
    /* 页面简介区域调整 */
    .page-intro {
        padding: 12px 15px;
        border-radius: 0;
        background: #fff;
    }
    
    .page-intro::before {
        width: 3px;
    }
    
    .page-intro p {
        font-size: 13px;
        line-height: 1.5;
        padding-left: 10px;
    }
    
    /* 搜索结果区域调整 */
    .search-results-container {
        padding: 0;
    }
    
    .words-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }
    
    /* 分页区域调整 */
    .pagination-container {
        padding: 10px;
    }
    
    /* 侧边栏区域调整 */
    .cidian-sidebar {
        padding: 10px;
    }
    
    /* 侧边栏网格调整 */
    .word-type-grid,
    .alphabet-grid {
        grid-template-columns: repeat(3, 1fr);
    }
} 