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

/* 百度蜘蛛模拟 - 工具特有样式 */
.input-section label { display: block; font-weight: 600; color: #333; margin-bottom: 10px; font-size: 1rem; }
.input-section textarea { width: 100%; min-height: 150px; padding: 15px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 14px; font-family: var(--font-code); resize: vertical; transition: border-color 0.3s; }
.input-section textarea:focus { outline: none; border-color: #667eea; }
.input-section .hint { font-size: 12px; color: #888; margin-top: 8px; }

.options-row { display: flex; gap: 20px; align-items: center; margin-bottom: 15px; }
.option-group { display: flex; align-items: center; gap: 10px; }
.option-group label { font-weight: 500; color: #555; }
.option-group select { padding: 10px 15px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; cursor: pointer; background: white; }

.button-row { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; }

.btn { padding: 14px 40px; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary { background: #f0f0f0; color: #555; }
.btn-secondary:hover { background: #e0e0e0; }

.progress-bar { display: none; margin-top: 20px; }
.progress-bar.active { display: block; }
.progress-track { height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); border-radius: 4px; transition: width 0.3s; width: 0%; }
.progress-text { text-align: center; margin-top: 10px; color: #666; font-size: 14px; }

/* 进度条卡片样式 */
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.progress-header h3 { font-size: 16px; color: #333; margin: 0; }
#progressText { font-size: 14px; color: #666; font-weight: 600; }
.progress-bar-container { width: 100%; height: 24px; background: #f0f0f0; border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.progress-message { font-size: 13px; color: #666; text-align: center; }

.results-section { display: none; }
.results-section.active { display: block; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.results-header h2 { color: #333; font-size: 1.5rem; margin: 0; }
.results-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-item { font-size: 14px; color: #666; }
.stat-item strong { color: #333; font-size: 16px; margin-left: 4px; }
.results-summary { display: flex; gap: 20px; }
.summary-item { text-align: center; padding: 10px 20px; background: #f8f9fa; border-radius: 8px; }
.summary-item .value { font-size: 1.5rem; font-weight: 700; color: #667eea; }
.summary-item .label { font-size: 12px; color: #888; margin-top: 4px; }

.results-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.results-table th { background: #f8f9fa; padding: 12px 15px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #e0e0e0; }
.results-table td { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.results-table tr:hover { background: #f8f9fa; }

.status-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-success { background: #d4edda; color: #155724; }
.status-error { background: #f8d7da; color: #721c24; }
.status-redirect { background: #fff3cd; color: #856404; }

.url-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-cell a { color: #667eea; text-decoration: none; }
.url-cell a:hover { text-decoration: underline; }
.title-cell { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555; }
.time-cell { font-family: var(--font-code); color: #666; }
.time-slow { color: #dc3545; font-weight: 600; }
.time-medium { color: #ffc107; }
.time-fast { color: #28a745; }

.compare-section { margin-top: 15px; padding: 15px; background: #f8f9fa; border-radius: 8px; }
.compare-title { font-weight: 600; color: #555; margin-bottom: 10px; font-size: 13px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.compare-item { padding: 10px; background: white; border-radius: 6px; border: 1px solid #e0e0e0; }
.compare-item .label { font-size: 11px; color: #888; margin-bottom: 4px; }
.compare-item .value { font-weight: 600; color: #333; }
.diff-warning { color: #dc3545; font-weight: 600; }
.error-message { color: #dc3545; font-size: 13px; margin-top: 5px; }
.empty-state { text-align: center; padding: 60px 20px; color: #888; }

/* 模态框 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-content { background: white; border-radius: 16px; max-width: 900px; width: 100%; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3); }
.modal-header { padding: 20px 25px; border-bottom: 1px solid #e0e0e0; display: flex; justify-content: space-between; align-items: center; background: #f8f9fa; }
.modal-header h3 { margin: 0; color: #333; font-size: 1.2rem; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #666; 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: #e0e0e0; color: #333; }
.modal-body { padding: 20px 25px; overflow-y: auto; flex: 1; }

.html-source { background: #1e1e1e; color: #d4d4d4; padding: 20px; border-radius: 8px; font-family: var(--font-code); font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; }
.html-source .tag { color: #569cd6; }
.html-source .attr { color: #9cdcfe; }
.html-source .value { color: #ce9178; }
.html-source .comment { color: #6a9955; font-style: italic; }
.html-source .doctype { color: #569cd6; font-weight: bold; }
.html-source .text { color: #d4d4d4; }

.btn-view { padding: 6px 12px; background: #667eea; color: white; border: none; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.2s; margin-top: 5px; }
.btn-view:hover { background: #5568d3; transform: translateY(-1px); }

.mobile-card { display: none; }

/* 响应式 - 仅工具特有规则 */
@media (max-width: 768px) {
    .tool-header h1 { font-size: 1.5rem; }
    .tool-header p { font-size: 0.9rem; }
    .options-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .option-group { width: 100%; }
    .option-group select { width: 100%; }
    .button-row { flex-direction: row; justify-content: flex-start; gap: 10px; }
    .button-row .btn { flex: 1; min-width: 0; padding: 12px 20px; font-size: 14px; }
    .results-header { flex-direction: column; align-items: flex-start; }
    .results-stats { width: 100%; justify-content: space-between; }
    .results-table { display: none; }
    .mobile-card { display: block; }
    .result-card { background: #f8f9fa; border-radius: 10px; padding: 15px; margin-bottom: 12px; border: 1px solid #e0e0e0; }
    .result-card .card-url { font-size: 13px; font-weight: 600; color: #333; word-break: break-all; margin-bottom: 8px; }
    .result-card .card-url a { color: #667eea; text-decoration: none; }
    .result-card .card-title { font-size: 12px; color: #666; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .result-card .card-info { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
    .result-card .info-tag { font-size: 11px; padding: 4px 8px; background: white; border-radius: 6px; border: 1px solid #e0e0e0; color: #555; }
    .result-card .info-tag strong { color: #333; }
    .result-card .card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .result-card .btn-view { flex: 1; min-width: 120px; text-align: center; padding: 10px 12px; font-size: 13px; margin-top: 0; }
    .modal-content { max-height: 90vh; border-radius: 12px; }
    .modal-header { padding: 15px; }
    .modal-header h3 { font-size: 1rem; }
    .modal-body { padding: 15px; }
    .html-source { font-size: 11px; padding: 12px; line-height: 1.5; }
    .compare-grid { grid-template-columns: 1fr; }
}
