/* ===== 大转盘浮动按钮 ===== */
.wheel-float-btn {
    position: fixed;
    right: 12px;
    bottom: 150px;
    z-index: 999;
    height: 44px;
    padding: 0 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ff2d55, #ff6b35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(255,45,85,.5), 0 0 20px rgba(255,107,53,.35);
    transition: transform .2s, box-shadow .2s;
    user-select: none;
    text-decoration: none;
    animation: wheelBtnPulse 2s infinite;
}

.wheel-float-btn i { font-size: 18px; }
.wheel-float-btn span {
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1px;
}

.wheel-float-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(255,45,85,.7), 0 0 28px rgba(255,107,53,.5);
    color: #fff;
    text-decoration: none;
}

.wheel-float-btn:active {
    transform: scale(.92);
}

@keyframes wheelBtnPulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(255,45,85,.5), 0 0 20px rgba(255,107,53,.35); }
    50% { box-shadow: 0 8px 32px rgba(255,45,85,.75), 0 0 32px rgba(255,107,53,.55), 0 0 0 6px rgba(255,45,85,.15); }
}

/* ===== 转盘弹窗 ===== */
.wheel-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wheelFadeIn .25s;
}

.wheel-popup-box {
    position: relative;
    background: rgba(30,30,40,.95);
    border-radius: 24px;
    padding: 30px 20px 20px;
    width: 360px;
    max-width: 94vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.1);
    animation: wheelScaleIn .35s cubic-bezier(.175,.885,.32,1.275);
}

.wheel-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}

.wheel-popup-close:hover {
    background: rgba(255,255,255,.3);
}

.wheel-popup-title {
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.wheel-popup-title i {
    color: #ffd93d;
    margin-right: 6px;
}
.wheel-popup-title .win-rate { font-size: 13px; color: #ffd93d; font-weight: 600; }

/* ===== 转盘核心样式 ===== */
.wheel-wrapper {
    position: relative;
    width: 320px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.wheel-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.wheel-pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 28px solid #ff3b30;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
    z-index: 5;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #f0f0f0 100%);
    box-shadow: 0 2px 12px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.8);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
    color: #ff3b30;
    letter-spacing: 1px;
    transition: transform .15s;
    user-select: none;
}

.wheel-center:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.wheel-center:active {
    transform: translate(-50%, -50%) scale(.95);
}

.wheel-center.disabled {
    cursor: not-allowed;
    color: #999;
    opacity: .6;
}

.wheel-center.disabled:hover {
    transform: translate(-50%, -50%);
}

/* 抽奖信息条 */
.wheel-info {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255,255,255,.6);
}

.wheel-info .spent {
    color: #ffd93d;
    font-weight: 700;
}

/* 登录/无资格遮罩 */
.wheel-mask {
    position: absolute;
    inset: 2px;
    background: rgba(0,0,0,.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    cursor: pointer;
    transition: background .2s;
}

.wheel-mask:hover {
    background: rgba(0,0,0,.7);
}

.wheel-mask-text {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    line-height: 1.6;
}

.wheel-mask-text .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 4px;
}

/* 中奖弹窗 */
.wheel-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wheelFadeIn .25s;
}

.wheel-result-box {
    background: #fff;
    border-radius: 20px;
    padding: 30px 24px 24px;
    width: 280px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: wheelScaleIn .35s cubic-bezier(.175,.885,.32,1.275);
}

.wheel-result-box .prize-icon {
    font-size: 56px;
    margin-bottom: 10px;
}

.wheel-result-box .prize-title {
    font-size: 14px;
    color: #888;
    margin-bottom: 4px;
}

.wheel-result-box .prize-name {
    font-size: 18px;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.wheel-result-box .prize-balance-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    padding: 10px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
}

.wheel-result-box .prize-balance-info .balance-amount {
    color: #16a34a;
    font-weight: 900;
    font-size: 18px;
}

.wheel-result-box .prize-action {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff3b30, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
    transition: transform .15s;
}

.wheel-result-box .prize-action:active {
    transform: scale(.95);
}

.wheel-result-box .prize-order-link {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    word-break: break-all;
}

.wheel-result-box .prize-order-link a {
    color: #4d96ff;
    font-weight: 700;
    text-decoration: underline;
}

.wheel-result-box .prize-query-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
}

.wheel-result-box .prize-query-hint a {
    color: #4d96ff;
    text-decoration: underline;
}

.wheel-result-box .prize-close {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    padding: 6px;
}

@keyframes wheelFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wheelScaleIn {
    from { transform: scale(.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .wheel-float-btn {
        right: 16px;
        bottom: 155px;
        height: 44px;
        padding: 0 16px;
        border-radius: 22px;
        gap: 6px;
    }
    .wheel-float-btn i { font-size: 18px; }
.wheel-float-btn span {
        font-size: 13px;
        letter-spacing: 1px;
    }
    .wheel-popup-box {
        width: 320px;
        padding: 24px 14px 16px;
    }
    .wheel-container {
        width: 250px;
        height: 250px;
    }
    .wheel-center {
        width: 44px;
        height: 44px;
        font-size: 11px;
    }
    .wheel-pointer {
        border-left-width: 13px;
        border-right-width: 13px;
        border-top-width: 22px;
        top: -12px;
    }
}
