/* ===== 网页嵌入模态框样式 ===== */
.web-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
}

.web-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.web-modal {
    background: var(--bg);
    border-radius: 12px;
    width: 95%;
    height: 90vh;
    max-width: 1200px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s var(--ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.web-modal-overlay.active .web-modal {
    transform: translateY(0) scale(1);
}

.web-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: var(--border);
    background: rgba(45,45,45,0.02);
}

.web-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.web-modal-title i {
    color: var(--accent);
}

.web-modal-actions {
    display: flex;
    gap: 0.5rem;
}

.web-modal-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    font-size: 1.1rem;
}

.web-modal-btn:hover {
    background: rgba(45,45,45,0.05);
}

.web-modal-btn.close-btn:hover {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
}

.web-modal-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.web-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.web-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.web-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(91, 203, 125, 0.2);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.web-loading-text {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* 外部链接提示 */
.web-external-link-hint {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 20;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.web-external-link-hint.show {
    opacity: 1;
    transform: translateY(0);
}

.web-external-link-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}
#web-modal-tool-sub {
    font-size: 0.8rem;
    margin-top: 5px;
    color: darkgray;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .web-modal {
        width: 98%;
        height: 85vh;
        border-radius: 8px;
    }
    .web-modal-header {
        padding: 1rem;
    }
    .web-modal-title {
        font-size: 1rem;
    }
    .web-external-link-hint {
        left: 1rem;
        right: 1rem;
        bottom: 0.5rem;
    }
}