/* 抽奖页面样式 */
.lottery-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    margin: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lottery-title {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.lottery-item {
    aspect-ratio: 1/1;
    background-color: #f8f8f8;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lottery-item.active {
    border-color: #FF9800;
    background-color: #FFF3E0;
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
}

.lottery-item img {
    width: 60%;
    height: auto;
    margin-bottom: 5px;
}

.lottery-item .item-name {
    font-size: 12px;
    text-align: center;
    word-break: break-all;
}

.lottery-item .item-rarity {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

.lottery-item .rarity-3 {
    background-color: #4CAF50;
}

.lottery-item .rarity-4 {
    background-color: #2196F3;
}

.lottery-item .rarity-5 {
    background-color: #FF5722;
}

.lottery-controls {
    text-align: center;
}

.lottery-balance {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.lottery-balance span:last-child {
    color: #FF5722;
    font-weight: bold;
}

.lottery-btn {
    padding: 12px 30px;
    background-color: #FF9800;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.lottery-btn:hover {
    background-color: #F57C00;
    transform: translateY(-2px);
}


.lottery-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}
.lottery-tips {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.lottery-tips p {
    margin: 5px 0;
}

.lottery-history {
    background-color: #fff;
    border-radius: 12px;
    margin: 15px;
    padding: 15px;
}

.lottery-history h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 4px;
}

.history-item .item-info {
    flex: 1;
}

.history-item .item-name {
    font-size: 14px;
    color: #333;
}

.history-item .item-time {
    font-size: 12px;
    color: #999;
}

.history-item .item-rarity {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    margin-left: 10px;
}

/* 抽奖动画 */
@keyframes highlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.lottery-prize {
    animation: highlight 0.5s ease-in-out 3;
}



/* 图片响应式处理 */
.item-image-container {
    width: 100%;
    max-width: 60px;
    height: auto;
    aspect-ratio: 1/1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


@keyframes flashPrize {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}
