/* ========================================
   诗芸诵诗词 - 样式表
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f5f2ed;
    color: #333;
    overflow-x: hidden;
}

/* ===== 页面容器 ===== */
.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 60px;
}

.page.active {
    display: block;
}

/* ========================================
   首页样式
   ======================================== */
.index-page {
	background-color: #f5f2ed;
}

.index-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 顶部图片 */
.video-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gif-img {
    width: 100%;
    height: auto;
    display: block;
}

/* 新闻区 - 轮播 */
.news-section {
    padding: 16px 11px 6px 11px;
}

.news-swiper {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
}

.news-swiper-wrapper {
    display: flex;
    transition: transform 0.4s ease;
}

.news-swiper-wrapper .news-card {
    min-width: 100%;
    flex-shrink: 0;
    border: none;
    border-radius: 0;
}

.news-swiper-wrapper .news-card:active {
    transform: none;
}

.news-swiper-wrapper .news-card:hover {
    transform: none;
    border-color: transparent;
}

.news-swiper-wrapper .news-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.news-swiper-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.news-swiper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s;
}

.news-swiper-dot.active {
    background: #ff6b35;
}

/* 目录选择区 - 卡片化 */
.selector-area {
    position: relative;
    background-color: #fff;
    padding: 16px;
	padding-top: 5px;
    margin: 12px;
    margin-bottom: 16px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.selector-hint {
    display: block;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #8b7355;
    padding: 0 0 10px;
    letter-spacing: 1px;
}

.total-poem-tip {
    display: block;
    text-align: center;
    font-size: 24px;
    color: #999;
    padding: 4px 0 6px;
}

.total-poem-tip span {
    color: #ff6b35;
    font-weight: 600;
}

/* 触发栏 - 卡片风格 */
.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    cursor: pointer;
    background: linear-gradient(135deg, #fef9f3, #fff8f0);
    border: 1px solid #f0e6dc;
    border-radius: 14px;
}

.trigger-text {
    font-size: 18px;
    color: #555;
    font-weight: 500;
}

.trigger-arrow {
    font-size: 11px;
    color: #bbb;
    transition: transform 0.25s ease;
}

.trigger-arrow.open {
    transform: rotate(180deg);
}

/* 级联面板 */
.cascade-panel {
    position: absolute;
    top: 100%;
    left: -12px;
    right: -12px;
    width: calc(100% + 24px);
    display: none;
    max-height: calc(80vh - 90px); /* 减去底部导航栏+安全区 */
    background: #fff;
    z-index: 100;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 14px 14px;
    overflow-y: auto;
    animation: panelSlideDown 0.25s ease;
    padding-bottom: 20px; /* 底部安全间距 */
}

.cascade-panel.show {
    display: flex;
}

@keyframes panelSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 左侧 - 学段列表 */
.panel-left {
    width: 30%;
    background: #faf7f2;
    border-right: 1px solid #f0ece4;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 中间 - 年级列表 */
.panel-middle {
    width: 60%;
    background: #fcfbf9;
    border-right: 1px solid #f0ece4;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.panel-cat-item {
    padding: 12px 12px;
    font-size: 16px;
    color: #666;
    position: relative;
    transition: all 0.15s;
    cursor: pointer;
}

.panel-cat-item.active {
    color: #ff6b35;
    font-weight: 600;
    background: #fff;
}

.panel-cat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, #ff6b35, #ff9800);
    border-radius: 0 2px 2px 0;
}

/* 右侧 - 班级/子类列表 */
.panel-right {
    width: 35%;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.panel-child-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 13px;
    color: #555;
    transition: all 0.15s;
    cursor: pointer;
}

.panel-child-item.active {
    color: #ff6b35;
    font-weight: 600;
    background: rgba(255, 107, 53, 0.04);
}

.check-icon {
    font-size: 16px;
    color: #ff6b35;
    margin-left: 6px;
}

/* 遮罩层 */
.dropdown-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99;
    display: none;
}

.dropdown-mask.show {
    display: block;
}

/* 古诗卡片列表 - 扁平风格 */
.poem-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: transparent;
    padding: 0 11px;
}

.poem-card {
    width: 100%;
    background-color: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #efebe6;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s ease;
}

.poem-card:hover {
    transform: translateY(-1px);
    border-color: #e0dbd2;
}

.poem-card:active {
    transform: scale(0.98);
}

.poem-img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 130px;
    object-fit: cover;
}

.poem-info {
    padding: 10px 14px 10px;
}

.poem-title {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.poem-author {
    display: block;
    font-size: 18px;
    color: #999;
}



.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e8e0dc;
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 加载更多按钮 - 长按/点击 */
.load-more-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 24px 14px;
    background: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.2s;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.load-more-btn:hover {
    opacity: 0.8;
}

.load-more-btn.holding span,
.load-more-btn.loading span {
    color: #ff6b35;
}

.load-more-btn.holding span {
    font-weight: 600;
}

.load-more-progress {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ff9800);
    border-radius: 14px;
    margin-bottom: 6px;
}

.load-more-btn span {
    font-size: 18px;
    color: #bbb;
    transition: color 0.2s;
}

/* 上拉加载指示器 - 轻量风格（保留兼容） */
.pull-up-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 0 16px;
    background: transparent;
}

.pull-up-indicator.pulling {
    padding: 12px 0 10px;
}

.pull-up-indicator.holding {
    padding: 12px 0 10px;
}

.pull-up-indicator.loading {
    padding: 12px 0 10px;
}

.pull-up-progress {
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ff9800);
    border-radius: 14px;
    margin-bottom: 6px;
    transition: width 0.1s linear;
}

.pull-up-indicator.pulling .pull-up-progress {
    width: 30%;
}

.pull-up-indicator.holding .pull-up-progress {
    animation: progress1s 1s linear forwards;
}

.pull-up-indicator.loading .pull-up-progress {
    width: 95%;
    animation: progressPulse 0.8s ease-in-out infinite;
}

@keyframes progress1s {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes progressPulse {
    0%, 100% { width: 0%; }
    50% { width: 100%; }
}

.pull-up-indicator span {
    font-size: 13px;
    color: #ccc;
    transition: color 0.2s;
}

.pull-up-indicator.pulling span {
    color: #ff6b35;
}

.pull-up-indicator.holding span {
    color: #ff6b35;
    font-weight: 600;
}

.pull-up-indicator.loading span {
    color: #ff6b35;
}

.retry-btn-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px;
    padding: 14px 0;
    background: linear-gradient(135deg, #ff6b35, #ff9800);
    border-radius: 30px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.retry-btn-inline span {
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.no-more-tip {
    text-align: center;
    padding: 16px 0 calc(30px + env(safe-area-inset-bottom, 0px));
}

.no-more-tip span {
    font-size: 12px;
    color: #ccc;
    letter-spacing: 2px;
}

.bottom-spacer {
    height: calc(30px + env(safe-area-inset-bottom, 0px));
}

/* 总数提示 */
.count-tip {
    text-align: center;
    padding: 4px 0 6px;
}

.count-tip span {
    font-size: 16px;
    color: #999;
}

/* ========================================
   古诗页面样式
   ======================================== */
.poem-page {
    background-color: #f5f2ed;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.poem-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 搜索框 - 顶部固定风格 */
.search-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fffbf7, #fff9f3);
    padding: 12px 14px;
    border-bottom: 1px solid #f0ece4;
    flex-shrink: 0;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 38px;
    background-color: #fff;
    border-radius: 14px;
    border: none;
    outline: none;
    padding: 0 26px 0 16px;
    font-size: 20px;
    color: #333;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.search-input::placeholder {
    color: #c5c5c5;
}

.search-clear {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

.search-btn {
    height: 38px;
    padding: 0 18px;
    background: linear-gradient(135deg, #ff6b35, #ff9800);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

.search-btn span {
    font-size: 15px;
	line-height: 15px;
    color: #fff;
    font-weight: 600;
}

/* 三栏布局（分类 + 内容） */
.main-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* 一级分类栏（大类） - 侧边导航风格 */
.category-bar {
    width: 80px;
    flex-shrink: 0;
    background-color: #efe9e1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.category-item {
    padding: 13px 6px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.category-item.active {
    background-color: #fff;
}

.category-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, #ff6b35, #ff9800);
    border-radius: 0 2px 2px 0;
}

.category-text {
    font-size: 16px;
    color: #777;
    line-height: 1.5;
}

.category-item.active .category-text {
    color: #ff6b35;
    font-weight: 700;
}

/* 右侧内容区 */
.content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 二级分类（子类）- 横向标签 */
.sub-category-bar {
    display: flex;
    white-space: nowrap;
    overflow-x: auto;
    padding: 10px 10px 8px;
    background-color: #fffcfa;
    border-bottom: 1px solid #f5efe7;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.sub-category-bar::-webkit-scrollbar {
    display: none;
}

.sub-tag {
    display: inline-flex;
    padding: 6px 14px;
    margin-right: 8px;
    border-radius: 14px;
    font-size: 13px;
    color: #777;
    background-color: #fff;
    border: 1px solid #eeebe3;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.sub-tag.active {
    color: #fff;
    background: linear-gradient(135deg, #ff6b35, #ff9800);
    border: none;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.25);
}

/* 三级分类（班级/子类）- 横向标签 */
.class-bar {
    display: flex;
    white-space: nowrap;
    overflow-x: auto;
    padding: 6px 10px 8px;
    background-color: #fffcfa;
    border-bottom: 1px solid #f5efe7;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.class-bar::-webkit-scrollbar {
    display: none;
}

.class-tag {
    display: inline-flex;
    padding: 4px 12px;
    margin-right: 6px;
    border-radius: 14px;
    font-size: 12px;
    color: #999;
    background-color: #fff;
    border: 1px solid #eeebe3;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.class-tag.active {
    color: #fff;
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    border: none;
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
	padding-top: 0;
    -webkit-overflow-scrolling: touch;
}

/* 搜索提示 */
.search-tip {
    text-align: center;
    padding: 4px 0 6px;
}

.search-tip span {
    font-size: 16px;
    color: #999;
}

.empty-tip {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
    font-size: 15px;
}

/* ========================================
   默写页面样式
   ======================================== */
.dictation-page {
    background-color: #f5f2ed;
}

.dictation-container {
    display: flex;
    flex-direction: column;
}

.content-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 10px calc(40px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.top-gif {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-area {
    margin: 40px 0 30px 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.start-btn {
    padding: 8px 50px;
    background: linear-gradient(135deg, #ff6b35, #ff9800);
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.start-btn:hover {
    transform: scale(1.05);
}

.start-btn span {
    font-size: 26px;
    color: #fff;
    font-weight: 700;
}

.img-grid {
    width: 100%;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap:20px;
}

.grid-img {
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    cursor: pointer;
    transition: transform 0.2s;
}

.grid-img:hover {
    transform: scale(1.03);
}

/* ========================================
   关于页面样式
   ======================================== */
.about-page {
    background-color: #f5f2ed;
}

.about-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.about-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 25px calc(40px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.about-header {
    text-align: center;
    margin-bottom: 25px;
}

.app-name {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    display: block;
    margin-bottom: 6px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-left: 8px;
    border-left: 4px solid #ff6b35;
}

.info-list {
    margin-bottom: 20px;
	margin-left: 5px;
}

.info-item {
    display: flex;
    margin-bottom: 13px;
    line-height: 1.7;
}

.info-index {
    font-size: 18px;
    line-height: 24px;
    color: #444;
    margin-right: 15px;
    flex-shrink: 0;
}

.info-text {
    font-size: 18px;
    color: #333;
    line-height:24px;
    flex: 1;
}

.highlight-green {
    color: #07c160;
    font-weight: 600;
    font-size: 18px;
}

.qr-section {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    padding-bottom: 10px;
}

.qr-image {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.extra-img-section {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    padding-bottom: 10px;
}

.extra-image {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* 关于页 - 目录列表 */
.about-catalog-list {
    margin-top: 20px;
    padding: 16px 0px 8px;
}

.about-catalog-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.about-catalog-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-tag {
    display: inline-block;
    padding: 5px;
    font-size: 13px;
    color: #666;
    background-color: #fff;
    border: 1px solid #e8e0d6;
    border-radius: 14px;
}

/* ========================================
   诗词大会页面样式（与默写一致）
   ======================================== */
.pk-page {
    background-color: #f5f2ed;
}

.pk-container {
    display: flex;
    flex-direction: column;
}

.pk-content-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 10px calc(40px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pk-header {
    text-align: center;
    margin-bottom: 25px;
}

.pk-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.pk-subtitle {
    font-size: 15px;
    color: #999;
    font-weight: 400;
}

.pk-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 35px;
}

.pk-mode-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #efebe6;
}

.mode-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.mode-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.mode-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.pk-features {
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    margin-bottom: 15px;
    border: 1px solid #efebe6;
}

.features-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 18px;
    text-align: center;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #555;
}

.feature-icon {
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.pk-coming-soon {
    text-align: center;
    padding: 16px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #efebe6;
}

.pk-coming-soon p {
    font-size: 14px;
    color: #999;
    font-weight: 400;
    line-height: 1.6;
}

/* ========================================
   底部导航栏
   ======================================== */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: #fffefb;
    border-top: 1px solid #f0ece4;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow: hidden;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 0 4px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.tab-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: #e8e0dc;
}

.tab-item:active {
    transform: scale(0.85);
}

.tab-item:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}

.tab-item.active {
    color: #ff6b35;
}

.tab-icon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.tab-icon-fallback {
    display: none !important;
    font-size: 20px;
    line-height: 28px;
}

.tab-text {
    font-size: 16px;
    margin-top: -4px;
}

/* ========================================
   图片预览模态框
   ======================================== */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-modal.show {
    display: flex;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.1s ease-out;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* 小程序码弹窗 */
.code-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2001;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.code-modal.show {
    display: flex;
}

.code-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px 0px 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    position: relative;
}

.code-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.code-modal-img {
    width:100%;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
}

.code-modal-text {
    color: #555;
    line-height: 1.6;
	padding: 0 16px;
}

@media (orientation: portrait) {
    .code-modal-text {
        font-size: 16px;
    }
}

/* 目录选择加载遮罩 */
.category-loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgb(52 52 52 / 92%);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.category-loading-overlay.show {
    display: flex;
}
.category-loading-content {
    text-align: center;
    padding: 40px 36px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.category-loading-text {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    font-weight: 500;
}
.category-loading-bar {
    width: 200px;
    height: 6px;
    background: #f0ece4;
    border-radius: 3px;
    overflow: hidden;
}
.category-loading-bar-inner {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #ff9a5c);
    border-radius: 3px;
    animation: catLoadingBar 2s ease-in-out forwards;
}
@keyframes catLoadingBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ========================================
   响应式调整
   ======================================== */
@media (min-width: 768px) {
    .category-bar {
        width: 120px;
    }

    .img-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 374px) {
    .category-bar {
        width: 70px;
    }

    .category-text {
        font-size: 12px;
    }
}

/* ========================================
   横屏布局（orientation: landscape）
   ======================================== */
@media (orientation: landscape) and (min-aspect-ratio: 1/1) {

body {
    background-color: #f0ece4;
}

/* 全局宽度限制 1200px */
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 80px;
}

.tab-bar {
    max-width: 100%;
}

/* ===== 底部导航栏 - 横屏放大，图左字右 ===== */
.tab-bar {
    height: 64px;
}

.tab-item {
    flex-direction: row;
    padding: 0 24px;
    gap: 6px;
}

.tab-icon-img {
    width: 60px;
    height: 60px;
}

.tab-text {
    font-size: 24px;
    margin-top: 0;
	margin-left: 5px;
}

/* ===== 首页 - 横屏 ===== */
.index-container {
    /* 继承 page 的 1200px */
}

.news-swiper-wrapper .news-img {
    height: -webkit-fill-available;
}

.selector-area {
    border-radius: 14px;
}

/* 首页顶部图 - 横屏 */
.video-container {
    width: 100%;
    position: relative;
    background: none;
    overflow: visible;
}

.video-container .gif-img {
    display: none;
}

.video-container::after {
    content: url('https://pic.imgdd.cc/item/6a2ac468d501629dd9795559.jpg');
    display: block;
    width: 100%;
}

.selector-hint {
    font-size: 24px;
	padding-bottom: 16px;
}

.poem-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 10px;
}

.poem-card {
    border-radius: 14px;
}

.poem-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.selector-area {
    margin: 10px 12px 30px 12px;
    padding-top: 0;
}

/* ===== 古诗页面 - 横屏 ===== */
.poem-page {
    height: calc(100vh - 64px);
}

.category-bar {
    width: 90px;
}

.category-text {
    font-size: 18px !important;
}

.category-item.active .category-text {
    font-size: 18px !important;
}

.panel-cat-item {
    font-size: 20px !important;
    padding: 12px 12px;
    padding-left: 30px;
}

.panel-child-item {
    white-space: normal;
    word-wrap: break-word;
	font-size: 20px !important;
    padding: 12px 12px;
    padding-left: 30px;
}

.panel-child-item.active {
    color: #ff6b35 !important;
	font-size: 20px !important;
    padding: 12px 12px;
    padding-left: 30px;
}

.check-icon {
    font-size: 24px !important;
}

.trigger-text {
    font-size: 24px !important;
}

/* 加载更多 - 横屏放大 */
.load-more-btn {
    padding: 36px 24px 30px;
}

.retry-btn-inline {
    margin: 18px;
    padding: 18px 0;
    border-radius: 40px;
}

.retry-btn-inline span {
    font-size: 24px;
}

.load-more-progress {
    height: 4px;
    margin-bottom: 8px;
}

.load-more-btn span {
    font-size: 18px;
}

.sub-tag {
    font-size: 18px !important;
    padding: 8px 16px !important;
    margin: 4px 10px !important;
}

.sub-tag.active {
    color: #fff !important;
    background: linear-gradient(135deg, #ff6b35, #ff9800) !important;
    border: none !important;
}

.sub-category-bar {
    flex-wrap: wrap;
    white-space: normal;
    overflow-x: visible;
}

.search-btn {
    padding: 24px 30px;
}

.search-btn span {
    font-size: 24px !important;
}

.search-input {
    font-size: 22px !important;
    padding: 24px 26px 24px 16px;
}

.poem-title {
    font-size: 24px !important;
}

.poem-author {
    font-size: 24px !important;
}

.no-more-tip {
    padding: 24px 0 28px;
}

.no-more-tip span {
    font-size: 18px;
}

.main-body {
    flex: 1;
    min-height: 0;
}

.content-scroll {
    padding: 6px;
}

/* ===== 默写页面 - 横屏 ===== */
.dictation-container,
.pk-container {
    /* 继承 page 的 1200px */
}

.content-area,
.pk-content-area {
    padding: 15px 20px;
}

.top-gif {
    border-radius: 14px;
}

.btn-area {
    margin: 50px 0 50px;
}

.start-btn {
    padding: 18px 100px;
	border-radius: 24px;
}

.start-btn span {
    font-size: 60px;
}

.count-tip span {
    font-size: 30px;
}

.count-tip {
    padding: 4px 0 10px;
}

.total-poem-tip {
    font-size: 40px;
}

.search-tip span {
    font-size: 30px !important;
}

.search-tip {
    padding: 4px 0 10px;
}

.class-tag {
    font-size: 18px !important;
}

.total-poem-tip span {
    font-size: 40px !important;
}

.app-name {
    font-size: 40px !important;
}

.info-text {
    font-size: 30px;
    line-height: 36px;
}

.info-index {
    font-size: 30px;
	line-height: 36px;
}

.highlight-green {
    font-size: 30px !important;
}

.qr-image,
.extra-image {
    max-width: none;
}

.img-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.grid-img:hover {
    transform: scale(1.05);
}

/* ===== 关于页面 - 横屏 ===== */
.about-container {
    /* 继承 page 的 1200px */
}

.about-content-area {
    padding: 25px 35px;
}

.code-modal-content {
    max-width:800px;
}

.code-modal-text {
    font-size: 26px;
	padding: 0 30px;
}

} /* end 横屏 */
