* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 页面主体样式 - 使用单一橙色背景，避免渐变产生的不同色块 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ff7b54;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 15px;
    box-sizing: border-box;
}

.lottery-box {
    background: #fff;
    border-radius: 28px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.lottery-grid {
    position: relative;
    width: 100%;
    height: clamp(300px, 80vw, 600px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: clamp(3px, 1vw, 5px);
    background: #ff625b;
    border-radius: clamp(15px, 4vw, 23px);
    padding: clamp(3px, 1vw, 4px);
    touch-action: manipulation;
}

.prize-item {
    background: #fff;
    border-radius: clamp(10px, 3vw, 15px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 1px #ebf1f4;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    min-height: 80px;
}

.prize-item.active {
    background: linear-gradient(270deg, #FFDCB8, #FDC689);
    box-shadow: 0 5px 1px #e89b4f;
    transform: scale(0.95);
}

.prize-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    box-sizing: border-box;
}

.prize-img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    display: block;
}

.prize-name {
    font-size: clamp(10px, 3vw, 14px);
    color: #DF424B;
    font-weight: bold;
    margin-top: clamp(4px, 1vw, 8px);
    line-height: 1.2;
}

.center-button-inner {
    text-align: center;
    color: #DF424B;
    font-weight: bold;
    font-size: clamp(14px, 4vw, 18px);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 10px;
}

/* 移除不再需要的绝对定位按钮样式 */

.mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.result-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 60%;
    width: 60%;
    height: 60%;
    border: 3px solid #ff7b54;
    position: relative;
    animation: modalAppear 0.5s ease-out;
}

/* 积分不足场景的特殊弹窗样式 - 已废弃，使用专用弹窗样式 */
/* .result-modal.points-warning-modal {
    max-width: 50%;
    width: 50%;
    height: 80%;
} */

@keyframes modalAppear {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h3 {
    color: #DF424B;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modal-content p {
    margin-bottom: 30px;
    font-size: 20px;
    color: #333;
    line-height: 1.5;
    font-weight: 500;
}

#closeModal {
    background: linear-gradient(270deg, #FF7B54, #FF625B);
    border: none;
    border-radius: 30px;
    padding: 15px 40px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 123, 84, 0.3);
    min-width: 120px;
}

#closeModal:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(255, 123, 84, 0.4);
}

/* 积分不足提示的特殊样式 - 增加优先级 */
.modal-content .points-warning {
    color: #ff6b6b !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    margin: 20px 0 !important;
    text-align: center !important;
    line-height: 1.4 !important;
    text-shadow: 0 2px 4px rgba(255, 107, 107, 0.3) !important;
    background: linear-gradient(135deg, #fff9f9 0%, #ffeaea 100%) !important;
    padding: 15px !important;
    border-radius: 12px !important;
    border-left: 5px solid #ff6b6b !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2) !important;
}

.modal-content .points-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border: 3px solid #2196f3 !important;
    border-radius: 15px !important;
    padding: 20px !important;
    margin: 25px 0 !important;
    font-size: 18px !important;
    color: #1565c0 !important;
    text-align: center !important;
    line-height: 1.6 !important;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.15) !important;
}

/* 重点突出样式 - 增加优先级 */
.modal-content .points-warning .highlight {
    color: #e53935 !important;
    font-weight: 900 !important;
    font-size: 26px !important;
    text-shadow: 0 3px 6px rgba(229, 57, 53, 0.4) !important;
}

.modal-content .points-info .telegram {
    color: #0088cc !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    background: rgba(0, 136, 204, 0.1) !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    margin: 0 5px !important;
}

.modal-content .points-info .requirement {
    color: #f57c00 !important;
    font-weight: 700 !important;
    font-size: 19px !important;
    background: rgba(245, 124, 0, 0.1) !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    margin: 0 5px !important;
}

/* 响应式设计 - 专门针对移动端优化 */
@media (max-width: 768px) {
    .lottery-grid {
        height: clamp(280px, 70vw, 400px);
    }
    
    .prize-content {
        padding: 3px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .prize-img {
        max-width: 92%;
        max-height: 92%;
        width: auto;
        height: auto;
    }
    
    .prize-name {
        font-size: clamp(10px, 3vw, 12px);
    }
    
    .lottery-box {
        padding: clamp(10px, 3vw, 15px);
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    .container {
        padding: 10px;
    }
    .lottery-info {
        margin-bottom: 10px;
    }
}

/* 禁用状态样式 - 只针对第5格抽奖按钮 */
.disabled-grid .prize-item[data-index="4"] {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    background: linear-gradient(270deg, #e0e0e0, #c0c0c0) !important;
    box-shadow: 0 5px 1px #a0a0a0 !important;
}