/* styles.css */
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.container {
    text-align: center;
}

h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
    animation: neon-glow 2s infinite alternate;
}

.cell {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
    mix-blend-mode: difference; /* 使用混合模式调整字体颜色 */
    color: white; /* 默认字体颜色为白色 */
    border: 2px solid transparent;
    animation: neon-border 2s infinite alternate;
}

.cell:hover {
    opacity: 0.8;
}

#startButton {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 20px;
}

#startButton:hover {
    background-color: #1e88e5;
}

#loadingGif {
    width: 100px; /* 设置GIF动画的宽度 */
    height: 100px; /* 设置GIF动画的高度 */
    display: none;
}

/* 模态对话框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 300px;
    text-align: center;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 根据屏幕宽度调整GIF动画的位置 */
@media (min-width: 600px) {
    #loadingGif {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
    }
}

@media (max-width: 599px) {
    #loadingGif {
        margin-top: 20px;
    }
}

/* 霓虹灯效果动画 */
@keyframes neon-glow {
    0% {
        box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #FF1177, 0 0 70px #FF1177, 0 0 80px #FF1177, 0 0 100px #FF1177, 0 0 150px #FF1177;
    }
    100% {
        box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #FF1177, 0 0 35px #FF1177, 0 0 40px #FF1177, 0 0 50px #FF1177, 0 0 75px #FF1177;
    }
}

@keyframes neon-border {
    0% {
        border-color: #fff;
    }
    50% {
        border-color: #FF1177;
    }
    100% {
        border-color: #fff;
    }
}

/* 抽奖中跑马灯效果 */
@keyframes neon-marquee {
    0% {
        box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #FF1177, 0 0 70px #FF1177, 0 0 80px #FF1177, 0 0 100px #FF1177, 0 0 150px #FF1177;
    }
    50% {
        box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #FF1177, 0 0 35px #FF1177, 0 0 40px #FF1177, 0 0 50px #FF1177, 0 0 75px #FF1177;
    }
    100% {
        box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #FF1177, 0 0 70px #FF1177, 0 0 80px #FF1177, 0 0 100px #FF1177, 0 0 150px #FF1177;
    }
}

/* 抽奖后快速闪烁效果 */
@keyframes neon-blink {
    0% {
        box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #FF1177, 0 0 70px #FF1177, 0 0 80px #FF1177, 0 0 100px #FF1177, 0 0 150px #FF1177;
    }
    50% {
        box-shadow: none;
    }
    100% {
        box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #FF1177, 0 0 70px #FF1177, 0 0 80px #FF1177, 0 0 100px #FF1177, 0 0 150px #FF1177;
    }
}