.ad-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    min-height: 90px;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ad-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.ad-container-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.ad-slot {
    display: block;
    width: 100%;
    overflow: hidden;
    text-align: center;
}

.ad-slot-leaderboard {
    max-width: 728px;
    min-height: 90px;
    margin: 1.5rem auto;
}

.ad-slot-banner {
    max-width: 468px;
    min-height: 60px;
    margin: 1rem auto;
}

.ad-slot-rectangle {
    max-width: 336px;
    min-height: 280px;
    margin: 1.5rem auto;
}

.ad-slot-skyscraper {
    max-width: 160px;
    min-height: 600px;
}

.ad-slot-sidebar {
    position: sticky;
    top: 80px;
    max-width: 300px;
    margin-bottom: 2rem;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    min-height: 90px;
}

.ad-infeed {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.ad-infeed + .story-card,
.story-card + .ad-infeed {
    margin-top: 1.5rem;
}

.ad-anchor-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(26, 29, 33, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem;
    text-align: center;
    min-height: 50px;
}

.ad-anchor-bottom .ad-close-btn {
    position: absolute;
    top: -12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #212529;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e9ecef;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.ad-spacer {
    margin: 2rem 0;
}

.ad-spacer-sm {
    margin: 1rem 0;
}

.ad-spacer-lg {
    margin: 3rem 0;
}

@media (max-width: 768px) {
    .ad-container {
        padding: 0.75rem;
        margin: 1rem 0;
        border-radius: 8px;
    }

    .ad-slot-leaderboard {
        max-width: 100%;
        min-height: 50px;
    }

    .ad-slot-sidebar,
    .ad-slot-skyscraper {
        display: none;
    }

    .ad-slot-rectangle {
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .ad-slot-sidebar {
        display: none;
    }
}
