/* ============================================
   封神与哪吒 - IAA广告弹窗样式
   模拟广告播放 + 奖励发放
   ============================================ */

/* ---------- 遮罩层 ---------- */
.ad-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.ad-modal-overlay.is-visible {
    display: flex;
}

/* ---------- 广告容器 ---------- */
.ad-modal-container {
    width: 320px;
    background: var(--color-bg, #f5efe0);
    border: 2px solid rgba(212, 168, 83, 0.4);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    animation: adModalIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes adModalIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ---------- 广告内容区（模拟视频播放） ---------- */
.ad-video-area {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a3e, #2a2a4a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 广告中的装饰动画 */
.ad-video-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 40%, rgba(212,168,83,0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(155,142,196,0.12) 0%, transparent 50%);
    animation: adBgShift 3s ease-in-out infinite alternate;
}

@keyframes adBgShift {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.1) rotate(5deg); }
}

.ad-video-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.ad-video-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: adIconBounce 1s ease-in-out infinite;
}

@keyframes adIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.ad-video-title {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 1.2rem;
    color: #d4a853;
    text-shadow: 0 0 10px rgba(212, 168, 83, 0.3);
}

.ad-video-subtitle {
    font-size: 0.7rem;
    color: rgba(245, 239, 224, 0.5);
    margin-top: 4px;
}

/* 广告倒计时 */
.ad-countdown {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4a853;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
}

/* "广告"标识 */
.ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(192, 60, 60, 0.8);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.1em;
    z-index: 2;
}

/* 进度条 */
.ad-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #d4a853, #f0d78c);
    transition: width 0.3s linear;
    z-index: 2;
}

/* ---------- 广告底部区域 ---------- */
.ad-modal-footer {
    padding: 18px 20px;
    text-align: center;
}

.ad-reward-title {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 1.1rem;
    color: var(--color-ink, #2c2c2c);
    margin-bottom: 10px;
}

.ad-reward-items {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.ad-reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ad-reward-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.ad-reward-icon--gold   { background: linear-gradient(135deg, #f0c75e, #d4a853); }
.ad-reward-icon--stone  { background: linear-gradient(135deg, #8ec5e8, #6a9fb5); }
.ad-reward-icon--hp     { background: linear-gradient(135deg, #e74c3c, #c03c3c); }
.ad-reward-icon--stamina{ background: linear-gradient(135deg, #7bc47f, #5a9e6f); }

.ad-reward-value {
    font-size: 0.8rem;
    color: var(--color-gold-dark, #b08a3a);
    font-weight: 700;
}

.ad-reward-label {
    font-size: 0.65rem;
    color: var(--color-ink-light, #5a5a5a);
}

/* ---------- 按钮 ---------- */
.ad-btn-group {
    display: flex;
    gap: 10px;
}

.ad-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-btn:active {
    transform: scale(0.96);
}

.ad-btn--cancel {
    background: rgba(44, 44, 44, 0.08);
    color: var(--color-ink-light, #5a5a5a);
}

.ad-btn--confirm {
    background: var(--color-red, #c03c3c);
    color: #fff;
}

.ad-btn--confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- 领取成功动画 ---------- */
.ad-success-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at center, rgba(212,168,83,0.3) 0%, transparent 70%);
    transition: opacity 0.3s ease;
}

.ad-success-flash.is-visible {
    opacity: 1;
    animation: successFlash 0.8s ease-out forwards;
}

@keyframes successFlash {
    0% { opacity: 0; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.2); }
}

/* ---------- 剩余次数提示 ---------- */
.ad-remain-text {
    font-size: 0.7rem;
    color: var(--color-ink-light, #5a5a5a);
    margin-top: 10px;
}

.ad-remain-text--empty {
    color: var(--color-red, #c03c3c);
}
