/* ========= 音频页阅读器浮层样式（仅用于主页面） ========= */
/* 兼容性：Android 9.0+ / iOS 12+ / Chrome 70+ / Safari 12+ */

/* 遮罩 */
.yuedu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: none;
    animation: yueduFadeIn 0.3s ease;
}

.yuedu-overlay.show {
    display: block;
}

@keyframes yueduFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* iframe 容器 */
.yuedu-iframe-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    height: 92%;
    max-width: 1000px;
    max-height: 900px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 3px solid #5a9c20;
}

.yuedu-iframe-container.show {
    display: flex;
}

/* 头部 */
.yuedu-iframe-header {
    padding: 12px 20px;
    background: linear-gradient(135deg, #5a9c20 0%, #4a7c1a 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 2px solid #3a6b14;
}

.yuedu-iframe-title {
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.yuedu-iframe-title .icon {
    font-size: 26px;
}

.close-yuedu-iframe {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-yuedu-iframe:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.close-yuedu-iframe:active {
    transform: scale(0.95);
}

/* iframe 本身 */
.yuedu-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fcfcfc;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .yuedu-iframe-container {
        width: 98%;
        height: 96%;
        border-radius: 12px;
    }
    .yuedu-iframe-header {
        padding: 10px 16px;
    }
    .yuedu-iframe-title {
        font-size: 19px;
    }
    .close-yuedu-iframe {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .yuedu-iframe-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
        max-height: none;
    }
    .yuedu-iframe-header {
        padding: 8px 12px;
    }
    .yuedu-iframe-title {
        font-size: 17px;
    }
    .close-yuedu-iframe {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}

/* 高对比度 */
@media (prefers-contrast: high) {
    .yuedu-iframe-container {
        border: 4px solid black;
    }
    .yuedu-iframe-header {
        background: black;
        border-bottom: 4px solid black;
    }
    .close-yuedu-iframe {
        border: 3px solid black;
    }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
    .yuedu-overlay,
    .yuedu-iframe-container {
        animation: none !important;
    }
}