/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8faf9;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航栏 */
.header {
    color: white;
    padding: 10px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 18px;
    font-weight: bold;
}

.logo-link {
    color: white;
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-input {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    width: 200px;
    font-size: 12px;
}

.search-btn {
    padding: 6px 12px;
    background-color: #ff6b35;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.search-btn:hover {
    background-color: #e55a2e;
}

/* 分类标签栏 */
.category-tabs {
    background-color: #f8f6f0;
    padding: 8px 0;
    border-bottom: 1px solid #e0ddd4;
}

.category-tabs .container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tab {
    padding: 5px 12px;
    background-color: #8b7355;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    transition: background-color 0.3s;
}

.tab.active,
.tab:hover {
    background-color: #6d5a42;
}

/* 主要内容区 */
.main-content {
    padding: 20px 0;
}

.main-content .container {
    display: flex;
    gap: 20px;
}

.left-content {
    flex: 1;
    min-width: 0;
}

.right-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* 今日精选 */
.today-selected {
    background-color: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 16px;
    color: #2c5f41;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2c5f41;
}

.selected-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.selected-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.poem-title {
    color: #2c5f41;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.poem-title:hover {
    color: #ff6b35;
}

.author {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.poem-content {
    color: #333;
    font-size: 13px;
    line-height: 1.8;
}

/* 古诗列表 */
.poem-list {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.poem-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.poem-item:last-child {
    border-bottom: none;
}

.poem-meta {
    position: absolute;
    top: 15px;
    right: 15px;
}

.rating {
    display: flex;
    align-items: center;
}

.stars {
    color: #ffd700;
    font-size: 12px;
}

.poem-item .poem-title {
    font-size: 16px;
    margin-bottom: 8px;
    margin-right: 80px;
}

.poem-item .author {
    margin-bottom: 10px;
}

.poem-item .poem-content {
    margin-bottom: 15px;
}

.poem-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.action-item {
    color: #666;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.action-item:hover {
    color: #2c5f41;
}

/* 右侧边栏 */
.sidebar-section {
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-size: 14px;
    color: #2c5f41;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0ddd4;
}

.category-grid,
.author-grid,
.dynasty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-item,
.author-item,
.dynasty-item {
    padding: 6px 8px;
    background-color: #f8f6f0;
    color: #666;
    text-decoration: none;
    text-align: center;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.3s;
}

.category-item:hover,
.author-item:hover,
.dynasty-item:hover {
    background-color: #2c5f41;
    color: white;
}

/* 二维码 */
.qr-code {
    text-align: center;
}

.qr-code img {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
}

.qr-code p {
    font-size: 12px;
    color: #666;
}

/* 底部版权 */
.footer {
    background-color: #2c5f41;
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    font-size: 12px;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 10px;
    }

    .nav {
        order: 3;
        justify-content: center;
        width: 100%;
    }

    .search-box {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .search-input {
        width: 250px;
    }

    .category-tabs .container {
        justify-content: center;
    }

    .main-content .container {
        flex-direction: column;
    }

    .right-sidebar {
        width: 100%;
    }

    .category-grid,
    .author-grid,
    .dynasty-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .poem-item .poem-title {
        margin-right: 60px;
    }

    .poem-meta {
        right: 10px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .nav {
        gap: 10px;
    }

    .nav-link {
        padding: 3px 6px;
        font-size: 12px;
    }

    .category-tabs .container {
        gap: 8px;
    }

    .tab {
        padding: 4px 8px;
        font-size: 11px;
    }

    .category-grid,
    .author-grid,
    .dynasty-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .category-item,
    .author-item,
    .dynasty-item {
        padding: 4px 6px;
        font-size: 11px;
    }

    .today-selected,
    .poem-item,
    .sidebar-section {
        padding: 15px;
    }

    .poem-item .poem-title {
        margin-right: 50px;
        font-size: 15px;
    }

    .poem-actions {
        gap: 10px;
    }

    .search-input {
        width: 200px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 360px) {
    .search-input {
        width: 180px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-tabs .container {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ==================== 字典模块公共样式 ==================== */

/* ===== 设计系统变量 ===== */
:root {
    --primary-color: #2c5f41;
    --primary-light: #3d7a54;
    --primary-lighter: #e8f5e9;
    --bg-color: #f8faf9;
    --card-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e8ebe9;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* ===== 新顶部导航栏样式 ===== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4530 100%);
    padding: 18px 0 0 0;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

/* 左侧Logo */
.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3d7a54 0%, #2c5f41 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
    box-shadow: 0 2px 4px rgba(44, 95, 65, 0.3);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.header-left {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
}

.logo-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 8px;
}

/* 搜索框（导航下方） */
.header-search-bar {
    display: none;
    background-color: rgba(0,0,0,0.12);
    padding: var(--spacing-md) 0;
    position: relative;
    z-index: 100;
}

.header-search-bar.active {
    display: block;
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-search-bar .search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box-new {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: var(--radius-md);
    height: 44px;
    position: relative;
}

.search-box-new .search-input-new {
    border-radius: 0;
}

.search-box-new .search-btn-new {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.search-select {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    border-right: 1px solid #e0e0e0;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    user-select: none;
    z-index: 100;
    height: 100%;
}

.select-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s ease;
}

.search-select.active .select-arrow {
    transform: rotate(180deg);
}

/* 搜索框下拉菜单样式 */
.search-dropdown,
.select-dropdown {
    position: absolute;
    top: 48px;
    left: 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border: 1px solid #d0d0d0;
    min-width: 140px;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-dropdown::before,
.select-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
    z-index: 9999;
}

.search-dropdown-item,
.select-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.search-dropdown-item:last-child,
.select-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover,
.select-dropdown-item:hover,
.search-dropdown-item.active,
.select-dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #d4edda 100%);
    color: var(--primary-color);
    padding-left: 24px;
}

.search-dropdown-item.active,
.select-dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    font-weight: 600;
}

.select-arrow {
    font-size: 10px;
    color: #999;
}

.search-input-new {
    flex: 1;
    border: none;
    padding: 0 15px;
    font-size: 14px;
    outline: none;
}

.search-btn-new {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 0 24px;
    height: 100%;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn-new:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.search-btn-new:active {
    transform: translateY(0);
}

.search-btn-new:hover {
    background-color: #45a049;
}

.search-tips {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* 搜索历史记录样式 */
.search-history {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #2c5f41;
    border-radius: 8px;
    padding: 12px 15px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8f5e9;
}

.search-history-title {
    font-size: 14px;
    color: #2c5f41;
    font-weight: 600;
}

.search-history-clear {
    font-size: 13px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.search-history-clear:hover {
    color: #e74c3c;
}

.clear-icon {
    font-size: 14px;
}

.search-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 6px 12px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    font-size: 14px;
    color: #2c5f41;
    cursor: pointer;
    transition: all 0.2s;
}

.history-tag:hover {
    background: #2c5f41;
    border-color: #2c5f41;
    color: #fff;
}

.search-history-empty {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    margin-top: 8px;
    background: #f8faf9;
}

.tips-icon {
    width: 14px;
    height: 14px;
    background-color: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

/* 右侧导航 */
.header-right {
    flex-shrink: 0;
}

.nav-new {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255,255,255,0.18);
    color: white;
    transform: translateY(-1px);
}

.nav-search-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0 4px;
    padding: 0;
}

.nav-search-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.nav-search-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.nav-menu-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0 4px;
    padding: 0;
}

.nav-menu-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

.nav-more {
    background-color: rgba(255,255,255,0.1);
}

/* 更多导航下拉菜单 */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0;
    min-width: 220px;
    z-index: 1000;
    flex-direction: column;
    border: 1px solid var(--border-color);
    animation: dropdownSlide 0.2s ease-out;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.nav-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.nav-dropdown-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.nav-dropdown-close {
    width: 24px;
    height: 24px;
    border: none;
    background-color: transparent;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-dropdown-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.nav-dropdown-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
}

.nav-dropdown.active {
    display: flex;
}

.nav-dropdown-item {
    display: inline-block;
    padding: 8px 14px;
    background-color: var(--primary-lighter);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(44, 95, 65, 0.25);
}

.header-right {
    position: relative;
}

/* 手机端菜单 */
.mobile-menu {
    display: none;
    background-color: rgba(0,0,0,0.1);
    padding: 15px;
}

.mobile-menu.active {
    display: block;
}

.mobile-search {
    margin-bottom: 15px;
}

.mobile-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-nav-item {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 14px;
}

/* 面包屑导航 */
.breadcrumb-nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb-item {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* 底部版权 */
.footer {
    background: linear-gradient(135deg, #1e4530 0%, var(--primary-color) 100%);
    color: rgba(255,255,255,0.9);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

/* 右侧边栏公共样式 */
.sidebar-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.title-icon {
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 2px;
}

.sidebar-subtitle {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-subtitle a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 同音字列表 */
.tongyin-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tongyin-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tongyin-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-lighter);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tongyin-item.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-lighter);
    font-weight: 600;
}

/* 热门诗文列表 */
.hot-poem-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-poem-item {
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.hot-poem-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hot-poem-link {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.hot-poem-link:hover {
    color: var(--primary-color);
}

.poem-dynasty-info {
    font-size: 12px;
    color: var(--text-muted);
}

/* 推荐古诗文 */
.recommend-poem-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recommend-poem-item {
    padding: 10px 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
    transition: all 0.2s;
}

.recommend-poem-item:hover {
    background: var(--primary-lighter);
    transform: translateX(4px);
}

.recommend-poem-link {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.recommend-poem-link:hover {
    color: var(--primary-color);
}

/* ===== 字典页面布局样式 ===== */
.zi-index-main {
    display: flex;
    gap: 24px;
    padding: 24px 0;
}

.zi-index-left {
    flex: 1;
    min-height: 600px;
}

.zi-index-right {
    width: 300px;
    flex-shrink: 0;
}

/* 左侧内容区域 */
.zi-index-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    min-height: 500px;
}

/* ===== 汉字大全模块 ===== */
.hanzi-all-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.hanzi-all-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: linear-gradient(135deg, #faf8f0 0%, #f5f0e0 100%);
    border: 1px solid #e8e0d0;
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 40px;
}

.hanzi-all-item:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3d7a54 100%);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 95, 65, 0.25);
}

/* ===== 笔画查字模块 ===== */
.bihua-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.bihua-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 36px;
}

.bihua-item:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 95, 65, 0.25);
}

.bihua-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3d7a54 100%);
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    cursor: pointer;
    border: none;
}

.bihua-more:hover {
    background: linear-gradient(135deg, #3d7a54 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 95, 65, 0.35);
}

.bihua-more .arrow-icon {
    font-size: 10px;
    margin-left: 4px;
}

.bihua-grid-more {
    margin-top: 8px;
}

/* ===== 拼音查字模块 ===== */
.pinyin-search-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.pinyin-search-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 36px;
}

.pinyin-search-item:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 95, 65, 0.25);
}

/* 手机端适配 */
@media (max-width: 768px) {
    .pinyin-search-grid {
        gap: 6px;
    }

    .pinyin-search-item {
        font-size: 12px;
        padding: 6px 2px;
        min-height: 32px;
    }
}
@media (max-width: 768px) {
    .header .container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }

    .header-left {
        flex: 1;
        flex-shrink: 1;
        min-width: 0;
        overflow: hidden;
    }

    .header-right {
        flex-shrink: 0;
        display: flex !important;
        align-items: center;
        margin-left: 10px;
    }

    .header-right .nav-new {
        display: flex !important;
        align-items: center;
        gap: 5px;
    }

    /* 隐藏PC端导航链接 */
    .header-right .nav-new .nav-item {
        display: none !important;
    }

    /* 手机端显示nav-search-btn和nav-menu-btn */
    .header-right .nav-new .nav-search-btn,
    .header-right .nav-new .nav-menu-btn {
        display: flex !important;
        flex-shrink: 0;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* 汉字大全和笔画查字响应式 */
    .hanzi-all-grid {
        gap: 8px;
    }

    .hanzi-all-item {
        font-size: 12px;
        padding: 8px 6px;
        min-height: 36px;
    }

    .bihua-grid {
        gap: 6px;
    }

    .bihua-item {
        font-size: 12px;
        padding: 6px 2px;
        min-height: 32px;
    }

    /* 字典页面布局移动端适配 */
    .zi-index-main {
        flex-direction: column;
    }

    .zi-index-right {
        width: 100%;
    }
}

/* ===== 分页组件公共样式 ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e8e8e8);
}

.page-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 4px;
    background: #fff;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-item:hover {
    border-color: var(--primary-color, #2c5f41);
    color: var(--primary-color, #2c5f41);
}

.page-item.active {
    background: var(--primary-color, #2c5f41);
    border-color: var(--primary-color, #2c5f41);
    color: #fff;
}

.page-ellipsis {
    color: #999;
    font-size: 14px;
}

.page-next {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--border-color, #e8e8e8);
    border-radius: 4px;
    background: #fff;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-next:hover {
    border-color: var(--primary-color, #2c5f41);
    color: var(--primary-color, #2c5f41);
}

/* 分页组件移动端适配 */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 20px;
        padding-top: 15px;
    }

    .page-item {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }

    .page-next {
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
    }
}

