/* 抽奖系统样式 */

/* 艺术图展示区域样式 */
.lottery-art-section {
    padding: 40px 0;
    background: linear-gradient(135deg, rgba(76, 217, 100, 0.03) 0%, rgba(76, 217, 100, 0.01) 100%);
    position: relative;
    overflow: hidden;
}

/* 积分说明区块样式 */
.points-info-section {
  margin: 40px auto 60px;
}
.points-info-section .container {
  max-width: 1024px;
  margin: 0 auto;
  text-align: center;
}
.points-info-section .section-title {
  margin-bottom: 12px;
  color: #e5e7eb; /* 调亮积分说明标题 */
}
.points-info-section .section-subtitle {
  color: #f3f4f6; /* 再调亮副标题，提升可读性 */
  margin-bottom: 16px;
  text-align: center;
}
.points-info-section .section-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}
.points-info-section .cta-button.primary {
  display: inline-block;
}

.lottery-art-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(76, 217, 100, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 50%, rgba(76, 217, 100, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.art-banner {
    position: relative;
    z-index: 1;
}

.art-image-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    border: 2px solid rgba(76, 217, 100, 0.2);
    transition: all 0.3s ease;
}

.art-image-container:hover {
    border-color: rgba(76, 217, 100, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.art-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--primary-color);
    text-align: center;
    padding: 40px;
    background: 
        linear-gradient(45deg, transparent 25%, rgba(76, 217, 100, 0.02) 25%, rgba(76, 217, 100, 0.02) 50%, transparent 50%, transparent 75%, rgba(76, 217, 100, 0.02) 75%),
        linear-gradient(-45deg, transparent 25%, rgba(76, 217, 100, 0.02) 25%, rgba(76, 217, 100, 0.02) 50%, transparent 50%, transparent 75%, rgba(76, 217, 100, 0.02) 75%);
    background-size: 20px 20px;
    position: relative;
}

.art-placeholder::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px dashed rgba(76, 217, 100, 0.3);
    border-radius: 12px;
    pointer-events: none;
}

.art-placeholder i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    color: var(--primary-color);
}

.art-placeholder p {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.dimensions-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.7;
    font-style: italic;
}

.lottery-main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* 魔法师Xwawa样式 */
.lottery-wheel-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin: 40px 0;
    position: relative;
}

.magic-wawa-container {
    position: absolute;
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.magic-wawa {
    position: relative;
    width: 120px;
    height: 150px;
    animation: float 3s ease-in-out infinite;
}

.wawa-body {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 魔法帽 */
.magic-hat {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 40px;
    z-index: 5;
}

.hat-base {
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, #4a0e4e, #2d1b69);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hat-base::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -10px;
    right: -10px;
    height: 8px;
    background: linear-gradient(135deg, #5a1e5e, #3d2b79);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hat-star {
    position: absolute;
    top: -5px;
    right: 5px;
    font-size: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

/* 青蛙头部 */
.wawa-head {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, #4cd964, #2ca745);
    border-radius: 50% 50% 45% 45%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wawa-eyes {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
}

.eye {
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 0;
}

.left-eye {
    left: 8px;
}

.right-eye {
    right: 8px;
}

.eye::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    animation: blink 4s ease-in-out infinite;
}

.wawa-mouth {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    background: #2ca745;
    border-radius: 0 0 50% 50%;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* 青蛙身体 */
.wawa-torso {
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 50px;
    background: linear-gradient(135deg, #4cd964, #2ca745);
    border-radius: 45% 45% 50% 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 青蛙手臂 */
.wawa-arms {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 60px;
}

.wawa-arm {
    position: absolute;
    width: 35px;
    height: 50px;
}

.left-arm {
    left: 5px;
    top: 0;
}

.right-arm {
    right: 5px;
    top: 0;
    transform-origin: 50% 20%;
}

.upper-arm {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 25px;
    background: linear-gradient(135deg, #4cd964, #2ca745);
    border-radius: 50% 50% 30% 30%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.lower-arm {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 20px;
    background: linear-gradient(135deg, #4cd964, #2ca745);
    border-radius: 30% 30% 50% 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hand {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #4cd964, #2ca745);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 魔法棒 */
.magic-wand {
    position: absolute;
    top: -5px;
    left: 8px;
    width: 45px;
    height: 6px;
    transform-origin: 0 center;
    transform: rotate(-30deg);
    z-index: 8;
    transition: transform 0.3s ease;
}

.wand-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 6px;
    background: linear-gradient(90deg, #8B4513, #A0522D);
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.wand-tip {
    position: absolute;
    right: -5px;
    top: -3px;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.wand-star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    animation: sparkle 1.5s ease-in-out infinite;
}

/* 魔法粒子效果 */
.magic-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* 魔法咒语 */
.magic-spell {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(76, 217, 100, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.magic-spell.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 魔法光环效果 - 调整尺寸避免遮挡转盘 */
.magic-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    border: 2px solid transparent;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1; /* 确保在转盘后方 */
}

.magic-aura.active {
    opacity: 0.6;
    border-color: rgba(76, 217, 100, 0.4);
    box-shadow: 
        0 0 15px rgba(76, 217, 100, 0.3),
        inset 0 0 15px rgba(76, 217, 100, 0.1);
    animation: pulse-aura 2s ease-in-out infinite;
}

/* 动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes blink {
    0%, 90%, 100% {
        opacity: 1;
    }
    95% {
        opacity: 0;
    }
}

@keyframes pulse-aura {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

/* 魔法棒挥动动画 */
.magic-wand.casting {
    animation: wand-wave 1s ease-in-out;
}

@keyframes wand-wave {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-30deg);
    }
    50% {
        transform: rotate(15deg);
    }
    75% {
        transform: rotate(-10deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* 魔法粒子爆发效果 */
.magic-burst-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ffd700 0%, #ff6b6b 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transition: all 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px currentColor;
}

/* 魔法师施法状态 */
.magic-wizard.casting {
    animation: casting-glow 2s ease-in-out;
}

@keyframes casting-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px #FFD700); 
    }
    50% { 
        filter: drop-shadow(0 0 20px #FFD700) drop-shadow(0 0 30px #FF69B4); 
        transform: scale(1.1);
    }
}

/* 手臂挥动动画 */
.right-arm.casting {
    animation: arm-wave 2s ease-in-out;
}

@keyframes arm-wave {
    0% { 
        transform: rotate(0deg);
    }
    25% { 
        transform: rotate(-30deg);
    }
    50% { 
        transform: rotate(15deg);
    }
    75% { 
        transform: rotate(-20deg);
    }
    100% { 
        transform: rotate(0deg);
    }
}

/* 魔法棒挥动增强效果 */
.magic-wand.waving {
    animation: wand-wave-enhanced 2s ease-in-out;
}

@keyframes wand-wave-enhanced {
    0% { 
        transform: rotate(-30deg); 
        filter: drop-shadow(0 0 5px #FFD700);
    }
    25% { 
        transform: rotate(-60deg); 
        filter: drop-shadow(0 0 15px #FF69B4);
    }
    50% { 
        transform: rotate(-15deg); 
        filter: drop-shadow(0 0 20px #00FFFF);
    }
    75% { 
        transform: rotate(-45deg); 
        filter: drop-shadow(0 0 15px #FF6347);
    }
    100% { 
        transform: rotate(-30deg); 
        filter: drop-shadow(0 0 5px #FFD700);
    }
}

/* 魔法粒子激活状态 */
.magic-particles.active .particle {
    animation: particle-burst 2s ease-out;
}

@keyframes particle-burst {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.5) rotate(720deg);
        opacity: 0;
    }
}

/* 转盘魔法光环激活状态 */
.wheel-magic-aura.active {
    animation: aura-pulse-enhanced 3s ease-in-out;
}

.wheel-magic-aura.spinning-aura {
    animation: spinning-aura 5s linear infinite;
}

@keyframes aura-pulse-enhanced {
    0%, 100% {
        box-shadow: 
            0 0 20px #FFD700,
            0 0 40px #FF69B4,
            0 0 60px #00FFFF;
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 0 40px #FFD700,
            0 0 80px #FF69B4,
            0 0 120px #00FFFF,
            0 0 160px #FF6347;
        transform: scale(1.05);
    }
}

@keyframes spinning-aura {
    0% {
        box-shadow: 
            0 0 30px #FFD700,
            0 0 60px #FF69B4,
            0 0 90px #00FFFF;
        transform: rotate(0deg) scale(1);
    }
    50% {
        box-shadow: 
            0 0 50px #FFD700,
            0 0 100px #FF69B4,
            0 0 150px #00FFFF,
            0 0 200px #9370DB;
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        box-shadow: 
            0 0 30px #FFD700,
            0 0 60px #FF69B4,
            0 0 90px #00FFFF;
        transform: rotate(360deg) scale(1);
    }
}

/* 魔法旋转状态 */
.lottery-wheel-container.magic-spinning {
    filter: drop-shadow(0 0 20px #FFD700) drop-shadow(0 0 40px #FF69B4);
}

.lottery-wheel-container.magic-burst {
    animation: magic-burst-glow 1s ease-in-out;
}

@keyframes magic-burst-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px #FFD700) drop-shadow(0 0 40px #FF69B4);
    }
    50% {
        filter: 
            drop-shadow(0 0 40px #FFD700) 
            drop-shadow(0 0 80px #FF69B4) 
            drop-shadow(0 0 120px #00FFFF)
            drop-shadow(0 0 160px #9370DB);
        transform: scale(1.02);
    }
}

/* 魔法旋转粒子 */
.spinning-magic-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    animation: orbit-spin 5s linear infinite;
    box-shadow: 0 0 15px currentColor;
}

@keyframes orbit-spin {
    0% {
        transform: rotate(0deg) translateX(150px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) translateX(150px) rotate(-360deg);
        opacity: 0;
    }
}

/* 魔法能量波 */
.magic-energy-wave {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid;
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .lottery-wheel-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .magic-wawa-container {
        left: -35px;
    }
    
    .magic-wawa {
        width: 100px;
        height: 125px;
    }
    
    .magic-wand {
        right: -25px;
        width: 50px;
    }
    
    .magic-burst-particle {
        width: 4px;
        height: 4px;
    }
}

.lottery-hero {
    background-color: #1a1a1a;
    padding: 60px 0;
    text-align: center;
    border-radius: 12px;
    margin: 20px auto;
    max-width: 1200px;
}

.lottery-title {
    color: #b0b0b0;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.lottery-subtitle {
    color: #888888;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.lottery-section {
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* 钱包连接样式 */
.wallet-connection {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

#wallet-status {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
}

#wallet-status.not-connected {
    background-color: #ff6b6b;
    color: white;
}

#wallet-status.connected {
    background-color: #4CAF50;
    color: white;
}

.connect-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.connect-button:hover {
    background-color: #45a049;
}

.disconnect-button {
    padding: 10px 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.disconnect-button:hover {
    background-color: #e55555;
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #ffffff; /* 在绿色背景上确保对比度 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    margin-left: 10px;
}

/* 钱包模态框样式 */
.wallet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.wallet-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(76, 217, 100, 0.2);
}

.wallet-modal h3 {
    text-align: center;
    color: #4cd964;
    margin-bottom: 30px;
    font-size: 1.5rem;
    font-weight: 600;
}

.wallet-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(76, 217, 100, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: left;
}

.wallet-option:hover {
    background: rgba(76, 217, 100, 0.1);
    border-color: rgba(76, 217, 100, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 217, 100, 0.2);
}

.wallet-option:last-child {
    margin-bottom: 0;
}

.wallet-icon {
    font-size: 2rem;
    margin-right: 15px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 217, 100, 0.1);
    border-radius: 10px;
}

.wallet-info {
    display: flex;
    flex-direction: column;
}

.wallet-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.wallet-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.close-selection {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-selection:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lottery-wheel-container {
    display: flex;
    justify-content: center;
    margin: 60px 0 140px; /* 增加底部间距，确保转盘完整显示 */
    position: relative;
    width: 100%;
    overflow: visible; /* 允许光环完整显示，不再裁剪 */
}

.lottery-wheel-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(240px, 90vw, 520px); /* 移动端按视口自适应 */
    height: clamp(240px, 90vw, 520px);
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #4cd964 0deg,
        #00d4ff 60deg,
        #ff9500 120deg,
        #ff3b30 180deg,
        #af52de 240deg,
        #007aff 300deg,
        #4cd964 360deg
    );
    animation: rotate-glow 10s linear infinite;
    z-index: -2;
    filter: blur(10px);
    opacity: 0.45;
}

@keyframes rotate-glow {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.lottery-wheel {
    position: relative;
    width: clamp(240px, 90vw, 420px); /* 防止小屏超出视口 */
    height: clamp(240px, 90vw, 420px);
    margin: 0 auto; /* 居中显示 */
    display: block; /* 保证作为块级元素占位 */
    max-width: 100vw;
    filter: drop-shadow(0 0 30px rgba(76, 217, 100, 0.3));
}

.wheel-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    overflow: hidden;
    border: 4px solid transparent;
    background-clip: padding-box;
    transition: transform 4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    contain: layout paint;
}

/* 预旋转动画：在等待合约结果时轻快旋转 */
.wheel-inner.pre-spin {
    animation: wheel-pre-spin 1.2s linear infinite;
}

@keyframes wheel-pre-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wheel-inner::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #4cd964,
        #00d4ff,
        #ff9500,
        #ff3b30,
        #af52de,
        #007aff,
        #4cd964
    );
    z-index: -1;
    animation: border-rotate 6s linear infinite;
}

@keyframes border-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wheel-inner::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(76, 217, 100, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.prize-section {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.prize-section:hover {
    filter: brightness(1.2);
    transform-origin: bottom right;
}

.prize-section:nth-child(1) {
    background: linear-gradient(135deg, #4cd964 0%, #34c759 100%);
    transform: rotate(0deg);
    box-shadow: inset 0 0 20px rgba(76, 217, 100, 0.3);
}

.prize-section:nth-child(2) {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    transform: rotate(60deg);
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.3);
}

.prize-section:nth-child(3) {
    background: linear-gradient(135deg, #ff9500 0%, #ff8c00 100%);
    transform: rotate(120deg);
    box-shadow: inset 0 0 20px rgba(255, 149, 0, 0.3);
}

.prize-section:nth-child(4) {
    background: linear-gradient(135deg, #ff3b30 0%, #e60012 100%);
    transform: rotate(180deg);
    box-shadow: inset 0 0 20px rgba(255, 59, 48, 0.3);
}

.prize-section:nth-child(5) {
    background: linear-gradient(135deg, #af52de 0%, #9932cc 100%);
    transform: rotate(240deg);
    box-shadow: inset 0 0 20px rgba(175, 82, 222, 0.3);
}

.prize-section:nth-child(6) {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    transform: rotate(300deg);
    box-shadow: inset 0 0 20px rgba(0, 122, 255, 0.3);
}

.prize-text {
    position: absolute;
    transform: rotate(-30deg);
    color: white;
    font-weight: 800;
    font-size: 1.12rem;
    text-align: center;
    width: 120px;
    left: 45px;
    top: 25px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.6px;
}

.wheel-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid #4cd964;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.wheel-pointer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -24px;
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, #4cd964 10%, #34c759 90%);
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 18px rgba(76, 217, 100, 0.7);
}

.wheel-pointer::after {
    content: '⬇';
    position: absolute;
    top: -40px;
    left: -10px;
    font-size: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Web3风格动画效果 */
.lottery-wheel-container.spinning {
    animation: container-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes container-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.02); }
}

.lottery-wheel-container.spinning::before {
    animation-duration: 2s;
    filter: blur(12px);
    opacity: 0.8;
}

.lottery-wheel-container.mid-spin {
    filter: brightness(1.1) saturate(1.2);
}

.lottery-wheel-container.spin-complete {
    animation: completion-flash 0.5s ease-in-out;
}

@keyframes completion-flash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3) saturate(1.5); }
}

.wheel-pointer.pointer-active {
    animation: pointer-bounce 0.3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(76, 217, 100, 0.8));
}

@keyframes pointer-bounce {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.1); }
}

/* 获奖效果 */
.lottery-wheel-container.major-win {
    animation: major-win-effect 1s ease-in-out;
    filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.8));
}

@keyframes major-win-effect {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(2deg); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.05) rotate(-2deg); }
}

.lottery-wheel-container.minor-win {
    animation: minor-win-effect 0.8s ease-in-out;
    filter: drop-shadow(0 0 30px rgba(76, 217, 100, 0.6));
}

@keyframes minor-win-effect {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* 烟花粒子效果 */
.firework-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ffd700 0%, #ff6b6b 50%, transparent 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: firework-explosion 1s ease-out forwards;
    z-index: 1000;
}

@keyframes firework-explosion {
    0% {
        transform: scale(0) translate(0, 0);
        opacity: 1;
    }
    50% {
        transform: scale(1) translate(
            calc((var(--random-x, 0.5) - 0.5) * 200px),
            calc((var(--random-y, 0.5) - 0.5) * 200px)
        );
        opacity: 0.8;
    }
    100% {
        transform: scale(0.5) translate(
            calc((var(--random-x, 0.5) - 0.5) * 300px),
            calc((var(--random-y, 0.5) - 0.5) * 300px)
        );
    opacity: 0;
}

/* 结束 @keyframes firework-explosion */
}

/* 全屏烟花覆盖层 */
.fireworks-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000; /* 高于弹窗，且不拦截点击 */
    overflow: hidden;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

/* 转盘悬停效果增强 */
.lottery-wheel:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.lottery-wheel:hover .wheel-inner {
    filter: brightness(1.05);
}

/* 奖项区域悬停效果 */
.prize-section:hover {
    filter: brightness(1.3) saturate(1.2);
    transform-origin: bottom right;
    z-index: 5;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .lottery-wheel-container::before {
        width: 380px;
        height: 380px;
    }
    
    .lottery-wheel {
        width: 320px;
        height: 320px;
    }
    
    .prize-text {
        font-size: 0.9rem;
        width: 100px;
        left: 35px;
        top: 20px;
    }
    
    .wheel-pointer {
        border-left: 20px solid transparent;
        border-right: 20px solid transparent;
        border-top: 40px solid #4cd964;
    }
    
    .wheel-pointer::before {
        width: 36px;
        height: 36px;
        top: -38px;
        left: -18px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .wheel-inner {
        border: 6px solid #ffffff;
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        contain: layout paint;
    }
    
    .prize-text {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        font-weight: 800;
    }
}

/* 抽奖控制区域样式 */
.lottery-controls {
    max-width: 500px;
    margin: 0 auto;
    margin-top: 10px; /* 与转盘保持距离 */
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 0; /* 保证不会覆盖转盘 */
}

.draw-cost, .draw-times, .total-cost {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #b0b0b0;
}

.cost-amount, #total-cost-amount {
    font-weight: bold;
    color: #4CAF50;
}

.times-control {
    display: flex;
    align-items: center;
}

.times-btn {
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
}

#draw-times-input {
    width: 50px;
    text-align: center;
    margin: 0 10px;
    padding: 5px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #222;
    color: white;
}

.draw-button {
    width: 100%;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.draw-button:hover {
    background-color: #45a049;
}

.draw-button:disabled {
    background-color: #888;
    cursor: not-allowed;
}

/* 抽奖结果区域样式 */
.lottery-results {
    margin-top: 40px;
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.lottery-results h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #b0b0b0;
}

.results-list {
    max-height: 300px;
    overflow-y: auto;
}

.result-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item.first-prize {
    background-color: rgba(255, 107, 107, 0.2);
    border-left: 5px solid #FF6B6B;
}

.result-item.second-prize {
    background-color: rgba(78, 205, 196, 0.2);
    border-left: 5px solid #4ECDC4;
}

.result-item.third-prize {
    background-color: rgba(255, 209, 102, 0.2);
    border-left: 5px solid #FFD166;
}

.result-item.pool-prize {
    background-color: rgba(6, 214, 160, 0.2);
    border-left: 5px solid #06D6A0;
}

.result-item.double {
    background-color: rgba(17, 138, 178, 0.2);
    border-left: 5px solid #118AB2;
}

.result-item.nothing {
    background-color: rgba(7, 59, 76, 0.2);
    border-left: 5px solid #073B4C;
}

.result-name {
    font-weight: bold;
    color: #b0b0b0;
}

.result-value {
    color: #4CAF50;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #888;
}

/* 奖项说明区域样式 */
.prize-info-section {
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: #e5e7eb; /* 调亮标题，提高对比度 */
}

.prize-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.prize-info-card {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.prize-info-card h3 {
    margin-bottom: 10px;
    color: #e5e7eb; /* 调亮卡片标题 */
}

.prize-info-card p {
    color: #cbd5e1; /* 调亮卡片正文 */
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 结果弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

/* 钱包连接消息提示 */
.wallet-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wallet-message-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.wallet-message-error {
    background: linear-gradient(135deg, #f44336, #da190b);
}

.wallet-message-info {
    background: linear-gradient(135deg, #2196F3, #0b7dda);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 钱包选项连接中状态 */
.wallet-option.connecting {
    opacity: 0.7;
    pointer-events: none;
}

.wallet-option.connecting .wallet-icon {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* 钱包选项禁用状态 */
.wallet-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.wallet-option.disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.result-title {
    margin-bottom: 20px;
    color: #b0b0b0;
}

.result-details {
    margin-bottom: 30px;
}

.result-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.result-message {
    color: #b0b0b0;
    font-size: 1.2rem;
}

.close-result-btn {
    padding: 12px 30px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 艺术图区域移动端适配 */
    .lottery-art-section {
        padding: 30px 0;
    }
    
    .art-placeholder {
        height: 200px;
        padding: 20px;
    }
    
    .art-placeholder i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .art-placeholder p {
        font-size: 1.1rem;
    }
    
    .dimensions-hint {
        font-size: 0.8rem;
    }
    
    .lottery-wheel {
        width: 300px;
        height: 300px;
    }
    
    .prize-text {
        font-size: 0.8rem;
        width: 80px;
        left: 40px;
        top: 25px;
    }
    
    .prize-info-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    /* 小屏幕设备的艺术图适配 */
    .art-placeholder {
        height: 150px;
        padding: 15px;
    }
    
    .art-placeholder i {
        font-size: 2rem;
    }
    
    .art-placeholder p {
        font-size: 1rem;
    }
    
    /* 小屏幕设备的魔法师Xwawa定位 */
    .magic-wawa-container {
        left: -25px;
    }
    
    .art-image-container {
        margin: 0 10px;
    }
}
/* 结果列表状态文本更亮，避免与灰背景混在一起 */
.results-list .result-item .result-status {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.2px;
    opacity: 0.98;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* 按状态分别上色 */
.results-list .result-item .result-status.status-auto {
    color: #4ECDC4 !important; /* 薄荷绿 */
    background: rgba(78, 205, 196, 0.12);
}

.results-list .result-item .result-status.status-none {
    color: #E74C3C !important; /* 暗红 */
    background: rgba(231, 76, 60, 0.12);
}

/* 可选：为状态增加轻微底色提升可读性 */
.results-list .result-item .result-status {
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 8px;
}

/* 如果结果项采用 Flex 布局，确保状态文本靠右显示 */
.results-list .result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-list .result-item .result-name {
    color: #f1f1f1;
}

.results-list .result-item .result-value {
    color: #d8d8d8;
}

/* 新增：钱包状态卡片样式 */
.wallet-status-cards {
    display: flex;
    gap: 12px;
    align-items: center;
}
.wallet-card {
    background: #2a9d8f;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.wallet-card .wallet-balance { font-weight: 600; }

/* 响应式：在窄屏竖屏时垂直居中堆叠 */
@media (max-width: 768px) {
  .wallet-connection {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  #wallet-status { width: 95%; text-align: center; }
  .wallet-status-cards { flex-direction: column; width: 95%; }
  .wallet-card { width: 100%; }
  #connect-wallet-btn { width: 95%; }
}

/* 进一步针对竖屏优化（设备宽高比判断） */
@media (orientation: portrait) {
  .wallet-connection { flex-direction: column; }
  .wallet-status-cards { flex-direction: column; }
}
/* 主卡：余额 + 连接按钮排列 */
.wallet-card.wallet-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.wallet-main .wallet-balance { font-size: 1rem; }
.wallet-main .wallet-connect-button { margin-left: auto; }

/* 积分卡美化 */
.wallet-points-card {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  box-shadow: 0 10px 24px rgba(37,117,252,0.35);
}
.wallet-points-card .wallet-points::before {
  content: '⭐ ';
}

/* 卡片容器在竖屏/窄屏时垂直居中堆叠 */
@media (max-width: 768px) {
  .wallet-status-cards { flex-direction: column; align-items: stretch; gap: 12px; }
  .wallet-card { width: 95%; margin: 0 auto; }
}
@media (orientation: portrait) {
  .wallet-status-cards { flex-direction: column; align-items: center; }
  .wallet-card { width: 95%; }
}

/* 抽奖等待提示：默认隐藏，仅在转盘旋转且链上结果未返回时显示 */
.chain-wait-hint {
  position: absolute;
  top: auto;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #ffffff;
  background: rgba(76, 217, 100, 0.12);
  border: 1px solid rgba(76, 217, 100, 0.35);
  border-radius: 8px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 2; /* ensure above aura but below pointer */
}

/* 当容器处于旋转状态并等待链上结果时显示提示 */
.lottery-wheel-container.spinning .chain-wait-hint {
  opacity: 1;
}

@media (max-width: 480px) {
  .chain-wait-hint {
    bottom: -32px;
    font-size: 12px;
    white-space: normal;
    max-width: 92vw;
    text-align: center;
  }
}
.prize-pool-highlight {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prize-pool-label {
  color: #ffd700; /* 亮金色标签 */
  font-weight: 700;
  letter-spacing: 0.3px;
}

.prize-pool-amount-bright {
  color: #00e676; /* 亮绿色数值，与按钮绿不同并更亮 */
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
  font-size: 1.15rem;
}
/* 提高“抽奖次数”标签的对比度 */
.lottery-controls .draw-times-control .label {
  color: #ffffff;
}