/* ============================================
   Ad Zone Styles (Added for Fix)
   ============================================ */

/* General Ad Zone - Hidden by default until JS loads */
.ad-zone {
    display: none;
    margin: 20px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    min-height: 0;
    /* Prevents empty height issues */
}

/* Sidebar Ads - Fixed Left & Right */
.ad-zone-sidebar,
.ad-zone-sidebar-left {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
    max-width: 160px;
    /* Standard skyscraper width */
    display: none;
    /* Hidden by default until JS finds ads */
}

/* Right Sidebar (Original 'sidebar' zone) */
.ad-zone-sidebar {
    right: 10px !important;
    left: auto !important;
}

/* Left Sidebar (New 'sidebar-left' zone) */
.ad-zone-sidebar-left {
    left: 10px !important;
    right: auto !important;
}

@media (max-width: 1400px) {

    /* Hide sidebars on screens smaller than 1400px (Content + Sidebars) */
    .ad-zone-sidebar,
    .ad-zone-sidebar-left {
        display: none !important;
    }
}

/* Fixed Bottom Ad - Sticky Footer */
.ad-zone-fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 10px;
    z-index: 999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: none;
    /* Hidden by default */
}

.ad-zone-fixed-bottom .ad-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.ad-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.ad-close:hover {
    background: var(--error);
    color: white;
}

/* Overlay Ad - Center Popup */
.ad-zone-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-zone-overlay .ad-content {
    position: relative;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

/* Interstitial Ad - Full Screen */
.ad-zone-interstitial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ad-timer {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-skip {
    margin-top: 20px;
    padding: 10px 30px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-muted);
    cursor: not-allowed;
    transition: all 0.3s;
}

.ad-skip.active {
    background: var(--primary);
    color: white;
    cursor: pointer;
    border-color: var(--primary);
}

/* Mobile Bottom Ad */
.ad-zone-mobile-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    z-index: 998;
    display: none;
}

@media (min-width: 769px) {
    .ad-zone-mobile-bottom {
        display: none !important;
    }
}