/* ========================================================
   死链接批量检测 — dead_link_batch_check.css
   ======================================================== */

/* ---------- 整体容器 ---------- */
.dlbc-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 195px);
    min-height: 580px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: background 0.3s;
}

/* ---------- 工具栏 ---------- */
.dlbc-toolbar {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 7px;
    box-shadow: 0 2px 8px rgba(14,165,233,0.28);
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255,255,255,0.22);
    padding-left: 7px;
}

.toolbar-btn {
    padding: 5px 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #0369a1;
    transition: all 0.18s;
    white-space: nowrap;
    line-height: 1.4;
}

.toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.14);
}

.toolbar-btn:active:not(:disabled) { transform: translateY(0); }
.toolbar-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.toolbar-btn.btn-primary {
    background: #fff;
    font-weight: 700;
    color: #0369a1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.toolbar-label {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

.toolbar-select {
    padding: 5px 8px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 4px;
    font-size: 12px;
    color: #0369a1;
    cursor: pointer;
    outline: none;
}

.shortcut-hint {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.15);
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.25);
    font-family: inherit;
    white-space: nowrap;
}

/* ---------- 主内容区（左右两栏） ---------- */
.dlbc-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ---------- 左侧输入面板 ---------- */
.dlbc-input-panel {
    width: 36%;
    min-width: 250px;
    max-width: 460px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: linear-gradient(to bottom, #fafafa, #f4f6f8);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.url-count-badge {
    font-size: 11px;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 9px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}

.url-textarea {
    flex: 1;
    resize: none;
    border: none;
    outline: none;
    padding: 12px 14px;
    font-size: 12.5px;
    font-family: 'Consolas', 'Monaco', 'Menlo', monospace;
    color: #334155;
    line-height: 1.65;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

.url-textarea::placeholder { color: #94a3b8; font-family: inherit; }

.input-footer {
    padding: 6px 14px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.input-tip {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

/* ---------- 右侧结果面板 ---------- */
.dlbc-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    min-width: 0;
}

/* ---------- 统计条 ---------- */
.dlbc-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 4px 11px;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.18s;
    border: 1.5px solid transparent;
    user-select: none;
}

.stat-item:hover { transform: translateY(-1px); filter: brightness(0.95); }

.stat-item.active { border-color: currentColor; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

.stat-item.stat-total   { color: #475569; background: #f1f5f9; }
.stat-item.stat-ok      { color: #16a34a; background: #f0fdf4; }
.stat-item.stat-dead    { color: #dc2626; background: #fef2f2; }
.stat-item.stat-redirect{ color: #d97706; background: #fffbeb; }
.stat-item.stat-error   { color: #7c3aed; background: #f5f3ff; }

.stat-num   { font-size: 17px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 11px; opacity: 0.8; }

/* ---------- 进度条 ---------- */
.dlbc-progress {
    padding: 7px 14px 8px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 5px;
}

.progress-pct { font-weight: 600; color: #0284c7; }

.progress-bar-track {
    background: #e2e8f0;
    border-radius: 4px;
    height: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #0284c7);
    border-radius: 4px;
    width: var(--dlbc-progress-pct, 0%);
    transition: width 0.35s ease;
}

/* 不定进度动画（检测中） */
.progress-bar-fill.indeterminate {
    width: 40% !important;
    animation: prog-slide 1.5s ease-in-out infinite;
}

@keyframes prog-slide {
    0%   { margin-left: -40%; }
    100% { margin-left: 100%; }
}

/* ---------- 过滤栏 ---------- */
.result-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    background: #fff;
}

.filter-label { font-size: 13px; color: #64748b; flex-shrink: 0; }

.filter-input {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
    color: #334155;
}

.filter-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14,165,233,0.12);
    background: #fff;
}

/* ---------- 空状态 ---------- */
.result-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
    text-align: center;
}

.empty-icon   { font-size: 42px; margin-bottom: 12px; opacity: 0.55; }
.empty-title  { font-size: 15px; font-weight: 600; color: #64748b; margin: 0 0 6px; }
.empty-desc   { font-size: 13px; margin: 0 0 10px; }
.empty-hint   { font-size: 11.5px; color: #b0bec5; margin: 0; }

/* ---------- 结果表格 ---------- */
.result-table-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.25s;
}
.result-table-wrapper:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 540px;
}

.result-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    padding: 8px 11px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    user-select: none;
}

.result-table th.sort-col { cursor: pointer; }
.result-table th.sort-col:hover { background: #f1f5f9; }

.sort-icon { font-size: 10px; opacity: 0.4; margin-left: 3px; }
.sort-col.sort-asc  .sort-icon::after { content: '↑'; opacity: 1; color: #0284c7; }
.sort-col.sort-desc .sort-icon::after { content: '↓'; opacity: 1; color: #0284c7; }

.result-table td {
    padding: 7px 11px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.result-table tr:last-child td { border-bottom: none; }
.result-table tr:hover td { background: #f8fafc; }

.col-index  { width: 38px; text-align: center; color: #94a3b8; font-size: 11px; }
.col-url    { max-width: 0; width: auto; }
.col-code   { width: 72px; text-align: center; }
.col-time   { width: 82px; text-align: right; }
.col-status { width: 90px; text-align: center; }
.col-action { width: 62px; text-align: center; }

/* URL 单元格 */
.url-cell {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}

.url-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #334155;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11.5px;
    cursor: pointer;
    transition: color 0.15s;
}

.url-text:hover { color: #0284c7; text-decoration: underline; }

/* 状态码颜色 */
.code-ok     { color: #16a34a; font-weight: 600; }
.code-redir  { color: #d97706; font-weight: 600; }
.code-4xx    { color: #dc2626; font-weight: 600; }
.code-5xx    { color: #7c3aed; font-weight: 600; }
.code-na     { color: #94a3b8; }

/* 响应时间颜色 */
.time-fast   { color: #16a34a; font-weight: 500; }
.time-medium { color: #d97706; font-weight: 500; }
.time-slow   { color: #dc2626; font-weight: 500; }
.time-na     { color: #94a3b8; }

/* 状态徽章 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-ok       { color: #16a34a; background: #dcfce7; }
.badge-dead     { color: #dc2626; background: #fee2e2; }
.badge-redirect { color: #d97706; background: #fef3c7; }
.badge-timeout  { color: #9f1239; background: #ffe4e6; }
.badge-error    { color: #7c3aed; background: #ede9fe; }
.badge-unknown  { color: #64748b; background: #f1f5f9; }
.badge-checking { color: #0284c7; background: #e0f2fe; }

/* 操作按钮 */
.action-btn {
    padding: 3px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
    white-space: nowrap;
}

.action-btn:hover { background: #e2e8f0; color: #1e293b; }

/* 骨架行动画 */
.skeleton-row td { opacity: 0.55; animation: skeleton-pulse 1.4s ease-in-out infinite; }
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 0.28; }
}

/* ---------- 底部状态栏 ---------- */
.dlbc-statusbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    font-size: 11.5px;
    color: #64748b;
}

.statusbar-hint {
    margin-left: auto;
    font-size: 11px;
    color: #94a3b8;
}

.statusbar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background 0.3s;
}

.statusbar-dot.running { background: #0ea5e9; animation: sb-pulse 1.1s infinite; }
.statusbar-dot.done    { background: #16a34a; }
.statusbar-dot.error   { background: #dc2626; }

@keyframes sb-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ---------- 暗黑模式 ---------- */
body.dark-mode .dlbc-container     { background: #1a1d2e; }
body.dark-mode .dlbc-input-panel   { background: #1e2135; border-color: #2d3154; }
body.dark-mode .dlbc-result-panel  { background: #1e2135; }
body.dark-mode .panel-header       { background: #171a2b; border-color: #2d3154; }
body.dark-mode .panel-title        { color: #94a3b8; }
body.dark-mode .url-count-badge    { background: #1e3a4c; color: #38bdf8; }
body.dark-mode .url-textarea       { background: #1e2135; color: #cbd5e1; }
body.dark-mode .input-footer       { background: #171a2b; border-color: #2d3154; }
body.dark-mode .input-tip          { color: #475569; }
body.dark-mode .dlbc-stats         { background: #171a2b; border-color: #2d3154; }
body.dark-mode .stat-item.stat-total   { background: #242848; }
body.dark-mode .stat-item.stat-ok      { background: #0f2e1a; }
body.dark-mode .stat-item.stat-dead    { background: #2e1010; }
body.dark-mode .stat-item.stat-redirect{ background: #2e2010; }
body.dark-mode .stat-item.stat-error   { background: #1e1530; }
body.dark-mode .dlbc-progress      { background: #1e2135; border-color: #2d3154; }
body.dark-mode .progress-bar-track { background: #2d3154; }
body.dark-mode .result-filter      { background: #1e2135; border-color: #2d3154; }
body.dark-mode .filter-input       { background: #171a2b; border-color: #2d3154; color: #cbd5e1; }
body.dark-mode .filter-input:focus { border-color: #0ea5e9; background: #1e2135; }
body.dark-mode .result-empty       { color: #475569; }
body.dark-mode .empty-title        { color: #64748b; }
body.dark-mode .result-table th    { background: #171a2b; color: #64748b; border-color: #2d3154; }
body.dark-mode .result-table th.sort-col:hover { background: #1e2135; }
body.dark-mode .result-table td    { border-color: #252840; }
body.dark-mode .result-table tr:hover td { background: #212435; }
body.dark-mode .url-text           { color: #94a3b8; }
body.dark-mode .url-text:hover     { color: #38bdf8; }
body.dark-mode .action-btn         { background: #2d3154; border-color: #3d4270; color: #94a3b8; }
body.dark-mode .action-btn:hover   { background: #3d4270; color: #cbd5e1; }
body.dark-mode .dlbc-statusbar     { background: #171a2b; border-color: #2d3154; color: #475569; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .dlbc-main { flex-direction: column; }
    .dlbc-input-panel {
        width: 100%; max-width: none; min-width: 0;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .statusbar-hint { display: none; }
    .dlbc-stats { gap: 6px; }
}

@media (max-width: 640px) {
    .dlbc-input-panel { height: 180px; }
    .dlbc-container   { min-height: 520px; }
    .dlbc-toolbar     { gap: 5px; }
    .stat-num         { font-size: 14px; }
}

/* === 工具类 === */
.dlbc-hidden { display: none !important; }

/* 结果表空状态提示行 */
.result-table-placeholder {
    text-align: center;
    padding: 32px 20px;
    color: #94a3b8;
    font-size: 13px;
}
body.dark-mode .result-table-placeholder { color: #475569; }

/* 骨架行操作列占位 */
.skeleton-action-placeholder { color: #cbd5e1; font-size: 11px; }
body.dark-mode .skeleton-action-placeholder { color: #3d4270; }

/* Toast 通知 — 使用 CSS 类避免 JS 内联样式 */
.dlbc-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    padding: 10px 18px;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0,0,0,0.16);
    max-width: 380px;
    word-break: break-all;
    line-height: 1.5;
    pointer-events: none;
}
.dlbc-toast-success { background: #16a34a; }
.dlbc-toast-warning { background: #d97706; }
.dlbc-toast-error   { background: #dc2626; }

/* 复制输入内容按钮 */
.copy-input-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    background: #e0f2fe;
    border: none;
    border-radius: 4px;
    font-size: 11.5px;
    color: #0284c7;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, background 0.15s;
}
.copy-input-btn.is-visible { opacity: 1; pointer-events: auto; }
.copy-input-btn:hover { background: #bae6fd; }
body.dark-mode .copy-input-btn       { background: #1e3a4c; color: #38bdf8; }
body.dark-mode .copy-input-btn:hover { background: #1e4560; }

/* === 统计数字弹跳动画 === */
@keyframes dyc-num-pop {
    from { transform: scale(0.86); }
    50%  { transform: scale(1.07); }
    to   { transform: scale(1); }
}
.stat-num.num-pop {
    animation: dyc-num-pop 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* === 表格行状态色 === */
.result-table tr.row-ok td         { background: rgba(22,163,74,0.03); }
.result-table tr.row-ok:hover td   { background: rgba(22,163,74,0.08); }
.result-table tr.row-dead td       { background: rgba(220,38,38,0.04); }
.result-table tr.row-redirect td   { background: rgba(217,119,6,0.04); }
.result-table tr.row-timeout td    { background: rgba(159,18,57,0.05); }
.result-table tr.row-error td      { background: rgba(124,58,237,0.04); }
.result-table tr.row-dead:hover td       { background: rgba(220,38,38,0.09); }
.result-table tr.row-redirect:hover td   { background: rgba(217,119,6,0.09); }
.result-table tr.row-timeout:hover td    { background: rgba(159,18,57,0.09); }
.result-table tr.row-error:hover td      { background: rgba(124,58,237,0.09); }
body.dark-mode .result-table tr.row-dead td     { background: rgba(220,38,38,0.1); }
body.dark-mode .result-table tr.row-redirect td { background: rgba(217,119,6,0.1); }
body.dark-mode .result-table tr.row-timeout td  { background: rgba(159,18,57,0.1); }
body.dark-mode .result-table tr.row-error td    { background: rgba(124,58,237,0.1); }

/* === 死链告警条 === */
.dead-warning-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
    flex-shrink: 0;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dw-count    { font-weight: 700; font-size: 14px; }
body.dark-mode .dead-warning-bar  { background: #2e1010; border-color: #7f1d1d; color: #f87171; }

/* === Ctrl+Enter 快捷键提示 === */
.ael-shortcut-tip {
    font-size: 11px;
    color: #b0bec5;
    line-height: 1.5;
    margin-top: 2px;
}

/* === 周末暖色调主题 === */
body.is-weekend .dlbc-toolbar {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 55%, #b45309 100%);
    box-shadow: 0 2px 8px rgba(245,158,11,0.28);
}
body.is-weekend .toolbar-btn              { color: #92400e; }
body.is-weekend .toolbar-btn.btn-primary  { color: #92400e; }
body.is-weekend .toolbar-select           { color: #92400e; }
body.is-weekend .url-count-badge          { background: #fef3c7; color: #d97706; }
body.is-weekend .filter-input:focus       { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,0.12); }
body.is-weekend .progress-bar-fill        { background: linear-gradient(90deg, #fbbf24, #d97706); }
body.is-weekend .statusbar-dot.running    { background: #f59e0b; }
body.is-weekend .statusbar-dot.done       { background: #d97706; }
body.is-weekend .stat-item.stat-total     { color: #92400e; background: #fef3c7; }
body.dark-mode.is-weekend .dlbc-toolbar   { background: linear-gradient(135deg, #92400e 0%, #78350f 55%, #451a03 100%); box-shadow: 0 2px 8px rgba(120,53,15,0.4); }

/* ---------- 应用层全屏模式 ---------- */
.dlbc-container.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 999;
    border-radius: 0;
    height: 100vh;
    width: 100vw;
}
