/* 广告系统样式文件 */

/* ========== 广告系统容器样式 ========== */
.ads-system {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
}

/* ========== 对联广告样式 ========== */
.f63097 {
    position: fixed !important;
    z-index: 19999 !important;
    /* 确保对联广告显示 */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* 默认尺寸 */
    width: 85px !important;
    height: 85px !important;
    max-width: 85px !important;
    max-height: 85px !important;
    min-width: 85px !important;
    min-height: 85px !important;
    /* 确保不影响页面布局 */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    /* 确保不影响页面滚动和宽度 */
    pointer-events: auto !important;
    overflow: hidden !important;
    /* 确保不影响页面其他元素 */
    transform: none !important;
    transition: none !important;
    animation: none !important;
    box-sizing: border-box !important;
}

/* 关闭按钮：放在广告内部右上角，使用图片并显示为圆形 */
.f63097 .ad-close {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 20000 !important;
    border: 1px solid #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    object-fit: cover !important;
    transition: all 0.2s ease !important;
}

.f63097 .ad-close:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

.f63097 .ad-close:active {
    transform: scale(0.95) !important;
}

.f63097 a img {
    margin: 10px;
    border-radius: 15px;
    border: solid 2px red;
    width: 65px;
    height: 65px;
}

/* 底部广告特殊样式 - 确保在紧密排列时仍然美观 */
.f63097[style*="bottom: 0px"] {
    /* 底部广告的特殊样式 */
}

.f63097[style*="bottom: 0px"] a img {
    /* 底部广告图片样式 */
    transition: transform 0.2s ease;
}

.f63097[style*="bottom: 0px"]:hover a img {
    transform: scale(1.05);
}

/* ========== 文字广告样式 ========== */
.txtguanggao {
    width: 100%;
    overflow: hidden;
    display: block;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,.05);
    margin: 8px 0;
    clear: both;
    z-index: 1;
    position: relative;
}

.txtguanggao a {
    width: 24.8%;
    float: left;
    border-radius: 3px;
    line-height: 35px;
    height: 35px;
    text-align: center;
    font-size: 16px;
    color: #fff;
    display: inline-block;
    background-color: rgb(255, 153, 159);
    margin: 1px;
    transition-duration: .3s;
    text-decoration: none;
}

@media (max-width: 600px) {
    .txtguanggao a {
        width: 48.6%;
    }
}

/* 文字广告颜色主题定义 */
.txtguanggao a:nth-child(1) { background-color: #FC9918; }
.txtguanggao a:nth-child(2) { background-color: #61529F; }
.txtguanggao a:nth-child(3) { background-color: #3e9f96; }
.txtguanggao a:nth-child(4) { background-color: #ff999f; }
.txtguanggao a:nth-child(5) { background-color: #61529F; }
.txtguanggao a:nth-child(6) { background-color: #FC9918; }
.txtguanggao a:nth-child(7) { background-color: #ff999f; }
.txtguanggao a:nth-child(8) { background-color: #3e9f96; }
.txtguanggao a:nth-child(9) { background-color: #F14A16; }
.txtguanggao a:nth-child(10) { background-color: #ff999f; }
.txtguanggao a:nth-child(11) { background-color: #FC9918; }
.txtguanggao a:nth-child(12) { background-color: #996699; }
.txtguanggao a:nth-child(13) { background-color: #ff999f; }
.txtguanggao a:nth-child(14) { background-color: #F14A16; }
.txtguanggao a:nth-child(15) { background-color: #996699; }
.txtguanggao a:nth-child(16) { background-color: #FC9918; }
.txtguanggao a:nth-child(17) { background-color: #F14A16; }
.txtguanggao a:nth-child(18) { background-color: #996699; }
.txtguanggao a:nth-child(19) { background-color: #FC9918; }
.txtguanggao a:nth-child(20) { background-color: #ff999f; }
.txtguanggao a:nth-child(21) { background-color: #996699; }
.txtguanggao a:nth-child(22) { background-color: #FC9918; }
.txtguanggao a:nth-child(23) { background-color: #ff999f; }
.txtguanggao a:nth-child(24) { background-color: #F14A16; }
.txtguanggao a:nth-child(25) { background-color: #FC9918; }
.txtguanggao a:nth-child(26) { background-color: #ff999f; }
.txtguanggao a:nth-child(27) { background-color: #F14A16; }
.txtguanggao a:nth-child(28) { background-color: #996699; }
.txtguanggao a:nth-child(29) { background-color: #ff999f; }
.txtguanggao a:nth-child(30) { background-color: #F14A16; }
.txtguanggao a:nth-child(31) { background-color: #996699; }
.txtguanggao a:nth-child(32) { background-color: #FC9918; }
.txtguanggao a:nth-child(33) { background-color: #F14A16; }
.txtguanggao a:nth-child(34) { background-color: #996699; }
.txtguanggao a:nth-child(35) { background-color: #FC9918; }
.txtguanggao a:nth-child(36) { background-color: #ff999f; }
.txtguanggao a:nth-child(37) { background-color: #996699; }
.txtguanggao a:nth-child(38) { background-color: #FC9918; }
.txtguanggao a:nth-child(39) { background-color: #ff999f; }
.txtguanggao a:nth-child(40) { background-color: #F14A16; }
.txtguanggao a:nth-child(41) { background-color: #FC9918; }
.txtguanggao a:nth-child(42) { background-color: #ff999f; }
.txtguanggao a:nth-child(43) { background-color: #F14A16; }
.txtguanggao a:nth-child(44) { background-color: #996699; }
.txtguanggao a:nth-child(45) { background-color: #ff999f; }
.txtguanggao a:nth-child(46) { background-color: #F14A16; }
.txtguanggao a:nth-child(47) { background-color: #996699; }
.txtguanggao a:nth-child(48) { background-color: #FC9918; }
.txtguanggao a:nth-child(49) { background-color: #F14A16; }
.txtguanggao a:nth-child(50) { background-color: #996699; }
.txtguanggao a:nth-child(51) { background-color: #FC9918; }
.txtguanggao a:nth-child(52) { background-color: #ff999f; }
.txtguanggao a:nth-child(53) { background-color: #996699; }
.txtguanggao a:nth-child(54) { background-color: #FC9918; }
.txtguanggao a:nth-child(55) { background-color: #ff999f; }
.txtguanggao a:nth-child(56) { background-color: #F14A16; }
.txtguanggao a:nth-child(57) { background-color: #FC9918; }
.txtguanggao a:nth-child(58) { background-color: #ff999f; }
.txtguanggao a:nth-child(59) { background-color: #F14A16; }
.txtguanggao a:nth-child(60) { background-color: #996699; }

.txtguanggao a:hover {
    background: #DC3545;
}

/* ========== 图标广告样式 ========== */
          /* 页面基础样式 */
          body {
            margin: 0;
            padding: 20px;
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
        }
        
        .demo-info {
            background: white;
            padding: 20px;
            margin: 20px 0;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .demo-info h2 {
            color: #333;
            margin-top: 0;
        }
        
        .demo-info p {
            color: #666;
            line-height: 1.6;
        }
        
        .ad-count {
            background: #e3f2fd;
            padding: 10px;
            border-radius: 4px;
            margin: 10px 0;
            border-left: 4px solid #2196f3;
        }
        
        /* 图标广告样式 */
        .bba-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
            gap: 4px;
            max-width: 100%;
            margin: 2px auto;
            padding: 5px;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0,0,0,.1);
            background: white;
        }
        
        @media (max-width: 750px) {
            .menu-wrap dd {
                width: 21%;
                line-height: 30px;
                font-size: 12px;
            }
            .bba-grid {
                grid-template-columns: repeat(auto-fit, minmax(67px, 67px));
                gap: 6px;
                max-width: 70%;
                margin: 2px 80px;
                padding: 0;
                border-radius: 2px;
                box-shadow: none;
            }
        }
        
        @media (max-width: 768px) {
            .bba-grid {
                grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
                gap: 3px;
                max-width: 90%;
            }
        }
        
        @media (max-width: 480px) {
            .bba-grid {
                grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
                gap: 2px;
                max-width: 95%;
            }
        }
        
        .bba-item {
            margin: 2px;
            text-align: center;
            border-radius: 8px;
            transition: transform .3s ease, box-shadow .3s ease;
            animation: pulse 2s infinite;
        }
        
        .bba-item img {
            width: 90%;
            object-fit: contain;
            border-radius: 10px;
            max-width: 80px;
            transition: transform .3s ease;
        }
        
        .bba-item div {
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 700;
            color: transparent;
            background-image: -webkit-linear-gradient(92deg, #206ceb, #ffffff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            -webkit-animation: hue 10s infinite linear;
        }

        /* 去除图标广告文字下划线 */
        .bba-item a { text-decoration: none !important; }
        .bba-item a:hover { text-decoration: none !important; }
        
        .bba-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 10px rgba(0,0,0,.2);
        }
        
        .bba-item:hover img {
            transform: scale(1.1);
        }
        
        /* 动画效果 */
        @keyframes hue {
            0% { filter: hue-rotate(0deg); }
            100% { filter: hue-rotate(360deg); }
        }
        
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        /* 加载动画 */
        .loading {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 200px;
            font-size: 18px;
            color: #666;
        }
        
        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #3498db;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 10px;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }