/**
 * Blessed AI Bible Plugin - Main Stylesheet
 *
 * Contains styles for both desktop (card-view) and mobile (full-screen)
 * displays, using a mobile-first approach.
 */

/* Import Cormorant Garamond font for chapter content */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

/* --- Mobile Styles (Default) --- */
.blessed-ai-bible-card {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.blessed-ai-bible-background {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* 移除背景叠加层和模糊遮罩 */
.blessed-ai-bible-background::before {
    display: none !important;
    content: none !important;
    background: none !important;
    backdrop-filter: none !important;
    filter: none !important;
}

/* --- Centered Content --- */
.blessed-ai-bible-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 90vw; /* Use viewport width for mobile */
}

.blessed-ai-bible-text {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: bold;
    line-height: 1.4;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0 0 20px 0;
}

.blessed-ai-bible-reference {
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-style: italic;
    cursor: pointer;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    transition: color 0.3s ease;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blessed-ai-bible-reference:hover {
    color: #ffddab;
    text-decoration-thickness: 2px;
}


/* --- Desktop Styles (screens wider than 768px) --- */
@media (min-width: 769px) {
    .blessed-ai-bible-card {
        max-width: 900px;
        height: auto; /* Let content determine height */
        margin: 40px auto; /* Center it on the page */
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }

    .blessed-ai-bible-background {
        height: 550px; /* A fixed height for the desktop card */
    }

    .blessed-ai-bible-content {
        max-width: 90%; /* More constrained on desktop */
    }

    .blessed-ai-bible-text {
        font-size: 3rem;
    }

    .blessed-ai-bible-reference {
        font-size: 1.5rem;
    }
}


/* --- Chapter Modal (Bible Chapter) UI Optimization --- */
.blessed-ai-bible-modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.18); /* Lighter overlay for more background visibility */
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease-in-out;
}

.blessed-ai-bible-modal .modal-content {
    background: rgba(255,255,255,0.72); /* Semi-transparent white */
    color: #222;
    margin: 6vh auto;
    padding: 32px 18px 24px 18px;
    border-radius: 18px;
    max-width: 700px;
    width: 92vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    animation: slideIn 0.4s ease-in-out;
    font-family: 'EB Garamond', 'Crimson Text', 'Playfair Display', serif;
}

.blessed-ai-bible-modal .modal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #4a2c0a;
    margin-bottom: 18px;
    text-align: center;
    letter-spacing: 0.04em;
}

.blessed-ai-bible-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
    line-height: 2.1;
    font-size: 1.18rem;
    font-family: 'EB Garamond', 'Crimson Text', 'Playfair Display', serif;
    color: #2d1c0b;
    background: none;
    text-align: left;
    padding: 0 4vw;
    letter-spacing: 0.01em;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto; /* 修改为auto避免与章节滚动冲突 */
}

.blessed-ai-bible-modal .modal-body p {
    margin: 0 0 1.2em 0;
    text-indent: 2em;
}

.blessed-ai-bible-modal .modal-body strong {
    color: #7c5c00;
    font-weight: 700;
    font-family: 'Crimson Text', serif;
    font-size: 1.05em;
}

.blessed-ai-bible-modal .close-button {
    color: #7c5c00;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 2;
    transition: color 0.2s;
}
.blessed-ai-bible-modal .close-button:hover,
.blessed-ai-bible-modal .close-button:focus {
    color: #b97a00;
}

.blessed-ai-bible-modal .modal-body.auto-scroll {
    animation: bible-chapter-autoscroll linear infinite;
    animation-duration: var(--bible-chapter-scroll-duration, 30s);
}

@keyframes bible-chapter-autoscroll {
    0% { scroll-behavior: auto; scroll-top: 0; }
    100% { scroll-behavior: auto; scroll-top: 100%; }
}

/* Keyframe animations for modal */
@keyframes fadeIn {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.7); }
}

@keyframes slideIn {
    from { margin-top: 5%; opacity: 0; }
    to { margin-top: 10%; opacity: 1; }
}

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

:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-text: #666;
    --background-color: #fff;
    --border-color: #e1e1e1;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    /* overflow-y: auto; // 默认即可，不强制 */
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 4px 12px;
    z-index: 1000;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 24px;
    width: auto;
}

.nav-auth {
    display: flex;
    align-items: center;
}

.user-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6B46C1;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.2s ease;
}

.user-icon:hover {
    transform: scale(1.05);
}

/* 主内容区域调整 */
#main-content {
    padding-top: 48px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow-x: hidden;
}

/* 经文卡片样式 */
.verse-card-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.verse-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.verse-header-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* 经文标题样式 */
#today-verse-heading {
    font-size: 1.5rem;
    margin: 0;
    color: #333;
    font-weight: 600;
}

.verse-date {
    font-size: 0.9rem;
    color: #666;
    margin: 4px 0 0;
}

/* 分享按钮样式 */
.share-btn, .share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #6B46C1;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.98rem;
    transition: all 0.2s ease;
}

.share-btn:hover, .share-button:hover {
    background-color: #5531a7;
    color: #fff;
}

.share-btn i, .share-button i {
    font-size: 1.1em;
    margin-right: 4px;
    color: #fff;
}

.share-btn span {
    color: #fff;
}

/* 经文背景容器 */
.verse-background-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
    border-radius: 0 0 12px 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 经文内容覆盖层 */
.verse-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
    color: #fff;
    text-align: center;
}

.verse-text {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    font-weight: 500;
}

.verse-reference {
    font-family: 'Crimson Text', serif;
    font-size: 18px;
    font-style: italic;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* AI Bible Guide 样式已整合到 .ai-bible-guide-section */

.ai-guide-header {
    text-align: center;
    margin-bottom: 20px;
}

.ai-guide-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 8px;
}

.section-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.ai-chat-container {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.ai-chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 分享弹窗整体样式优化 */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.18);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.share-modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 32px 28px 24px 28px;
    border-radius: 20px;
    width: 95vw;
    max-width: 400px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.12);
    position: relative;
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Arial', sans-serif;
}

.close-modal-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 28px;
    cursor: pointer;
    color: #222;
    background: none;
    border: none;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s;
}
.close-modal-btn:hover {
    color: #e53e3e;
}

.modal-content h2, .modal-content .share-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #111;
    letter-spacing: 0.01em;
}

/* 复制链接按钮样式 */
.copy-link-row {
    display: flex;
    align-items: center;
    background: #f6f6f6;
    border-radius: 999px;
    padding: 4px 8px 4px 0;
    margin-bottom: 18px;
    overflow: hidden;
}
.copy-link-btn {
    background: #222;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    margin-right: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.copy-link-btn:hover {
    background: #444;
}
.copy-link-url {
    font-size: 1rem;
    color: #888;
    background: none;
    border: none;
    outline: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 分享列表样式 */
.share-options-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;
    padding: 0;
}
.share-options-list button, .share-options-list a {
    display: flex;
    align-items: center;
    gap: 16px;
    background: none;
    border: none;
    outline: none;
    font-size: 1.08rem;
    color: #222;
    font-weight: 500;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.18s, color 0.18s;
    text-align: left;
    width: 100%;
    box-shadow: none;
    justify-content: flex-start;
}
.share-options-list button:hover, .share-options-list a:hover {
    background: #f6f6f6;
    color: #4a90e2;
}
.share-options-list i, .share-options-list svg {
    font-size: 1.35em;
    min-width: 1.35em;
    color: #666;
    transition: color 0.18s;
}
.share-options-list button:hover i, .share-options-list a:hover i {
    color: #4a90e2;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar {
        height: 40px;
        min-height: 40px;
        padding: 6px 15px;
    }
    
    .logo img {
        height: 28px;
    }
    
    #main-content {
        padding-top: 40px;
    }
    
    .verse-card-container {
        margin: 10px auto;
        border-radius: 8px;
    }
    
    .verse-background-container {
        padding-top: 177.78%; /* 9:16 比例，更适合移动设备 */
    }
    
    .share-options-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .verse-text {
        font-size: 18px;
        color: #ffffff;
    }
    
    .verse-reference {
        font-size: 16px;
        color: #ffffff;
    }
}

@media (max-width: 480px) {
    .verse-text {
        font-size: 16px;
        color: #ffffff;
    }
    
    .verse-reference {
        font-size: 14px;
        color: #ffffff;
    }
    
    .share-options-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 16px 4vw 12px 4vw;
        border-radius: 14px;
        max-width: 98vw;
    }
    .copy-link-row {
        padding: 2px 4px 2px 0;
    }
    .share-options-list {
        gap: 10px;
    }
    .share-options-list button, .share-options-list a {
        font-size: 1rem;
        padding: 10px 10px;
        border-radius: 8px;
    }
    .close-modal-btn {
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 600px) {
    #today-verse-heading {
        font-size: 1.1rem !important;
        line-height: 1.2;
    }
    .navbar {
        height: 36px;
        min-height: 36px;
        padding: 2px 8px;
    }
    .logo img {
        height: 24px;
    }
    .bab-verse-bg {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 1 !important;
    }
    .ai-bible-guide-section {
        position: static !important;
        z-index: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 300px !important;
        max-height: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        background: #fff !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: hidden !important;
        box-shadow: none !important;
        padding: 15px 8px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    .ai-bible-guide-section > * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .ai-chat-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .ai-chat-container iframe {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 500px !important;
        min-height: 350px;
        border-radius: 0 !important;
        visibility: visible !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    .bab-verse-overlay {
        padding: 40px 15px !important;
        font-size: 4vw !important;
        max-width: 98vw;
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .bab-verse-text {
        font-size: clamp(4.3em, 11.2vw, 5.9em) !important; /* 提升40%：3.1*1.4=4.34, 8*1.4=11.2, 4.2*1.4=5.88 */
        line-height: 1.25 !important;
        letter-spacing: 0.02em !important;
        word-spacing: 0.05em !important;
        margin-bottom: 0.8em !important;
        /* 移除省略号限制，让内容完整显示 */
        max-height: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        display: block !important;
        -webkit-line-clamp: none !important;
        -webkit-box-orient: unset !important;
    }
    .bab-verse-ref {
        font-size: clamp(4.3em, 11.2vw, 5.9em) !important; /* 与经文字体大小一致 */
        line-height: 1.25 !important;
        letter-spacing: 0.02em !important;
        word-spacing: 0.05em !important;
    }
}

.og-generated-image { display: none !important; }

/* 视频背景容器 - 已移除，因为实际HTML结构中视频直接在 .bab-verse-bg 内 */

/* 视频元素和回退图片共用样式，确保铺满容器 */
.background-video,
.background-video img,
.verse-bg-video,
#backgroundVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.verse-bg-image,
#fallbackImage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* 确保经文内容显示在视频和图片之上 */
.verse-background-container, .verse-content-overlay, .verse-content, .bible-verse-display {
    position: relative;
    z-index: 1;
}

/* 摩斯码"阿们"震动视觉反馈 */
.vibration-fallback {
    animation: morse-amen 0.8s linear;
}
@keyframes morse-amen {
    0%, 15% { transform: scale(0.98); }
    16%, 45% { transform: scale(0.92); }
    46%, 75% { transform: scale(0.92); }
    76%, 100% { transform: scale(0.98); }
}

/* Amen按钮容器，仅移动端显示 */
.amen-btn-container {
    position: absolute;
    left: 50%;
    bottom: 7vh;
    transform: translateX(-50%);
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}
@media (max-width: 900px) {
    .amen-btn-container { display: flex; pointer-events: auto; }
}

.amen-btn {
    display: flex;
    align-items: center;
    gap: 0.7em;
    background: linear-gradient(90deg, #ffe066 0%, #ffd700 100%);
    color: #7c5c00;
    font-size: 1.25rem;
    font-family: 'EB Garamond', 'Times New Roman', serif;
    font-weight: 600;
    border: none;
    border-radius: 2em;
    box-shadow: 0 4px 24px rgba(255,215,0,0.18);
    padding: 0.7em 2.2em 0.7em 1.2em;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: box-shadow 0.2s, transform 0.1s;
    outline: none;
}
.amen-btn:active {
    box-shadow: 0 2px 8px rgba(255,215,0,0.25);
    transform: scale(0.97);
}

.amen-btn .amen-hand {
    font-size: 1.5em;
    margin-right: 0.2em;
    color: #ffb300;
    filter: drop-shadow(0 0 6px #fffbe6);
    animation: amen-hand-glow 1.2s infinite alternate;
}
@keyframes amen-hand-glow {
    0% { filter: drop-shadow(0 0 6px #fffbe6); }
    100% { filter: drop-shadow(0 0 18px #ffe066); }
}

.amen-btn .amen-wave {
    display: inline-block;
    width: 1.6em;
    height: 1.6em;
    margin-left: 0.1em;
    position: relative;
}
.amen-btn .amen-wave span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    border: 2.5px solid #ffe066;
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.7);
    animation: amen-wave-pulse 1.2s infinite;
}
.amen-btn .amen-wave span:nth-child(2) {
    animation-delay: 0.6s;
    opacity: 0.4;
    border-width: 1.5px;
}
@keyframes amen-wave-pulse {
    0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.7); }
    80% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

.amen-btn .amen-label {
    position: relative;
    z-index: 1;
    letter-spacing: 0.04em;
    user-select: none;
}

.blessed-ai-bible-container,
.container,
.verse-background-container,
.verse-card-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    /* 不设置overflow:hidden，避免阻止内部滚动 */
}

/* 背景视频容器保持全屏 - 已在上方定义，删除重复 */

#backgroundWrapper {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}
/* 视频和图片的透明度由JavaScript控制 */

/* --- AI Chat Section --- */
.ai-bible-guide-section {
    padding: 20px;
    background-color: #f4f7f9;
    text-align: center;
}

@media (min-width: 769px) {
    .ai-bible-guide-section {
        margin: 40px auto;
        max-width: 900px;
        border-radius: 15px;
        box-sizing: border-box;
        overflow: hidden;
    }
}

.ai-chat-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 600px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
}

#ai-chat-placeholder,
#ai-chat-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#load-ai-chat-btn {
    padding: 12px 24px;
    font-size: 1rem;
    color: #ffffff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#load-ai-chat-btn:hover {
    background-color: #0056b3;
}

#ai-chat-iframe {
    width: 100%;
    max-width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    visibility: visible !important; /* 强制显示 */
    box-sizing: border-box;
}

#ai-chat-iframe.loaded {
    visibility: visible; /* Made visible by JS */
}

/* ===== 强制Blessed AI Bible内容区在所有主题下可见 ===== */
.blessed-ai-bible-page .verse-background-container {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background-size: cover !important;
    background-position: center !important;
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.blessed-ai-bible-page .verse-content-overlay {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10 !important;
    background: rgba(0,0,0,0.7) !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important; /* 标题居右 */
    justify-content: center !important;
    padding: 2vw 5vw !important;
    font-size: 2vw !important;
}

.blessed-ai-bible-page .verse-text,
.blessed-ai-bible-page .verse-reference {
    color: #fff !important;
    text-shadow: 0 2px 8px #000 !important;
    font-size: 2.5vw !important;
    margin-bottom: 1vw !important;
    text-align: right !important;
    z-index: 20 !important;
}

/* AI Bible Guide 模块全屏适配（如有） */
/* 已删除冗余的 .ai-bible-guide 样式 */

/* ===== Blessed AI Bible 唯一命名样式（终极优化） ===== */
.bab-verse-bg {
    position: relative !important;
    left: 0; top: 0;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    overflow: hidden;
}

/* ===== Prayer Button Styles ===== */
.bab-verse-bg .bab-prayer-button {
    /* 基督教主题配色：深蓝紫色背景渐变，象征信仰与庄严 */
    background: linear-gradient(135deg, 
        rgba(75, 85, 160, 0.92) 0%,
        rgba(106, 90, 205, 0.88) 50%,
        rgba(72, 61, 139, 0.92) 100%
    ) !important;
    color: #ffffff !important;
    /* 金色边框 - 神圣光辉 */
    border: 2px solid rgba(255, 215, 0, 0.3) !important;
    border-radius: 28px !important;
    padding: 10px 20px !important;
    font-size: 1.0em !important;
    font-weight: 600 !important;
    font-family: 'EB Garamond', serif !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 1.5em auto 0 auto !important;
    max-width: none !important;
    min-width: 100px !important;
    box-shadow: 
        0 4px 15px rgba(75, 85, 160, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(8px) !important;
    position: relative !important;
    z-index: 100 !important;
}

.bab-verse-bg .bab-prayer-button:hover {
    /* 悬停时增强金色光辉效果 */
    background: linear-gradient(135deg, 
        rgba(85, 95, 180, 0.95) 0%, 
        rgba(126, 110, 225, 0.92) 50%, 
        rgba(92, 81, 159, 0.95) 100%
    ) !important;
    border-color: rgba(255, 215, 0, 0.6) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 6px 20px rgba(75, 85, 160, 0.5),
        0 3px 12px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.bab-verse-bg .bab-prayer-button:active {
    /* 点击时的深度按压效果 */
    background: linear-gradient(135deg, 
        rgba(65, 75, 150, 0.98) 0%, 
        rgba(96, 80, 195, 0.95) 50%, 
        rgba(62, 51, 129, 0.98) 100%
    ) !important;
    border-color: rgba(255, 215, 0, 0.8) !important;
    transform: translateY(1px) !important;
    box-shadow: 
        0 2px 8px rgba(75, 85, 160, 0.6),
        0 1px 4px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.bab-verse-bg .bab-prayer-button.praying {
    /* 祷告时的神圣金色光辉 */
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.95) 0%,     /* 神圣金色 */
        rgba(255, 193, 7, 0.92) 50%,    /* 温暖琥珀色 */
        rgba(218, 165, 32, 0.95) 100%   /* 深金色 */
    ) !important;
    color: rgba(75, 85, 160, 1) !important; /* 深蓝色文字 */
    border-color: rgba(255, 255, 255, 0.8) !important;
    animation: christianPrayerGlow 1.5s ease-in-out infinite !important;
}

/* 基督教主题祷告光辉动画 */
@keyframes christianPrayerGlow {
    0%, 100% { 
        box-shadow: 
            0 4px 15px rgba(255, 215, 0, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.2),
            0 0 20px rgba(255, 215, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
        transform: scale(1) !important;
    }
    50% { 
        box-shadow: 
            0 8px 30px rgba(255, 215, 0, 0.6),
            0 4px 15px rgba(255, 193, 7, 0.5),
            0 0 40px rgba(255, 215, 0, 0.5),
            0 0 60px rgba(255, 255, 255, 0.2),
            inset 0 2px 4px rgba(255, 255, 255, 0.4) !important;
        transform: scale(1.02) !important;
    }
}

@keyframes prayerGlow {
    0%, 100% { 
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    }
    50% { 
        box-shadow: 
            0 6px 20px rgba(255, 193, 7, 0.4) !important,
            0 0 25px rgba(255, 193, 7, 0.3) !important;
    }
}

@keyframes prayerPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4), 0 0 0 0 rgba(255, 215, 0, 0.7);
        background: rgba(66, 133, 244, 0.85);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6), 0 0 0 8px rgba(255, 215, 0, 0.4);
        background: rgba(255, 215, 0, 0.9);
        color: #333;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4), 0 0 0 0 rgba(255, 215, 0, 0.7);
        background: rgba(66, 133, 244, 0.85);
    }
}

.bab-verse-bg .bab-prayer-button .prayer-icon {
    font-size: 1.2em !important;
    line-height: 1 !important;
    filter: none !important;
    position: relative !important;
}

.bab-verse-bg .bab-prayer-button .prayer-text {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
}

.bab-verse-bg .bab-prayer-button .vibration-icon {
    display: inline-block !important;
    font-size: 0.9em !important;
    margin-left: 4px !important;
    animation: vibrationPulse 2s infinite ease-in-out !important;
}

@keyframes vibrationPulse {
    0%, 100% { 
        opacity: 0.6 !important;
        transform: scale(0.9) !important;
    }
    50% { 
        opacity: 1 !important;
        transform: scale(1.1) !important;
    }
}

.bab-verse-bg .bab-prayer-button .vibration-waves {
    display: inline-block !important;
    position: relative !important;
    width: 12px !important;
    height: 12px !important;
    margin-left: 3px !important;
    z-index: 10 !important; /* 确保层级正确 */
}

.bab-verse-bg .bab-prayer-button .vibration-waves::before,
.bab-verse-bg .bab-prayer-button .vibration-waves::after {
    content: '' !important;
    position: absolute !important;
    border: 1px solid currentColor !important;
    border-radius: 50% !important;
    opacity: 0.6 !important;
    will-change: transform, opacity !important; /* 启用硬件加速 */
}

.bab-verse-bg .bab-prayer-button .vibration-waves::before {
    width: 8px !important;
    height: 8px !important;
    top: 2px !important;
    left: 2px !important;
    animation: christianWaveExpand 1.5s infinite ease-out !important;
    animation-fill-mode: both !important; /* 确保动画状态保持 */
}

.bab-verse-bg .bab-prayer-button .vibration-waves::after {
    width: 12px !important;
    height: 12px !important;
    top: 0 !important;
    left: 0 !important;
    animation: christianWaveExpand 1.5s infinite ease-out 0.3s !important;
    animation-fill-mode: both !important; /* 确保动画状态保持 */
}

.bab-verse-bg .bab-prayer-button .morse-indicator {
    font-size: 0.7em !important;
    opacity: 0.8 !important;
    margin-left: 3px !important;
    letter-spacing: 1px !important;
    font-family: monospace !important;
    vertical-align: middle !important;
}

/* Tooltip for morse code explanation - 移动到按钮上方避免与摩斯码动画重叠 */
.bab-verse-bg .bab-prayer-button::after {
    content: 'Vibrates "AMEN" in Morse Code' !important;
    position: absolute !important;
    top: -45px !important; /* 改为在按钮上方显示 */
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 0.7em !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
    z-index: 1001 !important;
    /* 添加小箭头指向按钮 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 为tooltip添加小箭头指向按钮 */
.bab-verse-bg .bab-prayer-button::before {
    content: '' !important;
    position: absolute !important;
    top: -35px !important; /* 箭头位置 */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-left: 5px solid transparent !important;
    border-right: 5px solid transparent !important;
    border-top: 5px solid rgba(0, 0, 0, 0.8) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
    z-index: 1002 !important;
}

.bab-verse-bg .bab-prayer-button:hover::before {
    opacity: 1 !important;
}

.bab-verse-bg .bab-prayer-button:hover::after {
    opacity: 1 !important;
}

/* Mobile prayer button adjustments */
@media (max-width: 600px) {
    .bab-verse-bg .bab-prayer-button {
        font-size: 1.4em !important; /* 增加字体大小：从0.95em到1.4em */
        padding: 12px 24px !important; /* 增加内边距：从8px 18px到12px 24px */
        margin-top: 5.0em !important; /* 扩大2倍间距：从2.5em改为5.0em */
        min-width: 120px !important; /* 增加最小宽度：从90px到120px */
        gap: 8px !important; /* 增加元素间距：从5px到8px */
    }
    
    .bab-verse-bg .bab-prayer-button .vibration-waves {
        width: 10px !important;
        height: 10px !important;
        margin-left: 2px !important;
        display: inline-block !important; /* 确保显示 */
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* 移动端震动波伪元素 - 确保动画正常 */
    .bab-verse-bg .bab-prayer-button .vibration-waves::before {
        content: '' !important;
        position: absolute !important;
        width: 6px !important; /* 适配移动端大小 */
        height: 6px !important;
        top: 2px !important;
        left: 2px !important;
        border: 1px solid currentColor !important;
        border-radius: 50% !important;
        opacity: 0.6 !important;
        animation: christianWaveExpand 1.5s infinite ease-out !important;
        animation-fill-mode: both !important;
        will-change: transform, opacity !important;
    }
    
    .bab-verse-bg .bab-prayer-button .vibration-waves::after {
        content: '' !important;
        position: absolute !important;
        width: 10px !important; /* 适配移动端大小 */
        height: 10px !important;
        top: 0 !important;
        left: 0 !important;
        border: 1px solid currentColor !important;
        border-radius: 50% !important;
        opacity: 0.6 !important;
        animation: christianWaveExpand 1.5s infinite ease-out 0.3s !important;
        animation-fill-mode: both !important;
        will-change: transform, opacity !important;
    }
    
    .bab-verse-bg .bab-prayer-button::after {
        font-size: 0.65em !important;
        bottom: -30px !important;
    }
}

/* Tablet prayer button adjustments */
@media (min-width: 601px) and (max-width: 900px) {
    .bab-verse-bg .bab-prayer-button {
        font-size: 1.0em !important;
        padding: 9px 22px !important;
        margin-top: 1.4em !important;
        min-width: 95px !important;
    }
    
    /* 平板端震动波确保正常显示 */
    .bab-verse-bg .bab-prayer-button .vibration-waves {
        display: inline-block !important;
        position: relative !important;
        width: 11px !important; /* 平板端适中大小 */
        height: 11px !important;
        margin-left: 3px !important;
        z-index: 10 !important;
    }
    
    .bab-verse-bg .bab-prayer-button .vibration-waves::before,
    .bab-verse-bg .bab-prayer-button .vibration-waves::after {
        content: '' !important;
        position: absolute !important;
        border: 1px solid currentColor !important;
        border-radius: 50% !important;
        opacity: 0.6 !important;
        animation-play-state: running !important; /* 确保动画运行 */
        will-change: transform, opacity !important;
    }
    
    .bab-verse-bg .bab-prayer-button .vibration-waves::before {
        width: 7px !important;
        height: 7px !important;
        top: 2px !important;
        left: 2px !important;
        animation: christianWaveExpand 1.5s infinite ease-out !important;
        animation-fill-mode: both !important;
    }
    
    .bab-verse-bg .bab-prayer-button .vibration-waves::after {
        width: 11px !important;
        height: 11px !important;
        top: 0 !important;
        left: 0 !important;
        animation: christianWaveExpand 1.5s infinite ease-out 0.3s !important;
        animation-fill-mode: both !important;
    }
}

.bab-verse-overlay {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10 !important;
    background: transparent !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px !important;
    font-size: 2vw !important;
    text-align: center !important;
    max-width: 95vw;
    margin: 10px;
    box-sizing: border-box;
    overflow: visible !important;
    height: auto !important;
    min-height: 100% !important;
}

/* 基础样式 - 移动端优化字体 */
.bab-verse-text {
    color: #fff !important;
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif !important;
    font-size: clamp(2.5em, 6.5vw, 3.2em) !important; /* 移动端适中字体：小屏2.5em，大屏3.2em */
    font-weight: 600 !important;
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.9),
        0 4px 8px rgba(0,0,0,0.7),
        0 8px 16px rgba(0,0,0,0.5),
        2px 2px 4px rgba(0,0,0,0.8) !important;
    margin-bottom: 1.2em !important;
    line-height: 1.25 !important;
    letter-spacing: 0.02em !important;
    text-align: center !important;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow: visible !important;
    display: block !important;
    height: auto !important;
    max-height: none !important;
}

.bab-verse-ref {
    color: #fff !important;
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif !important;
    font-size: clamp(1.4em, 2.2vw, 2.0em) !important; /* 桌面端引用也稍大 */
    font-style: italic !important;
    opacity: 0.95;
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.9),
        0 4px 8px rgba(0,0,0,0.6),
        1px 1px 3px rgba(0,0,0,0.8) !important;
    margin-bottom: 0 !important;
    text-align: center !important;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    position: relative !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    text-decoration-thickness: 1px !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow: visible !important;
    display: block !important;
    height: auto !important;
    max-height: none !important;
}

.bab-verse-ref:hover {
    opacity: 1 !important;
    background: transparent !important;
    transform: scale(1.03) !important;
    text-shadow: 
        0 3px 6px rgba(0,0,0,0.95),
        0 6px 12px rgba(0,0,0,0.7),
        0 0 20px rgba(255, 255, 255, 0.2) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
}

.bab-verse-ref:active {
    transform: scale(0.98) !important;
}

/* 章节经文显示样式（优化版本 - 修复闪烁问题）*/
.bab-chapter-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: 66.67% !important;
    height: 66.67% !important;
    transform: translate(-50%, -50%) translateY(20px) !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 12px !important;
    border: 2px solid rgba(255, 215, 0, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    color: #fff !important;
    display: none !important;
    flex-direction: column !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    /* 添加硬件加速避免闪烁 */
    will-change: opacity, transform !important;
    backface-visibility: hidden !important;
    -webkit-font-smoothing: antialiased !important;
}

.bab-chapter-content.active {
    display: flex !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) !important;
}

.bab-chapter-header {
    text-align: center !important;
    margin-bottom: 10px !important;
    flex-shrink: 0 !important;
}

.bab-chapter-title {
    font-family: 'Cormorant Garamond', 'EB Garamond', 'Georgia', 'Times New Roman', serif !important;
    font-size: clamp(2.0em, 4.5vw, 2.8em) !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-shadow: 0 2px 12px #000 !important;
    margin: 0 0 8px 0 !important;
    /* 减少文字重绘 */
    will-change: auto !important;
    backface-visibility: hidden !important;
}

.bab-chapter-close {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
}

.bab-chapter-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.1) !important;
}

.bab-chapter-scroll {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 4px !important;
    margin: 0 !important;
    /* === 核心修复：解决重影抖动的必要属性 === */
    transform: translate3d(0, 0, 0) !important; /* 硬件加速 - 最关键 */
    -webkit-transform: translate3d(0, 0, 0) !important; /* Safari兼容 */
    scroll-behavior: smooth !important; /* 恢复为smooth，提升滚动体验 */
    -webkit-font-smoothing: antialiased !important; /* 文字清晰 */
    backface-visibility: hidden !important; /* 避免重绘 */
    -webkit-overflow-scrolling: touch !important; /* 移动端滚动 */
    /* === 保留必要的性能优化 === */
    will-change: scroll-position !important; /* 滚动优化 */
}

/* 滚动条样式优化 */
.bab-chapter-scroll::-webkit-scrollbar {
    width: 6px !important;
}

.bab-chapter-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 3px !important;
}

.bab-chapter-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.6) !important;
    border-radius: 3px !important;
}

.bab-chapter-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.8) !important;
}

/* 章节经文条目样式（优化版本）*/
.bab-chapter-verse {
    margin-bottom: 10px !important;
    padding: 10px 12px !important;
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 6px !important;
    border-left: 3px solid rgba(255, 215, 0, 0.6) !important;
    line-height: 1.6 !important;
    /* 优化渲染性能 */
    will-change: auto !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    /* 确保文本清晰 */
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    /* 避免闪烁的关键设置 */
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* 移除可能导致闪烁的动画过渡 */
.bab-chapter-verse.visible {
    opacity: 1 !important;
    transform: translateY(0) translateZ(0) !important;
    display: block !important;
    visibility: visible !important;
}

.bab-chapter-verse-number {
    font-weight: bold !important;
    color: #ffd700 !important;
    margin-right: 8px !important;
    font-size: 1.1em !important;
    text-shadow: 
        0 1px 2px rgba(0,0,0,0.9),
        0 2px 4px rgba(0,0,0,0.5) !important;
    /* 减少文字重绘 */
    will-change: auto !important;
}

.bab-chapter-verse-text {
    font-size: clamp(1.3em, 2.8vw, 1.6em) !important;
    text-shadow: 
        0 1px 3px rgba(0,0,0,0.8),
        0 2px 6px rgba(0,0,0,0.4) !important;
    font-family: 'Cormorant Garamond', 'EB Garamond', 'Georgia', 'Times New Roman', serif !important;
    /* 确保文本渲染质量 */
    will-change: auto !important;
    backface-visibility: hidden !important;
}

/* 加载状态样式优化 */
.chapter-loading-state {
    /* 确保加载状态不会闪烁 */
    will-change: auto !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
}

/* 移动端章节样式优化（修复闪烁版本）*/
@media (max-width: 600px) {
    .bab-chapter-content {
        width: 85% !important;
        height: 75% !important;
        padding: 8px !important;
        border-radius: 8px !important;
        transform: translate(-50%, -50%) translateY(20px) !important;
        /* 移动端硬件加速 */
        -webkit-transform: translate3d(-50%, -50%, 0) translateY(20px) !important;
    }
    
    .bab-chapter-content.active {
        transform: translate(-50%, -50%) !important;
        -webkit-transform: translate3d(-50%, -50%, 0) !important;
    }
    
    .bab-chapter-title {
        font-size: clamp(1.6em, 6.5vw, 2.4em) !important;
        margin-bottom: 4px !important;
    }
    
    .bab-chapter-close {
        top: 6px !important;
        right: 8px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 20px !important;
    }
    
    .bab-chapter-scroll {
        padding: 0 2px !important;
        max-height: calc(96vh - 45px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .bab-chapter-verse {
        margin-bottom: 6px !important;
        padding: 6px 10px !important;
        background: rgba(0, 0, 0, 0.15) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .bab-chapter-verse-text {
        font-size: clamp(1.4em, 4.2vw, 1.8em) !important;
        word-break: break-word !important;
    }
}

/* 平板端章节样式优化 (601px-900px) */
@media (min-width: 601px) and (max-width: 900px) {
    .bab-chapter-content {
        padding: 7px !important;
    }
    
    .bab-chapter-title {
        font-size: clamp(1.8em, 5vw, 2.4em) !important;
        margin-bottom: 5px !important;
    }
    
    .bab-chapter-scroll {
        padding: 0 3px !important;
        max-height: calc(94vh - 55px) !important;
    }
    
    .bab-chapter-verse {
        margin-bottom: 8px !important;
        padding: 7px 11px !important;
        background: rgba(0, 0, 0, 0.15) !important;
    }
    
    .bab-chapter-verse-text {
        font-size: clamp(1.3em, 3.2vw, 1.7em) !important;
    }
}

/* 桌面端章节样式优化 (901px+) */
@media (min-width: 901px) {
    .bab-chapter-content {
        padding: 8px !important;
    }
    
    .bab-chapter-title {
        font-size: clamp(2.2em, 2.8vw, 2.6em) !important;
        margin-bottom: 5px !important;
    }
    
    .bab-chapter-scroll {
        padding: 0 3px !important;
        max-height: calc(92vh - 60px) !important;
    }
    
    .bab-chapter-verse {
        margin-bottom: 8px !important;
        padding: 8px 12px !important;
        background: rgba(0, 0, 0, 0.15) !important;
    }
    
    .bab-chapter-verse-text {
        font-size: clamp(1.2em, 1.4vw, 1.5em) !important;
    }
}

@media (min-width: 601px) {
    .bab-verse-bg {
        position: relative !important;
        width: 900px !important; /* 增加背景容器宽度 */
        height: 100vh !important;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        margin: 0 auto !important;
        border-radius: 18px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.18);
        overflow: hidden;
    }
    .bab-verse-overlay {
        max-width: 840px !important; /* 增加经文显示区域宽度 */
        left: 50%;
        transform: translateX(-50%);
        padding: 40px 30px 30px 30px !important; /* 增加左右内边距，确保文字有足够边距 */
        height: calc(100vh - 80px) !important; /* 限制高度，确保不溢出 */
        box-sizing: border-box !important;
        justify-content: space-between !important; /* 分散对齐，确保祷告按钮在底部 */
        overflow: visible !important; /* 确保内容可见 */
    }
    .bab-verse-text, .bab-verse-ref {
        text-align: center !important;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* 桌面端字体大小优化 - 自适应调整 */
    .bab-verse-text {
        font-size: clamp(1.6em, 3.0vw, 2.4em) !important; /* 调整字体大小范围，确保更好的显示效果 */
        line-height: 1.4 !important; /* 增加行高提高可读性 */
        letter-spacing: 0.01em !important;
        margin-bottom: 1em !important; /* 减少下边距 */
        max-height: calc(65vh - 120px) !important; /* 放宽最大高度限制 */
        overflow: visible !important; /* 允许内容完全显示 */
        text-overflow: clip !important; /* 避免截断 */
        word-wrap: break-word !important; /* 确保长单词换行 */
        hyphens: auto !important; /* 启用自动断词 */
    }
    
    .bab-verse-ref {
        font-size: clamp(1.1em, 1.8vw, 1.6em) !important; /* 调整引用字体大小与经文文字协调 */
        margin-bottom: 0.8em !important; /* 减少下边距 */
        word-wrap: break-word !important; /* 确保长引用换行 */
        overflow: visible !important; /* 允许内容完全显示 */
    }
    
    /* 桌面端祷告按钮优化 */
    .bab-verse-bg .bab-prayer-button {
        margin: 0.8em auto 0 auto !important; /* 减少上边距 */
        font-size: 0.9em !important; /* 稍小的按钮字体 */
        padding: 8px 18px !important; /* 稍小的内边距 */
        position: relative !important;
        z-index: 100 !important;
    }
    
    /* 确保PC端震动特效正常显示 */
    .bab-verse-bg .bab-prayer-button .vibration-waves {
        display: inline-block !important;
        width: 12px !important;
        height: 12px !important;
        margin-left: 3px !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .bab-verse-bg .bab-prayer-button .vibration-waves::before,
    .bab-verse-bg .bab-prayer-button .vibration-waves::after {
        content: '' !important;
        position: absolute !important;
        border: 1px solid currentColor !important;
        border-radius: 50% !important;
        opacity: 0.6 !important;
        animation-play-state: running !important; /* 确保动画运行 */
    }
    
    /* 摩斯码显示区域也要优化间距 */
    #morse-amen-display {
        margin-top: 10px !important; /* 减少上边距 */
        margin-bottom: 20px !important; /* 确保底部有足够空间 */
    }
}

/* 震动模拟动画 - 用于设备不支持真实震动时的替代方案 */
@keyframes prayer-vibrate {
    0%, 100% { 
        transform: translateX(0) !important; 
    }
    10% { 
        transform: translateX(-1px) !important; 
    }
    20% { 
        transform: translateX(1px) !important; 
    }
    30% { 
        transform: translateX(-1px) !important; 
    }
    40% { 
        transform: translateX(1px) !important; 
    }
    50% { 
        transform: translateX(-1px) !important; 
    }
    60% { 
        transform: translateX(1px) !important; 
    }
    70% { 
        transform: translateX(-1px) !important; 
    }
    80% { 
        transform: translateX(1px) !important; 
    }
    90% { 
        transform: translateX(-1px) !important; 
    }
}

/* 增强的视觉反馈动画 - 用于不支持震动的设备 */
@keyframes prayer-feedback-flash {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(75, 85, 160, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        border-color: rgba(255, 215, 0, 0.3) !important;
    }
    25% { 
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.4) !important;
        border-color: rgba(255, 215, 0, 0.9) !important;
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 50px rgba(255, 255, 255, 0.6), 0 0 80px rgba(255, 215, 0, 0.5) !important;
        border-color: rgba(255, 255, 255, 0.8) !important;
    }
    75% { 
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), 0 0 45px rgba(255, 215, 0, 0.7), 0 0 70px rgba(255, 215, 0, 0.5) !important;
        border-color: rgba(255, 215, 0, 1) !important;
    }
}

/* 震动和反馈状态样式 */
.bab-verse-bg .bab-prayer-button.vibrating {
    animation: prayer-vibrate 150ms ease-in-out infinite !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.4) !important;
}

.bab-verse-bg .bab-prayer-button.feedback-flash {
    animation: prayer-feedback-flash 200ms ease-in-out !important;
}

/* 设备类型指示器样式 */
.bab-verse-bg .bab-prayer-button.desktop-device::after {
    content: '🖥️ Desktop devices do not support vibration' !important;
    bottom: -50px !important;
    font-size: 0.65em !important;
    background: linear-gradient(135deg, rgba(128, 128, 128, 0.95) 0%, rgba(64, 64, 64, 0.95) 100%) !important;
    border-color: rgba(192, 192, 192, 0.4) !important;
}

.bab-verse-bg .bab-prayer-button.ios-device::after {
    content: '🍎 iOS Safari has limited vibration support' !important;
    bottom: -50px !important;
    font-size: 0.65em !important;
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.95) 0%, rgba(255, 95, 21, 0.95) 100%) !important;
    border-color: rgba(255, 215, 0, 0.4) !important;
}

.bab-verse-bg .bab-prayer-button.android-device::after {
    content: '🤖 Enable vibration in device settings if not felt' !important;
    bottom: -50px !important;
    font-size: 0.65em !important;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(56, 142, 60, 0.95) 100%) !important;
    border-color: rgba(129, 199, 132, 0.4) !important;
}

/* 震动状态指示器 */
.bab-verse-bg .bab-prayer-button.vibration-success {
    border-color: rgba(76, 175, 80, 0.8) !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4) !important;
}

.bab-verse-bg .bab-prayer-button.vibration-success::before {
    content: '✅' !important;
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: rgba(76, 175, 80, 1) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    z-index: 1002 !important;
}

.bab-verse-bg .bab-prayer-button.vibration-failed {
    border-color: rgba(244, 67, 54, 0.6) !important;
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.3) !important;
}

.bab-verse-bg .bab-prayer-button.vibration-failed::before {
    content: '❌' !important;
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;
    background: rgba(244, 67, 54, 1) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    z-index: 1002 !important;
}

/* === AMEN 摩斯码动画显示区域 - 改进版本 === */
/* Styling for the Morse Code Display Container */
#morse-amen-display {
    min-height: 60px; /* 增加最小高度确保足够空间 */
    text-align: center;
    margin: 25px auto 30px auto; /* 上下增加更多间距，避免与说明内容重叠 */
    padding: 20px 15px; /* 内边距确保动画元素不会被截断 */
    display: flex; /* 使用 Flexbox 轻松实现点/划的居中和间距 */
    justify-content: center;
    align-items: center;
    gap: 10px; /* 增加每个点/划之间的间距 */
    overflow: visible; /* 允许发光效果溢出 */
    position: relative;
    z-index: 150; /* 确保在其他内容之上，高于AI Guide Section */
    /* 添加背景以更好地分离摩斯码区域 */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    backdrop-filter: blur(3px);
    /* 添加边框以更清晰地定义区域 */
    border: 1px solid rgba(255, 215, 0, 0.1);
    /* 确保容器始终可见且不被其他元素压制 */
    box-sizing: border-box;
    width: 100%;
    max-width: 400px; /* 限制最大宽度保持美观 */
}

/* 为摩斯码容器添加特殊类 */
.morse-animation-container {
    /* 确保动画容器在页面流中占据固定空间 */
    flex-shrink: 0; /* 防止被压缩 */
    order: 10; /* 确保在布局中的顺序 */
}

/* Base style for Morse code elements (dots/dashes) */
.morse-element {
    background: linear-gradient(145deg, #FFD700, #FFA500); /* 金黄色渐变，基督教圣洁感 */
    border-radius: 50%; /* 默认圆形 (用于点) */
    opacity: 0; /* 初始不可见 */
    transform: scale(0.2); /* 初始尺寸更小，产生更明显的缩放效果 */
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); /* 更流畅的过渡动画 */
    box-shadow: 
        0 3px 12px rgba(255, 215, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.5); /* 增加神圣感的内阴影 */
    position: relative;
    /* 添加发光轮廓 */
    border: 2px solid rgba(255, 215, 0, 0.7);
    /* 确保元素具有最小尺寸以便于视觉识别 */
    min-width: 8px;
    min-height: 8px;
}

/* 新增：残留痕迹效果 - 点线消失后留下浅色痕迹 */
.morse-element::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%; /* 稍微大于原元素 */
    height: 120%;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.15));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.6s ease-out;
    pointer-events: none;
    /* 十字光芒效果 - 基督教象征 */
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.15),
        inset 0 0 15px rgba(255, 255, 255, 0.08);
    z-index: -1; /* 在主元素后面 */
}

/* Specific styles for Dots */
.morse-dot {
    width: 14px; /* 增大尺寸使其更明显 */
    height: 14px;
    border-radius: 50%; /* 确保是圆形 */
}

/* Specific styles for Dashes */
.morse-dash {
    width: 32px; /* 增大划的长度 */
    height: 14px; /* 增大高度与点保持一致 */
    border-radius: 7px; /* 圆角矩形，更美观 */
}

/* Class to make elements visible and full size */
.morse-element.active {
    opacity: 1;
    transform: scale(1.2); /* 更明显的放大效果 */
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.95),
        0 0 30px rgba(255, 215, 0, 0.7),
        0 3px 15px rgba(255, 215, 0, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.8); /* 激活时的强烈发光效果 */
    /* 添加十字光芒 - 基督教象征 */
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9));
    /* 添加轻微的"脉冲"感 */
    animation: morse-pulse 0.4s ease-out;
}

/* 新增：摩斯码脉冲动画 */
@keyframes morse-pulse {
    0% { transform: scale(0.2); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1.2); }
}

/* 新增：淡出状态 - 显示浅色痕迹 */
.morse-element.fading {
    opacity: 0.4; /* 增加可见度 */
    transform: scale(1.0);
    box-shadow: 
        0 0 12px rgba(255, 215, 0, 0.4),
        0 3px 8px rgba(255, 215, 0, 0.3);
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.5), rgba(255, 165, 0, 0.4));
    transition: all 0.5s ease-out; /* 更慢的淡出过渡 */
}

/* 浅色痕迹显示状态 */
.morse-element.trace::after {
    opacity: 1;
    transition: opacity 3s ease-out; /* 痕迹更缓慢消失 */
}

/* 移动端适配 */
@media (max-width: 600px) {
    #morse-amen-display {
        margin: 20px auto 25px auto;
        padding: 15px 10px;
        gap: 8px;
        min-height: 50px;
        max-width: 350px;
        /* 移动端减少背景效果以提高性能 */
        background: rgba(255, 255, 255, 0.02);
        backdrop-filter: blur(1px);
        border: 1px solid rgba(255, 215, 0, 0.08);
    }
    
    .morse-dot {
        width: 12px;
        height: 12px;
    }
    
    .morse-dash {
        width: 26px;
        height: 12px;
        border-radius: 6px;
    }
    
    .morse-element.active {
        transform: scale(1.1); /* 移动端稍微减少缩放 */
    }
}

/* 平板端适配 */
@media (min-width: 601px) and (max-width: 900px) {
    #morse-amen-display {
        margin: 22px auto 28px auto;
        padding: 18px 12px;
        min-height: 55px;
        max-width: 375px;
    }
    
    .morse-dot {
        width: 13px;
        height: 13px;
    }
    
    .morse-dash {
        width: 29px;
        height: 13px;
    }
}

/* 确保摩斯码区域在overlay中有适当的边距 */
.bab-verse-overlay {
    /* 为摩斯码动画预留额外空间 */
    padding-bottom: 80px !important; /* 增加底部内边距 */
}

/* 特殊处理：确保在所有屏幕高度下摩斯码都不会被AI Guide Section遮挡 */
@media (max-height: 700px) {
    #morse-amen-display {
        margin: 15px auto 20px auto !important;
        padding: 12px 10px !important;
        min-height: 40px !important;
    }
    
    .bab-verse-overlay {
        padding-bottom: 60px !important;
    }
}

@media (min-width: 901px) {
    .bab-verse-overlay {
        max-width: 720px !important; /* 原可能为600px，适度加宽 */
        margin: 0 auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        box-sizing: border-box !important;
        padding-left: 32px !important;
        padding-right: 32px !important;
    }
}
