/**
 * CDN验证弹窗样式
 * 当CDN资源加载失败需要验证时显示
 */

/* CDN验证模态框 */
.cdn-verification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 10000; /* 确保在最顶层 */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(0px);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.cdn-verification-modal.active {
    display: flex;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* 使用与普通模态框相同的动画 */
.cdn-verification-modal.opening {
    animation: backdropFadeIn 0.3s ease forwards;
}

.cdn-verification-modal.closing {
    animation: backdropFadeOut 0.3s ease forwards;
}

.cdn-verification-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    opacity: 0;
    will-change: transform, opacity;
    animation: modalFadeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.cdn-verification-modal.active .modal-content {
    opacity: 1;
}

.cdn-verification-modal h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #ff4757;
    font-size: 1.6rem;
}

.cdn-verification-message {
    margin-bottom: 2rem;
}

.cdn-verification-message p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #333;
}

/* 验证原因列表 */
.verification-reasons {
    text-align: left;
    margin: 15px auto;
    padding-left: 20px;
    max-width: 320px;
}

.verification-reasons li {
    margin-bottom: 8px;
    line-height: 1.4;
    color: #333;
    position: relative;
}

.verification-reasons li:before {
    content: '•';
    position: absolute;
    left: -15px;
    color: #ff4757;
    font-size: 18px;
}

.verification-offline-note {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

/* 验证按钮样式 */
.verification-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.verification-btn {
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.verification-btn:hover {
    background: #3367d6;
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
    transform: translateY(-2px);
}

.verification-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.3);
}

.verification-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cdn-verification-modal .modal-content {
        width: 85%;
        padding: 1.5rem;
    }
    
    .cdn-verification-modal h3 {
        font-size: 1.4rem;
    }
    
    .cdn-verification-message p {
        font-size: 1rem;
    }
    
    .verification-btn {
        padding: 10px 25px;
        font-size: 1rem;
    }
}

/* 加载异常时的视觉提示 */
.cdn-loading-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    background: #ff4757;
    color: white;
    text-align: center;
    font-size: 14px;
    z-index: 9999;
    display: none;
}

.cdn-loading-warning.show {
    display: block;
    animation: slideDown 0.3s forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
} 