html.fpk-ad-open,
body.fpk-ad-open {
    overflow: hidden !important;
}

#fpk-game-ad-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 18px;
    background: rgba(8, 20, 48, 0.94);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

#fpk-game-ad-overlay.fpk-visible {
    display: flex;
}

.fpk-game-ad-dialog {
    width: min(100%, 1100px);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.fpk-game-ad-label {
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.fpk-game-ad-video-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 76vh;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    background: #000;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

#fpk-game-ad-video {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    background: #000;
}

.fpk-game-ad-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fpk-game-ad-countdown {
    min-width: 150px;
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.fpk-game-ad-button {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

#fpk-game-ad-sound {
    background: #fff;
    color: #17244d;
}

#fpk-game-ad-continue {
    background: #ffc928;
    color: #382a00;
}

#fpk-game-ad-continue:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

#fpk-game-ad-test {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2147482000;
    border: 2px solid #fff;
    border-radius: 12px;
    padding: 11px 15px;
    background: #6b4eff;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

@media (max-width: 820px) {
    #fpk-game-ad-overlay {
        padding: 10px;
    }

    .fpk-game-ad-dialog {
        max-height: 98vh;
    }

    .fpk-game-ad-video-wrap,
    #fpk-game-ad-video {
        max-height: 78vh;
    }

    .fpk-game-ad-controls {
        gap: 7px;
    }

    .fpk-game-ad-countdown {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #fpk-game-ad-overlay *,
    #fpk-game-ad-test {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}
