/**
 * 激励广告样式
 * 提供美观的用户界面和良好的交互体验
 */

/* 激励广告模态框 */
.incentive-ad-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.incentive-ad-modal.show {
    opacity: 1;
    visibility: visible;
}

.incentive-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.incentive-ad-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: incentive-ad-slide-up 0.3s ease-out;
}

@keyframes incentive-ad-slide-up {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* 广告头部 */
.incentive-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.incentive-ad-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.incentive-ad-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.incentive-ad-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 广告内容区域 */
.incentive-ad-content {
    padding: 24px;
}

.incentive-ad-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.incentive-ad-player video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.incentive-image-ad {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 播放器控制覆盖层 */
.incentive-ad-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

/* 奖励信息 */
.incentive-ad-info {
    text-align: center;
}

.reward-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.reward-type {
    background: #f0f2f5;
    color: #666;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.reward-value {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    animation: reward-pulse 2s infinite;
}

@keyframes reward-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 进度条 */
.progress-container {
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f2f5;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #44a08d 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-20px);
    }
    100% {
        transform: translateX(20px);
    }
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* 状态文本 */
.status-text {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 奖励成功动画 */
.reward-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: reward-success-bounce 0.6s ease-out;
}

@keyframes reward-success-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reward-icon {
    font-size: 48px;
    animation: reward-icon-spin 1s ease-in-out;
}

@keyframes reward-icon-spin {
    0% {
        transform: rotate(0deg) scale(0);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.reward-message {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

/* 激励广告触发按钮 */
.zibll-incentive-ad-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.zibll-incentive-ad-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.zibll-incentive-ad-trigger:hover::before {
    left: 100%;
}

.zibll-incentive-ad-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.zibll-incentive-ad-trigger:active {
    transform: translateY(0);
}

/* 激励广告卡片 */
.incentive-ad-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f2f5;
    transition: all 0.3s ease;
}

.incentive-ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.incentive-ad-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.incentive-ad-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.incentive-ad-card-badge {
    background: #4ecdc4;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.incentive-ad-card-content {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.incentive-ad-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.incentive-ad-card-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .incentive-ad-container {
        width: 95%;
        max-width: none;
        margin: 20px;
    }
    
    .incentive-ad-header {
        padding: 16px 20px;
    }
    
    .incentive-ad-content {
        padding: 20px;
    }
    
    .incentive-ad-player {
        aspect-ratio: 4/3;
    }
    
    .reward-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .incentive-ad-card {
        padding: 16px;
    }
    
    .incentive-ad-card-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .incentive-ad-container {
        background: #1a1a1a;
        color: #fff;
    }
    
    .incentive-ad-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .incentive-ad-card-title {
        color: #fff;
    }
    
    .reward-type {
        background: #404040;
        color: #ccc;
    }
    
    .progress-bar {
        background: #404040;
    }
    
    .progress-text {
        color: #ccc;
    }
    
    .status-text {
        color: #fff;
    }
}

/* 加载动画 */
.incentive-ad-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.incentive-ad-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.incentive-ad-error {
    text-align: center;
    padding: 40px 20px;
    color: #ff4757;
}

.incentive-ad-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.incentive-ad-error-message {
    font-size: 16px;
    margin-bottom: 20px;
}