/* 蜘蛛抓取测试工具样式 */
.tool-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.tool-info {
    flex: 1;
    min-width: 300px;
}

.tool-operation {
    flex: 2;
    min-width: 500px;
}

.result-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;

    overflow-y: auto;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input[type="text"],
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* 整体工具卡片样式 */
.tool-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tool-card h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.spider-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.url-input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-weight: 500;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-success {
    background: #28a745;
}

.status-error {
    background: #dc3545;
}

.status-pending {
    background: #ffc107;
}

.messages-panel {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.result-content {
    margin-top: -1px;
    background-color: #f8f9fa;
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: visible;
    flex-grow: 1;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #3c3c3c, #2c2c2c);
    color: #f8f8f2;
    padding: 10px 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border: 1px solid #444;
    border-bottom: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#spider-result {
    margin: 0;
    padding: 15px;
    background-color: #f8f9fa;
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    tab-size: 4;
    white-space: pre-wrap; /* 允许换行 */
    direction: ltr;
    text-align: left;
    outline: none;
    border: none;
    border-radius: 0 0 8px 8px;
    min-height: 500px;
    max-height: none;
    overflow-x: auto; /* 允许水平滚动 */
    overflow-y: visible; /* 垂直方向不隐藏内容 */
}

/* 蜘蛛类型选择样式 */
.spider-type {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.spider-type label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.spider-type input[type="radio"] {
    margin: 0;
}

/* 操作指南样式 */
.guidance-panel {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-top: 15px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
}

.guidance-panel h4 {
    margin-top: 0;
    color: #007bff;
}

.guidance-panel ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.guidance-panel li {
    margin-bottom: 5px;
}

/* 代码显示区域样式 */
pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    overflow: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
}

.result-actions {
    margin-top: 10px;
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        flex-direction: column;
    }
    
    .tool-info,
    .tool-operation {
        min-width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .spider-form {
        grid-template-columns: 1fr;
    }
    
    .spider-type {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-actions {
        text-align: center;
    }
}