@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700;800&display=swap');

:root {
    --ad-bg: #1a1a1a;
    --ad-accent: #00ff88;
    --ad-text-main: #ffffff;
    --ad-text-muted: #a0a0a0;
    --ad-radius: 12px;
}

/* MINI TOP AD */
.ad-mini-wrapper {
    background: linear-gradient(135deg, #020817, #06122b);
    border: 1px solid rgba(98,215,208,0.12);
    border-radius: var(--ad-radius);
    padding: 6px 12px;
    width: 100%;
    max-width: 400px;
    margin: 10px auto 20px;
    overflow: hidden;
    height: 68px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: fadeIn 0.5s ease;
}

/* Dashboard previews reproduce the game viewport width instead of inheriting nested panel padding. */
.dashboard-ads-shell,
[data-ads-main-panel="overview"],
[data-ads-overview],
.ads-overview-grid,
.current-ad-card,
.current-ad-card__preview {
    overflow: visible !important;
}

.ad-mini-preview-bleed {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .ad-mini-preview-bleed {
        width: min(400px, calc(100vw - 16px));
        max-width: none;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }
}

.ad-mini-content {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.ad-mini-logo {
    height: 48px;
    width: auto;
    max-width: 100px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 0 8px rgba(98,215,208,0.2);
}

.ad-mini-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-align: left;
}

.ad-mini-text h4 {
    font-size: 0.85rem;
    margin: 0 0 3px 0;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.ad-mini-text p {
    font-size: 0.75rem;
    margin: 0;
    color: #cbd5e1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ad-mini-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    height: 100%;
    flex-shrink: 0;
}

.ad-mini-partner-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-height: 0;
    max-height: 80%;
    white-space: nowrap;
}

.ad-mini-partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
}

.ad-mini-partner-badge img { width: 18px; height: 18px; }
.ad-mini-partner-badge--fundador { color: #fcd34d; }
.ad-mini-partner-badge--destaque { color: #d8b4fe; }
.ad-mini-partner-badge--oficial { color: #a5f3fc; }

.ad-mini-cta {
    background: transparent;
    width: 24px;
    height: 80%;
    box-sizing: border-box;
    padding: 0;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    transition: transform 0.2s ease;
}

.ad-mini-cta img { width: 12px; height: 100%; }

.ad-mini-cta:hover {
    transform: scale(1.03);
}

/* FULLSCREEN CARD */
#ad-full-custom-image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ad-full-overlay {
    position: absolute;
    inset: -1px;
    background: linear-gradient(180deg, #020817 0%, #06122b 100%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border-radius: 16px;
}

/* Keep the current round from competing visually with a Full ad. Visibility
   preserves the card dimensions while its question, answers and controls hide. */
.game-card.is-showing-full-ad > .game-question,
.game-card.is-showing-full-ad > #options,
.game-card.is-showing-full-ad > .game-progress,
.game-card.is-showing-full-ad > #action-buttons,
.game-card.is-showing-full-ad .image-container > :not(#fullscreen-ad-overlay) {
    visibility: hidden;
}

.ad-full-loader {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 109;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #d9f8f5;
    font-size: .9rem;
    font-weight: 700;
    background: linear-gradient(180deg, #020817 0%, #06122b 100%);
}

.ad-full-loader span:first-child {
    font-size: 1.5rem;
    animation: ad-full-loader-pulse .9s ease-in-out infinite alternate;
}

.ad-full-overlay.is-loading .ad-full-loader { display: flex; }

.ad-full-overlay.is-loading #ad-full-custom-image,
.ad-full-overlay.is-loading .ad-full-columns,
.ad-full-overlay.is-loading #ad-full-info,
.ad-full-overlay.is-loading .ad-full-image-partner-badges,
.ad-full-overlay.is-loading .ad-full-game-partner-badges { visibility: hidden; }

@keyframes ad-full-loader-pulse {
    from { transform: scale(.9); opacity: .55; }
    to { transform: scale(1.08); opacity: 1; }
}

.image-container:has(#fullscreen-ad-overlay) {
    overflow: visible;
}

.ad-full-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    z-index: 110;
}

#ad-full-progress-fill, #prev-full-progress-fill {
    height: 100%;
    background: #62d7d0;
    width: 0%;
}

.ad-full-columns {
    flex: 1;
    display: flex;
    position: relative;
    gap: 14px;
    padding: 42px 10px 10px;
    overflow: hidden;
}

.ad-full-left {
    width: 33%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ad-sponsor-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #62d7d0;
}

.ad-full-founder-badge { display:none; }
.ad-full-founder-badge.is-visible { display:flex; flex-direction:column; align-items:center; gap:2px; font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.ad-full-founder-label { color:#94a3b8; }
.ad-full-founder-value { display:flex; align-items:center; gap:3px; color:#fcd34d; }
.ad-full-founder-badge img { display:block; width:21px; height:21px; object-fit:contain; }

#prev-full-logo-placeholder { display: none !important; }
#prev-full-logo { margin-top: 0 !important; }
#prev-full-cta-wrap > div {
    background: rgba(7, 38, 83, 0.92) !important;
    color: #fff !important;
    font-weight: 700;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-size: .8rem !important;
}

.ad-full-partner-badges { display:flex; flex-wrap:wrap; gap:4px; align-items:flex-start; }
.ad-full-partner-badge { display:block; flex:0 0 auto; filter:drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.ad-full-partner-badge img { display:block; width:100%; height:100%; object-fit:contain; }
.ad-full-partner-badge--fundador { width:65px; height:78px; }
.ad-full-partner-badge--oficial { width:106px; height:111px; }
.ad-full-partner-badge--destaque { width:64px; height:70px; }

.ad-full-image-partner-badges {
    position: absolute;
    top: 0;
    right: 0;
    left: 10px;
    z-index: 112;
    display: flex;
    gap: 5px;
    align-items: flex-start;
    justify-content: flex-end;
}
.ad-full-game-partner-badges {
    position: absolute;
    top: 0;
    right: 0;
    left: 10px;
    z-index: 112;
    justify-content: flex-end;
}

.ad-full-image-partner-badges .ad-full-partner-badge--fundador,
.ad-full-game-partner-badges .ad-full-partner-badge--fundador {
    margin-right: auto;
}

.ad-full-game-partner-badges .ad-full-partner-badge--oficial {
    position: relative;
    top: -6px;
    right: -3px;
}
.ad-full-image-partner-badges .ad-full-partner-badge { filter: drop-shadow(0 3px 6px rgba(0,0,0,.65)); }
.ad-full-image-partner-badges .ad-full-partner-badge--oficial {
    position:relative;
    top:-6px;
    right:-3px;
}

#ad-full-logo, #prev-full-logo, .ad-full-logo {
    width: 100%;
    max-height: 110px;
    object-fit: contain;
    border-radius: 10px;
}

.ad-full-cta-btn {
    background: rgba(7, 38, 83, 0.92);
    color: #fff;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    align-self: center;
    transition: transform 0.2s ease;
}

.ad-full-cta-btn:hover { transform: scale(1.02); }

.ad-full-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    overflow: hidden;
}

#ad-full-brand, #prev-full-brand, .ad-full-brand {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 6px 0 0;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ad-full-headline, #prev-full-headline, .ad-full-headline {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 24px 0 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

#ad-full-description, #prev-full-desc, .ad-full-description {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
    width: 100%;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    line-clamp: 7;
    -webkit-box-orient: vertical;
}

.ad-full-footer, #prev-full-info {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    padding-right: 35px;
    flex-shrink: 0;
}

.ad-full-footer span:empty, #prev-full-info span:empty { display: none; }

.ad-full-footer span, #prev-full-info span {
    font-size: 0.72rem;
    color: #62d7d0;
    background: rgba(98,215,208,0.08);
    border: 1px solid rgba(98,215,208,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#prev-full-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#prev-full-brand, #prev-full-info { display:none !important; }

.ad-full-name {
    position:absolute;
    top:13px;
    left:20px !important;
    right:auto;
    width:calc(100% - 40px);
    padding-left:0 !important;
    text-indent:0 !important;
    transform:none !important;
    /* The game body centers text globally; Full Ad names must start at left:20px. */
    text-align:left !important;
    z-index:105;
    margin:0;
}

.ad-full-right-footer {
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    gap:6px;
    width:100%;
    margin-top:auto;
    min-height:26px;
}
.ad-full-right-footer span {
    max-width:145px;
    font-size:.66rem;
    color:#62d7d0;
    background:rgba(98,215,208,.08);
    border:1px solid rgba(98,215,208,.2);
    padding:3px 8px;
    border-radius:20px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.ad-full-right-footer span:empty { display:none; }
.ad-full-right.has-commercial-badge .ad-full-brand {
    padding-right: 106px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
