/* 乔府大院稻米文化馆 - 移动端优先样式 */
:root {
    --primary-color: #8b6914;
    --secondary-color: #c9a96e;
    --text-color: #333;
    --bg-light: #f5f0e6;
    --bg-dark: #e8dcc8;
    --white: #fff;
    --shadow: rgba(139, 105, 20, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-dark) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 移动端优先 - 基础样式 */
.section {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 70px 16px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, var(--bg-light) 100%);
    border-bottom: 2px solid var(--secondary-color);
}
.section:nth-child(odd) {
    background: linear-gradient(180deg, rgba(201,169,110,0.08) 0%, rgba(255,255,255,0.98) 100%);
}


.section-number {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 3px 12px var(--shadow);
}

.section-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 12px;
    max-width: 100%;
    font-weight: 600;
    line-height: 1.4;
}

.section-content {
    max-width: 100%;
    line-height: 1.9;
    color: var(--text-color);
    text-align: justify;
    font-size: 16px;
    padding: 0 4px;
}
.section-content p { margin-bottom: 12px; }
.section-content p:last-child { margin-bottom: 0; }
.section-content strong { color: var(--primary-color); }

/* 顶部控制栏 */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.progress-bar {
    position: fixed;
    top: 50px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    z-index: 1001;
    transition: width 0.3s ease;
}


.current-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* 顶部控制区域 */
.top-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 18px; height: 18px; fill: var(--primary-color); }

.icon-btn.muted .icon-muted { display: block; }
.icon-btn.muted .icon-unmuted { display: none; }
.icon-btn:not(.muted) .icon-muted { display: none; }
.icon-btn:not(.muted) .icon-unmuted { display: block; }

.font-size-label {
    font-size: 11px;
    color: #666;
    min-width: 28px;
    text-align: center;
}

.lang-switch {
    display: flex;
    background: var(--bg-light);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--secondary-color);
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
    font-weight: 500;
}
.lang-btn.active {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
}
.lang-btn:active { transform: scale(0.95); }

/* 播放按钮 */
.audio-btn {
    position: fixed;
    bottom: 24px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.2s ease;
}
.audio-btn:active { transform: scale(0.92); }
.audio-btn.playing { animation: pulse 1.5s infinite ease-in-out; }
.audio-btn svg { width: 26px; height: 26px; fill: var(--white); }

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px var(--shadow); }
    50% { box-shadow: 0 4px 30px rgba(139,105,20,0.6); transform: scale(1.05); }
}


/* 导航点 - 移动端隐藏 */
.nav-dots {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
}
.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.nav-dot.active {
    background: var(--primary-color);
    transform: scale(1.4);
    border-color: var(--secondary-color);
}

/* 底部导航 - 移动端专用 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.nav-btn:active { transform: scale(0.9); background: var(--bg-light); }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.nav-btn svg { width: 20px; height: 20px; fill: var(--primary-color); }

.section-indicator {
    font-size: 17px;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 80px;
    text-align: center;
}


/* 平板及桌面端适配 */
@media (min-width: 768px) {
    .section {
        padding: 80px 40px 100px;
    }
    .section-number {
        width: 50px;
        height: 50px;
        font-size: 20px;
        top: 24px;
        left: 24px;
    }
    .section-title {
        font-size: 30px;
        margin-bottom: 30px;
        max-width: 600px;
    }
    .section-content {
        max-width: 800px;
        font-size: 17px;
        line-height: 2;
    }
    .top-bar {
        height: 56px;
        padding: 0 24px;
    }
    .progress-bar { top: 56px; height: 4px; }
    .current-section { font-size: 14px; padding: 8px 18px; }
    .lang-btn { padding: 8px 16px; font-size: 14px; }
    .audio-btn {
        width: 64px;
        height: 64px;
        bottom: 100px;
        right: 24px;
    }
    .audio-btn svg { width: 30px; height: 30px; }
    .nav-dots { display: flex; right: 20px; gap: 8px; }
    .nav-dot { width: 12px; height: 12px; }
    .bottom-nav { display: none; }
}

@media (min-width: 1024px) {
    .section { padding: 100px 60px 120px; }
    .section-content { max-width: 900px; }
    .audio-btn:hover { transform: scale(1.08); }
    .nav-dot:hover { background: var(--secondary-color); }
    .lang-btn:hover:not(.active) { background: var(--bg-light); }
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
    .audio-btn { bottom: calc(24px + env(safe-area-inset-bottom)); }
    @media (min-width: 768px) {
        .audio-btn { bottom: 100px; }
    }
}


/* 语音提示弹窗 */
.audio-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 30px 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.modal-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 24px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
}
.modal-btn-primary:active { transform: scale(0.96); }

.modal-btn-secondary {
    background: var(--bg-light);
    color: #666;
    border: 1px solid #ddd;
}
.modal-btn-secondary:active { transform: scale(0.96); }

.audio-modal.hidden { display: none; }