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

body {
    width: 750px;
    min-height: 100vh;
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: #d51914;
    overflow-x: hidden;
}

.page {
    width: 750px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 30px 40px;
    position: relative;
}

/* 背景 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 750px;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
}

/* ========== 九宫格抽奖区域 ========== */
.lottery-box {
    position: relative;
    z-index: 10;
    width: 550px;
    margin-top: 43%;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* 每个格子 */
.grid-item {
    aspect-ratio: 1;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.15s ease;
}

/* 奖品格子 */
.prize-cell {
    background: linear-gradient(to top right, #faeae5, #fcf1ec 40%, #fff3ee 65%, #fff8f4);
    border: 4px solid transparent;
    cursor: default;
}

.prize-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

/* ===== 高亮状态（跑马灯经过） ===== */
.prize-cell.active {
    border-color: #000;
    z-index: 2;
}

/* ===== 中奖高亮（最终停留） ===== */
.prize-cell.winner {
    border-color: #000;
    z-index: 3;
    animation: winnerPulse 0.6s ease-in-out infinite alternate;
}

@keyframes winnerPulse {
    from { border-color: #000; }
    to { border-color: #fff; }
}

/* ===== 中间抽奖按钮 ===== */
.center-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    padding: 0;
}

.btn-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.center-btn:active {
    transform: scale(0.95);
}

.center-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== 结果弹窗 ========== */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 750px;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.result-modal.show {
    display: flex;
}

.result-content {
    width: 600px;
    aspect-ratio: 1;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.result-content.new {
    width: 680px;
}

@keyframes popIn {
    0% { transform: scale(0.3); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.prize-text {
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}

.prize-text.new {
    font-size: 30px;
    margin-top: 94px;
}

/* ========== 活动规则 ========== */
.action-rules {
    position: relative;
    z-index: 10;
    margin-top: 246px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px 40px;
    width: 690px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.action-rules strong {
    color: #ffd700;
    font-size: 28px;
    display: block;
    margin-bottom: 20px;
}

.action-rules strong::before {
    content: '📋 ';
}

.rule-item {
    padding: 8px 0;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.rule-item::before {
    content: '• ';
    color: #ffd700;
    margin-right: 6px;
}

/* 结果弹窗 */
.result-modal2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.result-modal2.show {
    display: flex;
}

.result-content2 {
    width: 65%;
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-content2 h2 {
    font-size: 28px;
    color: #FF6B6B;
    margin-bottom: 20px;
}

.prize-text {
    font-size: 36px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-close {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-close:hover {
    transform: scale(1.05);
}

.btn-close:active {
    transform: scale(0.95);
}

.btn-close2 {
    margin-top: 10px;
}
