﻿/* Lớp phủ mờ toàn màn hình */
.ads-overlay {
    display: none; /* mặc định ẩn */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

    /* khi mở quảng cáo */
    .ads-overlay.show {
        display: flex;
    }

/* Khung chứa ảnh quảng cáo */
.ads-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

    .ads-container img {
        max-width: 100%;
        max-height: 85vh; /* Giới hạn chiều cao để không bị tràn */
        border-radius: 8px;
        box-shadow: 0 0 30px rgba(255,255,255,0.2);
    }

/* Nút X đóng quảng cáo */
.ads-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

    .ads-close:hover {
        color: #ff0000;
        transform: rotate(90deg);
    }

/* Responsive cho Mobile */
@media (max-width: 768px) {
    .ads-container {
        width: 95%;
    }

    .ads-close {
        top: -35px;
        right: 10px;
    }
}

/* ADS 2 BÊN LUÔN BÁM THEO SCROLL */
/* ADS 2 bên */
.ads-side {
    position: fixed !important;
    top: 0; /* lên sát top luôn */
    width: 10%;
    height: 100vh;
    width: 10%;
    z-index: 9000;
}

/* tránh bị cha ảnh hưởng */
body {
    overflow-x: hidden;
}

/* trái */
.ads-left {
    left: 0;
}

/* phải */
.ads-right {
    right: 0;
}

/* ảnh */
.ads-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* ẩn mobile */
@media (max-width: 1200px) {
    .ads-side {
        display: none !important;
    }
}

.ads-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 20px;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5000000;
    transition: 0.3s;
}

    .ads-close-btn:hover {
        background: red;
        transform: rotate(90deg);
    }
