/* 동영상 광고 오버레이 (인터스티셜) */
.ad-video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: adFadeIn 0.3s ease;
}

@keyframes adFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ad-video-content {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 16px;
    max-width: 420px;
    width: 95%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ad-video-label {
    font-family: 'Jua', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.ad-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.ad-video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ad-video-display {
    position: absolute;
    inset: 0;
}

.ad-video-close {
    padding: 12px 36px;
    border: none;
    border-radius: 10px;
    background: #a855f7;
    color: white;
    font-family: 'Jua', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    min-width: 140px;
}

.ad-video-close:hover {
    background: #9333ea;
    transform: scale(1.05);
}

/* ======================== */
/* 보상형 광고 오버레이 */
/* ======================== */
.ad-rewarded-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: adFadeIn 0.3s ease;
}

.ad-rewarded-content {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 20px 16px;
    max-width: 420px;
    width: 95%;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.05);
}

.ad-reward-info {
    font-family: 'Jua', sans-serif;
    font-size: 1rem;
    color: #ffd700;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.ad-reward-result {
    font-family: 'Jua', sans-serif;
    font-size: 1.1rem;
    color: #22c55e;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    animation: adFadeIn 0.3s ease;
}

.ad-rewarded-claim {
    background: linear-gradient(135deg, #ffd700, #ff8c00) !important;
    color: #1a1a2e !important;
    font-weight: bold;
}

.ad-rewarded-claim:hover {
    background: linear-gradient(135deg, #ffed4a, #ffa500) !important;
    transform: scale(1.05);
}

/* ======================== */
/* 게임 오버 보상 버튼 */
/* ======================== */
.ad-reward-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    font-family: 'Jua', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 200px;
    margin: 8px auto;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    animation: adRewardPulse 2s ease-in-out infinite;
}

.ad-reward-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.ad-reward-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
    transform: none;
}

.ad-reward-btn .reward-icon {
    font-size: 1.2em;
}

@keyframes adRewardPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(255, 215, 0, 0.5); }
}

/* ======================== */
/* 골드 잔액 표시 */
/* ======================== */
.gold-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    font-family: 'Jua', sans-serif;
    font-size: 0.85rem;
    color: #ffd700;
    cursor: default;
    user-select: none;
}

.gold-display-icon {
    width: 16px;
    height: 16px;
}

.gold-display-amount {
    min-width: 20px;
    text-align: center;
}

.gold-display-pop {
    animation: goldPop 0.4s ease;
}

@keyframes goldPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #22c55e; }
    100% { transform: scale(1); }
}

/* ======================== */
/* 골드로 이어하기 버튼 */
/* ======================== */
.ad-gold-continue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    font-family: 'Jua', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    min-width: 200px;
    margin: 8px auto;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.15);
}

.ad-gold-continue-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.ad-gold-continue-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #666;
    color: #888;
    background: rgba(100, 100, 100, 0.1);
    box-shadow: none;
}

.ad-gold-continue-btn .gold-continue-icon {
    font-size: 1.2em;
}

/* 골드 부족 토스트 */
.ad-gold-toast {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 50, 0.95);
    color: #ff6b6b;
    font-family: 'Jua', sans-serif;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    z-index: 100000;
    animation: adGoldToastIn 0.3s ease, adGoldToastOut 0.3s ease 1.7s forwards;
    pointer-events: none;
}

@keyframes adGoldToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes adGoldToastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ======================== */
/* Count-up Animation Pop   */
/* ======================== */
.count-pop {
    animation: countPop 0.3s ease;
}
@keyframes countPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
