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

ruby rt{
    font-size: 0.7rem;
}

/* CSS 变量定义 */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #333333;
    --text-medium: #555555;
    --text-light: #666666;
    --text-muted: #999999;
    --font-size-base: 16px;
    --font-size-h2: 28px;
    --font-size-h3: 1.3rem;
    --font-size-h4: 1.2rem;
    --font-size-h5: 1.1rem;
    --font-size-h6: 1rem;
    --font-size-h7: 0.9rem;
    --font-size-h8: 0.8rem;
    --font-size-h9: 0.7rem;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-5px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 顶部导航栏 */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.site-info {
    display: flex;
    align-items: center;
}

.logo img {
    border-radius: 50%;
    margin-right: 15px;
}

.site-name {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.language-switcher {
    margin-bottom: 10px;
}

.lang-link {
    text-decoration: none;
    color: #666;
    margin-left: 15px;
    font-size: 14px;
}

.lang-link.active {
    color: #007bff;
    font-weight: bold;
}

/* 繁体简体转换按钮样式 */
.zh-switcher {
    display: flex;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    justify-content: flex-end;
}

.zh-btn {
    background-color: white;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.zh-btn:hover {
    background-color: #f0f7ff;
    color: #007bff;
}

/* 后面再补充 */
/* .zh-btn.active {
    background-color: #007bff;
    color: white;
} */

.page-info {
    display: flex;
    font-size: 12px;
    color: #999;
}

.creation-date {
    margin-right: 15px;
}

.navigation {
    padding: 15px 0;
    position: relative;
}

/* 响应式导航按钮 */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1000;
}

.nav-toggle-icon {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #333;
    position: relative;
    transition: all 0.3s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

.nav-toggle-icon::before {
    top: -8px;
}

.nav-toggle-icon::after {
    top: 8px;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list .active {
    color: #007bff;
    font-weight: bold;
}

.nav-item {
    margin-right: 30px;
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-block;
    padding: 5px 0;
}

.nav-link:hover {
    color: #007bff;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 100;
    list-style: none;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    margin: 0;
    padding: 0;
}

.dropdown-link {
    display: block;
    text-decoration: none;
    color: #333;
    padding: 8px 20px;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 400;
}

.dropdown-link:hover {
    background-color: #f5f5f5;
    color: #007bff;
}

/* 主要内容区域 */
.main-content {
    padding: 40px 0;
}

.content-wrapper {
    display: flex;
    gap: 40px;
}

/* 目录 */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.toc {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 120px;
}

.toc h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 10px;
}

.toc-link {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: color 0.3s;
    display: block;
    padding: 5px 0;
}

.toc-link:hover {
    color: #007bff;
    padding-left: 5px;
}

/* 正文 */
.content {
    flex: 1;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content h2 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #2c3e50;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    font-weight: 700;
}

.content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

.content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

/* 搜索区域样式 */
.search-container {
    margin-bottom: 30px;
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-btn {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-weight: 500;
}

.search-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.search-btn:active {
    transform: translateY(0);
}

/* 搜索选项样式 */
.search-options {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
}

.options-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #007bff;
}

.option-item label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s;
}

.option-item:hover label {
    color: #007bff;
}

/* 筛选容器样式 */
.filter-container {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
}

.filter-input-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 10px 16px;
    font-size: 14px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: border-color 0.3s;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    font-size: 14px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

.filter-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filter-btn {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

/* 词汇数量信息 */
.vocab-count {
    font-size: 14px;
    color: #666;
    padding: 15px;
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
}

.vocab-count .count {
    font-weight: 500;
    color: #007bff;
}

.view-all-words {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all-words:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 搜索结果样式 */
.search-results {
    margin-top: 30px;
}

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

/* 卡片式布局样式 */
.result-card {
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-top {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #e6ebf1;
    gap: 15px;
    background-color: #f8f9fa;
}

.card-top-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-row1 {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-vocab {
    font-size: 22px;
    font-weight: bold;
    color: #007bff;
}

.result-pronunciation {
    font-size: 15px;
    color: #666;
    font-style: italic;
}

.top-row2 {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-hanzi {
    font-size: 17px;
    color: #333;
}

.result-speech {
    display: inline-block;
    padding: 3px 10px;
    background-color: #007bff;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
}

.top-row3 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.result-label {
    display: inline-block;
    padding: 3px 10px;
    background-color: #28a745;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.card-top-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
    object-fit: cover;
}

.card-bottom {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bottom-top {
    border-bottom: 1px solid #e6ebf1;
    padding-bottom: 12px;
}

.result-definition {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.bottom-middle-top {
    border-bottom: 1px solid #e6ebf1;
    padding-bottom: 12px;
}

.phrases-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.result-phrase {
    flex: 0 0 auto;
    max-width: calc(50% - 5px);
    min-width: 200px;
    margin-bottom: 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.phrase-romazi {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-bottom: 4px;
}

.phrase-teochew {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
}

.phrase-putonghua {
    font-size: 13px;
    color: #666;
}

.bottom-middle-bottom {
    border-bottom: 1px solid #e6ebf1;
    padding-bottom: 12px;
}

.result-example {
    margin-bottom: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #28a745;
}

.example-romazi {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-bottom: 4px;
}

.example-teochew {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
}

.example-putonghua {
    font-size: 13px;
    color: #666;
}

.bottom-bottom {
    padding-top: 8px;
}

.result-note {
    font-size: 12px;
    color: #888;
    font-style: italic;
}

.result-radical {
    display: inline-block;
    padding: 8px 16px;
    background-color: #28a745;
    color: white;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 发音部分样式 */
.main-pronunciation-section {
    margin: 15px 0;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.main-pronunciation-item {
    flex: 0 0 auto;
    width: calc(33.333% - 8px);
    min-width: 200px;
    margin: 0;
    padding: 10px 12px;
    background-color: white;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.main-pronunciation-item:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.secondary-pronunciation {
    margin: 15px 0;
    padding: 12px;
    background-color: #fafafa;
    border-radius: 6px;
    font-size: 12px;
    color: #777;
    border: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.secondary-pronunciation > * {
    flex: 0 0 auto;
    padding: 6px 10px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.secondary-pronunciation > *:hover {
    background-color: #f8f9fa;
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

/* 定义和翻译区域样式 */
.definitions-section {
    margin: 15px 0;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.definition-item {
    margin: 12px 0;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
}

.definition-label {
    display: inline-block;
    width: 110px;
    font-weight: 600;
    color: #007bff;
    vertical-align: top;
    flex-shrink: 0;
    margin-right: 10px;
}

.definition-text {
    display: inline-block;
    color: #333;
    vertical-align: top;
    flex: 1;
}

.result-definition {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

.result-romazi {
    font-size: 13px;
    color: #999;
    font-style: italic;
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.result-translations {
    font-size: 14px;
    margin-bottom: 10px;
}

.translation-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px;
}

.translation-label {
    min-width: 80px;
    color: #007bff;
    font-weight: 500;
}

.translation-text {
    color: #666;
    flex: 1;
}

/* 例子区域样式 */
.examples-section {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.example-item {
    margin: 15px 0;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    border-left: 2px solid #dee2e6;
}

.example-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    font-weight: 500;
}

.example-teochew {
    font-size: 16px;
    color: #333;
    margin-bottom: 6px;
    font-weight: 500;
}

.example-romazi {
    font-size: 13px;
    color: #999;
    font-style: italic;
    margin-bottom: 8px;
}

.example-translations {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e1e5e9;
}

.example-translations .translation-item {
    margin-bottom: 4px;
}

.example-translation-item {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.5;
}

.example-translation-label {
    display: inline-block;
    width: 100px;
    font-weight: 500;
    color: #28a745;
    vertical-align: top;
}

.example-translation-text {
    display: inline-block;
    color: #333;
    vertical-align: top;
}

.result-example {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 3px solid #007bff;
}

.result-note {
    font-size: 13px;
    color: #888;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e1e5e9;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* 表格样式 */
.content table {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.content th,
.content td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.content th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.content tr:nth-child(even) {
    background-color: #f8f9fa;
}

.content tr:hover {
    background-color: #e9ecef;
}

.content tr:last-child td {
    border-bottom: none;
}

/* 筛选控件样式 */
.filter-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-item label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.filter-item select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    transition: border-color 0.3s;
    min-width: 150px;
}

.filter-item select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.reset-btn {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-weight: 500;
}

.reset-btn:hover {
    background-color: #5a6268;
}

/* 所有词汇页面样式 */
.words-container {
    margin-top: 20px;
    overflow-x: auto;
}

.loading {
    text-align: center;
    color: #666;
    font-size: 16px;
    padding: 20px;
}

.error {
    text-align: center;
    color: #dc3545;
    font-size: 16px;
    padding: 20px;
}

/* 表格通用样式 */
.vocabulary-table,
.hanzi-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
    font-size: 14px;
}

.vocabulary-table th,
.vocabulary-table td,
.hanzi-table th,
.hanzi-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.5;
}

.vocabulary-table th,
.hanzi-table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    vertical-align: middle;
    padding: 15px 10px;
    white-space: nowrap;
}

/* 词汇表（6列）样式 */
.vocabulary-table th:nth-child(1) {
    width: 20%;
    text-align: left;
}

.vocabulary-table th:nth-child(2) {
    width: 15%;
}

.vocabulary-table th:nth-child(3),
.vocabulary-table th:nth-child(4) {
    width: 10%;
}

.vocabulary-table th:nth-child(5),
.vocabulary-table th:nth-child(6) {
    width: 22.5%;
    text-align: left;
}

/* 汉字表（5列）样式 */
.hanzi-table th:nth-child(1) {
    width: 12%;
    text-align: center;
}

.hanzi-table th:nth-child(2) {
    width: 18%;
    text-align: center;
}

.hanzi-table th:nth-child(3) {
    width: 10%;
    text-align: center;
}

.hanzi-table th:nth-child(4) {
    width: 35%;
    text-align: left;
}

.hanzi-table th:nth-child(5) {
    width: 25%;
    text-align: left;
}

/* 汉字表单元格样式 */
.hanzi-table td:nth-child(1) {
    width: 12%;
    text-align: center;
    font-weight: 600;
}

.hanzi-table td:nth-child(2) {
    width: 18%;
    text-align: center;
}

.hanzi-table td:nth-child(3) {
    width: 10%;
    text-align: center;
}

.hanzi-table td:nth-child(4) {
    width: 35%;
    text-align: left;
}

.hanzi-table td:nth-child(5) {
    width: 25%;
    text-align: left;
}

/* 单元格基础样式 */
.vocabulary-table td,
.hanzi-table td {
    color: #333;
    vertical-align: top;
    padding: 12px 15px;
}

/* 词汇表特定列样式 */
.vocabulary-table td:nth-child(1),
.vocabulary-table td:nth-child(5),
.vocabulary-table td:nth-child(6) {
    text-align: left;
}

.vocabulary-table td:nth-child(2),
.vocabulary-table td:nth-child(3),
.vocabulary-table td:nth-child(4) {
    text-align: center;
}

.vocabulary-table td:nth-child(5) {
    font-size: 13px;
    line-height: 1.4;
}

/* 行样式 */
.vocabulary-table tbody tr:nth-child(even),
.hanzi-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.vocabulary-table tbody tr:hover,
.hanzi-table tbody tr:hover {
    background-color: #e9ecef;
}

.vocabulary-table tbody tr:last-child td,
.hanzi-table tbody tr:last-child td {
    border-bottom: none;
}

/* 处理表格内容中的换行 */
.vocabulary-table td br,
.hanzi-table td br {
    margin: 5px 0;
}

/* 分类列的上下间距 */
.vocabulary-table .result-category {
    margin-bottom: 1px;
}

/* 知识页面样式 */
.results-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.result-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

.result-header h3 {
    margin: 0;
    color: #007bff;
    font-size: 1.3rem;
    font-weight: bold;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background-color: white;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    color: #333;
    font-weight: bold;
}

.card-info {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.8;
    flex-grow: 1;
    line-height: 1.5;
}

/* 生物分类页面样式 */
.taxonomy-nav {
    margin: 2rem 0;
    padding: 1rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.taxonomy-nav-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.taxonomy-nav-item {
    margin: 0;
}

.taxonomy-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 20px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.taxonomy-nav-link:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* 分类标题样式 */
.taxonomy-section h3,
.taxonomy-section h4,
.taxonomy-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    font-weight: 600;
}

.taxonomy-section h3 {
    font-size: var(--font-size-h3);
}

.taxonomy-section h4 {
    font-size: var(--font-size-h4);
}

.taxonomy-section h5 {
    font-size: var(--font-size-h5);
}

.taxonomy-section h6 {
    font-size: var(--font-size-h6);
}

.taxonomy-section h7 {
    font-size: var(--font-size-h7);
}

.taxonomy-section h8 {
    font-size: var(--font-size-h8);
}

.taxonomy-section h9 {
    font-size: var(--font-size-h9);
}

/* 分类切换按钮样式 */
.taxonomy-toggle {
    position: relative;
    padding-left: 1rem;
}

.taxonomy-toggle::before {
    content: "▶";
    position: absolute;
    left: 0;
    font-size: 0.7rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.taxonomy-toggle.collapsed::before {
    transform: rotate(-90deg);
}

/* 分类内容样式 */
.taxonomy-content {
    margin-top: 1rem;
    /* padding-left: 1rem; */
    transition: var(--transition);
}

.taxonomy-content.collapsed {
    display: none;
}

.taxonomy-section p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-medium);
}

/* 分类类别样式 */
.taxonomy-category {
    padding: 0.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
    /* margin-bottom: 1.2rem; */
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.taxonomy-category:hover {
    background-color: #f0f7ff;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

/* 分类列表样式 */
.taxonomy-list {
    list-style: disc;
    /* padding-left: 1.8rem; */
    margin: 0 0 1rem 0;
}

.taxonomy-list li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-medium);
}

.taxonomy-tree-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.taxonomy-tree-section h3 {
    color: #007bff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.taxonomy-tree {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.taxonomy-tree ul {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0;
}

.taxonomy-tree li {
    margin: 0.5rem 0;
    position: relative;
}

.taxonomy-tree li::before {
    content: "▶";
    position: absolute;
    left: -1rem;
    font-size: 0.7rem;
    color: #007bff;
}

.taxonomy-tree li ul {
    margin-top: 0.3rem;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.contact-email {
    font-size: 14px;
    margin-bottom: 10px;
    color: #007bff;
}

.update-time {
    font-size: 12px;
    margin-bottom: 10px;
    color: #999;
}

.slogan {
    font-size: 14px;
    color: #ccc;
    font-style: italic;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        padding: 15px;
        z-index: 100;
        flex-direction: column;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-item {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .nav-item:last-child {
        margin-bottom: 0;
    }
    
    /* 下拉菜单在移动端的样式 */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-link {
        padding: 6px 0;
    }
}

@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .toc {
        position: static;
    }
}

@media (max-width: 768px) {
    /* 通用响应式样式 */
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-meta {
        align-items: flex-start;
        margin-top: 15px;
    }
    
    .nav-list {
        flex-wrap: wrap;
    }
    
    .nav-item {
        margin-right: 20px;
        margin-bottom: 10px;
    }
    
    .content {
        padding: 20px;
    }
    
    .content h2 {
        font-size: 24px;
    }
    
    .section h3 {
        font-size: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-meta {
        text-align: left;
        margin-top: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    /* 表格响应式样式 */
    .vocabulary-table,
    .hanzi-table {
        font-size: 13px;
    }
    
    .vocabulary-table th,
    .vocabulary-table td,
    .hanzi-table th,
    .hanzi-table td {
        padding: 8px 10px;
    }
    
    .vocabulary-table th,
    .hanzi-table th {
        font-size: 11px;
    }
    
    /* 卡片响应式样式 */
    .cards-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-icon {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-info {
        font-size: 0.9rem;
    }
    
    /* 生物分类页面响应式样式 */
    .taxonomy-nav-list {
        gap: 0.5rem;
    }
    
    .taxonomy-nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .taxonomy-section {
        /* padding: 1.2rem; */
        margin-bottom: 1rem;
    }
    
    .taxonomy-section.nested {
        /* margin-left: 0.8rem; */
        padding: 0.8rem 0.8rem 0.8rem 0;
    }
    
    .taxonomy-toggle::before {
        left: -0.8rem;
    }
    
    /* .taxonomy-content {
        padding-left: 0.8rem;
    } */
    
    .taxonomy-category {
        padding: 0.8rem;
    }

}

@media (max-width: 480px) {
    /* 通用响应式样式 */
    .site-name {
        font-size: 20px;
    }
    
    .content h2 {
        font-size: 20px;
    }
    
    .section h3 {
        font-size: 18px;
    }
    
    /* 卡片响应式样式 */
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .results-container {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .result-header {
        margin-bottom: 1rem;
    }
    
    .result-header h3 {
        font-size: 1.2rem;
    }
    
    /* 生物分类页面响应式样式 */
    .taxonomy-nav-list {
        flex-direction: column;
    }
    
    .taxonomy-nav-item {
        width: 100%;
    }
    
    .taxonomy-nav-link {
        text-align: center;
    }
    
    .taxonomy-section {
        /* padding: 1rem; */
        margin-bottom: 0.8rem;
    }
    
    .taxonomy-section.nested {
        /* margin-left: 0.5rem; */
        padding: 0.6rem 0.6rem 0.6rem 0;
    }
    
    .taxonomy-toggle::before {
        left: -0.6rem;
    }
    
    /* .taxonomy-content {
        padding-left: 0.6rem;
    } */
    
    .taxonomy-category {
        padding: 0.6rem;
    }
}
