/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

/* 页面包装器 - PC端模拟手机屏 */
.page-wrapper {
    position: relative;
    max-width: 414px;
    min-width: 375px;
    height: 100vh;
    margin: 0 auto;

    background-color: #f0f0f0; /* 头部以下的背景色 */

    @media (max-width: 768px) {
        max-width: 100%;
        min-width: 100%;
    }
}
.top-bg{
}

/* 头部背景图 */
.bg-image {
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 45vh;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* 内容覆盖层 - 放在背景上面 */
.content-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 20px;
    padding-bottom: 70px; /* 为底部按钮留出空间 */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 白色圆角矩形框通用样式 */
.content-box {
    width: 100%;
    background: rgba(255, 255, 255, 0.95); /* 半透明白色 */
    border-radius: 16px;
    padding: 10px 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
    margin-bottom: 10px;
}

/* 第一个内容框 - 距离顶部稍远 */
.info-box {
    margin-top: 5px;
    text-align: left;  /* 将整个内容框内的文字左对齐 */
    padding-top: 10px;
}

/* 文本行样式 */
.text-line {
    font-size: clamp(14px, 3vw, 16px);
    /*color: #d92b2b;*/
    color: #000000;
    line-height: 2;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    text-align: left;  /* 确保每行文本左对齐 */
    padding-left: 20px;
}
/* 文本行样式 */
.text-line2 {
    font-size: clamp(14px, 3vw, 16px);
    /*color: #d92b2b;*/
    color: #000000;
    line-height: 1;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    text-align: center;  /* 确保每行文本左对齐 */
    margin-top:20px;
}
/* 灰色文字样式 */
.gray-text {
    /* color: #999999;  /* 中灰色 */
    /* 或者使用其他灰色值 */
    color: #666666; */  /* 深灰色 */
    /* color: #cccccc; */  /* 浅灰色 */
}

/* 第二个内容框 */
.stats-box {
    margin-top: 0;
}

/* 抽奖按钮区域 */
.draw-btn-box {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* 抽奖按钮样式 */
.draw-btn {
    background: linear-gradient(135deg, #ff6b35, #e63946);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: clamp(18px, 5vw, 20px);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    width: 80%;
    max-width: 280px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.draw-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.draw-btn:disabled {
    background: #ccc;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* 底部按钮栏 - 固定在底部 */
.bottom-bar {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 374px; /* 414px - 40px */
    display: flex;
    gap: 15px;
    z-index: 10;
}

/* 底部按钮通用样式 */
.bottom-btn {
    flex: 1;
    padding: 14px 0;
    border: none;
    border-radius: 30px;
    font-size: clamp(16px, 4vw, 18px);
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bottom-btn:active {
    opacity: 0.8;
}

/* 左侧按钮：我的奖品 */
.bottom-btn.left {
    background: #fff5f5;
    color: #d92b2b;
    border: 1px solid #d92b2b;
}

/* 右侧按钮：分享好友 */
.bottom-btn.right {
    background: linear-gradient(135deg, #ff6b35, #e63946);
    color: #fff;
}

/* 抽奖结果弹窗 */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

/* 弹窗内容区域 */
.result-content {
    background: transparent;    /* 透明背景 */
    border: none;               /* 移除边框 */
    border-radius: 20px;        /* 可保留圆角，但不影响透明 */
    padding: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    margin: 0 auto;
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 老虎机滚动区域 */
.slot-machine {
    height: 180px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
    border-radius: 12px;
    background: #f5f5f5;
    padding: 10px;
}

/* 老虎机图片对样式 */
.slot-pair {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 12px;
    animation: scrollDown 0.1s linear infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

.slot-pair img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 最终结果大图 */
.final-img-box {
    display: none;
    margin: 15px 0;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

/* 图片本身：宽度为屏幕的80%，无背景和边框 */
.final-img-box img {
    width: 80vw;               /* 占视口宽度的80% */
    max-width: 400px;           /* 但不超过400px，防止过大 */
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    /* 移除背景和内边距，避免白色边框 */
    background: none;
    padding: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* 门型信息区域 */
.door-info {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
    /* === 以下为背景和边框样式，可注释以对比 === */
    background: #f8f8f8;      /* 背景色 */
    border-radius: 8px;        /* 圆角边框 */
    padding: 10px;             /* 内边距 */
    /* ===================================== */
}

.door-name {
    font-weight: bold;
    font-size: 18px;
    color: #d92b2b;
    margin-bottom: 5px;
}

.door-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 查看视频按钮 */
.video-btn {
    background: linear-gradient(135deg, #ff6b35, #e63946);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
    transition: transform 0.2s;
}

.video-btn:hover {
    transform: scale(1.05);
}

.video-btn:active {
    transform: scale(0.98);
}

/* 视频容器 */
.video-container {
    margin-top: 15px;
}

.video-container video {
    border-radius: 12px;
    background: #000;
}

/* 分享弹窗 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(3px);
}

.share-content {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    width: 85%;
    max-width: 340px;
    text-align: center;
    animation: modalPop 0.3s ease;
}

.share-content p {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.share-content input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    background: #f9f9f9;
}

.share-content button {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    transition: background 0.2s;
}

.share-content button:hover {
    background: #c82333;
}

.share-content button:active {
    transform: scale(0.98);
}

/* 小红点动画 */
.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3b30;
    color: #fff;
    font-size: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: flyToGoods 0.8s forwards;
    z-index: 100;
}

@keyframes flyToGoods {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: scale(0.3) translate(calc(50vw - 100px), 50vh);
        opacity: 0;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e63946;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 移动端适配优化 */
@media (max-width: 380px) {
    .content-box {
        padding: 15px 10px;
    }

    .text-line {
        font-size: 15px;
        line-height: 1.8;
    }

    .draw-btn {
        padding: 12px 30px;
        font-size: 17px;
    }

    .bottom-btn {
        padding: 12px 0;
        font-size: 15px;
    }
}

/* 老虎机滚动容器 */
.slot-machine {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 16px;
    background: #f0f0f0;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

/* 滚动列表 */
.scroll-list {
    position: absolute;
    width: 100%;
    will-change: transform;
}

/* 图片对样式 */
.slot-pair {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 15px 0;
    padding: 5px;
}

.slot-pair img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    background: white;
    padding: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

/* 最终结果大图容器 */
.final-img-box {
    margin: 20px 0;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

/* 门型介绍文字 */
.door-info {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    margin-top: 15px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 8px;
}

/* 最终图片容器 */
.final-img-box {
    /*margin: 15px 0;*/
    text-align: center;
}

/* 图片本身：宽度为屏幕的80%，无背景和边框 */
.final-img-box img {
    width: 80vw;               /* 占视口宽度的80% */
    max-width: 400px;           /* 但不超过400px，防止过大 */
    height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    /* 移除背景和内边距，避免白色边框 */
    background: none;
    padding: 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* 门型信息区域 */
.door-info {
    margin-top: 15px;
    font-size: 16px;
    color: #333;
    /* === 以下为背景和边框样式，可注释以对比 === */
    /*background: #f8f8f8;      /* 背景色 */
    /*border-radius: 8px;        /* 圆角边框 */
    /*padding: 10px;             /* 内边距 */
    /* ===================================== */
}

.door-name {
    font-weight: bold;
    font-size: 18px;
    color: #d92b2b;
    margin-bottom: 5px;
}

.door-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 查看视频按钮 */
.video-btn {
    background: linear-gradient(135deg, #ff6b35, #e63946);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
    transition: transform 0.2s;
}

.video-btn:hover {
    transform: scale(1.05);
}

.video-btn:active {
    transform: scale(0.98);
}

/* 视频容器 */
.video-container {
    margin-top: 15px;
}

.video-container video {
    border-radius: 12px;
    background: #000;
}

/* 抽奖结果弹窗关闭按钮 */
.result-close-btn {
    position: absolute;
    top: 0px;          /* 根据需要调整，让按钮部分突出于弹窗外 */
    right: 0px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    border: none;
    color: #333;         /* 深灰色叉号，比纯黑柔和 */
    font-size: 28px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10;
    transition: transform 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.result-close-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.1);
}

.result-close-btn:active {
    transform: scale(0.95);
}

/* 确保按钮在弹窗内容之上 */
.result-content {
    position: relative;   /* 如果未在HTML中内联添加，请在此处添加 */
}

/* 提示信息样式 - 居中 */
.prize-names {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 5px 5px;
    margin: 1px 0;
    font-size: 14px;
    color: #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(2px);
}

.prize-names p {
    margin: 5px 0;
}

.prize-names p:first-child {
    font-weight: 500;
    color: #d92b2b;           /* 醒目的红色 */
}

.prize-names p:last-child {
    /*color: #ff6b35;            /* 温暖的橙色 */
    /*font-size: 12px;
    /*border-top: 1px dashed #ffb199;
    padding-top: 8px;
    margin-top: 8px;*/
}

/* 活动规则 - 左对齐红色小字 */
.rule-text {
    text-align: left;
    color: #d92b2b;             /* 红色字体 */
    font-size: 12px;
    line-height: 1.6;
    margin-top: 0px;
    margin-bottom: 0px;
    padding: 0 5px;
    white-space: pre-line;       /* 保留HTML中的换行 */
    word-break: break-word;
    background: rgba(255, 245, 245, 0.7);
    border-radius: 8px;
    padding: 5px 12px;
    border-left: 3px solid #ff6b35; /* 左侧装饰线 */
}

.rule-text br {
    display: block;
    content: "";
    margin-top: 1px;
}

.view-prize-link {
    background: rgba(255, 107, 53, 0.1);
    color: #d92b2b;
    font-weight: 500;
    padding: 2px 12px 2px 8px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
    white-space: nowrap;
    margin-left: 6px;
    border: 1px solid rgba(255, 107, 53, 0.2);
    line-height: 1.4;                   /* 与周围文字高度协调 */
}

.view-prize-link:hover {
    background: rgba(255, 107, 53, 0.2);
    color: #e63946;
    border-color: rgba(255, 107, 53, 0.4);
}

/* 添加右箭头 */
.view-prize-link::after {
    opacity: 0.8;
    transition: transform 0.2s;
}

.view-prize-link:hover::after {
    transform: translateX(3px);
}

/* 艺术字：分享给好友获多次抽奖机会 - 醒目版 */
.share-art-text {
    text-align: center;
    font-size: 24px;                /* 字体加大 */
    font-weight: bold;
    background: linear-gradient(135deg, #ffb347, #ff6b35, #ff3a1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: white;
    text-shadow: 0 0 12px rgba(255, 107, 53, 0.8), 0 2px 8px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    margin-top: 21vh;
    margin-bottom: 1px;
    position: relative;
    animation: gentleFloat 3s ease-in-out infinite;
    padding: 0 5px;
    white-space: normal;
    word-break: break-word;
    /* 增加描边感（浅色外发光） */
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5);
    text-stroke: 2px rgba(255, 255, 255, 0.5);
}

/* 柔和浮动动画（文字整体） */
@keyframes gentleFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}