/**
 * 六合彩开奖动画样式
 * 配合 lhc-lottery.js 使用
 * 
 * 使用方式：
 * <link rel="stylesheet" href="lhc-lottery.css">
 * <script src="lhc-lottery.js"></script>
 */

/* ============ 摇奖机容器 ============ */
.lhc-machine {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 玻璃球罩 */
.lhc-globe {
    position: relative;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.6) 20%,
        rgba(240, 248, 255, 0.3) 40%,
        rgba(200, 220, 240, 0.2) 60%,
        rgba(180, 200, 220, 0.3) 80%,
        rgba(160, 180, 200, 0.4) 100%
    );
    box-shadow: 
        inset 0 0 50px rgba(255, 255, 255, 0.5),
        inset 20px 20px 60px rgba(255, 255, 255, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 玻璃高光 */
.lhc-globe::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 15%;
    width: 35%;
    height: 25%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 70%
    );
    border-radius: 50%;
    transform: rotate(-30deg);
    pointer-events: none;
    z-index: 100;
}

/* 玻璃边缘反光 */
.lhc-globe::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
    z-index: 99;
}

/* 球的内部容器 */
.lhc-balls-container {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 50%;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

/* 底座 */
.lhc-base {
    position: relative;
    background: linear-gradient(
        180deg,
        #ffb347 0%,
        #ff9500 20%,
        #ff8c00 50%,
        #e67300 80%,
        #cc6600 100%
    );
    border-radius: 10px 10px 15px 15px;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.3),
        inset 0 -5px 15px rgba(0, 0, 0, 0.2);
    margin-top: -5%;
    z-index: 10;
}

/* 底座顶部弧形 */
.lhc-base::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 10%;
    width: 80%;
    height: 40%;
    background: linear-gradient(
        180deg,
        #ffb347 0%,
        #ff9500 50%,
        #ff8c00 100%
    );
    border-radius: 50% 50% 0 0;
    z-index: -1;
}

/* 出球口 */
.lhc-outlet {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(
        180deg,
        #2a2a2a 0%,
        #1a1a1a 50%,
        #0a0a0a 100%
    );
    border-radius: 30%;
    box-shadow: 
        inset 0 3px 10px rgba(0, 0, 0, 0.8),
        0 2px 5px rgba(255, 255, 255, 0.2);
}

/* ============ 彩球样式 ============ */
.lhc-ball {
    position: absolute;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    box-shadow: 
        inset -4px -4px 10px rgba(0,0,0,0.35),
        inset 4px 4px 10px rgba(255,255,255,0.45),
        3px 5px 10px rgba(0,0,0,0.4);
    cursor: default;
    user-select: none;
    z-index: 50;
    will-change: transform, left, top;
    backface-visibility: hidden;
}

/* 球的高光 */
.lhc-ball::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 15%;
    width: 35%;
    height: 30%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.4) 40%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

/* 球的底部阴影 */
.lhc-ball::after {
    content: '';
    position: absolute;
    bottom: 5%;
    right: 10%;
    width: 25%;
    height: 20%;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.2) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

/* 红色球 */
.lhc-ball.red {
    background: radial-gradient(circle at 35% 35%, #ff8a8a 0%, #ff6b6b 20%, #ee2c2c 50%, #cc0000 100%);
}

/* 蓝色球 */
.lhc-ball.blue {
    background: radial-gradient(circle at 35% 35%, #a0d2ff 0%, #74b9ff 20%, #0984e3 50%, #0066cc 100%);
}

/* 绿色球 */
.lhc-ball.green {
    background: radial-gradient(circle at 35% 35%, #7fffd4 0%, #55efc4 20%, #00b894 50%, #009966 100%);
}

/* 黄色球 */
.lhc-ball.yellow {
    background: radial-gradient(circle at 35% 35%, #fff5cc 0%, #ffeaa7 20%, #fdcb6e 50%, #f39c12 100%);
    color: #333;
    text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
}

/* 灰色球 */
.lhc-ball.gray {
    background: radial-gradient(circle at 35% 35%, #dfe6e9 0%, #b2bec3 20%, #636e72 50%, #2d3436 100%);
}

/* ============ 结果展示区 ============ */
.lhc-result-area {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.lhc-result-ball {
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 
        inset -2px -2px 6px rgba(0,0,0,0.3),
        inset 2px 2px 6px rgba(255,255,255,0.4),
        2px 3px 6px rgba(0,0,0,0.3);
    transform: scale(0);
    animation: lhcResultPop 0.4s ease forwards;
}

.lhc-result-ball.red {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee2c2c 40%, #cc0000 100%);
}

.lhc-result-ball.blue {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 40%, #0066cc 100%);
}

.lhc-result-ball.green {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 40%, #009966 100%);
}

/* 特码球（金色边框） */
.lhc-result-ball.special {
    border: 3px solid #ffd700;
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 0.6),
        inset -2px -2px 6px rgba(0,0,0,0.3),
        inset 2px 2px 6px rgba(255,255,255,0.4);
}

/* 结果球弹出动画 */
@keyframes lhcResultPop {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

