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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f4e9;
    overflow-x: hidden;
}

.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #f8f4e9;
    padding: 15px;
    box-sizing: border-box;
    padding-bottom: 150px; /* 为底部固定内容预留空间 */
}

/* 背景装饰样式 */
.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: url('../assets/3.webp');
    background-size: cover;
    z-index: 0;
}

/* 顶部卷轴样式 */
.scroll-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.scroll-decoration {
    width: 40px;
    height: 60px;
}

.scroll-pattern {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scroll-title {
    margin: 0 10px;
    text-align: center;
}

.title-text {
    font-size: 22px;
    font-weight: bold;
    color: #8B4513;
    margin: 0;
}

.subtitle-text {
    font-size: 14px;
    color: #A0522D;
    margin-top: 5px;
    margin: 0;
}

/* 签文图片区域样式 */
.image-scroll-container {
    width: 100%;
    height: calc(100vh - 300px);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.main-scroll {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.lottery-image-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-frame {
    width: 90%;
    max-width: 320px;
    position: relative;
    margin-bottom: 15px;
}

.seal-overlay {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    z-index: 2;
}

.seal-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scroll-wrapper {
    overflow: hidden;
    position: relative;
}

.lottery-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.lottery-number {
    margin-top: 10px;
}

.number-text {
    font-size: 16px;
    color: #8B4513;
    font-weight: bold;
}

/* 底部固定内容区 */
.fixed-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #f8f4e9 0%, rgba(248,244,233,0.9) 100%);
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

.lottery-content {
    margin-bottom: 15px;
}

/* 展开内容区域 */
.expanded-content {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #fff 0%, #f9f2dd 100%);
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
    animation: fadeIn 0.3s ease-out;
    display: flex;
    gap: 15px;
}

/* 展开布局容器 */
.expanded-layout {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
}

/* 左侧面板 */
.left-panel {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 右侧面板 */
.right-panel {
    width: 45%;
    height: 100%;
}

/* 签文头部 */
.sign-header {
    padding: 12px;
    background: rgba(210,180,140,0.15);
    border-radius: 8px;
    border-left: 4px solid #8B4513;
    font-size: 15px;
    color: #5C3A21;
    line-height: 1.6;
}

/* 内容区块通用样式 */
.verse-section,
.explanation-section,
.meaning-section {
    padding: 15px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 区块特色边框 */
.verse-section {
    border-left: 4px solid #A0522D;
}
.explanation-section {
    border-left: 4px solid #D2B48C;
}
.meaning-section {
    border-left: 4px solid #8B4513;
    height: 100%;
}

/* 圣意滚动区域优化 */
.meaning-scroll {
    height: 300px;
    max-height: 60vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.meaning-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
}

.scroll-padding {
    height: 100px; /* 确保有足够的滚动空间 */
}

.meaning-item {
    padding: 10px;
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    border-left: 3px solid #8B4513;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.meaning-item:last-child {
    margin-bottom: 0;
}

/* 当前滚动到的项目高亮 */
.meaning-item.highlight {
    transform: scale(1.02);
    box-shadow: 0 3px 10px rgba(139,69,19,0.2);
}

/* 独立左侧内容区 */
.expanded-left {
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 右侧圣意区优化 */
.right-column {
    width: 45%;
    min-height: 200px;
}

.empty-tip {
    display: block;
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
}

/* 内容区块通用样式 */
.content-section {
    padding: 15px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 圣意列表优化 */
.meaning-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.meaning-key {
    font-size: 13px;
    color: #8B4513;
    margin-bottom: 3px;
    display: block;
}

.meaning-value {
    font-size: 14px;
    color: #5C3A21;
    font-weight: 500;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 10px;
    display: block;
    padding-bottom: 5px;
    border-bottom: 1px dashed #D2B48C;
}

.section-content {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 签文按钮样式优化 */
.sign-btn {
    width: 100%;
    height: auto;
    min-height: 50px;
    background: linear-gradient(135deg, #D2B48C 0%, #8B4513 100%);
    border-radius: 25px;
    color: white;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    white-space: normal;
    text-align: left;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sign-btn:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.button-group {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

.action-button {
    flex: 1;
    margin: 0 5px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 10px;
    color: #333;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button.primary {
    background: linear-gradient(135deg, #95ec69 0%, #7ad64b 100%);
    color: #fff;
}

.action-button.home-btn {
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    color: #fff;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.button-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    object-fit: contain;
}

.button-text {
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
}

/* 展开箭头样式 */
.arrow-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* 多层箭头容器 */
.arrow-stack {
    position: relative;
    width: 24px;
    height: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* CSS实现多层下箭头 */
.arrow-down {
    position: relative;
    width: 12px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: bounce 1.5s infinite;
    opacity: 0.9;
    margin-bottom: -5px; /* 添加负边距制造重叠效果 */
}

/* 中间箭头 */
.arrow-middle {
    width: 9px;
    height: 9px;
    animation-delay: 0.2s;
    opacity: 0.7;
    margin-left: 3px; /* 向右偏移3px，形成阶梯效果 */
}

/* 顶部箭头 */
.arrow-top {
    width: 6px;
    height: 6px;
    animation-delay: 0.4s;
    opacity: 0.5;
    margin-left: 6px; /* 向右偏移6px，形成阶梯效果 */
}

/* 箭头晃动动画 */
@keyframes bounce {
    0%, 100% {
        transform: rotate(45deg) translateY(0);
    }
    50% {
        transform: rotate(45deg) translateY(3px);
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载状态样式 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(139,69,19,0.2);
    border-radius: 50%;
    border-top-color: #8B4513;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.loading-text {
    font-size: 14px;
    color: #8B4513;
}

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

/* 广告提示弹窗样式 */
.ad-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.ad-prompt-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.ad-prompt-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    max-width: 320px;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ad-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.ad-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.ad-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.ad-buttons {
    display: flex;
    gap: 10px;
}

.ad-btn {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.confirm-btn {
    background: linear-gradient(135deg, #95ec69 0%, #7ad64b 100%);
    color: #fff;
}

.ad-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .expanded-layout {
        flex-direction: column;
    }
    
    .left-panel,
    .right-panel {
        width: 100%;
    }
    
    .meaning-scroll {
        height: 200px;
    }
    
    .image-scroll-container {
        height: calc(100vh - 400px);
    }
}

/* 展开内容区域的新样式 */
.expanded-layout {
    display: flex;
    width: 100%;
    gap: 15px;
}

.left-panel {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 15px;
}

.right-panel {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 15px;
}

.sign-header {
    font-weight: bold;
    color: #8B4513;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 69, 19, 0.2);
}

.verse-section,
.explanation-section {
    margin-bottom: 15px;
}

.section-title {
    display: block;
    font-weight: bold;
    color: #8B4513;
    font-size: 15px;
    margin-bottom: 8px;
}

.section-content {
    display: block;
    color: #555;
    line-height: 1.7;
    font-size: 14px;
}

.meaning-section {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.meaning-scroll {
    flex: 1;
    overflow-y: auto;
    height: 250px;
}

.meaning-list {
    padding-bottom: 10px;
}

.meaning-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
    line-height: 1.5;
}

.meaning-item:last-child {
    border-bottom: none;
}

.meaning-key {
    font-weight: bold;
    color: #8B4513;
    margin-right: 8px;
    flex-shrink: 0;
}

.meaning-value {
    color: #666;
    flex: 1;
}

.scroll-padding {
    height: 20px;
}