/**
 * Anti-AdBlock CSS Styles
 * AdBlock sistemi için özel stiller
 */

/* Fallback reklamlar için temel stiller */
.fallback-ad {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.fallback-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* AdBlock tespit edildiğinde blur efekti */
.adblock-blur {
    filter: blur(1px);
    pointer-events: none;
    user-select: none;
}

/* Hafif blur - içerik okunabilir kalır */
.adblock-light-blur {
    filter: blur(1px);
    opacity: 0.8;
}

/* Kırmızı warning banner kalıcı stili */
#exam-adblock-warning {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: linear-gradient(90deg, #DC2626, #B91C1C) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Modal overlay hafif opaklık - blur eklendi */
#exam-block-modal,
#adblock-warning-modal {
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    background-color: rgba(0, 0, 0, 0.75) !important;
}

/* Modal animasyonları */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Anti-AdBlock modal özel stilleri */
#adblock-warning-modal .inline-block {
    animation: fadeIn 0.3s ease-out;
}

#fallback-top-banner {
    animation: slideUp 0.5s ease-out;
}

#fallback-bottom-banner {
    animation: slideUp 0.5s ease-out;
}

/* Progress bar animasyonu */
#adblock-progress {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    border-radius: 9999px;
}

/* Responsive tasarım */
@media (max-width: 640px) {
    .fallback-ad {
        font-size: 14px;
        padding: 12px;
    }
    
    #adblock-warning-modal .sm\\:max-w-lg {
        max-width: 95vw;
        margin: 10px;
    }
    
    #fallback-top-banner,
    #fallback-bottom-banner {
        padding: 12px;
        font-size: 14px;
    }
}

/* AdBlock bait elementleri için gizli stiller */
.adsbox,
.ads,
.advertisement,
.pub_300x250,
.pub_300x250m,
.pub_728x90,
.text-ad,
.textAd,
.text_ad,
.text_ads,
.text-ads,
.text-ad-links {
    /* Bu sınıflar AdBlock tarafından hedeflenir */
}

/* Fallback reklam türleri için özel stiller */
.fallback-ad.banner-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.fallback-ad.text-type {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.fallback-ad.support-type {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Hover efektleri */
.fallback-ad button:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

/* Loading spinner */
.adblock-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notification styles */
.adblock-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10002;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    max-width: 300px;
    word-wrap: break-word;
}

.adblock-notification.show {
    transform: translateX(0);
}

/* Content overlay için özel stiller - hafif blur eklendi */
#adblock-content-overlay {
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
}

/* Anti-AdBlock warning banner */
.adblock-warning-banner {
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1000;
}

.adblock-warning-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Tooltip stili */
.adblock-tooltip {
    position: relative;
    cursor: help;
}

.adblock-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10003;
}

.adblock-tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10003;
}

.adblock-tooltip:hover::before,
.adblock-tooltip:hover::after {
    opacity: 1;
}

/* Dark mode desteği */
@media (prefers-color-scheme: dark) {
    .fallback-ad {
        background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
        color: #F9FAFB;
        border-color: #4B5563;
    }
    
    #adblock-warning-modal .bg-white {
        background-color: #1F2937;
        color: #F9FAFB;
    }
    
    #adblock-content-overlay .bg-white {
        background-color: #1F2937;
        color: #F9FAFB;
    }
}

/* Kapat butonunu gizle - kullanıcı modali kapatamaz */
.adblock-modal-close,
.adblock-close-btn,
#adblock-close,
#close-modal,
[data-close="modal"],
.modal-close {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Butonları ortala */
.adblock-modal .flex,
.adblock-modal .flex.space-x-4,
.adblock-modal .space-x-4,
#adblock-warning-modal .flex,
#adblock-warning-modal .flex.space-x-4,
#adblock-warning-modal .space-x-4,
#exam-block-modal .space-y-3,
#exam-block-modal .space-y-4,
#exam-block-modal .space-y-2,
#adblock-warning-modal .space-y-4,
#adblock-warning-modal .space-y-2,
#adblock-adblock-warning .space-x-3 {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

/* Buton boşlukları için özel kurallar */
#adblock-warning-modal .space-y-4 > button,
#adblock-warning-modal .space-y-2 > button {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#adblock-warning-modal .space-y-4 > button:not(:first-child) {
    margin-top: 1rem !important;
}

#adblock-warning-modal .space-y-2 > button:not(:first-child) {
    margin-top: 0.5rem !important;
}

/* Diğer butonlar için yatay margin */
.adblock-modal button:not(.space-y-4 button),
#adblock-warning-modal button:not(.space-y-4 button) {
    margin: 0 8px !important;
}

/* Arkaplan blur efekti güçlendirildi */
body.adblock-detected {
    filter: blur(2px) !important;
    transition: filter 0.3s ease !important;
}

body.adblock-detected > *:not(#adblock-warning-modal):not(#adblock-content-overlay):not(.adblock-modal) {
    filter: blur(2px) !important;
    opacity: 0.7 !important;
    transition: filter 0.3s ease, opacity 0.3s ease !important;
}

/* Print media - AdBlock kontrollerini gizle */
@media print {
    #adblock-warning-modal,
    #adblock-guide-modal,
    #adblock-content-overlay,
    #fallback-top-banner,
    #fallback-bottom-banner,
    .fallback-ad {
        display: none !important;
    }
}
