/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}
a {
    color: #0055aa;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
ul {
    padding-left: 1.2rem;
}
ol {
    padding-left: 1.8rem;
    margin-left: 0;
}
ol li {
    margin-left: 0;
    padding-left: 0.4rem;
    list-style-position: outside;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* ===== 顶部（桌面端居中，移动端左对齐并粘性固定） ===== */
#top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0 10px;
    border-bottom: 2px solid #e0e0e0;
    background: #fff;
    z-index: 999;
    position: relative;
    gap: 12px;
}
#top .brand {
    text-align: center;
}
#top h1 {
    font-size: 2.2rem;
    color: #cc0000;
    margin: 0;
    font-weight: 900;
    letter-spacing: 1px;
}
#top .subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-top: 2px;
}
/* 移动端汉堡按钮（桌面端隐藏） */
#top .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2.2rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    color: #333;
    border-radius: 4px;
}
#top .menu-toggle:hover {
    background: #f0f0f0;
}

/* ===== 主内容区 ===== */
#box {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px 0;
}

#boxcontent {
    flex: 1 1 0;
    min-width: 0;
    order: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ===== 顶部内容区 (搜索 + 标题) ===== */
#boxconttop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
    gap: 10px;
}
#search {
    flex: 1 1 auto;
    min-width: 160px;
}
#boxconttop h2 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #cc0000;
    margin: 0;
    flex: 1 1 auto;
    text-align: left;
}

/* .highlight 样式 - 用于标题中的名字显示，使用黑色以区别于红色标题 */
#boxconttop h2 .highlight {
    color: #333;
}

/* ===== 问候语区块 ===== */
#default {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 10px 0 14px;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
}
#defaultl {
    flex: 1 1 100%;
    font-size: 0.95rem;
}

/* ===== 音频播放样式 ===== */
.phrase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dotted #f0f0f0;
    gap: 10px;
}
.phrase-item span {
    flex: 1;
}
.phrase-item .highlight {
    color: #cc0000;
    font-weight: bold;
}
.play-btn {
    background: #007AFF;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.play-btn:hover {
    background: #0055aa;
}
.play-btn.playing {
    background: #ff9500;
}
.play-btn:active {
    transform: scale(0.92);
}

/* ===== 美食菜单 拼音+汉字 布局 ===== */
.py {
    display: inline-block;
    text-align: center;
    line-height: 1.3;
    margin-right: 4px;
    min-width: 1.4em;
    vertical-align: middle;
}

/* ===== 美食菜单 列表（响应式 flex：无项目符号、不溢出、自适应换列） ===== */
#boxcontent ul:has(.ll) {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}
.ll {
    list-style: none;
    padding-left: 2px;
    margin: 0;
    width: 200px;
    max-width: 100%;
    line-height: 1.6;
    box-sizing: border-box;
}
#link {
    padding: 0;
    margin-top: 3px;
    margin-bottom: 3px;
}

/* ===== 内容标题 ===== */
#boxcontent h3 {
    font-size: 1.3rem;
    margin: 24px 0 10px;
    padding-bottom: 4px;
    border-bottom: 2px solid #cc0000;
}
#boxcontent h3 a {
    color: #222;
}
#boxcontent p {
    margin: 8px 0 12px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* ===== 句子模式列表（两列布局） ===== */
#boxcontent ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#boxcontent ul li.blog {
    float: left;
    width: 48%;
    min-width: 350px;
    margin-right: 2%;
    margin-bottom: 20px;
    line-height: 1.6;
}
#boxcontent ul li.blog a {
    display: block;
    padding: 2px 0;
}

/* ===== 课程列表 ===== */
.lesson-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 20px;
    padding: 6px 0 12px;
    list-style: none;
}
.lesson-list li::before {
    content: "• ";
    color: #cc0000;
    font-weight: bold;
}
.lesson-list a {
    display: inline-block;
    padding: 2px 0;
}

/* ===== 课程句子列表 ===== */
.lesson-content {
    padding: 10px 0;
}

.sentence-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.sentence-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    gap: 12px;
}

.sentence-number {
    flex: 0 0 30px;
    color: #999;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.sentence-english {
    flex: 0 0 200px;
    min-width: 150px;
    font-size: 0.95rem;
    color: #333;
}

.sentence-chinese {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sentence-chinese .audio-text {
    font-size: 1.1rem;
    white-space: nowrap;
}

.doyouknow {
    background: #fff8e8;
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid #ff9500;
    margin: 20px 0;
}

.doyouknow h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #cc0000;
}

.doyouknow p {
    margin: 0;
    line-height: 1.8;
}

.lesson-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin: 20px 0;
    border-top: 2px solid #e8e8e8;
    border-bottom: 2px solid #e8e8e8;
}

.lesson-prev, .lesson-next {
    flex: 1;
}

.lesson-next {
    text-align: right;
}

.lesson-nav strong {
    color: #cc0000;
}

.lesson-nav a {
    color: #0055aa;
    font-weight: bold;
}

.lesson-nav a:hover {
    text-decoration: underline;
}

/* 移动端适配 */
@media screen and (max-width: 640px) {
    .sentence-item {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }

    .sentence-number {
        flex: 0 0 25px;
        font-size: 0.85rem;
    }

    .sentence-english {
        flex: 1 1 100%;
        min-width: unset;
        font-size: 0.85rem;
    }

    .sentence-chinese {
        flex: 1 1 100%;
    }

    .sentence-chinese .audio-text {
        font-size: 1rem;
    }

    .lesson-nav {
        flex-direction: column;
        gap: 12px;
    }

    .lesson-prev, .lesson-next {
        text-align: center;
    }
}

/* ===== 相关资源 ===== */
.related-resource {
    padding: 10px 0 6px;
    font-size: 0.95rem;
}
.related-resource a {
    display: inline-block;
    margin: 2px 4px 2px 0;
}

/* ===== 更多文章 ===== */
#ad1 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    padding: 16px 0 8px;
    border-top: 1px solid #eee;
    margin-top: 16px;
}
#ad2 {
    flex: 1 1 300px;
    min-width: 200px;
}
#ad2 b {
    font-size: 1.05rem;
    display: block;
    margin-bottom: 6px;
}
#ad2 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#ad2 ul li {
    padding: 3px 0 3px 16px;
    position: relative;
    border-bottom: 1px dotted #f0f0f0;
}
#ad2 ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #cc0000;
    font-weight: bold;
}
#ad2 ul li a {
    font-size: 0.92rem;
}

/* ===== 侧边菜单（桌面端正常显示） ===== */
#boxmenul {
    flex: 0 0 240px;
    min-width: 180px;
    order: 2;
    background: #f8f8f8;
    border-radius: 6px;
    padding: 10px 12px 16px;
    border: 1px solid #e8e8e8;
    align-self: flex-start;
}
#boxmenutitle {
    font-size: 1.05rem;
    font-weight: bold;
    padding: 8px 0 4px;
    border-bottom: 2px solid #cc0000;
    margin-top: 12px;
}
#boxmenutitle:first-of-type {
    margin-top: 0;
}
#boxmenutitle a {
    color: #222;
}
#boxmenul ul {
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
}
#boxmenul ul li {
    padding: 3px 0 3px 10px;
    border-bottom: 1px dotted #eee;
    font-size: 0.9rem;
}
#boxmenul ul li a {
    display: block;
    color: #333;
}
#boxmenul ul li a:hover {
    color: #cc0000;
}
/* 移动端菜单面板内隐藏自带的按钮 */
#boxmenul .menu-toggle {
    display: none;
}

/* ===== 底部 ===== */
#folder {
    padding: 14px 0 10px;
    border-top: 2px solid #ddd;
    margin-top: 4px;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

/* ===== 移动端菜单遮罩层 ===== */
#menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}
body.menu-open #menu-overlay {
    display: block;
}

/* ===== 响应式 ===== */
@media screen and (max-width: 992px) {
    #box {
        flex-direction: column;
    }
    #boxmenul {
        flex: 1 1 auto;
        width: 100%;
        order: 3;
        margin-top: 12px;
    }
    #boxcontent {
        order: 1;
    }
    #boxconttop h2 {
        font-size: 1rem;
        text-align: left;
        width: 100%;
    }
    #search {
        width: 100%;
    }
}

/* 移动端（≤640px） */
@media screen and (max-width: 640px) {
    .container {
        padding: 0;
    }

    /* ---- 顶部粘性栏 ---- */
    #top {
        justify-content: flex-start;
        position: sticky;
        top: 0;
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
        z-index: 999;
        gap: 6px;
    }
    #top .menu-toggle {
        display: block;
        font-size: 2rem;
        padding: 4px 6px 4px 0;
    }
    #top .brand {
        text-align: left;
        flex: 1;
    }
    #top h1 {
        font-size: 1.3rem;
    }
    #top .subtitle {
        font-size: 0.7rem;
        margin-top: 0;
    }

    /* ---- 隐藏桌面侧边栏，改用滑出面板 ---- */
    #boxmenul {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 1001;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 70px 16px 30px;
        border-radius: 0;
        border: none;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
        flex: none;
        min-width: unset;
        order: unset;
        margin-top: 0;
        align-self: auto;
    }
    body.menu-open #boxmenul {
        transform: translateX(0);
    }
    /* 面板内标题和列表样式微调 */
    #boxmenul #boxmenutitle {
        font-size: 1rem;
        margin-top: 10px;
    }
    #boxmenul ul li {
        font-size: 0.88rem;
        padding: 5px 0 5px 10px;
    }
	#boxmenul ul {
	    display: none;  /* 默认折叠 */
	}
	#boxmenul ul.open {
	    display: block; /* 展开状态 */
	}

    /* ---- 其他移动端调整 ---- */
    #box {
        padding: 12px 12px 20px;
        gap: 16px;
    }
    #boxconttop {
        flex-direction: column;
        align-items: stretch;
    }
    #boxconttop h2 {
        text-align: center;
        font-size: 0.95rem;
    }
    #default {
        flex-direction: column;
    }
    #boxcontent h3 {
        font-size: 1.1rem;
    }
    #ad1 {
        flex-direction: column;
    }
    .lesson-list {
        grid-template-columns: 1fr !important;
    }

    /* 移动端句子模式单列布局 */
    #boxcontent ul li.blog {
        float: none;
        width: 100%;
        margin-right: 0;
    }

    /* 隐藏桌面端菜单切换按钮（面板内部） */
    #boxmenul .menu-toggle {
        display: none;
    }

    /* 搜索框占位 */
    #search input {
        width: 100% !important;
    }

    /* 移动端音频按钮尺寸调整 */
    .phrase-item {
        padding: 8px 0;
        gap: 8px;
    }
    .play-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ===== 辅助 ===== */
.text-center {
    text-align: center;
}
.flash-fallback {
    background: #f9f9f9;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #cc0000;
    margin: 8px 0;
}
.flash-fallback strong {
    color: #cc0000;
}

/* ===== 可点击的音频文本 ===== */
.audio-text {
    cursor: pointer;
    transition: opacity 0.2s;
    display: inline-block;
    margin: 0 0.15em;
    padding: 0.1em 0.2em;
    white-space: nowrap;
}
.audio-text:hover {
    opacity: 0.7;
    text-decoration: underline;
}
.audio-text.playing {
    opacity: 0.5;
}

/* 确保包含音频文本的段落可以正常换行 */
#boxcontent p:has(.audio-text) {
    white-space: normal;
    word-break: normal;
}

/* ===== 面包屑导航 ===== */
#breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 !important;
    width: 100%;
}
#breadcrumb-nav a {
    flex-shrink: 0;
    margin-right: 0.25em;
}
#breadcrumb-nav span {
    flex-shrink: 0;
    color: #333;
    margin-left: 0.25em;
    margin-right: 0.25em;
}
#breadcrumb-nav h2 {
    display: inline;
    font-size: 1.2rem;
    margin: 0;
    color: #cc0000;
    font-weight: bold;
    /* 桌面端：紧跟 >> 后面，不换行 */
    flex: 0 1 auto;
    white-space: normal;
}
.breadcrumb-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 0px;
    width: 100%;
}

.breadcrumb-wrapper a {
    flex-shrink: 0;
    margin-right: 4px;
}

.breadcrumb-wrapper span {
    flex-shrink: 0;
    color: #333;
    margin-right: 0;
}

.breadcrumb-wrapper h2 {
    display: inline;
    font-size: 1.2rem;
    margin: 0;
    color: #cc0000;
    font-weight: bold;
    /* 桌面端：紧跟 >> 后面，不换行 */
    flex: 0 1 auto;
	white-space: normal;
}

/* 移动端（≤640px）：标题另起一行 */
@media screen and (max-width: 640px) {
    .breadcrumb-wrapper h2 {
        flex: 1 1 100%;
        white-space: normal;
        font-size: 1rem;
        margin-top: 2px;
    }
}

/* ===== 拼音示例垂直布局 ===== */
.example-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin: 12px 0;
}
.example-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 60px;
}
.example-item .audio-text {
    margin: 0;
    padding: 0.2em 0.4em;
}
.example-item .cn-text {
    color: #333;
    font-size: 0.95rem;
    margin-top: 4px;
}
.example-note {
    font-style: italic;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

/* ===== Neutral Tone Examples (拼音在上、汉字在下) ===== */
.neutral-tone-example {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.pinyin-hanzi-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 8px;
}

.word-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.pinyin-item {
    color: #333;
    font-size: 1rem;
    text-align: center;
    font-weight: normal;
}

.pinyin-item.highlight {
    color: #cc0000;
    font-weight: bold;
}

.hanzi-item {
    color: #333;
    font-size: 1.1rem;
    text-align: center;
}

.hanzi-item.highlight {
    color: #cc0000;
    font-weight: bold;
}

.pinyin-hanzi-grid > .hanzi-item {
    font-size: 1.1rem;
    margin-left: -4px;
}

.play-btn {
    background: #0055aa;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    background: #004488;
    transform: scale(1.1);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn.playing {
    background: #cc0000;
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.7);
    }
    to {
        box-shadow: 0 0 0 8px rgba(204, 0, 0, 0);
    }
}

.english-translation {
    color: #666;
    font-style: italic;
    margin: 8px 0 0 0;
    padding-left: 0;
}

/* ===== 名字表格样式 ===== */
.names-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}

.names-table thead {
    background: #f0f0f0;
}

.names-table th {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #bbbddd;
    font-weight: bold;
    color: #333;
}

.names-table td {
    padding: 8px;
    border: 1px solid #bbbddd;
    text-align: center;
}

.names-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.names-table tbody tr:hover {
    background: #f0f8ff;
}

.names-table .chinese {
    font-size: 1.3rem;
    font-weight: bold;
    color: #cc0000;
}

.names-table .pinyin {
    font-size: 1.1rem;
    color: #333;
}

.names-table .sound {
    width: 60px;
}

.audio-btn {
    background: #007AFF;
    border: none;
    color: #fff;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.audio-btn:hover {
    background: #0055aa;
    transform: scale(1.1);
}

.audio-btn:active {
    transform: scale(0.95);
}

.note {
    padding: 12px 16px;
    background: #fff8e8;
    border-left: 4px solid #ff9500;
    border-radius: 4px;
    margin: 16px 0;
}

.note code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

/* 移动端表格适配 */
@media screen and (max-width: 640px) {
    .names-table {
        font-size: 0.85rem;
    }

    .names-table th,
    .names-table td {
        padding: 6px 4px;
    }

    .names-table .chinese {
        font-size: 1.1rem;
    }

    .names-table .pinyin {
        font-size: 0.95rem;
    }

    .audio-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* ===== 姓氏表格样式 (百家姓) ===== */
.surnames-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}

.surnames-table thead th {
    padding: 12px 8px;
    text-align: center;
    background: #cc0000;
    color: #fff;
    font-weight: bold;
    border: 1px solid #cc0000;
}

.surnames-table td {
    padding: 8px 6px;
    text-align: center;
    border: 1px solid #ddd;
    min-width: 35px;
}

.surnames-table .pinyin-row td {
    background: #f5f5f5;
    color: #666;
    font-size: 0.9rem;
}

.surnames-table .hanzi-row td {
    background: #fff;
    color: #333;
    font-size: 1.4rem;
    font-weight: bold;
    border-bottom: 2px solid #ccc;
}

.surnames-table .hanzi-row td:hover {
    background: #fff0f0;
    cursor: pointer;
}

/* ===== 复姓表格样式 ===== */
.compound-surnames-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

.compound-surnames-table thead th {
    padding: 10px 8px;
    text-align: center;
    background: #f0f0f0;
    border: 1px solid #bbbddd;
    font-weight: normal;
    color: #666;
}

.compound-surnames-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #bbbddd;
}

.compound-surnames-table .compound-surname {
    color: #cc0000;
    font-size: 1.2rem;
    font-weight: bold;
}

.compound-surnames-table tbody tr:hover td {
    background: #f9f9f9;
}

/* 姓氏页面标题 */
#boxcontent h3 {
    margin: 24px 0 12px;
    font-size: 1.2rem;
    color: #cc0000;
}

/* 移动端姓氏表格适配 */
@media screen and (max-width: 640px) {
    .surnames-table {
        font-size: 0.75rem;
    }

    .surnames-table td {
        padding: 5px 2px;
        min-width: 25px;
    }

    .surnames-table .hanzi-row td {
        font-size: 1.1rem;
    }

    .compound-surnames-table {
        font-size: 0.75rem;
    }

    .compound-surnames-table td {
        padding: 6px 4px;
    }

    .compound-surnames-table .compound-surname {
        font-size: 1rem;
    }
}

/* ===== 新版汉字页面样式 ===== */
/* 汉字页面特殊容器 */
.hanzi-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f5f5;
}

/* 汉字页面 - 头部渐变 */
.hanzi-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hanzi-page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: white;
    text-align: center;
}

/* 汉字页面 - 面包屑 */
.hanzi-breadcrumb {
    padding: 15px 0;
    color: #666;
    font-size: 0.9rem;
}

.hanzi-breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.hanzi-breadcrumb a:hover {
    color: #764ba2;
}

/* 汉字页面 - 主布局 */
.hanzi-main-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* 汉字页面 - 侧边栏 */
.hanzi-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}

.hanzi-menu-section {
    margin-bottom: 25px;
}

.hanzi-menu-section:last-child {
    margin-bottom: 0;
}

.hanzi-menu-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hanzi-menu-title a {
    color: inherit;
    text-decoration: none;
}

.hanzi-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hanzi-menu-list li {
    margin-bottom: 8px;
}

.hanzi-menu-list a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.hanzi-menu-list a:hover {
    background: #f0f0ff;
    color: #667eea;
    padding-left: 15px;
}

/* 汉字页面 - 内容区 */
.hanzi-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hanzi-intro {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    line-height: 1.8;
}

.hanzi-section-title {
    font-size: 1.5rem;
    color: #333;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* 汉字网格 */
.hanzi-character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.hanzi-character-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin: 0 auto;
}

.hanzi-character-link:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
    text-decoration: none;
}

/* 汉字页面 - 相关链接 */
.hanzi-related-links {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.hanzi-related-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.hanzi-related-links a:hover {
    text-decoration: underline;
}

/* 汉字页面 - 页脚 */
.hanzi-footer {
    text-align: center;
    padding: 30px 0;
    color: #888;
    font-size: 0.85rem;
}

/* 汉字页面 - 响应式 */
@media screen and (max-width: 768px) {
    .hanzi-main-wrapper {
        grid-template-columns: 1fr;
    }

    .hanzi-sidebar {
        position: static;
    }

    .hanzi-page-header h1 {
        font-size: 1.5rem;
    }

    .hanzi-content {
        padding: 20px;
    }

    .hanzi-character-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 8px;
    }

    .hanzi-character-link {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}