/* aitool-embed.css - AI工具嵌入模块样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.embed-container {
    max-width: 1600px;
    margin: 0 auto;
    background: #f5f7fa;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 20px;
}

.main-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    display: inline-block;
    width: 100%;
}

/* 窗口样式 */
.window-section {
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.window-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.window-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.window-label {
    color: white;
    font-weight: bold;
    font-size: 16px;
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
}

.domain-hint {
    color: #ffd700;
    font-size: 14px;
    font-weight: normal;
}

.iframe-wrapper {
    position: relative;
    height: 600px;
    background: #e0e0e0;
}

.embed-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.window-footer {
    padding: 8px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

/* URL控制栏样式 */
.url-controls {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.url-input, .ai-tool-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.url-input:focus, .ai-tool-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.load-url-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 23px;
}

.load-url-btn:hover {
    background: #218838;
}

.button-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #5a6268;
}

/* PDF模态框样式 */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pdf-modal-content {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pdf-header {
    background: #333;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-pdf-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.pdf-viewer-container {
    padding: 20px;
    text-align: center;
    max-height: 60vh;
    overflow-y: auto;
}

.pdf-canvas {
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
    height: auto;
}

.pdf-controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.pdf-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.pdf-btn:hover {
    background: #5a67d8;
}

.pdf-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

.agreement-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.agree-btn, .disagree-btn {
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.agree-btn {
    background: #28a745;
    color: white;
}

.agree-btn:hover {
    background: #218838;
    transform: scale(1.02);
}

.disagree-btn {
    background: #dc3545;
    color: white;
}

.disagree-btn:hover {
    background: #c82333;
    transform: scale(1.02);
}

/* Excel下载模态框 */
.excel-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.excel-modal-content {
    background: white;
    padding: 30px 50px;
    border-radius: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    animation: slideIn 0.3s ease;
}

.excel-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.excel-yes-btn, .excel-no-btn {
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.excel-yes-btn {
    background: #007bff;
    color: white;
}

.excel-yes-btn:hover {
    background: #0056b3;
}

.excel-no-btn {
    background: #6c757d;
    color: white;
}

.excel-no-btn:hover {
    background: #5a6268;
}

/* 错误提示层 */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.error-toast-content {
    background: #dc3545;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    min-width: 300px;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
}

/* 加载动画 */
.iframe-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 风险提示 */
.risk-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.risk-notice p {
    margin: 0;
    font-size: 13px;
    color: #856404;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .embed-container {
        padding: 10px;
    }
    
    .window-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .url-controls {
        flex-direction: column;
    }
    
    .input-group {
        width: 100%;
    }
    
    .load-url-btn {
        width: 100%;
    }
    
    .iframe-wrapper {
        height: 400px;
    }
    
    .pdf-modal-content {
        width: 95%;
    }
}


