/**
 * 基础样式文件 - 抽奖系统通用样式
 * 包含所有用户状态共享的基础样式
 * 优先级：最低，可被主题样式覆盖
 */

/* 重置样式 */
* {
    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 {
    padding: clamp(5px, 2vw, 10px);
    width: 100%;
}

.prize-img {
    width: 120px;
    height: 120px;
    margin: 0 auto clamp(4px, 1vw, 8px);
    display: block;
    object-fit: contain;
}

.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%;
}

/* 通用遮罩层样式 - 基础版本 */
.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;
}

@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);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .result-modal {
        max-width: 80%;
        width: 80%;
        height: 70%;
        padding: 30px 20px;
    }
    
    .modal-content h3 {
        font-size: 24px;
    }
    
    .modal-content p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .result-modal {
        max-width: 90%;
        width: 90%;
        height: 80%;
        padding: 20px 15px;
    }
    
    .modal-content h3 {
        font-size: 20px;
    }
    
    .modal-content p {
        font-size: 16px;
    }
    
    #closeModal {
        padding: 12px 30px;
        font-size: 16px;
    }
}