/* 🔥 限时折扣升级按钮样式 */

/* 升级按钮内容容器 */
.upgrade-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 4px;
    width: 100%;
}

/* 主要文本区域 */
.upgrade-main-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
}

.upgrade-icon {
    font-size: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.upgrade-name {
    color: inherit;
}

/* 价格区域 */
.upgrade-pricing {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 折扣徽章 */
.discount-badge {
    background: linear-gradient(45deg, #ff4444, #ff6b6b);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.4);
    animation: discountPulse 2s ease-in-out infinite;
}

@keyframes discountPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(255, 68, 68, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 68, 68, 0.6);
    }
}

/* 价格部分 */
.price-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.original-price {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: line-through;
    font-weight: 500;
}

.discount-price {
    font-size: 16px;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 加成概率区域 */
.bonus-section {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
    animation: bonusGlow 2s ease-in-out infinite alternate;
}

@keyframes bonusGlow {
    0% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
        border-color: rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
        border-color: rgba(255, 215, 0, 0.5);
    }
}

.bonus-icon {
    color: #FFD700;
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.bonus-text {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

@keyframes countdownBlink {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* 升级按钮增强样式 */
.wish-btn--gold {
    position: relative;
    overflow: hidden;
    min-height: 80px;
    padding: 12px 16px;
    line-height: 1.2;
}

/* 添加闪烁效果 */
.wish-btn--gold::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -100%;
    width: 100%;
    height: calc(100% + 4px);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 悬浮效果增强 */
.wish-btn--gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(218, 165, 32, 0.4),
        0 0 30px rgba(255, 215, 0, 0.3);
}

.wish-btn--gold:hover .discount-badge {
    animation-duration: 1s;
}

.wish-btn--gold:hover .countdown-timer {
    animation-duration: 0.5s;
}

/* 紧急状态样式（倒计时少于1小时） */
.countdown-urgent .countdown-timer {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
    animation: urgentBlink 0.5s ease-in-out infinite;
}

@keyframes urgentBlink {
    0%, 100% { 
        background: rgba(255, 68, 68, 0.2);
        transform: scale(1);
    }
    50% { 
        background: rgba(255, 68, 68, 0.4);
        transform: scale(1.05);
    }
}

.countdown-urgent .countdown-label {
    color: #ff6b6b;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upgrade-btn-content {
        gap: 6px;
    }
    
    .upgrade-main-text {
        font-size: 14px;
    }
    
    .upgrade-icon {
        font-size: 16px;
    }
    
    .upgrade-pricing {
        gap: 8px;
    }
    
    .discount-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .discount-price {
        font-size: 14px;
    }
    
    .original-price {
        font-size: 11px;
    }
    
    .countdown-section {
        font-size: 10px;
        gap: 4px;
    }
    
    .wish-btn--gold {
        min-height: 70px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .upgrade-pricing {
        flex-direction: column;
        gap: 4px;
    }
    
    .countdown-section {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }
    
    .wish-btn--gold {
        min-height: 85px;
    }
}

/* 特殊效果：按钮点击时的反馈 */
.wish-btn--gold:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

/* 折扣结束状态 */
.discount-ended .discount-badge {
    background: linear-gradient(45deg, #666, #888);
    animation: none;
}

.discount-ended .countdown-timer {
    color: #999;
    background: rgba(153, 153, 153, 0.1);
    border-color: rgba(153, 153, 153, 0.3);
    animation: none;
}

/* 加载状态 */
.upgrade-btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.upgrade-btn-loading .upgrade-btn-content {
    position: relative;
}

.upgrade-btn-loading .upgrade-btn-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
