/* 底部广告样式 */
.bottom-ad {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 999999;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-ad.show {
    bottom: 0;
}

/* 底部广告内容样式 */
.bottom-ad .ad-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;  /* 垂直居中 */
    justify-content: center;  /* 水平居中 */
    position: relative;
    background: #fff;  /* 添加白色背景 */
}

/* 底部广告文本样式 */
.bottom-ad .ad-text-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

/* 底部广告图片样式 */
.bottom-ad .ad-content img {
    width: auto;  /* 改为自动宽度 */
    height: 100%;  /* 保持高度100% */
    object-fit: contain;  /* 保持图片比例 */
    margin: 0 auto;  /* 水平居中 */
}

/* 底部广告链接样式 */
.bottom-ad .ad-content a {
    display: flex;  /* 使用flex布局 */
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* 搜索下方广告样式 */
.search-ad {
    width: 100%;
    height: 90px;
    margin: -75px auto 20px;
    position: relative;
    z-index: 1;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 只在空状态时显示虚线边框和背景 */
.search-ad:empty {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    background: rgba(245, 245, 245, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-ad:empty::after {
    content: '广告位招租';
    color: #696868;
    font-size: 14px;
}

/* 有内容时完全移除所有默认样式 */
.search-ad:not(:empty) {
    border: none;
    background: none;
    padding: 0;
}

/* 广告内容样式 */
.search-ad .ad-content {
    width: 100%;
    height: 100%;
}

/* 图片广告样式 */
.search-ad .ad-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 侧边悬浮广告共同样式 */
.side-ad {
    position: fixed;
    width: 120px;
    height: 300px;
    z-index: 999998;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    top: 50%;
    transform: translateY(-50%);
}

/* 空状态样式 */
.side-ad:empty {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    background: rgba(245, 245, 245, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-ad:empty::after {
    content: '广告位招租';
    color: #696868;
    font-size: 14px;
}

/* 有内容时移除默认样式 */
.side-ad:not(:empty) {
    border: none;
    background: none;
    box-shadow: none;
}

/* 左侧广告位 */
.left-ad {
    left: -120px;
}

.left-ad.show {
    left: 10px;
}

/* 右侧广告位 */
.right-ad {
    right: -120px;
}

.right-ad.show {
    right: 10px;
}

/* 广告内容样式 */
.side-ad .ad-content {
    width: 100%;
    height: 100%;
}

/* 图片广告样式 */
.side-ad .ad-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 文本广告样式 */
.ad-text-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

.ad-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 最多显示两行 */
    -webkit-box-orient: vertical;
}

/* HTML广告样式 */
.ad-content iframe,
.ad-content embed,
.ad-content object {
    width: 100%;
    height: 100%;
    border: none;
}

/* 关闭按钮样式 */
.close-ad {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000000;
    padding: 0;
    font-size: 12px;
}

.close-ad:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 广告链接样式 */
.ad-content a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* 基础广告样式 */
.basic-ad-group {
    margin-bottom: 20px;
}

.basic-ad-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
} 