/* Ad Optimization Styles */
.ad-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    background: #f5f5f5;
    margin: 20px 0;
}

.ad-container.loaded {
    background: transparent;
}

.ad-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    border-radius: 8px;
}

.native-ad-container {
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0;
}

.popunder-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: transparent;
    display: none;
}

.popunder-trigger.active {
    display: block;
}

/* Sticky Ads */
.sticky-ad {
    position: fixed;
    z-index: 9999;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sticky-ad.bottom {
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 100px;
}

.sticky-ad.side {
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
}

.sticky-ad.left {
    left: 10px;
}

.sticky-ad.right {
    right: 10px;
}

/* Social Bar */
.social-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 10px;
}

/* Interstitial */
.interstitial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.interstitial-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.interstitial-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

/* Ad Labels */
.ad-label {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 0 0 0 4px;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .sticky-ad.side {
        display: none;
    }

    .ad-container {
        margin: 15px 0;
    }

    .social-bar {
        bottom: 60px;
        right: 10px;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ad-slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Loading States */
.ad-loading {
    position: relative;
    overflow: hidden;
}

.ad-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Performance Optimizations */
.ad-container[data-lazy="true"] {
    content-visibility: auto;
    contain-intrinsic-size: 0 250px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ad-container {
        background: #2a2a2a;
    }

    .native-ad-container {
        background: #1a1a1a;
        border-color: #404040;
    }

    .sticky-ad,
    .social-bar {
        background: #1a1a1a;
    }
}