﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    /*background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);*/
    background: url(../images/bg.jpg) top center;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lottery-container {
    max-width: 1700px;
    width: 100%;
    padding: 20px;
    margin-top: 13%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(90deg, #4A00E0 0%, #8E2DE2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(78, 0, 224, 0.3);
    color: white;
}

    .header h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .header p {
        font-size: 1.1rem;
        opacity: 0.9;
        max-width: 800px;
        margin: 0 auto;
        line-height: 1.6;
    }

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 30px;
}

/* 30格抽奖区域 */
.grid-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #8E2DE2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(142, 45, 226, 0.3);
    width: 100%;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-gap: 15px;
    width: 100%;
    max-width: 1200px;
}

@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-item {
    aspect-ratio: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(74, 0, 224, 0.1) 0%, rgba(142, 45, 226, 0.1) 100%);    
    font-weight: bold;
    font-size: 16px;
    color: #8E2DE2;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid rgba(142, 45, 226, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

    .grid-item:hover:not(.flipped):not(.drawing) {
        transform: scale(1.05);
        border-color: #8E2DE2;
        box-shadow: 0 8px 20px rgba(142, 45, 226, 0.3);
    }

    .grid-item.flipped {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
        border-color: rgba(255, 255, 255, 0.2);
        cursor: default;
    }

    .grid-item.drawing {
        cursor: not-allowed;
        opacity: 0.8;
    }

    .grid-item.win {
        background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.2) 100%);
        border-color: #2ecc71;
        animation: winPulse 1s infinite alternate;
    }

    .grid-item.lose {
        background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%);
        border-color: #e74c3c;
    }

.item-front, .item-back {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    transition: transform 0.6s;
    border-radius: 10px;
    padding: 15px;
}

.item-front {
    /*background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);*/
    background: url(../images/dan.png);
    background-size: 100%  auto;
    color: white;
}

.item-back {
    transform: rotateY(180deg);
    background: rgba(0, 0, 0, 0.7);
}

.grid-item.flipped .item-front {
    transform: rotateY(180deg);
}

.grid-item.flipped .item-back {
    transform: rotateY(0);
}

.item-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.item-text {
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
}

.item-number {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.win-icon {
    color: #2ecc71;
}

.lose-icon {
    color: #e74c3c;
}

/* 开奖动画容器 */
.lottery-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

    .lottery-animation-container.active {
        opacity: 1;
        visibility: visible;
    }

/* 开奖动画 */
.lottery-animation {
    text-align: center;
    padding: 40px;
    max-width: 600px;
    width: 90%;
}

.animation-title {
    font-size: 2.5rem;
    color: #8E2DE2;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(142, 45, 226, 0.7);
    font-weight: 700;
}

.countdown-number {
    font-size: 8rem;
    font-weight: 900;
    color: #8E2DE2;
    margin: 20px 0;
    text-shadow: 0 0 30px rgba(142, 45, 226, 0.9);
    animation: pulse 1s infinite alternate;
}

.countdown-text {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 20px;
    font-weight: 600;
}

.lottery-spinner {
    width: 120px;
    height: 120px;
    border: 8px solid rgba(142, 45, 226, 0.3);
    border-top: 8px solid #8E2DE2;
    border-radius: 50%;
    margin: 30px auto;
    animation: spin 1.5s linear infinite;
}

.prize-reveal {
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    margin: 30px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: reveal 1.5s ease-out;
    text-shadow: 0 0 20px rgba(142, 45, 226, 0.8);
}

.confetti-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.confetti {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: #8E2DE2;
    top: -10px;
    opacity: 0;
}

.result-icon-large {
    font-size: 6rem;
    margin: 20px 0;
    color: #8E2DE2;
    animation: bounce 1s infinite alternate;
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes winPulse {
    0% {
        box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
    }

    100% {
        box-shadow: 0 0 25px rgba(46, 204, 113, 0.8);
    }
}

@keyframes glowing {
    0% {
        box-shadow: 0 0 5px #8E2DE2;
    }

    50% {
        box-shadow: 0 0 20px #8E2DE2, 0 0 30px #8E2DE2;
    }

    100% {
        box-shadow: 0 0 5px #8E2DE2;
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-20px);
    }
}

@keyframes reveal {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.grid-item.selected {
    animation: glowing 2s infinite;
}

/* 抽奖记录 */
.records-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.records-list {
    max-height: 300px;
    overflow-y: auto;
}

.record-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

    .record-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .record-item.win {
        border-left: 4px solid #2ecc71;
    }

    .record-item.lose {
        border-left: 4px solid #e74c3c;
    }

.record-prize {
    font-weight: 500;
    color: #fff;
}

.record-time {
    color: #aaa;
    font-size: 0.8rem;
}

/* 按钮样式 */
.lottery-button {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

.el-button--primary {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(90deg, #8E2DE2 0%, #4A00E0 100%);
    border: none;
    transition: all 0.3s;
}

    .el-button--primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(142, 45, 226, 0.4);
    }

    .el-button--primary:active {
        transform: translateY(0);
    }

.el-button--success {
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
}

    .el-button--success:hover {
        box-shadow: 0 10px 20px rgba(46, 204, 113, 0.4);
    }

.el-button--warning {
    background: linear-gradient(90deg, #f39c12 0%, #d35400 100%);
}

    .el-button--warning:hover {
        box-shadow: 0 10px 20px rgba(243, 156, 18, 0.4);
    }

/* 响应式调整 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .grid-section, .records-container {
        padding: 20px 15px;
    }

    .grid-item {
        font-size: 14px;
    }

    .countdown-number {
        font-size: 5rem;
    }

    .animation-title {
        font-size: 2rem;
    }

    .prize-reveal {
        font-size: 2rem;
    }
}

.result-modal {
    text-align: center;
    padding: 30px;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    color: #8E2DE2;
}

.result-text {
    font-size: 1.8rem; 
    color: #8E2DE2;
    font-weight: 600;
    margin: 0 auto;
    margin-top: 200px;
    width: 170px;
}

.result-desc {
    color: #aaa;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.el-divider {
    margin: 20px 0;
    background-color: rgba(255, 255, 255, 0.1);
}

.instruction-box {
    width: 1200px;
}



/* 抽奖统计 */
.stats-box {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1500px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #8E2DE2;
    margin-bottom: 5px;
}

.stat-label {
    color: #aaa;
    font-size: 0.9rem;
}

/* 简洁的底部按钮 */
.bottom-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.el-dialog__wrapper{ background: url(../images/zjbg.jpg); background-size: cover;}
.result-modal{ height: 540px; background: url(../images/giftbg1.png);}
.result-modal .el-button{ margin-top: 220px;}

.el-dialog {
    background: none !important;
    box-shadow: none !important;
}