/* ================================================
   天天读古诗 - 儿童卡通风格样式表
   横屏1280x720优化版
   ================================================ */

/* === 变量 & 重置 === */
:root {
    --primary: #ff8c42;
    --primary-dark: #f76b2f;
    --primary-light: #fff3e6;
    --secondary: #4caf7d;
    --accent: #ffc53d;
    --purple: #9b7ede;
    --pink: #ff7b9c;
    --sky: #4fc3f7;
    --bg: #fff8f1;
    --bg-card: #ffffff;
    --text: #4a3f35;
    --text-light: #a09386;
    --border: #ffe3cc;
    --shadow: 0 4px 14px rgba(255, 140, 66, 0.14);
    --shadow-hover: 0 12px 28px rgba(255, 140, 66, 0.25);
    --radius: 20px;
    --radius-sm: 12px;
    --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === 背景漂浮装饰 === */
.bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-decor .decor-item {
    position: absolute;
    font-size: 2.2rem;
    opacity: 0.35;
    animation: floaty 8s ease-in-out infinite;
    user-select: none;
}
.bg-decor .decor-item:nth-child(1) { top: 14%; left: 4%;  animation-delay: 0s;   font-size: 2rem; }
.bg-decor .decor-item:nth-child(2) { top: 30%; left: 94%; animation-delay: 1.2s; font-size: 1.8rem; }
.bg-decor .decor-item:nth-child(3) { top: 68%; left: 3%;  animation-delay: 2s;   font-size: 1.7rem; }
.bg-decor .decor-item:nth-child(4) { top: 82%; left: 92%; animation-delay: 0.6s; font-size: 2rem; }
.bg-decor .decor-item:nth-child(5) { top: 52%; left: 97%; animation-delay: 1.8s; font-size: 1.6rem; }

/* === 容器 === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* === 头部导航 === */
.site-header {
    background: linear-gradient(135deg, #ffb347 0%, #ff8c42 45%, #ff7b9c 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 18px rgba(255, 123, 156, 0.35);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.logo-icon {
    font-size: 1.7rem;
    display: inline-block;
    animation: wiggle 3s ease-in-out infinite;
}

.logo:hover .logo-icon { animation: bounce 0.6s ease; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.nav-link {
    padding: 6px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.25s ease;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 1.2;
}

.nav-link .nav-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-link.active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

/* === 面包屑 === */
.breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid var(--border);
    padding: 10px 0;
    font-size: 0.9rem;
}

.bc-sep { margin: 0 8px; color: var(--text-light); }
.bc-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.bc-link:hover { text-decoration: underline; }
.bc-current { color: var(--text-light); }

/* === 主内容 === */
.main-content { padding: 36px 0 64px; }

/* === 首页 Hero === */
.hero {
    position: relative;
    text-align: center;
    padding: 56px 24px 48px;
    background: linear-gradient(135deg, #fff3d6 0%, #ffe6f0 55%, #e3f4ff 100%);
    border-radius: 28px;
    margin-bottom: 40px;
    border: 3px dashed #ffd9a8;
    overflow: hidden;
}

.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.hero::before {
    width: 160px; height: 160px;
    background: radial-gradient(circle, #ffd54f 0%, transparent 70%);
    top: -40px; left: -40px;
    animation: floaty 9s ease-in-out infinite;
}

.hero::after {
    width: 120px; height: 120px;
    background: radial-gradient(circle, #4fc3f7 0%, transparent 70%);
    bottom: -30px; right: -20px;
    animation: floaty 11s ease-in-out infinite reverse;
}

.hero-deco {
    position: absolute;
    font-size: 2.4rem;
    opacity: 0.6;
    animation: floaty 6s ease-in-out infinite;
    user-select: none;
}

.hero-deco.d1 { top: 18px; left: 12%; animation-delay: 0s; }
.hero-deco.d2 { top: 40px; right: 14%; animation-delay: 1.4s; font-size: 1.9rem; }
.hero-deco.d3 { bottom: 26px; left: 20%; animation-delay: 2.2s; font-size: 1.8rem; }
.hero-deco.d4 { bottom: 34px; right: 24%; animation-delay: 0.8s; font-size: 2rem; }

.hero-title {
    font-size: 2.4rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    text-shadow: 0 3px 0 rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
}

.hero-sub { font-size: 1.05rem; color: var(--text-light); margin-bottom: 26px; }

.hero-stats { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; }

.hero-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 20px;
    padding: 14px 26px;
    box-shadow: var(--shadow);
    border: 2px solid #fff;
}

.hero-stat-num {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.hero-stat-label { font-size: 0.88rem; color: var(--text-light); }

/* === 区块标题 === */
.section-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    flex: 0 0 auto;
    width: 90px;
    height: 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, #ff9a5a, #ffd54f, #66bb6a, #4fc3f7, #9b7ede, #ff7b9c);
}

/* === 年级选择 === */
.grade-select-header {
    background: linear-gradient(135deg, #fff3d6, #ffe6f0);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.grade-select-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.grade-select-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.grade-select-count {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

.grade-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.grade-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.grade-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.grade-card-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.grade-card-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* === 古诗卡片 === */
.poem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.poem-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 20px 22px 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.22s;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.poem-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ff9a5a, #ffd54f, #66bb6a, #4fc3f7, #9b7ede, #ff7b9c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s;
}

.poem-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: #ffd2a8; }
.poem-card:hover::before { transform: scaleX(1); }

.poem-card-grade {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 6px;
    display: inline-block;
    background: var(--primary-light);
    padding: 2px 10px;
    border-radius: 12px;
}

.poem-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.poem-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.poem-card-snippet {
    font-size: 0.92rem;
    color: #8a7a6c;
    line-height: 1.7;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.poem-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 24px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9a5a, #ff7b9c);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 123, 156, 0.35);
}

.btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 6px 18px rgba(255, 123, 156, 0.45); }
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    background: linear-gradient(135deg, #66bb6a, #4caf7d);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 175, 125, 0.35);
}

.btn-secondary:hover { transform: translateY(-2px) scale(1.03); }

.btn-outline {
    background: #fff;
    border: 2px solid var(--primary);
    color: var(--primary-dark);
}

.btn-outline:hover { background: var(--primary-light); transform: translateY(-2px); }

.btn-sm { padding: 6px 14px; font-size: 0.84rem; }
.btn-icon { padding: 8px 14px; }

/* === 古诗详情页 === */
.poem-detail {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
    border: 2px solid var(--border);
}

.poem-detail-header {
    background: linear-gradient(135deg, #ffb347 0%, #ff8c42 45%, #ff7b9c 100%);
    color: #fff;
    padding: 34px;
    position: relative;
}

.poem-detail-header::after {
    content: '📜';
    position: absolute;
    right: 24px;
    bottom: 18px;
    font-size: 3rem;
    opacity: 0.3;
    transform: rotate(12deg);
}

.poem-detail-title {
    font-size: 2.1rem;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    letter-spacing: 2px;
}

.poem-detail-meta {
    font-size: 1rem;
    opacity: 0.95;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.poem-detail-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.18);
    padding: 3px 12px;
    border-radius: 16px;
}

.poem-detail-body { padding: 32px; }

/* 诗文正文 - 纸张效果 */
.poem-content-block {
    background: linear-gradient(180deg, #fffdf5 0%, #fff8e8 100%);
    border: 2px solid #f0dcb4;
    border-radius: 16px;
    padding: 30px 34px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: inset 0 0 40px rgba(245, 223, 184, 0.35);
}

.poem-content-text {
    font-size: 1.45rem;
    line-height: 2.3;
    color: #5a4632;
    white-space: pre-line;
    text-align: center;
    font-family: "KaiTi", "STKaiti", "楷体", "FangSong", "仿宋", serif;
    letter-spacing: 2px;
}

/* 朗读高亮样式 */
.poem-segment {
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.poem-segment.highlight {
    background: linear-gradient(120deg, #fff3d6 0%, #ffe6b3 100%);
    color: #d35400;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
    transform: scale(1.05);
}

.poem-detail-section { margin-bottom: 24px; }

.poem-detail-section h4 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.poem-detail-section p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.9;
}

/* === 朗读区 === */
.read-aloud-section {
    background: linear-gradient(135deg, #fff6ec, #fff0f6);
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.read-aloud-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.read-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.voice-select {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    background: #fff;
    font-family: inherit;
    cursor: pointer;
    color: var(--text);
    transition: border-color 0.2s;
}

.voice-select:focus { border-color: var(--primary); }

.read-aloud-status {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 12px;
}

.read-aloud-status.error { color: #e74c3c; font-weight: 600; }
.read-aloud-status.success { color: var(--secondary); font-weight: 600; }
.read-aloud-status.loading { color: var(--primary); font-weight: 600; }

/* === 音频播放器 === */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #7c5cf0 0%, #b06be0 50%, #ff7b9c 100%);
    color: #fff;
    z-index: 999;
    box-shadow: 0 -6px 24px rgba(124, 92, 240, 0.4);
    border-radius: 22px 22px 0 0;
}

.player-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.player-info { flex: 0 0 200px; }
.player-title { font-weight: 800; font-size: 0.98rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-voice { font-size: 0.82rem; color: rgba(255, 255, 255, 0.75); }

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.btn-player {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #7c5cf0;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn-player:hover { transform: scale(1.12); }

.player-progress {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd54f, #ff9a5a);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-time { font-size: 0.82rem; white-space: nowrap; color: rgba(255, 255, 255, 0.85); font-weight: 600; }

.audio-player .voice-select {
    padding: 6px 12px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.86rem;
    outline: none;
    font-family: inherit;
}

.audio-player .voice-select option { color: var(--text); }

/* === 错误/提示框 === */
.error-box {
    background: #fff5f3;
    border: 2px solid #f5b7b1;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    color: var(--primary-dark);
}

.info-box {
    background: #f0faf0;
    border: 2px solid #b9e4c9;
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 0.95rem;
}

/* === 页脚 === */
.site-footer {
    background: linear-gradient(135deg, #ffb347, #ff8c42, #ff7b9c);
    border-top: none;
    padding: 10px 0;
    text-align: center;
    color: #fff;
    font-size: 0.82rem;
}

.footer-hint { margin-top: 6px; opacity: 0.92; }
.api-link { color: #fff; text-decoration: underline; font-weight: 600; }
.api-link:hover { text-decoration: none; }

/* === 分页 === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination a, .pagination span {
    padding: 7px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    border: 2px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    background: #fff;
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* === 加载动画 === */
.loading-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === 通用动画 === */
@keyframes floaty {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-16px) rotate(4deg); }
}

@keyframes bounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.3) rotate(-10deg); }
    70% { transform: scale(0.9) rotate(8deg); }
    100% { transform: scale(1); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(6deg); }
}

/* === 趣味游戏 === */
.games-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 24px;
    border: 2px solid var(--border);
}

.games-header {
    text-align: center;
    margin-bottom: 40px;
}

.games-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.games-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

.games-grade-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.games-grade-select label {
    font-weight: 600;
    color: var(--text);
}

.game-current-grade {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 16px;
}

.game-grade-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.game-card {
    background: linear-gradient(135deg, #fff8f1, #fff3e6);
    border: 3px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #ff9a5a, #ffd54f, #66bb6a, #4fc3f7, #9b7ede, #ff7b9c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: #ffd2a8;
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    transition: transform 0.3s;
}

.game-card:hover .game-card-icon {
    transform: scale(1.2) rotate(-5deg);
}

.game-card-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.game-card-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.game-card-badge {
    display: inline-block;
    padding: 4px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* 游戏容器 */
.game-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 24px;
    border: 2px solid var(--border);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.game-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.game-stats {
    display: flex;
    gap: 20px;
    font-weight: 700;
    color: var(--primary);
}

.game-content {
    min-height: 300px;
}
.game-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-light);
    text-align: center;
}
.game-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}
.game-placeholder-text {
    font-size: 1rem;
    font-weight: 500;
}

/* 游戏卡片 */
.game-poem-card {
    background: linear-gradient(135deg, #fffdf5, #fff8e8);
    border: 2px solid #f0dcb4;
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.game-poem-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    text-align: center;
}

/* 填空游戏样式 */
.game-poem-blank-area {
    text-align: center;
}

.game-input {
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    text-align: center;
    width: 200px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.game-input:focus {
    border-color: var(--primary);
}

.game-input-wide {
    width: 300px;
}

/* 接龙游戏样式 */
.game-poem-chain-area {
    text-align: center;
}

.game-chain-hint {
    font-size: 1.4rem;
    line-height: 2;
    color: #5a4632;
    font-family: "KaiTi", "STKaiti", "楷体", serif;
    letter-spacing: 2px;
    margin: 20px 0;
    padding: 24px 20px;
    background: linear-gradient(135deg, #fdf6e3, #fef9ef);
    border-radius: 12px;
    border: 1px solid #e8d5b0;
    border-left: 4px solid #d4a843;
    box-shadow: 0 2px 8px rgba(180, 140, 60, 0.08);
}

.game-chain-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding: 0 8px;
}

.game-chain-option {
    padding: 16px 14px;
    background: #fff;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: "KaiTi", "STKaiti", "楷体", serif;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.game-chain-option:hover:not(:disabled) {
    border-color: #4a90d9;
    background: #f0f6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.15);
}

.game-chain-option:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.game-chain-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.game-chain-option.correct {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.game-chain-option.wrong {
    border-color: #e74c3c;
    background: #ffebee;
    color: #c62828;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* 游戏 Toast 提示 */
.game-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    z-index: 10000;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    white-space: nowrap;
}

.game-toast.toast-success {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.game-toast.toast-fail {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
}

.game-toast.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 猜谜游戏样式 */
.game-poem-guess-area {
    text-align: center;
}

.game-guess-hint {
    font-size: 1.4rem;
    line-height: 2;
    color: #5a4632;
    font-family: "KaiTi", "STKaiti", "楷体", serif;
    letter-spacing: 2px;
    margin: 20px 0;
    padding: 24px 20px;
    background: linear-gradient(135deg, #fdf6e3, #fef9ef);
    border-radius: 12px;
    border: 1px solid #e8d5b0;
    border-left: 4px solid #d4a843;
    box-shadow: 0 2px 8px rgba(180, 140, 60, 0.08);
}

.game-guess-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding: 0 8px;
}

.game-guess-option {
    padding: 16px 14px;
    background: #fff;
    border: 2px solid #d0d0d0;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: "KaiTi", "STKaiti", "楷体", serif;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    position: relative;
}

.game-guess-option:hover:not(:disabled) {
    border-color: #4a90d9;
    background: #f0f6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.15);
}

.game-guess-option:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.game-guess-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.game-guess-option.correct {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.game-guess-option.wrong {
    border-color: #e74c3c;
    background: #ffebee;
    color: #c62828;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* 分类游戏样式 */
.game-poem-classify-area {
    text-align: center;
}

.game-classify-hint {
    font-size: 1.4rem;
    color: #5a4632;
    font-family: "KaiTi", "STKaiti", "楷体", serif;
    letter-spacing: 2px;
    margin: 20px 0;
    padding: 24px 20px;
    background: linear-gradient(135deg, #fdf6e3, #fef9ef);
    border-radius: 12px;
    border: 1px solid #e8d5b0;
    border-left: 4px solid #d4a843;
    box-shadow: 0 2px 8px rgba(180, 140, 60, 0.08);
    text-align: center;
}

.game-classify-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.game-classify-option {
    padding: 20px;
    background: #fff;
    border: 2px solid #f0dcb4;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.game-classify-option:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.game-classify-option.correct {
    border-color: var(--secondary);
    background: #f0faf0;
}

.game-classify-option.wrong {
    border-color: #e74c3c;
    background: #fff5f3;
}

.game-classify-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.game-classify-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 游戏结果 */
.game-result {
    text-align: center;
    padding: 40px;
    border-radius: 16px;
    margin: 20px 0;
}

.game-result.success {
    background: linear-gradient(135deg, #f0faf0, #e3f4e3);
    border: 2px solid #b9e4c9;
}

.game-result.fail {
    background: linear-gradient(135deg, #fff5f3, #ffe3d9);
    border: 2px solid #f5b7b1;
}

.game-result-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.game-result-message {
    font-size: 1.2rem;
    color: var(--text);
    line-height: 1.8;
    white-space: pre-line;
}

/* 游戏提示 */
.game-poem-text {
    font-size: 1.2rem;
    line-height: 2;
    color: #5a4632;
    font-family: "KaiTi", "STKaiti", "楷体", serif;
    letter-spacing: 2px;
    text-align: center;
    margin: 16px 0;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #f0dcb4;
}

.game-footer {
    margin-top: 30px;
    text-align: center;
}

/* === 批量音频生成页 === */
.batch-page {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    border: 2px solid var(--border);
}

.batch-status-panel { margin-bottom: 24px; }

.batch-status-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: var(--text-light);
}

.batch-status-error {
    padding: 16px;
    background: #fff5f3;
    border: 2px solid #f5b7b1;
    border-radius: 12px;
    color: #c0392b;
    text-align: center;
    font-weight: 600;
}

.batch-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.batch-stat-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff3d6, #ffe6f0);
    border-radius: 16px;
    border: 2px solid var(--border);
}

.batch-stat-cached {
    background: linear-gradient(135deg, #f0faf0, #e3f4e3);
    border-color: #b9e4c9;
}

.batch-stat-uncached {
    background: linear-gradient(135deg, #fff5f3, #ffe3d9);
    border-color: #f5b7b1;
}

.batch-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.batch-stat-cached .batch-stat-num { color: var(--secondary); }
.batch-stat-uncached .batch-stat-num { color: #e74c3c; }

.batch-stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.batch-controls {
    margin-bottom: 20px;
}

.batch-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.batch-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.batch-config-value {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.batch-config-note {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-left: 4px;
}

.batch-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.batch-filter {
    margin-bottom: 20px;
}

.batch-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.batch-filter-row .btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.batch-progress {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.batch-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.batch-progress-bar {
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.batch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s ease;
}

.batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.batch-table th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.batch-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text);
}

.batch-table tr:hover { background: #fafafa; }
.batch-table tr.batch-uncached { background: #fffbf8; }
.batch-table tr.batch-cached { background: #f9fff9; }

.batch-title a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.batch-title a:hover { text-decoration: underline; }

.batch-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.batch-badge.batch-cached {
    background: #e8f5e9;
    color: #2e7d32;
}

.batch-badge.batch-uncached {
    background: #ffebee;
    color: #c62828;
}

.batch-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1rem;
}

/* === 游戏页面 === */
.game-page {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 24px;
    border: 2px solid var(--border);
}

.game-page-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px dashed var(--border);
}

.game-page-title {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.game-page-desc {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.game-page .game-grade-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.game-page .game-grade-select label {
    font-weight: 600;
    color: var(--text);
}

.game-stats-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.game-stats-bar span {
    font-weight: 600;
    color: var(--primary);
}

.game-grade-badge {
    display: inline-block;
    padding: 4px 14px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 16px;
    font-size: 0.9rem;
}

/* === 竖屏 375x667 适配 === */
@media (orientation: portrait) {
    .header-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: auto;
        padding: 10px 0 6px;
        gap: 6px;
    }
    .logo { font-size: 1.1rem; gap: 6px; justify-content: center; }
    .logo-icon { font-size: 1.3rem; }
    .logo-text { display: inline; font-size: 1.05rem; }

    .main-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0;
        width: 100%;
        max-width: 340px;
        overflow-x: visible;
    }
    .nav-link {
        padding: 6px 0;
        font-size: 0;
        border-radius: 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
        justify-content: center;
    }
    .nav-link .nav-icon { font-size: 1.3rem; }
    .nav-link.active {
        background: rgba(255, 255, 255, 0.25);
        border-radius: 10px;
    }
    .breadcrumb { display: none; }

    .hero {
        padding: 18px 14px;
        margin-bottom: 16px;
        border-radius: 16px;
        border-width: 2px;
    }
    .hero-deco { display: none; }
    .hero-title { font-size: 1.4rem; margin-bottom: 6px; }
    .hero-sub { font-size: 0.85rem; margin-bottom: 14px; color: var(--text-light); }
    .hero-stats { gap: 14px; }
    .hero-stat { padding: 10px 18px; border-radius: 14px; }
    .hero-stat-num { font-size: 1.5rem; }
    .hero-stat-label { font-size: 0.82rem; }

    .section-title { font-size: 1.1rem; margin-bottom: 12px; }
    .section-title::after { width: 50px; height: 5px; }

    .grade-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
    .grade-card { padding: 12px 6px; border-radius: 10px; }
    .grade-card-label { font-size: 0.95rem; }
    .grade-card-count { font-size: 0.78rem; }

    .games-grid { grid-template-columns: 1fr; gap: 12px; }
    .game-card { padding: 16px; border-radius: 14px; }
    .game-card-icon { font-size: 2rem; margin-bottom: 8px; }
    .game-card-title { font-size: 1.1rem; margin-bottom: 4px; }
    .game-card-desc { font-size: 0.85rem; margin-bottom: 8px; line-height: 1.5; }
    .game-card-badge { font-size: 0.75rem; padding: 3px 12px; }

    .poem-detail-header { padding: 16px; }
    .poem-detail-header::after { display: none; }
    .poem-detail-title { font-size: 1.4rem; margin-bottom: 4px; letter-spacing: 1px; }
    .poem-detail-meta { font-size: 0.85rem; gap: 8px; }
    .poem-detail-meta span { padding: 2px 10px; }
    .poem-detail-body { padding: 16px; }
    .poem-content-block { padding: 20px 16px; margin-bottom: 16px; }
    .poem-content-text { font-size: 1.2rem; line-height: 2; }
    .poem-segment.highlight { transform: none; }

    .poem-left {
        display: flex;
        flex-direction: column;
    }

    .poem-audio-controls {
        text-align: center;
        margin: 16px 0 12px;
    }

    .poem-audio-controls .btn { padding: 10px 24px; font-size: 0.95rem; }

    .poem-nav-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-top: 8px;
    }

    .poem-nav-row .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        min-width: 0;
        flex: 1;
        justify-content: center;
    }

    .poem-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .grade-select-header { padding: 16px; margin-bottom: 16px; border-radius: 14px; }
    .grade-select-title { font-size: 1.1rem; margin-bottom: 12px; }
    .grade-select-list { gap: 8px; margin-bottom: 10px; }
    .grade-select-list .btn { padding: 6px 12px; font-size: 0.82rem; }
    .grade-select-count { font-size: 0.85rem; }

    .poem-grid { grid-template-columns: 1fr; gap: 10px; }
    .poem-card { padding: 14px 16px 12px; border-radius: 14px; }
    .poem-card-title { font-size: 1.1rem; }
    .poem-card-meta { font-size: 0.82rem; margin-bottom: 0; }

    .game-page { padding: 16px; }
    .game-page-header { margin-bottom: 12px; padding-bottom: 12px; }
    .game-page-title { font-size: 1.3rem; margin-bottom: 6px; }
    .game-page-desc { font-size: 0.88rem; margin-bottom: 10px; }
    .game-page .grade-select-list .btn { padding: 5px 10px; font-size: 0.8rem; }
    .game-stats-bar { margin-bottom: 12px; gap: 14px; font-size: 0.85rem; }
    .game-content { min-height: 200px; }
    .game-poem-card { padding: 20px; max-width: 100%; }
    .game-chain-hint, .game-guess-hint, .game-classify-hint { font-size: 1.2rem; padding: 16px; margin: 12px 0; }
    .game-chain-options { grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
    .game-chain-option { padding: 14px 12px; font-size: 1rem; }
    .game-guess-options { grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
    .game-guess-option { padding: 14px 12px; font-size: 1rem; }
    .game-classify-options { grid-template-columns: 1fr; gap: 10px; margin: 12px 0; }
    .game-classify-option { padding: 16px; }
    .game-classify-title { font-size: 1.05rem; }
    .game-result { padding: 24px; }
    .game-result-icon { font-size: 3rem; margin-bottom: 12px; }
    .game-result-message { font-size: 1rem; }

    .games-container { padding: 20px; }
    .games-header { margin-bottom: 20px; }
    .games-title { font-size: 1.4rem; margin-bottom: 8px; }
    .games-subtitle { font-size: 0.95rem; }
    .games-grade-select { margin-top: 12px; }
    .games-grid { grid-template-columns: 1fr; gap: 12px; }

    .player-inner { padding: 10px 14px; gap: 10px; }
    .player-info { flex: 0 0 100px; }
    .player-title { font-size: 0.82rem; }
    .btn-player { width: 34px; height: 34px; font-size: 0.9rem; }
    .player-progress { min-width: 80px; }
    .progress-bar { height: 6px; }

    .batch-status-grid { grid-template-columns: 1fr; }
    .batch-table { font-size: 0.82rem; }
    .batch-table th, .batch-table td { padding: 8px 6px; }
    .batch-action-row { flex-direction: column; }
    .batch-action-row .btn { width: 100%; justify-content: center; }
}

/* === 横屏 1280x720 适配 === */
@media (orientation: landscape) {
    /* 全局布局：尽量撑满视口，内容超出时允许滚动 */
    body { display: flex; flex-direction: column; min-height: 100vh; width: 100%; }
    .bg-decor { display: none; }

    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        width: 100%;
        padding: 0;
    }

    .main-content > .container {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        width: 100%;
        padding-top: 16px;
        padding-bottom: 8px;
    }

    .site-header { flex-shrink: 0; }
    .header-inner { height: 80px; gap: 16px; }
    .logo { font-size: 1.1rem; gap: 6px; }
    .logo-icon { font-size: 1.4rem; }
    .breadcrumb { display: none; }

    /* ===== 首页 ===== */
    .hero {
        flex-shrink: 0;
        padding: 36px 32px 30px;
        margin-bottom: 20px;
        border-radius: 28px;
        border-width: 3px;
        position: relative;
        text-align: center;
        overflow: hidden;
    }

    .hero::before {
        width: 140px; height: 140px;
        background: radial-gradient(circle, #ffd54f 0%, transparent 70%);
        top: -30px; left: -30px;
        animation: floaty 9s ease-in-out infinite;
    }

    .hero::after {
        width: 100px; height: 100px;
        background: radial-gradient(circle, #4fc3f7 0%, transparent 70%);
        bottom: -20px; right: -15px;
        animation: floaty 11s ease-in-out infinite reverse;
    }

    .hero-deco { display: block; }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 8px;
        white-space: normal;
    }

    .hero-sub { display: block; font-size: 0.95rem; margin-bottom: 18px; }

    .hero-stats { gap: 28px; flex-wrap: nowrap; justify-content: center; }

    .hero-stat {
        padding: 12px 22px;
        border-radius: 16px;
    }

    .hero-stat-num { font-size: 1.8rem; }
    .hero-stat-label { font-size: 0.85rem; }

    .section-title {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .section-title::after { width: 60px; height: 5px; }

    .grade-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }

    .grade-card {
        padding: 12px 8px;
        border-radius: 10px;
    }

    .grade-card-label { font-size: 0.95rem; }
    .grade-card-count { font-size: 0.78rem; }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .game-card { padding: 16px; border-radius: 14px; }
    .game-card-icon { font-size: 2rem; margin-bottom: 8px; }
    .game-card-title { font-size: 1.05rem; margin-bottom: 6px; }
    .game-card-desc { font-size: 0.82rem; margin-bottom: 10px; line-height: 1.5; }
    .game-card-badge { font-size: 0.75rem; padding: 3px 12px; }

    /* ===== 古诗详情页 ===== */
    .poem-detail {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 0;
    }

    .poem-detail-header {
        flex-shrink: 0;
        padding: 14px 24px;
    }

    .poem-detail-header .poem-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .poem-detail-header::after { display: none; }

    .poem-detail-title {
        font-size: 1.5rem;
        margin-bottom: 0;
        letter-spacing: 1px;
    }

    .poem-detail-header .poem-detail-meta {
        font-size: 0.88rem;
        gap: 10px;
    }

    .poem-detail-header .poem-detail-meta span {
        padding: 2px 10px;
    }

    .poem-detail-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 16px;
        min-height: 0;
        overflow: hidden;
    }

    .poem-left {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .poem-content-block {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
        padding: 16px 20px;
        min-height: 0;
        overflow: hidden;
    }

    .poem-content-text {
        font-size: 2rem;
        line-height: 2.1;
    }

    .poem-segment.highlight { transform: none; }

    .poem-audio-controls {
        flex-shrink: 0;
        text-align: center;
        margin-bottom: 6px;
    }

    .poem-audio-controls .btn { padding: 7px 18px; font-size: 0.88rem; }

    .poem-nav-row {
        flex-shrink: 0;
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }

    .poem-nav-row .btn {
        padding: 5px 12px;
        font-size: 0.8rem;
        min-width: 0;
    }

    /* ===== 年级列表页 ===== */
    .grade-select-header {
        flex-shrink: 0;
        padding: 14px 20px;
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .grade-select-title { font-size: 1.15rem; margin-bottom: 10px; }
    .grade-select-list { margin-bottom: 8px; gap: 8px; }
    .grade-select-list .btn { padding: 6px 14px; font-size: 0.85rem; }
    .grade-select-count { font-size: 0.85rem; }

    .poem-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 10px;
    }

    .poem-card {
        padding: 12px 16px 10px;
        border-radius: 12px;
    }

    .poem-card-title { font-size: 1.05rem; }
    .poem-card-meta { font-size: 0.8rem; margin-bottom: 0; }

    /* ===== 游戏页面 - 趣味左右布局 ===== */
    .game-page {
        flex: 1;
        display: flex;
        flex-direction: row;
        min-height: 0;
        margin-bottom: 0;
        padding: 14px;
        gap: 14px;
    }

    /* 左侧面板 - 彩色渐变背景 */
    .game-page-left {
        flex: 0 0 230px;
        display: flex;
        flex-direction: column;
        background: linear-gradient(180deg, #fff3d6 0%, #ffe6f0 50%, #e3f4ff 100%);
        border-radius: 18px;
        padding: 14px;
        border: 2px solid #ffd9a8;
    }

    .game-page-right {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 0;
        justify-content: flex-start;
    }

    /* 标题区 */
    .game-page-header {
        flex-shrink: 0;
        text-align: center;
        padding-bottom: 10px;
        border-bottom: 3px dashed #ffb347;
        margin-bottom: 10px;
    }

    .game-page-title {
        font-size: 1.35rem;
        margin-bottom: 4px;
        color: var(--primary-dark);
        text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
    }

    .game-page-desc {
        font-size: 0.82rem;
        margin-bottom: 10px;
        color: #b08968;
        font-weight: 500;
    }

    .game-page .grade-select-list {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .game-page .grade-select-list .btn {
        padding: 7px 12px;
        font-size: 0.82rem;
        width: 100%;
        justify-content: center;
        border-radius: 14px;
        font-weight: 700;
        transition: all 0.2s;
    }

    .game-page .grade-select-list .btn:hover {
        transform: scale(1.04);
    }

    .game-page .grade-select-list .btn-primary {
        box-shadow: 0 3px 10px rgba(255, 123, 156, 0.4);
    }

    /* 得分卡片 - 彩色渐变 */
    .game-stats-bar {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }

    .game-stats-bar span {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-align: center;
        padding: 10px 8px;
        border-radius: 14px;
        font-weight: 800;
        font-size: 0.9rem;
        color: #fff;
        text-shadow: 0 1px 2px rgba(0,0,0,0.15);
        box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    }

    #game-score {
        background: linear-gradient(135deg, #ff9a5a, #ff7b9c);
    }

    #game-correct {
        background: linear-gradient(135deg, #66bb6a, #4caf7d);
    }

    #game-answered {
        background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    }

    /* 游戏内容区 */
    .game-content {
        min-height: 0;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        overflow-y: auto;
        padding-top: 6px;
    }

    /* 游戏卡片 - 纸张效果 */
    .game-poem-card {
        padding: 20px 24px;
        max-width: 720px;
        width: 100%;
        background: linear-gradient(180deg, #fffdf5 0%, #fff8e8 100%);
        border: 2px solid #f0dcb4;
        border-radius: 18px;
        box-shadow: 0 4px 16px rgba(180, 140, 60, 0.1);
    }

    /* 提示诗句 - 古风卡片 */
    .game-chain-hint, .game-guess-hint, .game-classify-hint {
        font-size: 1.3rem;
        padding: 18px 20px;
        margin: 14px 0;
        background: linear-gradient(135deg, #fdf6e3, #fef9ef);
        border-radius: 14px;
        border: 2px solid #e8d5b0;
        border-left: 5px solid #d4a843;
        box-shadow: 0 3px 10px rgba(180, 140, 60, 0.1);
        text-align: center;
    }

    /* 选项按钮 - 圆角卡片式 */
    .game-chain-options { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }

    .game-chain-option {
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: 14px;
        border: 2px solid #d0d0d0;
        background: #fff;
        transition: all 0.2s;
        box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    }

    .game-chain-option:hover:not(:disabled) {
        border-color: var(--sky);
        background: #f0f6ff;
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 6px 16px rgba(74, 144, 217, 0.2);
    }

    .game-guess-options { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }

    .game-guess-option {
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: 14px;
        border: 2px solid #d0d0d0;
        background: #fff;
        transition: all 0.2s;
        box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    }

    .game-guess-option:hover:not(:disabled) {
        border-color: var(--purple);
        background: #f5f0ff;
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 6px 16px rgba(155, 126, 222, 0.2);
    }

    .game-classify-options { grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }

    .game-classify-option {
        padding: 18px;
        border-radius: 16px;
        border: 2px solid #f0dcb4;
        background: linear-gradient(135deg, #fff8f1, #fff3e6);
        transition: all 0.2s;
        box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    }

    .game-classify-option:hover {
        border-color: var(--primary);
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 8px 20px rgba(255, 140, 66, 0.2);
    }

    .game-classify-title {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--text);
    }

    /* 答对/答错动画增强 */
    .game-chain-option.correct, .game-guess-option.correct, .game-classify-option.correct {
        animation: popCorrect 0.4s ease;
    }

    .game-chain-option.wrong, .game-guess-option.wrong, .game-classify-option.wrong {
        animation: shakeWrong 0.4s ease;
    }

    @keyframes popCorrect {
        0% { transform: scale(1); }
        50% { transform: scale(1.08); }
        100% { transform: scale(1); }
    }

    @keyframes shakeWrong {
        0%, 100% { transform: translateX(0); }
        20% { transform: translateX(-6px); }
        40% { transform: translateX(6px); }
        60% { transform: translateX(-4px); }
        80% { transform: translateX(4px); }
    }

    /* 游戏结果 - 庆祝样式 */
    .game-result {
        padding: 36px 28px;
        margin: 0;
        border-radius: 20px;
        text-align: center;
    }

    .game-result.success {
        background: linear-gradient(135deg, #e8f5e9, #c8e6c9, #a5d6a7);
        border: 3px solid #66bb6a;
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.25);
    }

    .game-result.fail {
        background: linear-gradient(135deg, #fff3e0, #ffe0b2, #ffcc80);
        border: 3px solid #ffb74d;
        box-shadow: 0 6px 20px rgba(255, 152, 0, 0.25);
    }

    .game-result-icon {
        font-size: 4.5rem;
        margin-bottom: 14px;
        animation: bounceIn 0.5s ease;
    }

    .game-result-message {
        font-size: 1.35rem;
        font-weight: 700;
        line-height: 1.8;
        color: var(--text);
    }

    @keyframes bounceIn {
        0% { transform: scale(0.3); opacity: 0; }
        50% { transform: scale(1.1); }
        70% { transform: scale(0.95); }
        100% { transform: scale(1); opacity: 1; }
    }

    /* 下一题按钮 */
    .game-footer {
        flex-shrink: 0;
        margin-top: 0;
        padding-top: 14px;
        text-align: center;
    }

    .game-footer .btn {
        padding: 11px 32px;
        font-size: 1.05rem;
        border-radius: 26px;
        font-weight: 800;
        box-shadow: 0 4px 14px rgba(255, 123, 156, 0.4);
        transition: all 0.2s;
    }

    .game-footer .btn:hover {
        transform: translateY(-2px) scale(1.04);
        box-shadow: 0 6px 20px rgba(255, 123, 156, 0.5);
    }

    /* ===== 综合游戏页 ===== */
    .games-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 0;
        padding: 20px;
    }

    .games-header { margin-bottom: 20px; }
    .games-title { font-size: 1.4rem; margin-bottom: 6px; }
    .games-subtitle { font-size: 0.95rem; }
    .games-grade-select { margin-top: 12px; }

    .games-grid {
        flex: 1;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        align-content: center;
    }

    /* ===== 播放器适配 ===== */
    .player-inner { padding: 10px 20px; gap: 12px; }
    .player-info { flex: 0 0 160px; }
    .player-title { font-size: 0.88rem; }
    .btn-player { width: 36px; height: 36px; font-size: 0.95rem; }
    .player-progress { min-width: 100px; }
    .progress-bar { height: 6px; }

    /* ===== 批量页面 ===== */
    .batch-page {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow-y: auto;
    }

    /* 横屏显示浮动二维码 */
    .landscape-qr { display: block; }

    /* 横屏弹窗适配 */
    .poem-modal-content {
        max-width: 600px;
        max-height: 80vh;
    }
}

/* === 练习页朗读模式栏 === */
.grade-mode-bar {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.grade-mode-bar .btn {
    min-width: 110px;
}

/* === 古诗弹窗 === */
.poem-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.poem-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}
.poem-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 24px;
}
.poem-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.poem-modal-header > div {
    flex: 1;
    text-align: center;
}
.poem-modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}
.poem-modal-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}
.poem-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
}
.poem-modal-close:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.poem-modal-text {
    font-size: 1.3rem;
    line-height: 2.2;
    text-align: center;
    padding: 20px 12px;
    background: linear-gradient(180deg, #fffdf5, #fff8e8);
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
    min-height: 80px;
}
@media (orientation: portrait) {
    .poem-modal-text { font-size: 1.2rem; }
}
.poem-modal-text .poem-segment.highlight {
    color: var(--primary-dark);
    font-weight: 700;
    background: rgba(255, 140, 66, 0.12);
    border-radius: 6px;
    padding: 2px 4px;
    transition: all 0.2s;
}
.poem-modal-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}
.poem-modal-controls .btn {
    min-width: 100px;
}
.poem-modal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.poem-modal-counter {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 600;
}

/* === 横屏浮动二维码 === */
.landscape-qr {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    backdrop-filter: blur(8px);
}
#landscape-qr-code {
    width: 100px;
    height: 100px;
    margin-bottom: 6px;
    border-radius: 8px;
    overflow: hidden;
}
#landscape-qr-code img {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.landscape-qr-text {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* === 打印样式 === */
@media print {
    .site-header, .site-footer, .audio-player, .btn, .read-aloud-section, .bg-decor { display: none; }
    .poem-detail { box-shadow: none; border: 1px solid #ccc; }
}
