#ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    /* Slightly more transparent */
    backdrop-filter: blur(5px);
    /* Nice modern touch */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#ad-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#ad-upgrade-link {
    margin-top: 20px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#ad-upgrade-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#ad-upgrade-link strong {
    color: #ffd700;
    /* Gold color for PRO */
    font-weight: 700;
}

#ad-container {
    position: relative;
    width: auto;
    /* Adapt to video width */
    height: auto;
    /* Adapt to video height */
    max-width: 90vw;
    /* Max screen width constraint */
    max-height: 80vh;
    /* Max screen height constraint */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#ad-video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    /* Match container max-height to ensure ratio is preserved */
    display: block;
    object-fit: contain;
}

#ad-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

#skip-ad-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: not-allowed;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

#skip-ad-btn:not(:disabled) {
    background-color: #e63946;
    /* Example primary color or simply distinctive */
    border-color: #e63946;
    cursor: pointer;
    font-weight: 600;
}

#skip-ad-btn:not(:disabled):hover {
    background-color: #ff4d5a;
}