/* public/assets/css/video/m3u-checker.css */

.chk-wrapper { padding: 32px; border-radius: var(--radius-lg); }
.chk-header { text-align: center; margin-bottom: 32px; }
.chk-title { font-size: 2rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; letter-spacing: -0.5px; }
.chk-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* 🌟 核心布局：改为上下布局 (垂直单列排列) */
.chk-workspace { display: flex; flex-direction: column; gap: 24px; max-width: 1200px; margin: 0 auto; }
.chk-panel { background: var(--bg-surface); padding: 24px; border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); display: flex; flex-direction: column; }
.chk-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chk-panel-title { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }

/* 表单与输入 */
.chk-textarea { width: 100%; height: 200px; padding: 14px; border: 1.5px solid var(--border-color); border-radius: 12px; font-size: 0.9rem; background: var(--bg-body); color: var(--text-main); outline: none; transition: 0.2s; box-sizing: border-box; resize: vertical; font-family: ui-monospace, monospace; line-height: 1.5; margin-bottom: 20px; }
.chk-textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15); }

.chk-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.chk-label { display: block; font-weight: 600; color: var(--text-main); font-size: 0.9rem; margin-bottom: 8px; }
.chk-range-group { display: flex; align-items: center; gap: 12px; background: var(--bg-body); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-color); }
.chk-range { -webkit-appearance: none; width: 100%; height: 4px; background: #e2e8f0; border-radius: 2px; outline: none; }
.chk-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-color); cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.chk-val-badge { background: rgba(var(--primary-rgb), 0.1); color: var(--primary-color); font-weight: bold; font-size: 0.85rem; padding: 2px 8px; border-radius: 6px; }

/* 按钮组 */
.chk-btn-group { display: flex; gap: 12px; }
.chk-btn-primary { flex: 1; background: var(--primary-color); color: #fff; border: none; padding: 14px; border-radius: 10px; font-size: 1.05rem; font-weight: bold; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.2); }
.chk-btn-primary:hover { transform: translateY(-2px); filter: brightness(1.1); }
.chk-btn-outline { flex: 1; background: var(--bg-body); border: 1.5px solid var(--border-color); color: var(--text-main); padding: 14px; border-radius: 10px; font-size: 1.05rem; font-weight: bold; cursor: pointer; transition: 0.2s; }
.chk-btn-outline:hover { background: rgba(0,0,0,0.03); }

/* 🌟 小型按钮样式 (修复清空按钮) */
.chk-btn-sm { background: var(--bg-body); color: var(--text-main); border: 1px solid var(--border-color); padding: 6px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.chk-btn-sm-danger { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
.chk-btn-sm-danger:hover { background: #fecaca; color: #b91c1c; border-color: #f87171; }

.chk-cors-note { font-size: 0.8rem; color: #f59e0b; margin-top: 16px; line-height: 1.5; background: rgba(245, 158, 11, 0.1); padding: 10px; border-radius: 8px; border: 1px dashed rgba(245, 158, 11, 0.3); }

/* 看板面板 */
.chk-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.chk-stat-card { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 12px; text-align: center; }
.chk-stat-num { font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; color: var(--text-main); transition: 0.3s; }
.chk-stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.text-green { color: #10b981; }
.text-red { color: #ef4444; }
.text-gray { color: #94a3b8; }

.chk-progress-bar { width: 100%; height: 8px; background: var(--bg-body); border-radius: 4px; overflow: hidden; border: 1px solid var(--border-color); margin-bottom: 20px; }
.chk-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary-color), #60a5fa); transition: width 0.3s ease; }

/* 频道列表 */
.chk-list-container { flex: 1 1 0; display: flex; flex-direction: column; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; min-height: 350px; }
.chk-list-header { display: flex; padding: 12px 16px; background: rgba(0,0,0,0.02); border-bottom: 1px solid var(--border-color); font-weight: 700; font-size: 0.9rem; color: var(--text-muted); }
.chk-col-name { flex: 1; min-width: 0; }
.chk-col-status { width: 100px; text-align: right; }

.chk-channel-list { flex: 1 1 0; overflow-y: auto; display: flex; flex-direction: column; max-height: 500px; }
.chk-channel-list::-webkit-scrollbar { width: 6px; }
.chk-channel-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.chk-empty-state { text-align: center; padding: 60px; color: var(--text-muted); font-size: 1rem; }

.chk-list-item { display: flex; padding: 14px 16px; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; align-items: center; transition: 0.2s; }
.chk-list-item:hover { background: rgba(0,0,0,0.01); }
.chk-item-info { flex: 1; min-width: 0; }
.chk-item-name { font-weight: 600; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.chk-item-url { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: monospace; }

.chk-status-badge { width: 100px; text-align: right; font-weight: bold; font-size: 0.85rem; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.st-wait { color: #94a3b8; }
.st-check { color: #3b82f6; animation: blink 1s infinite alternate; }
.st-alive { color: #10b981; }
.st-dead { color: #ef4444; }
@keyframes blink { from { opacity: 0.5; } to { opacity: 1; } }

/* 导出区 */
.chk-export-box { margin-top: 24px; padding-top: 24px; border-top: 1px dashed var(--border-color); animation: chkFadeIn 0.4s; }
.chk-btn-group-sm { display: flex; gap: 12px; }
.chk-btn-outline-sm { flex: 1; background: var(--bg-body); border: 1.5px solid var(--border-color); color: var(--text-main); padding: 12px; border-radius: 10px; font-size: 0.95rem; font-weight: bold; cursor: pointer; transition: 0.2s; }
.chk-btn-outline-sm:hover { background: rgba(0,0,0,0.03); }
.chk-btn-success-sm { flex: 2; background: #10b981; color: #fff; border: none; padding: 12px; border-radius: 10px; font-size: 0.95rem; font-weight: bold; cursor: pointer; transition: 0.3s; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.chk-btn-success-sm:hover { background: #059669; transform: translateY(-2px); }

/* SEO Blocks */
.chk-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1200px; margin: 0 auto; }
.chk-info-card { background: var(--bg-surface); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); }
.chk-info-card h3 { color: var(--text-main); font-size: 1.15rem; margin-bottom: 16px; }
.chk-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.chk-list li { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 768px) {
    .chk-settings-grid { grid-template-columns: 1fr; }
    .chk-stats-row { grid-template-columns: 1fr 1fr; }
    .chk-info-grid { grid-template-columns: 1fr; }
}

/* 深色模式 */
[data-theme="dark"] .chk-panel, [data-theme="dark"] .chk-info-card { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .chk-textarea, [data-theme="dark"] .chk-range-group { background: #0f172a; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .chk-stat-card, [data-theme="dark"] .chk-list-container { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .chk-list-header { background: rgba(255,255,255,0.02); border-color: #334155; }
[data-theme="dark"] .chk-list-item { border-color: #334155; }
[data-theme="dark"] .chk-list-item:hover { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .chk-progress-bar { background: #0f172a; border-color: #334155; }
[data-theme="dark"] .chk-btn-outline, [data-theme="dark"] .chk-btn-outline-sm { background: #0f172a; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .chk-btn-outline:hover, [data-theme="dark"] .chk-btn-outline-sm:hover { background: #1e293b; border-color: #94a3b8; }
[data-theme="dark"] .chk-btn-sm { background: #0f172a; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .chk-btn-sm-danger { background: rgba(239,68,68,0.1); color: #f87171; border-color: rgba(239,68,68,0.3); }
[data-theme="dark"] .chk-btn-sm-danger:hover { background: rgba(239,68,68,0.2); }
[data-theme="dark"] .chk-range { background: #334155; }