/**
 * 活动奖励弹窗样式
 * 
 * @version 1.0.0
 * @date 2026-01-05
 * @note 一次性活动代码，活动结束后需删除
 */

/* ============================================
   弹窗遮罩层
   ============================================ */
.bonus-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bonus-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   弹窗容器
   ============================================ */
.bonus-popup {
    background: #fff;
    border-radius: var(--radius-lg, 16px);
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    position: relative;
}

.bonus-popup-overlay.active .bonus-popup {
    transform: scale(1) translateY(0);
}

/* ============================================
   弹窗头部 - 渐变背景
   ============================================ */
.bonus-popup__header {
    background: linear-gradient(135deg, var(--primary, #FF8C42) 0%, #ff6b1a 100%);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 装饰圆圈 */
.bonus-popup__header::before,
.bonus-popup__header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.bonus-popup__header::before {
    width: 150px;
    height: 150px;
    top: -60px;
    right: -40px;
}

.bonus-popup__header::after {
    width: 100px;
    height: 100px;
    bottom: -30px;
    left: -30px;
}

/* 庆祝图标 */
.bonus-popup__icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
    animation: bounceIn 0.6s ease-out;
}

/* 标题 */
.bonus-popup__title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================
   弹窗内容
   ============================================ */
.bonus-popup__content {
    padding: 24px 20px;
    text-align: center;
}

/* 排名信息 (仅新用户) */
.bonus-popup__ranking {
    color: var(--text-secondary, #666);
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.bonus-popup__ranking-number {
    color: var(--primary, #FF8C42);
    font-weight: 700;
    font-size: 18px;
}

/* 积分卡片 */
.bonus-popup__points-card {
    background: linear-gradient(135deg, #fff8f4 0%, #fff0e8 100%);
    border: 2px solid var(--primary, #FF8C42);
    border-radius: var(--radius-md, 12px);
    padding: 20px;
    margin: 16px 0;
    position: relative;
}

.bonus-popup__points-label {
    color: var(--text-secondary, #666);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.bonus-popup__points-value {
    color: var(--primary, #FF8C42);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.bonus-popup__points-plus {
    font-size: 28px;
    font-weight: 600;
}

.bonus-popup__points-unit {
    font-size: 18px;
    font-weight: 600;
    margin-left: 4px;
}

/* 描述文字 */
.bonus-popup__description {
    color: var(--text-secondary, #666);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 16px;
}

/* ============================================
   弹窗底部按钮
   ============================================ */
.bonus-popup__footer {
    padding: 0 20px 24px;
}

.bonus-popup__btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bonus-popup__btn--primary {
    background: linear-gradient(135deg, var(--primary, #FF8C42) 0%, #ff6b1a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

.bonus-popup__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 140, 66, 0.4);
}

.bonus-popup__btn--primary:active {
    transform: translateY(0);
}

.bonus-popup__btn--secondary {
    background: transparent;
    color: var(--text-secondary, #666);
    margin-top: 12px;
}

.bonus-popup__btn--secondary:hover {
    color: var(--text-primary, #333);
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   动画
   ============================================ */
@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.bonus-popup__points-card {
    animation: pulse 2s ease-in-out infinite;
}

/* 积分数字渐入 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bonus-popup__points-value {
    animation: countUp 0.5s ease-out 0.3s both;
}

/* ============================================
   响应式 - 桌面端
   ============================================ */
@media (min-width: 768px) {
    .bonus-popup {
        max-width: 420px;
    }
    
    .bonus-popup__header {
        padding: 40px 30px;
    }
    
    .bonus-popup__icon {
        font-size: 56px;
    }
    
    .bonus-popup__title {
        font-size: 28px;
    }
    
    .bonus-popup__content {
        padding: 30px;
    }
    
    .bonus-popup__points-value {
        font-size: 52px;
    }
    
    .bonus-popup__footer {
        padding: 0 30px 30px;
    }
}

/* ============================================
   响应式 - 小屏手机
   ============================================ */
@media (max-width: 360px) {
    .bonus-popup-overlay {
        padding: 16px;
    }
    
    .bonus-popup__header {
        padding: 24px 16px;
    }
    
    .bonus-popup__icon {
        font-size: 40px;
    }
    
    .bonus-popup__title {
        font-size: 20px;
    }
    
    .bonus-popup__content {
        padding: 20px 16px;
    }
    
    .bonus-popup__points-value {
        font-size: 36px;
    }
    
    .bonus-popup__points-plus {
        font-size: 24px;
    }
    
    .bonus-popup__footer {
        padding: 0 16px 20px;
    }
    
    .bonus-popup__btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* ============================================
   深色模式支持 (如果项目有)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .bonus-popup {
        background: #1e1e1e;
    }
    
    .bonus-popup__ranking,
    .bonus-popup__description {
        color: #aaa;
    }
    
    .bonus-popup__points-card {
        background: linear-gradient(135deg, #2d2d2d 0%, #252525 100%);
        border-color: var(--primary, #FF8C42);
    }
    
    .bonus-popup__points-label {
        color: #888;
    }
    
    .bonus-popup__btn--secondary {
        color: #aaa;
    }
    
    .bonus-popup__btn--secondary:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* ============================================
   Safe Area 支持 (iPhone X+)
   ============================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bonus-popup__footer {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
}
