/* ===== Quảng cáo có thưởng (mô phỏng) & hộp hỏi "đánh lại" ===== */

.ad-sim-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    animation: adFadeIn 0.2s ease-out;
}

.ad-sim-card {
    width: min(420px, 100%);
    max-height: 100%;
    overflow-y: auto;
    padding: 18px 20px;
    border-radius: 16px;
    text-align: center;
    color: var(--text-main, #f3f4f6);
    background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.ad-sim-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #111;
    background: var(--gold, #f59e0b);
}

.ad-sim-art {
    font-size: 56px;
    line-height: 1.1;
    margin: 10px 0 4px;
    animation: adSpin 2.4s linear infinite;
}

.ad-sim-title {
    font-size: 18px;
    font-weight: 700;
}

.ad-sim-reason {
    margin-top: 4px;
    font-size: 13px;
    color: var(--gold, #f59e0b);
}

.ad-sim-bar {
    height: 8px;
    margin: 14px 0 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.ad-sim-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981, #f59e0b);
}

.ad-sim-count {
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
}

.ad-sim-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.ad-sim-actions button,
.reward-prompt-actions button {
    flex: 1;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    touch-action: manipulation;
    letter-spacing: normal;
    white-space: nowrap;
    width: auto;
    height: auto;
    text-transform: none;
}

.ad-sim-skip {
    color: var(--text-muted, #9ca3af);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ad-sim-close {
    color: #111;
    background: var(--accent-green, #10b981);
    border: none;
}

.ad-sim-close:disabled {
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.1);
}

.ad-sim-note {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

/* Hộp hỏi sau khi trượt */
.reward-prompt {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 400;
    transform: translate(-50%, -50%);
    width: min(340px, calc(100vw - 32px));
    padding: 16px 18px;
    border-radius: 16px;
    text-align: center;
    color: var(--text-main, #f3f4f6);
    background: var(--card-bg, rgba(18, 24, 38, 0.92));
    border: 1px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.25), 0 16px 40px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    animation: adPop 0.22s ease-out;
}

.reward-prompt-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.reward-prompt-text {
    font-size: 14px;
    line-height: 1.45;
}

#reward-prompt-left {
    font-size: 12px;
    color: var(--text-muted, #9ca3af);
}

.reward-prompt-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

#reward-prompt-watch {
    color: #111;
    background: var(--gold, #f59e0b);
    border: none;
}

#reward-prompt-skip {
    color: var(--text-muted, #9ca3af);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

html.mobile .reward-prompt {
    padding: 12px 14px;
}

html.mobile .reward-prompt-title {
    font-size: 16px;
}

@media (max-height: 420px) {
    .ad-sim-art { font-size: 36px; margin: 4px 0 2px; }
    .ad-sim-card { padding: 12px 16px; }
    .ad-sim-bar { margin: 8px 0 6px; }
    .ad-sim-actions { margin-top: 8px; }
    .ad-sim-note { display: none; }
}

@keyframes adFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes adPop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes adSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
