/* Floating Ads Pro - 前端样式 */

/* 基础样式重置 */
.floating-ad-left,
.floating-ad-right,
.floating-ad-bottom,
.floating-ad-popup-overlay {
    box-sizing: border-box;
}

/* 悬浮广告容器 */
.floating-ad-left,
.floating-ad-right {
    position: fixed;
    z-index: 9998;
    max-width: 200px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.floating-ad-left {
    top: 30%;
    left: 10px;
}

.floating-ad-right {
    top: 30%;
    right: 10px;
}

.floating-ad-left:hover,
.floating-ad-right:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* 关闭按钮 */
.floating-ad-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 9999;
}

.floating-ad-close:hover {
    background: #ff6b81;
    transform: scale(1.1);
}

/* 底部广告 */
.floating-ad-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    text-align: center;
    animation: slideInUp 0.5s ease-out;
}

.floating-ad-bottom-close {
    position: absolute;
    top: 5px;
    right: 15px;
    color: white;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.floating-ad-bottom-close:hover {
    opacity: 1;
}

/* 开屏广告 */
.floating-ad-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-ad-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.floating-ad-popup {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.5s ease-out;
}

.floating-ad-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
    z-index: 10000;
}

.floating-ad-popup-close:hover {
    color: #333;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .floating-ad-left,
    .floating-ad-right {
        max-width: 150px;
        top: 20%;
    }
    
    .floating-ad-left {
        left: 5px;
    }
    
    .floating-ad-right {
        right: 5px;
    }
    
    .floating-ad-close {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: -8px;
        right: -8px;
    }
    
    .floating-ad-bottom {
        padding: 10px;
        font-size: 14px;
    }
    
    .floating-ad-bottom-close {
        font-size: 18px;
        top: 3px;
        right: 10px;
    }
    
    .floating-ad-popup {
        padding: 20px;
        margin: 20px;
    }
    
    .floating-ad-popup-close {
        font-size: 20px;
        top: 8px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .floating-ad-left,
    .floating-ad-right {
        max-width: 120px;
        top: 15%;
    }
    
    .floating-ad-left {
        left: 3px;
    }
    
    .floating-ad-right {
        right: 3px;
    }
    
    .floating-ad-close {
        width: 18px;
        height: 18px;
        font-size: 11px;
        top: -6px;
        right: -6px;
    }
    
    .floating-ad-bottom {
        padding: 8px;
        font-size: 12px;
    }
    
    .floating-ad-popup {
        padding: 15px;
        margin: 15px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .floating-ad-close {
        border: 2px solid black;
    }
    
    .floating-ad-bottom {
        background: black;
        border-top: 2px solid white;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .floating-ad-left,
    .floating-ad-right,
    .floating-ad-bottom,
    .floating-ad-popup-overlay,
    .floating-ad-close {
        animation: none;
        transition: none;
    }
    
    .floating-ad-popup-overlay {
        transition: opacity 0.3s ease;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .floating-ad-popup {
        background: #2d3748;
        color: white;
    }
    
    .floating-ad-popup-close {
        color: #a0aec0;
    }
    
    .floating-ad-popup-close:hover {
        color: white;
    }
}

/* 打印样式隐藏 */
@media print {
    .floating-ad-left,
    .floating-ad-right,
    .floating-ad-bottom,
    .floating-ad-popup-overlay {
        display: none !important;
    }
}