/* Adsterra Mobile Optimized Styles */
.adsterra-mobile-container {
    position: relative;
    width: 100%;
    min-height: 50px;
}

/* Mobile Banner */
.mobile-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-banner.top {
    top: 0;
}

.mobile-banner.bottom {
    bottom: 0;
}

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

.mobile-interstitial-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 340px;
    padding: 20px;
    position: relative;
}

.mobile-interstitial-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #ff4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

/* Mobile Sticky Footer */
.mobile-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 10px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

/* Mobile Native Ads */
.mobile-native-ad {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 15px 0;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-native-ad-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.mobile-native-ad-content {
    flex: 1;
}

.mobile-native-ad-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.mobile-native-ad-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Mobile Popunder Trigger */
.mobile-popunder-trigger {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999998;
    background: transparent;
    display: none;
}

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

/* Mobile Swipe Ad */
.mobile-swipe-ad {
    position: fixed;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 15px;
    transform: translateY(120%);
    transition: transform 0.3s ease;
    z-index: 9997;
}

.mobile-swipe-ad.show {
    transform: translateY(0);
}

/* Mobile Video Ad */
.mobile-video-ad {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px 0;
}

.mobile-video-ad video,
.mobile-video-ad iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Mobile Anchor Ad */
.mobile-anchor-ad {
    position: fixed;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9996;
    transition: transform 0.3s ease;
}

.mobile-anchor-ad.top {
    top: 0;
}

.mobile-anchor-ad.bottom {
    bottom: 0;
}

.mobile-anchor-ad.hidden {
    transform: translateY(100%);
}

/* Mobile Expandable Ad */
.mobile-expandable-ad {
    position: relative;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 15px 0;
    overflow: hidden;
    transition: height 0.3s ease;
}

.mobile-expandable-ad.collapsed {
    height: 60px;
}

.mobile-expandable-ad.expanded {
    height: auto;
    min-height: 250px;
}

.mobile-expandable-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 1;
}

/* Mobile Performance */
@media (max-width: 480px) {
    .mobile-banner {
        min-height: 50px;
        max-height: 90px;
    }

    .mobile-native-ad {
        padding: 10px;
    }

    .mobile-native-ad-image {
        width: 60px;
        height: 60px;
    }

    .mobile-swipe-ad {
        left: 5px;
        right: 5px;
        bottom: 50px;
    }
}

/* Landscape Mode */
@media (orientation: landscape) and (max-width: 768px) {
    .mobile-interstitial-content {
        max-height: 80vh;
        overflow-y: auto;
    }

    .mobile-banner {
        max-height: 50px;
    }
}

/* Touch Interactions */
.mobile-ad-touchable {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

/* Loading States */
.mobile-ad-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Safe Area Support */
@supports (padding: max(0px)) {
    .mobile-sticky-footer {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .mobile-banner.bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .mobile-banner,
    .mobile-sticky-footer,
    .mobile-native-ad,
    .mobile-swipe-ad,
    .mobile-expandable-ad,
    .mobile-interstitial-content {
        background: #1a1a1a;
        color: white;
        border-color: #404040;
    }

    .mobile-native-ad-title {
        color: white;
    }

    .mobile-native-ad-description {
        color: #ccc;
    }
}