/* 转盘样式扩展 - 支持多种转盘布局 */

/* 基础转盘容器 */
.b7b2-lottery-container {
    --wheel-primary-color: #667eea;
    --wheel-secondary-color: #764ba2;
    --wheel-accent-color: #FFD700;
    --wheel-background-color: #FFFFFF;
    --wheel-text-color: #FFFFFF;
    --wheel-border-radius: 12px;
}

/* 主题配色 */
.wheel-theme-gold {
    --wheel-primary-color: #FFD700;
    --wheel-secondary-color: #FFA500;
    --wheel-accent-color: #FF6B6B;
}

.wheel-theme-red {
    --wheel-primary-color: #FF6B6B;
    --wheel-secondary-color: #EE5A24;
    --wheel-accent-color: #FFD700;
}

.wheel-theme-blue {
    --wheel-primary-color: #3742fa;
    --wheel-secondary-color: #2f3542;
    --wheel-accent-color: #ff6348;
}

.wheel-theme-green {
    --wheel-primary-color: #2ed573;
    --wheel-secondary-color: #1e90ff;
    --wheel-accent-color: #ffa502;
}

.wheel-theme-purple {
    --wheel-primary-color: #a55eea;
    --wheel-secondary-color: #26de81;
    --wheel-accent-color: #fd79a8;
}

/* ========== 圆形转盘样式 ========== */
.wheel-style-circle .lottery-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.wheel-style-circle .circle-wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--wheel-primary-color) 0deg 45deg,
        var(--wheel-secondary-color) 45deg 90deg,
        var(--wheel-primary-color) 90deg 135deg,
        var(--wheel-secondary-color) 135deg 180deg,
        var(--wheel-primary-color) 180deg 225deg,
        var(--wheel-secondary-color) 225deg 270deg,
        var(--wheel-primary-color) 270deg 315deg,
        var(--wheel-secondary-color) 315deg 360deg
    );
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: wheel-idle 20s linear infinite;
}

.wheel-style-circle .circle-wheel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.wheel-style-circle .lottery-item {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wheel-text-color);
    font-weight: bold;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    transform-origin: center;
}

.wheel-style-circle .lottery-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* 圆形转盘位置布局 */
.wheel-style-circle .lottery-item:nth-child(1) {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.wheel-style-circle .lottery-item:nth-child(2) {
    top: 25%;
    right: 10px;
    transform: translateY(-50%);
}

.wheel-style-circle .lottery-item:nth-child(3) {
    bottom: 25%;
    right: 10px;
    transform: translateY(50%);
}

.wheel-style-circle .lottery-item:nth-child(4) {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.wheel-style-circle .lottery-item:nth-child(6) {
    bottom: 25%;
    left: 10px;
    transform: translateY(50%);
}

.wheel-style-circle .lottery-item:nth-child(7) {
    top: 25%;
    left: 10px;
    transform: translateY(-50%);
}

.wheel-style-circle .lottery-item:nth-child(8) {
    top: 15%;
    right: 15%;
}

.wheel-style-circle .lottery-item:nth-child(9) {
    bottom: 15%;
    right: 15%;
}

/* 圆形转盘中心按钮 */
.wheel-style-circle .lottery-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wheel-accent-color), #ff6348);
    color: white;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.wheel-style-circle .lottery-center:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.wheel-style-circle .lottery-center:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* 圆形转盘指针 */
.wheel-style-circle .wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--wheel-accent-color);
    z-index: 20;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* ========== 六边形转盘样式 ========== */
.wheel-style-hexagon .lottery-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

.wheel-style-hexagon .hexagon-wheel {
    position: relative;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--wheel-primary-color), var(--wheel-secondary-color));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.wheel-style-hexagon .lottery-item {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wheel-text-color);
    font-weight: bold;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: all 0.3s ease;
    cursor: pointer;
}

.wheel-style-hexagon .lottery-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 六边形位置布局 */
.wheel-style-hexagon .lottery-item:nth-child(1) {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.wheel-style-hexagon .lottery-item:nth-child(2) {
    top: 30%;
    right: 20px;
}

.wheel-style-hexagon .lottery-item:nth-child(3) {
    bottom: 30%;
    right: 20px;
}

.wheel-style-hexagon .lottery-item:nth-child(4) {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.wheel-style-hexagon .lottery-item:nth-child(6) {
    bottom: 30%;
    left: 20px;
}

.wheel-style-hexagon .lottery-item:nth-child(7) {
    top: 30%;
    left: 20px;
}

/* 六边形中心 */
.wheel-style-hexagon .lottery-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--wheel-accent-color), #ff6348);
    color: white;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.wheel-style-hexagon .lottery-center:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ========== 卡片式转盘样式 ========== */
.wheel-style-cards .lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
    perspective: 1000px;
}

.wheel-style-cards .lottery-item {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--wheel-primary-color), var(--wheel-secondary-color));
    border-radius: var(--wheel-border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wheel-text-color);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    transform-style: preserve-3d;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.wheel-style-cards .lottery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.wheel-style-cards .lottery-item:hover {
    transform: rotateY(10deg) rotateX(10deg) translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.wheel-style-cards .lottery-item:hover::before {
    transform: translateX(100%);
}

.wheel-style-cards .lottery-center {
    background: linear-gradient(135deg, var(--wheel-accent-color), #ff6348);
    position: relative;
    z-index: 5;
}

.wheel-style-cards .lottery-center:hover {
    transform: rotateY(15deg) rotateX(15deg) translateY(-15px) scale(1.05);
}

/* ========== 转盘动画效果 ========== */
@keyframes wheel-idle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wheel-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(1800deg); }
}

@keyframes wheel-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes wheel-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes wheel-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

/* 转盘旋转状态 */
.wheel-spinning .circle-wheel {
    animation: wheel-spin 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.wheel-spinning .lottery-item {
    pointer-events: none;
}

.wheel-spinning .lottery-center {
    pointer-events: none;
    animation: wheel-pulse 0.5s ease-in-out infinite;
}

/* 中奖状态 */
.lottery-item.winner {
    animation: wheel-glow 1s ease-in-out infinite;
    z-index: 15;
}

.wheel-style-circle .lottery-item.winner {
    background: rgba(255, 215, 0, 0.3);
    border-color: #FFD700;
    transform: scale(1.2);
}

.wheel-style-cards .lottery-item.winner {
    transform: rotateY(15deg) rotateX(15deg) translateY(-20px) scale(1.1);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .wheel-style-circle .lottery-grid,
    .wheel-style-hexagon .lottery-grid {
        width: 300px;
        height: 300px;
    }
    
    .wheel-style-circle .circle-wheel {
        width: 100%;
        height: 100%;
    }
    
    .wheel-style-circle .lottery-item {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .wheel-style-circle .lottery-center {
        width: 80px;
        height: 80px;
        font-size: 14px;
    }
    
    .wheel-style-hexagon .hexagon-wheel {
        width: 250px;
        height: 250px;
    }
    
    .wheel-style-hexagon .lottery-item {
        width: 50px;
        height: 50px;
        font-size: 11px;
    }
    
    .wheel-style-hexagon .lottery-center {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .wheel-style-cards .lottery-grid {
        max-width: 350px;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .wheel-style-circle .lottery-grid,
    .wheel-style-hexagon .lottery-grid {
        width: 250px;
        height: 250px;
    }
    
    .wheel-style-circle .lottery-item {
        width: 50px;
        height: 50px;
        font-size: 10px;
    }
    
    .wheel-style-circle .lottery-center {
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .wheel-style-cards .lottery-grid {
        max-width: 280px;
        gap: 10px;
    }
}

/* ========== 转盘样式切换动画 ========== */
.wheel-transition {
    transition: all 0.5s ease-in-out;
}

.wheel-style-switching {
    opacity: 0;
    transform: scale(0.8);
}

.wheel-style-switched {
    opacity: 1;
    transform: scale(1);
}

/* ========== 奖品图片和文字样式 ========== */
.lottery-item .prize-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 5px;
    border-radius: 4px;
}

.lottery-item .prize-name {
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.lottery-item .prize-value {
    font-size: 9px;
    opacity: 0.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 圆形转盘特殊样式 */
.wheel-style-circle .lottery-item .prize-image {
    width: 25px;
    height: 25px;
}

.wheel-style-circle .lottery-item .prize-name {
    font-size: 10px;
}

.wheel-style-circle .lottery-item .prize-value {
    font-size: 8px;
}

/* 六边形转盘特殊样式 */
.wheel-style-hexagon .lottery-item .prize-image {
    width: 20px;
    height: 20px;
}

.wheel-style-hexagon .lottery-item .prize-name {
    font-size: 9px;
}

.wheel-style-hexagon .lottery-item .prize-value {
    font-size: 7px;
}

/* 卡片式转盘特殊样式 */
.wheel-style-cards .lottery-item .prize-image {
    width: 35px;
    height: 35px;
    margin-bottom: 8px;
}

.wheel-style-cards .lottery-item .prize-name {
    font-size: 12px;
    margin-bottom: 4px;
}

.wheel-style-cards .lottery-item .prize-value {
    font-size: 10px;
}

/* ========== 加载状态 ========== */
.wheel-loading {
    position: relative;
}

.wheel-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--wheel-accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}