@import url('/tools/css/common.css');

/* HTTP查询工具 - 工具特有样式 */

.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-header h2 { font-size: 1.4rem; color: #333; }
.badge { background: #667eea; color: white; padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; }

textarea { width: 100%; padding: 16px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 14px; font-family: var(--font-code); resize: vertical; transition: border-color 0.3s; line-height: 1.6; }
textarea:focus { outline: none; border-color: #667eea; }

.hint { font-size: 13px; color: #888; margin-top: 8px; padding: 8px 12px; background: #f8f9fa; border-radius: 6px; border-left: 3px solid #667eea; }

.config-panel { margin-top: 20px; padding: 20px; background: #f8f9fa; border-radius: 10px; }
.config-row { display: flex; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.config-row:last-child { margin-bottom: 0; }
.config-item { flex: 1; min-width: 150px; }
.config-item label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: #666; font-weight: 500; }
.config-item select, .config-item input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.3s; }
.config-item select:focus, .config-item input:focus { outline: none; border-color: #667eea; }

.btn-group { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.btn { padding: 12px 24px; border: none; border-radius: 8px; font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4); }
.btn-secondary { background: #f0f0f0; color: #555; }
.btn-secondary:hover { background: #e0e0e0; }
.btn-success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); color: white; }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(17, 153, 142, 0.4); }
.btn-small { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; background: white; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.btn-small:hover { background: #f5f5f5; border-color: #667eea; color: #667eea; }

/* 结果头部统计 */
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 12px; }
.results-header h2 { color: #333; font-size: 1.3rem; margin: 0; }
/*.results-stats { display: flex; gap: 16px; flex-wrap: wrap; }*/
.results-stats .stat-item { font-size: 14px; color: #666; flex-direction: row; min-width: auto; }
.results-stats .stat-item strong { color: #333; font-size: 16px; margin-left: 4px; }

.result-section { padding: 30px; }
.result-actions { display: flex; gap: 8px; }
.result-table-wrapper { overflow-x: auto; margin-top: 20px; border-radius: 10px; border: 1px solid #eee; }
.result-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result-table th { background: #f8f9fa; padding: 14px 12px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #eee; white-space: nowrap; }
.result-table td { padding: 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.result-table tr:hover { background: #f8f9fa; }
.result-table tr:last-child td { border-bottom: none; }
.url-cell { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #667eea; font-weight: 500; }
.status-code { display: inline-block; padding: 4px 10px; border-radius: 4px; font-weight: 600; font-size: 13px; }
.status-2xx { background: #d4edda; color: #155724; }
.status-3xx { background: #fff3cd; color: #856404; }
.status-4xx { background: #f8d7da; color: #721c24; }
.status-5xx { background: #f5c6cb; color: #721c24; }
.status-error { background: #f8d7da; color: #721c24; }
.time-cell { font-weight: 600; font-family: var(--font-code); }
.time-fast { color: #11998e; }
.time-normal { color: #f0932b; }
.time-slow { color: #eb3349; }
.speed-cell, .size-cell { font-family: var(--font-code); color: #666; }
.detail-btn { padding: 4px 10px; background: #667eea; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; transition: background 0.2s; }
.detail-btn:hover { background: #764ba2; }

.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-content { background: white; border-radius: 12px; max-width: 700px; width: 100%; max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #eee; }
.modal-header h3 { font-size: 1.3rem; }
.modal-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #999; line-height: 1; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s; }
.modal-close:hover { background: #f0f0f0; color: #333; }
.modal-body { padding: 24px; overflow-y: auto; font-family: var(--font-code); font-size: 13px; line-height: 1.8; }
.detail-row { display: flex; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 140px; color: #888; flex-shrink: 0; }
.detail-value { flex: 1; color: #333; word-break: break-all; }

.footer { text-align: center; padding: 20px; color: #666; font-size: 0.9rem; }
.footer a { color: #667eea; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* 响应式 - 仅工具特有规则 */
@media (max-width: 768px) {
    .tool-header { padding: 15px 0; margin-bottom: 15px; }
    .tool-header h1 { font-size: 1.5rem; }
    .config-row { flex-wrap: wrap; }
    .config-item { flex: 1; min-width: 120px; }
    .progress-stats { justify-content: space-around; }
    .result-actions { flex-wrap: wrap; }
}

/* 加载动画 */
.loading { display: inline-block; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; border-top-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 状态指示器 */
.status-indicator { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-indicator.success { background: #11998e; }
.status-indicator.error { background: #eb3349; }
.status-indicator.pending { background: #f0932b; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
