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

/* ====== 主题变量 ====== */
:root {
    --theme-primary: #667eea;
    --theme-secondary: #764ba2;
    --theme-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --theme-area-tag-bg: rgba(102, 126, 234, 0.85);
    --theme-bg-tint: #f0f2f5;
    --theme-bg-soft: #f7f8fa;
    --theme-accent: rgba(102, 126, 234, 0.12);
}

/* 经典紫蓝（默认） */
.theme-default {
    --theme-primary: #667eea;
    --theme-secondary: #764ba2;
    --theme-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --theme-area-tag-bg: rgba(102, 126, 234, 0.85);
    --theme-bg-tint: #f2f3fb;
    --theme-bg-soft: #f7f8fc;
    --theme-accent: rgba(102, 126, 234, 0.12);
}

/* 水墨黑金 */
.theme-ink {
    --theme-primary: #d4af37;
    --theme-secondary: #4a4a4a;
    --theme-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --theme-area-tag-bg: rgba(212, 175, 55, 0.85);
    --theme-bg-tint: #f4f4f0;
    --theme-bg-soft: #f8f8f4;
    --theme-accent: rgba(212, 175, 55, 0.12);
}

/* 青瓷碧绿 */
.theme-jade {
    --theme-primary: #2d6a4f;
    --theme-secondary: #52b788;
    --theme-gradient: linear-gradient(135deg, #2d6a4f 0%, #52b788 100%);
    --theme-area-tag-bg: rgba(45, 106, 79, 0.85);
    --theme-bg-tint: #f0f7f4;
    --theme-bg-soft: #f5faf7;
    --theme-accent: rgba(45, 106, 79, 0.12);
}

/* 朱砂中国红 */
.theme-crimson {
    --theme-primary: #c0392b;
    --theme-secondary: #e74c3c;
    --theme-gradient: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    --theme-area-tag-bg: rgba(192, 57, 43, 0.85);
    --theme-bg-tint: #fdf4f3;
    --theme-bg-soft: #fef8f7;
    --theme-accent: rgba(192, 57, 43, 0.12);
}

/* 深海蔚蓝 */
.theme-ocean {
    --theme-primary: #0f4c75;
    --theme-secondary: #3282b8;
    --theme-gradient: linear-gradient(135deg, #0f4c75 0%, #3282b8 100%);
    --theme-area-tag-bg: rgba(15, 76, 117, 0.85);
    --theme-bg-tint: #f0f5fa;
    --theme-bg-soft: #f5f9fc;
    --theme-accent: rgba(15, 76, 117, 0.12);
}

/* 暮色晚霞 */
.theme-sunset {
    --theme-primary: #ee5a6f;
    --theme-secondary: #f29263;
    --theme-gradient: linear-gradient(135deg, #ee5a6f 0%, #f29263 100%);
    --theme-area-tag-bg: rgba(238, 90, 111, 0.85);
    --theme-bg-tint: #fdf5f3;
    --theme-bg-soft: #fef9f7;
    --theme-accent: rgba(238, 90, 111, 0.12);
}

/* 博物馆棕（文物馆、博物馆通用） */
.theme-museum {
    --theme-primary: #8b5a2b;
    --theme-secondary: #c19a6b;
    --theme-gradient: linear-gradient(135deg, #3e2723 0%, #8b5a2b 100%);
    --theme-area-tag-bg: rgba(139, 90, 43, 0.85);
    --theme-bg-tint: #f7f3ef;
    --theme-bg-soft: #faf7f4;
    --theme-accent: rgba(139, 90, 43, 0.12);
}

/* 历史青铜（青铜器、历史馆） */
.theme-history {
    --theme-primary: #8c6f2d;
    --theme-secondary: #a67c00;
    --theme-gradient: linear-gradient(135deg, #2c1810 0%, #5d4037 50%, #8c6f2d 100%);
    --theme-area-tag-bg: rgba(140, 111, 45, 0.85);
    --theme-bg-tint: #f6f2ec;
    --theme-bg-soft: #faf7f2;
    --theme-accent: rgba(140, 111, 45, 0.12);
}

/* 纪念庄重（纪念馆、革命历史） */
.theme-memorial {
    --theme-primary: #1d3557;
    --theme-secondary: #457b9d;
    --theme-gradient: linear-gradient(135deg, #0f1c2f 0%, #1d3557 60%, #457b9d 100%);
    --theme-area-tag-bg: rgba(29, 53, 87, 0.88);
    --theme-bg-tint: #f2f4f7;
    --theme-bg-soft: #f7f9fb;
    --theme-accent: rgba(29, 53, 87, 0.12);
}

/* 红色文化（红色纪念馆、革命馆） */
.theme-red {
    --theme-primary: #9d0208;
    --theme-secondary: #d00000;
    --theme-gradient: linear-gradient(135deg, #3c0000 0%, #7f0000 50%, #9d0208 100%);
    --theme-area-tag-bg: rgba(157, 2, 8, 0.88);
    --theme-bg-tint: #fbf2f2;
    --theme-bg-soft: #fdf7f7;
    --theme-accent: rgba(157, 2, 8, 0.12);
}

/* 科技未来（科技馆、科普馆） */
.theme-tech {
    --theme-primary: #00b4d8;
    --theme-secondary: #7209b7;
    --theme-gradient: linear-gradient(135deg, #03045e 0%, #0077b6 50%, #00b4d8 100%);
    --theme-area-tag-bg: rgba(0, 119, 182, 0.85);
    --theme-bg-tint: #f0f5f9;
    --theme-bg-soft: #f5f9fc;
    --theme-accent: rgba(0, 119, 182, 0.12);
}

/* 自然生态（自然馆、动植物、地质馆） */
.theme-nature {
    --theme-primary: #2d6a4f;
    --theme-secondary: #40916c;
    --theme-gradient: linear-gradient(135deg, #1b4332 0%, #2d6a4f 50%, #74c69d 100%);
    --theme-area-tag-bg: rgba(45, 106, 79, 0.85);
    --theme-bg-tint: #f0f7f4;
    --theme-bg-soft: #f5faf7;
    --theme-accent: rgba(45, 106, 79, 0.12);
}

/* 民俗古朴（非遗、民俗馆） */
.theme-folk {
    --theme-primary: #b35c1e;
    --theme-secondary: #d4871d;
    --theme-gradient: linear-gradient(135deg, #3b1f0d 0%, #8b4513 50%, #d4871d 100%);
    --theme-area-tag-bg: rgba(179, 92, 30, 0.85);
    --theme-bg-tint: #f8f3ed;
    --theme-bg-soft: #fbf7f2;
    --theme-accent: rgba(179, 92, 30, 0.12);
}

/* 艺术典雅（美术馆、艺术馆） */
.theme-art {
    --theme-primary: #8338ec;
    --theme-secondary: #fb5607;
    --theme-gradient: linear-gradient(135deg, #3a0ca3 0%, #8338ec 50%, #ff006e 100%);
    --theme-area-tag-bg: rgba(131, 56, 236, 0.82);
    --theme-bg-tint: #f5f2fb;
    --theme-bg-soft: #f9f7fc;
    --theme-accent: rgba(131, 56, 236, 0.12);
}

/* 宗教禅意（宗教、古寺庙） */
.theme-zen {
    --theme-primary: #7f4f24;
    --theme-secondary: #936639;
    --theme-gradient: linear-gradient(135deg, #1c1a17 0%, #582f0e 50%, #a68a64 100%);
    --theme-area-tag-bg: rgba(127, 79, 36, 0.88);
    --theme-bg-tint: #f6f3ef;
    --theme-bg-soft: #faf7f4;
    --theme-accent: rgba(127, 79, 36, 0.12);
}

/* 古籍卷香（图书馆、古籍馆） */
.theme-ancient {
    --theme-primary: #774936;
    --theme-secondary: #b08968;
    --theme-gradient: linear-gradient(135deg, #2d1b0e 0%, #774936 60%, #ede0d4 100%);
    --theme-area-tag-bg: rgba(119, 73, 54, 0.88);
    --theme-bg-tint: #f7f2ec;
    --theme-bg-soft: #faf6f2;
    --theme-accent: rgba(119, 73, 54, 0.12);
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--theme-bg-tint);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* ====== 加载状态 ====== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--theme-bg-tint);
    z-index: 1000;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--theme-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    margin-top: 18px;
    color: #999;
    font-size: 14px;
    letter-spacing: 1px;
}

/* ====== 错误页面 ====== */
.error-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--theme-bg-tint);
    padding: 40px;
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fef2f2;
    color: #ef4444;
    font-size: 40px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.error-page h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 12px;
}

.error-page p {
    font-size: 14px;
    color: #999;
}

/* ====== 主页面（默认流式，大尺寸再居中卡片） ====== */
.main-page {
    min-height: 100vh;
    background: #fff;
    position: relative;
    width: 100%;
    box-shadow: 0 0 0 1px var(--theme-accent);
}

/* ====== 顶部导航 ====== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    background: var(--theme-area-tag-bg, rgba(0, 0, 0, 0.45));
    color: #fff;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-back, .header-share {
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.header-back-placeholder {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.header-back:active, .header-share:active {
    background: rgba(255, 255, 255, 0.15);
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0 8px;
}

/* ====== 封面图区域（使用 aspect-ratio，自适应比例） ====== */
.cover-section {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 60vh;
    min-height: 220px;
    overflow: hidden;
    background: #fff;  /* 图片完整显示时，比例不符处留白 */
}

@supports not (aspect-ratio: 16 / 10) {
    .cover-section {
        height: 320px;
    }
}

/* 轮播图容器 */
.carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;  /* 完整显示整张图片，不裁切 */
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fff;     /* 空白处留白 */
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 10;
}

.indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

/* 轮播切换按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

.prev-btn {
    left: 12px;
}

.next-btn {
    right: 12px;
}

.cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    pointer-events: none;
}

.cover-hall {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--theme-bg-soft);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.hall-tag {
    display: none;  /* 全站隐藏展厅标签（与展区标签重复） */
    padding: 5px 14px;
    background: #fff;
    color: #555;
    font-size: 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.area-tag {
    display: inline-block;
    padding: 5px 14px;
    background: var(--theme-area-tag-bg);
    color: #fff;
    font-size: 12px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ====== 标题区域 ====== */
.title-section {
    display: none;  /* 隐藏展品标题区域（标题已在讲解正文内呈现） */
    padding: 22px 20px 18px;
    background: var(--theme-bg-soft);
    border-bottom: 1px solid var(--theme-accent);
}

.item-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.35;
    letter-spacing: 0.5px;
}

.item-subtitle {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}

/* ====== 音频播放器区域 ====== */
.player-section {
    padding: 28px 20px;
    background: var(--theme-gradient);
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.player-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

/* 播放按钮 */
.play-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.06);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

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

.play-btn svg {
    width: 30px;
    height: 30px;
}

/* 进度条 */
.progress-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.time-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    min-width: 0;
}

.progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: left 0.1s linear;
}

/* 倍速控制 */
.speed-control {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.speed-btn {
    padding: 5px 13px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.speed-btn.active {
    background: rgba(255, 255, 255, 0.92);
    color: var(--theme-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.speed-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.speed-btn.active:hover {
    background: rgba(255, 255, 255, 0.92);
}

/* ====== 讲解文案区域 ====== */
.content-section {
    padding: 24px 20px;
    background: #fff;
    margin-bottom: 0;
    border-top: 1px solid var(--theme-accent);
    border-bottom: 1px solid var(--theme-accent);
}

.content-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-left: 10px;
    border-left: 3px solid var(--theme-primary);
    line-height: 1.4;
}

.content-text {
    font-size: 15px;
    color: #555;
    line-height: 1.9;
    word-wrap: break-word;
    letter-spacing: 0.3px;
}

/* 详情文案段落：段首空两格（2em）+ 段间距，段落化渲染 */
.content-text p {
    margin: 0 0 0.85em;
    text-indent: 2em;
    text-align: justify;
}

/* 最后一段去掉底部外边距，避免与底部模块留多余空白 */
.content-text p:last-child {
    margin-bottom: 0;
}

/* 对齐方式为居中/右/左的段落取消段首缩进（仅富文本编辑器产生的内联样式） */
.content-text p[style*="text-align:center"],
.content-text p[style*="text-align:right"],
.content-text p[style*="text-align:left"] {
    text-indent: 0;
}

/* Quill 对齐类直接生效（兼容未转换 ql-align-* 的旧版 app.js；前端无需加载 Quill CSS） */
.content-text .ql-align-center,
.content-text p[class*="ql-align-center"],
.content-text h1[class*="ql-align-center"],
.content-text h2[class*="ql-align-center"],
.content-text h3[class*="ql-align-center"] {
    text-align: center;
    text-indent: 0;
}
.content-text .ql-align-right,
.content-text p[class*="ql-align-right"],
.content-text h1[class*="ql-align-right"],
.content-text h2[class*="ql-align-right"],
.content-text h3[class*="ql-align-right"] {
    text-align: right;
    text-indent: 0;
}
.content-text .ql-align-left,
.content-text p[class*="ql-align-left"] {
    text-align: left;
    text-indent: 0;
}
.content-text .ql-align-justify,
.content-text p[class*="ql-align-justify"] {
    text-align: justify;
    text-indent: 2em;
}

/* ====== 富文本编辑器内容样式 ====== */
.content-text h1,
.content-text h2,
.content-text h3,
.content-text h4,
.content-text h5,
.content-text h6 {
    margin: 0.8em 0 0.4em;
    font-weight: 600;
    text-indent: 0;
    line-height: 1.4;
}
.content-text h1 { font-size: 1.4em; }
.content-text h2 { font-size: 1.25em; }
.content-text h3 { font-size: 1.1em; }
.content-text h4, .content-text h5, .content-text h6 { font-size: 1em; }

.content-text ul,
.content-text ol {
    margin: 0.5em 0;
    padding-left: 1.8em;
    text-indent: 0;
}
.content-text li {
    margin: 0.2em 0;
    text-indent: 0;
}

.content-text a {
    color: var(--theme-primary);
    text-decoration: underline;
    word-break: break-all;
}

.content-text blockquote {
    margin: 0.5em 0;
    padding: 0.5em 1em;
    border-left: 3px solid var(--theme-primary);
    background: var(--theme-accent);
    text-indent: 0;
    color: #666;
}

.content-text img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5em 0;
}

.content-text strong,
.content-text b {
    font-weight: 600;
}

.content-text hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1em 0;
}

/* ====== 底部版权 ====== */
.footer {
    padding: 24px 16px 32px;
    text-align: center;
    background: var(--theme-bg-soft);
    border-top: 1px solid var(--theme-accent);
}

.footer p {
    font-size: 12px;
    color: #bbb;
    letter-spacing: 0.5px;
}

/* ====== 展品列表区域（展区页）——默认单列，大屏多列网格 ====== */
.item-list-section {
    padding: 24px 20px;
    background: var(--theme-bg-soft);
    border-top: 1px solid var(--theme-accent);
}

.item-list {
    margin-top: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 12px;
    justify-items: center;
}

.item-card {
    display: flex;
    align-items: stretch;
    padding: 12px;
    background: #fff;
    border-radius: 14px;
    text-decoration: none;
    color: #333;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 1px solid #f0f2f5;
    gap: 14px;
    width: 100%;
    max-width: 380px;
}

.item-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.item-card:active {
    background: #f8f9fb;
    transform: translateY(0);
}

.item-card-cover {
    position: relative;
    width: 96px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.item-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-card-play {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.item-card-play svg {
    width: 14px;
    height: 14px;
    margin-left: 1px;
}

.item-card:hover .item-card-play {
    background: var(--theme-gradient);
    transform: scale(1.1);
}

.item-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 2px 0;
}

.item-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-sub {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.item-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--theme-accent);
    color: var(--theme-primary);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.item-card-tag svg {
    width: 12px;
    height: 12px;
}

.item-card-arrow {
    flex-shrink: 0;
    font-size: 22px;
    color: #d0d5dd;
    margin-left: auto;
    align-self: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.item-card:hover .item-card-arrow {
    color: var(--theme-primary);
    transform: translateX(2px);
}

.empty-tip {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 32px 0;
}

/* ====== 无音频时隐藏播放器 ====== */
.no-audio .player-section {
    display: none;
}

/* ====== 超小屏手机（≤360px） ====== */
@media screen and (max-width: 360px) {
    .cover-section {
        aspect-ratio: 4 / 3;
    }

    .item-title {
        font-size: 20px;
    }

    .content-text {
        font-size: 14.5px;
    }

    .play-btn {
        width: 68px;
        height: 68px;
    }

    .play-btn svg {
        width: 26px;
        height: 26px;
    }

    .item-card-cover {
        width: 84px;
        height: 64px;
    }

    .item-card-title {
        font-size: 15px;
    }

    .item-card-sub {
        font-size: 12px;
    }

    .item-card {
        padding: 10px;
        gap: 10px;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
    }

    .prev-btn { left: 8px; }
    .next-btn { right: 8px; }
}

/* ====== 小屏手机（≤420px）微调 ====== */
@media screen and (max-width: 420px) {
    .title-section, .player-section, .content-section, .item-list-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .player-section {
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

/* ====== 平板 / 大屏手机（≥500px）——卡片居中，展品双列 ====== */
@media screen and (min-width: 500px) {
    body {
        background: var(--theme-bg-tint);
    }

    .main-page {
        max-width: 560px;
        margin: 0 auto;
        min-height: 100vh;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
        background: #fff;
    }

    .header {
        max-width: 560px;
        left: 50%;
        transform: translateX(-50%);
    }

    .loading {
        background: var(--theme-bg-tint);
    }

    .error-page {
        background: var(--theme-bg-tint);
    }

    .cover-section {
        aspect-ratio: 16 / 9;
    }

    .item-title {
        font-size: 24px;
    }

    .content-text {
        font-size: 15.5px;
    }

    /* 展品列表自适应网格（auto-fit 自动适配列数） */
    .item-list {
        gap: 16px;
    }

    .item-card {
        flex-direction: column;
        padding: 0;
        gap: 0;
        overflow: hidden;
    }

    .item-card-cover {
        width: 100%;
        height: 0;
        padding-bottom: 75%;
        border-radius: 14px 14px 0 0;
        box-shadow: none;
    }

    .item-card-cover img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .item-card-play {
        bottom: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
    }

    .item-card-play svg {
        width: 16px;
        height: 16px;
    }

    .item-card-info {
        padding: 12px 12px 14px;
    }

    .item-card-title {
        font-size: 15px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .item-card-sub {
        font-size: 12.5px;
        margin-bottom: 6px;
    }

    .item-card-meta {
        justify-content: space-between;
    }

    .item-card-arrow {
        display: none;
    }
}

/* ====== 大屏平板 / 小屏 PC（≥768px）——主卡片放大，展品三列 ====== */
@media screen and (min-width: 768px) {
    .main-page {
        max-width: 720px;
        margin-top: 20px;
        margin-bottom: 20px;
        min-height: calc(100vh - 40px);
        border-radius: 16px;
        overflow: hidden;
    }

    .header {
        max-width: 720px;
        top: 20px;
        border-radius: 16px 16px 0 0;
    }

    .cover-section {
        padding-top: 0;
        aspect-ratio: 16 / 8;
    }

    .footer {
        border-radius: 0 0 16px 16px;
    }

    .item-list {
        gap: 18px;
    }

    .item-card-cover {
        padding-bottom: 65%;
    }

    .title-section, .player-section, .content-section, .item-list-section {
        padding-left: 28px;
        padding-right: 28px;
    }

    .player-section {
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .item-title {
        font-size: 26px;
    }
}

/* ====== 中屏 PC（≥1024px）——主卡片再放大，展品三列 ====== */
@media screen and (min-width: 1024px) {
    .main-page {
        max-width: 960px;
        margin-top: 24px;
        margin-bottom: 24px;
        min-height: calc(100vh - 48px);
    }

    .header {
        max-width: 960px;
        top: 24px;
    }

    .cover-section {
        aspect-ratio: 21 / 9;
    }

    .item-list {
        gap: 20px;
    }

    .item-card-cover {
        padding-bottom: 62%;
    }

    .title-section, .player-section, .content-section, .item-list-section {
        padding-left: 36px;
        padding-right: 36px;
    }

    .item-title {
        font-size: 28px;
    }

    .content-title {
        font-size: 18px;
    }

    .content-text {
        font-size: 16px;
        line-height: 1.9;
    }

    /* 讲解文案区域在大屏上增加阅读宽度限制 */
    .content-text {
        max-width: 780px;
    }
}

/* ====== 大屏 PC（≥1440px）——限制最大宽度，继续用三列 ====== */
@media screen and (min-width: 1440px) {
    .main-page {
        max-width: 1120px;
    }

    .header {
        max-width: 1120px;
    }

    .cover-section {
        aspect-ratio: 24 / 9;
    }

    .title-section, .player-section, .content-section, .item-list-section {
        padding-left: 44px;
        padding-right: 44px;
    }
}

/* ====== 底部固定播放栏 ====== */
/* 默认预留足够的底部空间（播放条总高 + iOS 安全区 + 与内容的呼吸间距） */
.main-content {
    padding-bottom: 140px;
}

.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    background: var(--theme-bg-soft);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -1px 0 var(--theme-accent), 0 -4px 20px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 跟随主卡片宽度（分段） */
@media screen and (min-width: 500px) {
    .player-bar {
        max-width: 560px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 0 0 16px 16px;
    }
}
@media screen and (min-width: 768px) {
    .player-bar {
        max-width: 720px;
    }
}
@media screen and (min-width: 1024px) {
    .player-bar {
        max-width: 960px;
    }
}
@media screen and (min-width: 1440px) {
    .player-bar {
        max-width: 1120px;
    }
}

.player-bar-progress {
    position: relative;
    width: 100%;
    height: 3px;
    background: var(--theme-accent);
    cursor: pointer;
}

.bar-progress-fill {
    height: 100%;
    background: var(--theme-primary);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

.bar-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    background: var(--theme-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-bar-progress:hover .bar-progress-handle {
    opacity: 1;
}

.player-bar-body {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 10px;
    flex-wrap: nowrap;
}

.bar-time {
    font-size: 11px;
    color: #aaa;
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: center;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.bar-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.bar-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
    flex-shrink: 0;
}

.bar-btn svg {
    width: 20px;
    height: 20px;
}

.bar-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.bar-btn:active {
    background: #e8e8e8;
    transform: scale(0.92);
}

/* 播放按钮（渐变主题色） */
.bar-play {
    width: 46px;
    height: 46px;
    background: var(--theme-gradient);
    color: #fff;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    outline: none;
}

.bar-play svg {
    width: 24px;
    height: 24px;
}

.bar-play:hover,
.bar-play:focus,
.bar-play:focus-visible {
    background: var(--theme-gradient);
    color: #fff;
    filter: brightness(1.08);
    transform: scale(1.06);
    outline: none;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.bar-play:active {
    background: var(--theme-gradient) !important;
    color: #fff !important;
    transform: scale(0.94);
    filter: brightness(0.96);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    outline: none;
}

/* 倍速按钮（文字型，带主题色高亮） */
.bar-speed {
    width: auto;
    min-width: 42px;
    height: 32px;
    padding: 0 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-primary);
    background: var(--theme-accent);
    letter-spacing: 0.3px;
    outline: none;
}

.bar-speed:hover,
.bar-speed:focus,
.bar-speed:focus-visible {
    background: var(--theme-accent);
    color: var(--theme-primary);
    transform: scale(1.05);
    outline: none;
}

.bar-speed:active {
    background: var(--theme-accent) !important;
    color: var(--theme-primary) !important;
    transform: scale(0.95);
    filter: brightness(0.96);
    outline: none;
}

/* 小屏优化 */
@media screen and (max-width: 360px) {
    .bar-btn {
        width: 34px;
        height: 34px;
    }

    .bar-btn svg {
        width: 18px;
        height: 18px;
    }

    .bar-play {
        width: 42px;
        height: 42px;
    }

    .bar-play svg {
        width: 22px;
        height: 22px;
    }

    .player-bar-body {
        padding: 8px 10px;
        gap: 6px;
    }

    .main-content {
        padding-bottom: 80px;
    }
}

/* ====== 嵌入网页入口 ====== */
.embed-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin: 0 16px 16px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--theme-accent);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: #333;
}

@media screen and (min-width: 500px) {
    .embed-entry {
        margin: 0 20px 16px;
    }
}
@media screen and (min-width: 768px) {
    .embed-entry {
        margin: 0 28px 18px;
        padding: 16px 18px;
    }
}
@media screen and (min-width: 1024px) {
    .embed-entry {
        margin: 0 36px 20px;
    }
}

.embed-entry:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.embed-entry:active {
    transform: translateY(0);
}

.embed-entry-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--theme-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.embed-entry-icon svg {
    width: 24px;
    height: 24px;
}

.embed-entry-text {
    flex: 1;
    min-width: 0;
}

.embed-entry-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.embed-entry-sub {
    font-size: 12px;
    color: #999;
}

.embed-entry-arrow {
    flex-shrink: 0;
    font-size: 22px;
    color: #d0d5dd;
    transition: color 0.2s ease, transform 0.2s ease;
}

.embed-entry:hover .embed-entry-arrow {
    color: var(--theme-primary);
    transform: translateX(2px);
}

/* ====== 嵌入网页全屏弹层 ====== */
.embed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #fff;
    flex-direction: column;
}

.embed-modal-close {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.2s ease;
}

.embed-modal-close:active {
    background: rgba(0, 0, 0, 0.7);
}

.embed-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}
