/* =========================================================
   公共基础布局
   ========================================================= */
.nettv-tool-page{padding:24px;display:flex;flex-direction:column;gap:20px;max-width:1400px;margin:0 auto;width:100%;box-sizing:border-box}

/* 面包屑 */
.tool-breadcrumb{display:flex;align-items:center;gap:8px;font-size:13px;color:#8F959E;flex-wrap:wrap}
.tool-breadcrumb a{color:#8F959E;transition:color .2s ease}
.tool-breadcrumb a:hover{color:#E50914}
.tool-breadcrumb .sep{color:#D1D5DB}
.tool-breadcrumb .current{color:#4E5969;font-weight:500}

/* 页面标题 */
.tool-page-head{background:#FFF;border:1px solid #E5E6EB;border-radius:8px;padding:20px 24px;box-shadow:0 1px 3px rgba(0,0,0,.04);transition:background-color .3s ease,border-color .3s ease}
.tool-page-head h1{font-size:22px;font-weight:700;color:#1F2329;margin-bottom:6px;line-height:1.35}
.tool-page-head p{font-size:13px;color:#8F959E;line-height:1.6}

/* 双栏网格 */
.tool-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
.tool-col-main,.tool-col-side,.tool-side-col{display:flex;flex-direction:column;gap:20px;min-width:0}

/* 卡片 */
.tool-card{background:#FFF;border:1px solid #E5E6EB;border-radius:8px;box-shadow:0 1px 3px rgba(0,0,0,.04);overflow:hidden;transition:background-color .3s ease,border-color .3s ease}
.tool-card-head{padding:16px 20px;border-bottom:1px solid #F2F4F7;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;transition:border-color .3s ease}
.tool-card-head h2{font-size:15px;font-weight:600;color:#1F2329;display:flex;align-items:center;gap:8px;margin:0}
.tool-card-head h2 svg{width:16px;height:16px;fill:#8F959E;flex-shrink:0}
.tool-card-head .hint{font-size:12px;color:#8F959E;margin:0;flex-basis:100%;line-height:1.6}
.tool-card-body{padding:20px}

/* 区块标题通用 */
.area-title,.tool-section-title,.section-title{font-size:13.5px;font-weight:600;color:#1F2329;margin-bottom:10px;display:flex;align-items:center;gap:6px}
.area-title::before,.tool-section-title::before,.section-title::before{content:'';width:3px;height:14px;border-radius:2px;background:#E50914;flex-shrink:0}
.area-title.input::before,.input-title::before,.input-group .area-title::before,.input-section h2::before{background:#3B82F6}
.area-title.output::before,.output-title::before,.output-group .area-title::before,.output-section h2::before{background:#00A870}
.area-hint,.tool-form-hint{font-size:12px;color:#8F959E;line-height:1.65;margin:0 0 10px}
.tool-section-title .sub-note{font-weight:400;color:#8F959E;font-size:12px;margin-left:4px}

/* 说明列表 */
.tool-help-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px;font-size:13px;color:#4E5969;line-height:1.75}
.tool-help-list li{position:relative;padding-left:16px}
.tool-help-list li::before{content:'';position:absolute;left:2px;top:9px;width:5px;height:5px;border-radius:50%;background:#E50914;flex-shrink:0}
.tool-help-list strong{color:#1F2329;font-weight:600}
.tool-help-list code,.tool-desc code{font-family:'Menlo','Consolas',monospace;font-size:12px;padding:1px 6px;background:#F2F4F7;border-radius:4px;color:#E50914}
.tool-help-list a,.tool-link-hint a{color:#E50914;font-weight:500;text-decoration:underline;text-underline-offset:2px}
.tool-help-list a:hover,.tool-link-hint a:hover{color:#C40812}
.tool-help-list ul{list-style:none;padding:0;margin:6px 0 0;display:flex;flex-direction:column;gap:4px}
.tool-help-list ul li{padding-left:12px;font-size:12.5px;color:#8F959E}
.tool-help-list ul li::before{width:4px;height:4px;background:#D1D5DB;top:8px;left:1px}

/* 广告位 */
.tool-ad-body{display:flex;align-items:center;justify-content:center;min-height:120px;color:#8F959E;font-size:13px;text-align:center}

/* 通用提示 */
.tool-desc{font-size:13px;color:#4E5969;line-height:1.8;margin:0 0 12px}
.tool-desc strong{color:#1F2329;font-weight:600}
.tool-link-hint{margin-top:14px;font-size:12.5px;color:#8F959E;line-height:1.7}
.tool-footer-note{font-size:12px;color:#8F959E;line-height:1.7;padding-top:14px;margin-top:16px;border-top:1px solid #F2F4F7;transition:border-color .3s ease}

/* =========================================================
   国家列表 / 搜索 / 字母筛选
   ========================================================= */
.search-wrapper{margin-bottom:16px}
.tool-card-body {margin:0}
.tool-card-body .uk-inline{position:relative;display:block;width:100%}
.tool-card-body .uk-form-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:15px;color:#8F959E;pointer-events:none;z-index:1;display:inline-flex;align-items:center}
.uk-form-icon svg{width:18px;height:18px;fill:var(--c-text-3)}
#search-country,.search-input{width:100%;padding:11px 14px 11px 40px;font-size:14px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box;font-family:inherit}
#search-country:focus,.search-input:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
#search-country::placeholder,.search-input::placeholder{color:#A9AFB8}
.letter-filter{padding-top:14px;border-top:1px solid #F2F4F7;transition:border-color .3s ease}
.letter-container{display:flex;flex-wrap:wrap;gap:6px}
.letter-btn{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:32px;padding:0 12px;font-size:12.5px;font-weight:500;color:#4E5969;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:6px;cursor:pointer;transition:all .2s ease;font-family:inherit;white-space:nowrap}
.letter-btn:hover{background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
.letter-btn.active{background:#E50914;border-color:#E50914;color:#FFF;font-weight:600}
.country-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-top:18px}
.country-grid>*{padding:12px 14px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;font-size:13px;line-height:1.65;color:#1F2329;transition:all .2s ease;word-break:break-word;position:relative}
.country-grid>*:hover{background:#F2F4F7;border-color:#D1D5DB}
.country-grid code{font-family:'Menlo','Consolas',monospace;font-size:12px;padding:1px 6px;background:#FFF;border:1px solid #E5E6EB;border-radius:4px;color:#E50914}
.flag{width:4rem;height:auto;border-radius:.375rem;object-fit:cover;border:1px solid #e2e8f0;flex-shrink:0;position:absolute;right:10px;top:9px}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 20px;margin-top:18px;color:#8F959E;font-size:13px;background:#FFF;border:1px dashed #D1D5DB;border-radius:8px;text-align:center;transition:background-color .3s ease,border-color .3s ease}
.empty-state.hidden{display:none}
.empty-state .empty-icon{opacity:.5;padding:20px}
.empty-state .empty-text{margin:0}
.country-name{font-weight:600;font-size:16px}

/* =========================================================
   频道提取 / 播放器
   ========================================================= */
.input-section{position:relative}
.input-label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;color:#4E5969;margin-bottom:8px}
.input-label svg{width:14px;height:14px;fill:#8F959E}
.input-wrapper{display:flex;gap:10px;flex-wrap:wrap}
.channel-input{flex:1;min-width:0;padding:10px 14px;font-size:13.5px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box;font-family:inherit}
.channel-input:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.channel-input::placeholder{color:#A9AFB8}
.fetch-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border-radius:8px;font-size:13.5px;font-weight:500;border:none;cursor:pointer;background:#E50914;color:#FFF;transition:all .2s ease;white-space:nowrap;font-family:inherit;flex-shrink:0}
.fetch-btn:hover:not(:disabled){background:#C40812}
.fetch-btn:disabled{background:#F0A3A8;cursor:not-allowed}
.loading-overlay{display:none;position:absolute;inset:0;background:rgba(255,255,255,.9);border-radius:8px;padding:24px;text-align:center;z-index:5;transition:background-color .3s ease}
.loading-overlay .spinner{width:40px;height:40px;border:3px solid #F2F4F7;border-top-color:#E50914;border-radius:50%;animation:nettvSpin .8s linear infinite;margin:0 auto 14px}
.loading-overlay h3{font-size:14px;font-weight:600;color:#1F2329;margin:0 0 4px}
.loading-overlay p{font-size:12.5px;color:#8F959E;margin:0}
@keyframes nettvSpin{to{transform:rotate(360deg)}}
.status-box{display:none;margin-top:14px;padding:12px 16px;border-radius:8px;font-size:13px;line-height:1.7;border:1px solid;transition:all .2s ease}
.status-box h3{font-size:13px;font-weight:600;margin:0 0 4px;display:flex;align-items:center;gap:6px}
.status-box p{margin:0}
.status-box.error-box{background:#FFF1F0;border-color:#FCA5A5;color:#B91C1C}
.status-box.success-box{background:#ECFDF5;border-color:#A7F3D0;color:#065F46}
.channel-infos{margin-top:20px}
.info-card{background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;padding:16px;transition:background-color .3s ease,border-color .3s ease}
.info-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed #EEF0F3;flex-wrap:wrap}
.info-row:last-of-type{border-bottom:none}
.info-label{font-size:12.5px;font-weight:500;color:#8F959E;display:flex;align-items:center;gap:6px;min-width:90px}
.info-label svg{width:13px;height:13px;fill:currentColor}
.info-value{font-size:13px;color:#1F2329;font-weight:500;word-break:break-all;text-align:right;flex:1;min-width:0;font-family:'Menlo','Consolas',monospace}
#channelName{font-family:inherit}
.channel-id-box{display:inline-block;padding:4px 10px;background:#FFF;border:1px solid #E5E6EB;border-radius:6px;font-family:'Menlo','Consolas',monospace;font-size:12.5px;color:#E50914;font-weight:600;max-width:100%;overflow-x:auto;white-space:nowrap;transition:background-color .3s ease,border-color .3s ease}
#channelUrl{font-size:12.5px;color:#3B82F6}
.action-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid #EEF0F3}
.action-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:7px 14px;border-radius:6px;font-size:12.5px;font-weight:500;border:1px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.action-btn svg,.action-btn i{width:13px;height:13px;font-size:12px;line-height:1}
.action-btn.copy-btn{background:#FFF;color:#00A870;border-color:#A7F3D0}
.action-btn.copy-btn:hover{background:#ECFDF5;border-color:#00A870}
.action-btn.open-btn{background:#FFF;color:#3B82F6;border-color:#BFDBFE}
.action-btn.open-btn:hover{background:#EFF6FF;border-color:#3B82F6}
.action-btn.test-btn{background:#1F2329;color:#FFF}
.action-btn.test-btn:hover{background:#333A42}
.examples{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.example-tag{padding:4px 10px;font-size:12px;color:#4E5969;background:#F2F4F7;border-radius:4px;cursor:pointer;transition:all .2s ease}
.example-tag:hover{background:#FFF1F0;color:#E50914}
.player-url-section{margin-bottom:16px}
.player-url-label{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;font-size:13px;font-weight:500;color:#4E5969;margin-bottom:8px}
.player-url-label svg{width:14px;height:14px;fill:#8F959E}
.player-url-label small{font-size:11.5px;color:#8F959E;font-weight:400}
.player-url-input-group{display:flex;gap:10px;flex-wrap:wrap}
.player-url-input{flex:1;min-width:0;padding:10px 14px;font-family:'Menlo','Consolas',monospace;font-size:13px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box}
.player-url-input:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.player-url-input::placeholder{color:#A9AFB8}
.player-test-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border-radius:8px;font-size:13.5px;font-weight:500;border:none;cursor:pointer;background:#3B82F6;color:#FFF;transition:all .2s ease;white-space:nowrap;font-family:inherit;flex-shrink:0}
.player-test-btn:hover{background:#2563EB}
.player-container{position:relative;aspect-ratio:16/9;background:#000;border-radius:8px;overflow:hidden}
.player-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;color:#FFF;padding:20px;background:#1F2329}
.player-placeholder p{margin:0;font-size:13px;color:#B0B3B8;line-height:1.6}
.player-frame{width:100%;height:100%;border:none;display:block;background:#000}

/* =========================================================
   UIkit 覆盖 / 批量结果 / 时间戳
   ========================================================= */
.nettv-tool-page .uk-textarea,.nettv-tool-page .uk-input{width:100%;padding:10px 12px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box}
.nettv-tool-page .uk-textarea:focus,.nettv-tool-page .uk-input:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.nettv-tool-page .uk-input[readonly]{background:#F8F9FA}
.nettv-tool-page .uk-form-label{font-size:12.5px;font-weight:500;color:#4E5969;margin-bottom:6px;display:block}
.nettv-tool-page .uk-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 18px;border-radius:8px;font-size:13px;font-weight:500;border:1px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit;min-height:38px;box-sizing:border-box;text-transform:none}
.nettv-tool-page .uk-button-primary{background:#E50914;color:#FFF}
.nettv-tool-page .uk-button-primary:hover{background:#C40812}
.nettv-tool-page .uk-button-secondary{background:#3B82F6;color:#FFF}
.nettv-tool-page .uk-button-secondary:hover{background:#2563EB}
.nettv-tool-page .uk-button-default{background:#FFF;color:#4E5969;border-color:#E5E6EB}
.nettv-tool-page .uk-button-default:hover{background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
.nettv-tool-page .uk-button-danger{background:#FFF;color:#E50914;border-color:#F0A3A8}
.nettv-tool-page .uk-button-danger:hover{background:#FFF1F0;border-color:#E50914}
.nettv-tool-page .uk-button-small{padding:5px 12px;font-size:12px;min-height:30px}
.nettv-tool-page .uk-tab{display:flex;flex-wrap:wrap;gap:4px;padding:3px;margin:0 0 14px;list-style:none;background:#F2F4F7;border-radius:8px;border-bottom:none}
.nettv-tool-page .uk-tab::before{display:none}
.nettv-tool-page .uk-tab>li{flex:1;margin:0;padding:0}
.nettv-tool-page .uk-tab>li>a{display:flex;align-items:center;justify-content:center;gap:5px;padding:7px 12px;font-size:12.5px;font-weight:500;color:#4E5969;border-radius:6px;text-decoration:none;text-transform:none;transition:all .2s ease;border:none!important;position:relative;white-space:nowrap}
.nettv-tool-page .uk-tab>li>a:hover{color:#1F2329}
.nettv-tool-page .uk-tab>li.uk-active>a{background:#FFF;color:#E50914;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.nettv-tool-page .uk-tab>li.uk-active>a::before,.nettv-tool-page .uk-tab>li.uk-active>a::after{display:none}
.nettv-tool-page .uk-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;padding:1px 7px;font-size:11px;font-weight:600;border-radius:10px;background:#E50914;color:#FFF;line-height:1.6;margin-left:2px}
.nettv-tool-page .uk-badge:empty{display:none}
.nettv-tool-page .uk-badge-success{background:#00A870}
.nettv-tool-page .uk-badge-warning{background:#F59E0B}
.nettv-tool-page .uk-alert-primary,.nettv-tool-page .uk-alert-success,.nettv-tool-page .uk-alert-warning,.nettv-tool-page .uk-alert-danger{padding:12px 16px;border-radius:8px;border:1px solid;font-size:13px;line-height:1.7;margin:12px 0}
.nettv-tool-page .uk-alert-primary{background:#EFF6FF;border-color:#BFDBFE;color:#1E40AF}
.nettv-tool-page .uk-alert-success{background:#ECFDF5;border-color:#A7F3D0;color:#065F46}
.nettv-tool-page .uk-alert-warning{background:#FFFBEB;border-color:#FDE68A;color:#92400E}
.nettv-tool-page .uk-alert-danger{background:#FFF1F0;border-color:#FCA5A5;color:#B91C1C}
.nettv-tool-page .uk-alert p{margin:0}
.nettv-tool-page .uk-alert h4{font-size:13.5px;font-weight:600;margin:0 0 8px;color:inherit}
#batchResults,#singleResult{display:flex;flex-direction:column;gap:12px}
#summary{margin-top:14px}
.nettv-tool-page .uk-placeholder{padding:36px 20px;text-align:center;background:#F8F9FA;border:1px dashed #D1D5DB;border-radius:8px;color:#8F959E;font-size:13px;margin:0}
.nettv-tool-page .uk-placeholder p{margin:8px 0 0}
.result-item{background:#F8F9FA;border:1px solid #E5E6EB;border-left:3px solid #3B82F6;border-radius:8px;padding:14px 16px;font-size:13px;line-height:1.7}
.result-item.expired{border-left-color:#E50914}
.result-item.future{border-left-color:#00A870}
.result-item.no-timestamp{border-left-color:#D1D5DB}
.timestamp-detail{padding:10px 12px;background:#FFF;border:1px solid #E5E6EB;border-radius:6px;margin-top:8px}
.timestamp-detail code,.timestamp-highlight{font-family:'Menlo','Consolas',monospace;font-size:12px}
.timestamp-highlight{background:#FEF3C7;color:#92400E;padding:1px 4px;border-radius:3px;font-weight:500}
.time-ago{display:inline-block;padding:2px 9px;font-size:11.5px;font-weight:500;border-radius:4px;margin-left:6px}
.time-ago.past{color:#E50914;background:#FFF1F0}
.time-ago.future{color:#00A870;background:#ECFDF5}
.nettv-tool-page .uk-label{display:inline-flex;align-items:center;padding:1px 8px;font-size:11.5px;font-weight:500;border-radius:4px;background:#F2F4F7;color:#4E5969;margin-right:4px;line-height:1.6}
.nettv-tool-page .uk-label-success{background:#ECFDF5;color:#00A870}
.nettv-tool-page .uk-label-warning{background:#FFFBEB;color:#F59E0B}
.summary-card{padding:16px 12px;border-radius:8px;color:#FFF;text-align:center}
.summary-card .uk-text-large{font-size:22px;font-weight:700;line-height:1.3}
.summary-card .uk-text-small{font-size:12px;opacity:.9}
.nettv-tool-page .uk-card-default{background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;transition:background-color .3s ease,border-color .3s ease}
.nettv-tool-page .uk-card-body{padding:14px 16px}
.nettv-tool-page .uk-text-small{font-size:12px;color:#8F959E}
.nettv-tool-page .uk-text-meta{font-size:11.5px;color:#8F959E}
.nettv-tool-page .uk-text-large{font-size:18px}
.nettv-tool-page .uk-text-bold{font-weight:600}
.nettv-tool-page .uk-text-danger{color:#E50914}
.nettv-tool-page .uk-text-success{color:#00A870}
.nettv-tool-page .uk-text-break{word-break:break-all;font-family:'Menlo','Consolas',monospace;font-size:12px;line-height:1.65}
.nettv-tool-page code{font-family:'Menlo','Consolas',monospace;font-size:12px;padding:1px 6px;background:#F2F4F7;border-radius:4px;color:#E50914;word-break:break-all}
.nettv-tool-page .uk-text-meta code,.nettv-tool-page .uk-text-small code{color:#E50914}
.nettv-tool-page .uk-list-divider>li{padding:8px 0;border-bottom:1px solid #F2F4F7;font-size:12.5px;color:#4E5969;line-height:1.7}
.nettv-tool-page .uk-list-divider>li:last-child{border-bottom:none}
.nettv-tool-page .uk-list-divider>li strong{color:#1F2329}
.nettv-tool-page .uk-grid-small{margin-left:-8px}
.nettv-tool-page .uk-grid-small>*{padding-left:8px}
.nettv-tool-page .uk-margin{margin-top:16px}
.nettv-tool-page .uk-margin-small-top{margin-top:8px}
.nettv-tool-page .uk-margin-top{margin-top:16px}
.nettv-tool-page .uk-inline{position:relative;display:inline-block;width:100%}
.nettv-tool-page .uk-form-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:14px;color:#8F959E;pointer-events:none;z-index:1}
.nettv-tool-page .uk-form-icon+.uk-input{padding-left:36px}
.nettv-tool-page .datetime-input input{font-family:inherit;font-size:13px}
.uk-notification-message{border-radius:8px!important;box-shadow:0 8px 24px rgba(0,0,0,.25)!important;font-size:13px!important;padding:12px 18px!important;font-family:inherit!important}
.uk-notification-message-primary{background:#1E40AF!important;color:#FFF!important}
.uk-notification-message-success{background:#008F5F!important;color:#FFF!important}
.uk-notification-message-warning{background:#F59E0B!important;color:#FFF!important}
.uk-notification-message-danger{background:#E50914!important;color:#FFF!important}

/* =========================================================
   二维码工具
   ========================================================= */
.form-group{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.form-group:last-child{margin-bottom:0}
.form-group label{font-size:12.5px;font-weight:500;color:#4E5969}
#qr-content{width:100%;padding:12px 14px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;resize:vertical;min-height:100px;transition:all .2s ease;box-sizing:border-box}
#qr-content:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}

.options .form-group{margin-bottom:0}
#qr-color,#qr-bgcolor{width:100%;height:38px;padding:2px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;cursor:pointer;transition:all .2s ease}
#qr-color:hover,#qr-bgcolor:hover{border-color:#D1D5DB}
#qr-color:focus,#qr-bgcolor:focus{outline:none;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
#qr-color::-webkit-color-swatch-wrapper,#qr-bgcolor::-webkit-color-swatch-wrapper{padding:2px}
#qr-color::-webkit-color-swatch,#qr-bgcolor::-webkit-color-swatch{border:none;border-radius:4px}
#qr-size,#qr-errorlevel{width:100%;padding:9px 12px;font-size:13px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box;font-family:inherit}
#qr-size:focus,#qr-errorlevel:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
#generate-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:11px 24px;border-radius:8px;font-size:13.5px;font-weight:500;border:none;cursor:pointer;background:#E50914;color:#FFF;transition:all .2s ease;font-family:inherit}
#generate-btn:hover{background:#C40812}
.output-section{display:flex;flex-direction:column;align-items:center;gap:14px;padding-top:20px;margin-top:20px;border-top:1px solid #F2F4F7;transition:border-color .3s ease}
#qrcode{display:flex;align-items:center;justify-content:center;min-width:260px;min-height:260px;padding:16px;background:#FFF;border:2px dashed #E5E6EB;border-radius:12px;transition:all .3s ease}
#qrcode img,#qrcode canvas{display:block;max-width:100%;height:auto}
#qrcode p{font-size:13px;color:#8F959E;text-align:center;margin:0}
#download-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 28px;border-radius:8px;font-size:13px;font-weight:500;border:none;cursor:pointer;background:#00A870;color:#FFF;transition:all .2s ease;font-family:inherit}
#download-btn:hover:not(:disabled){background:#008F5F}
#download-btn:disabled{background:#F8F9FA;color:#C9CDD4;cursor:not-allowed}
.tool-help-list{counter-reset:help-counter}
.tool-help-list li{counter-increment:help-counter}
.tool-help-list li::before{content:counter(help-counter);width:18px;height:18px;border-radius:50%;background:#FFF1F0;color:#E50914;font-size:11px;font-weight:600;display:flex;align-items:center;justify-content:center;line-height:1;top:2px;left:0}
.tool-help-list li{padding-left:26px}

/* =========================================================
   去重 / 重复检测工具
   ========================================================= */
.input-area{width:100%;min-height:180px;padding:12px 14px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;resize:vertical;transition:all .2s ease;box-sizing:border-box}
.input-area:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.button-group{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px;justify-content: center;}
.button-group button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 20px;border-radius:8px;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.detect-btn{background:#E50914;color:#FFF}
.detect-btn:hover{background:#C40812}
.repeat-duplicates-btn{background:#FFF;color:#E50914;border-color:#F0A3A8}
.repeat-duplicates-btn:hover{background:#FFF1F0;border-color:#E50914}
.down-duplicates-btn,.clear-btn{background:#FFF;color:#4E5969;border-color:#E5E6EB}
.down-duplicates-btn:hover,.clear-btn:hover{background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}
.stat-item{background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;padding:14px 12px;text-align:center;transition:background-color .3s ease,border-color .3s ease}
.stat-value{font-size:22px;font-weight:700;color:#E50914;line-height:1.2;margin-bottom:4px}
.stat-label{font-size:12px;color:#8F959E}
 .stat-badge {
            display: inline-flex;
            align-items: center;
            padding: 1px 8px;
            font-size: 12px;
            font-weight: 600;
            color: #4E5969;
            background-color: #F2F4F7;
            border-radius: 4px;
            min-width: 24px;
            justify-content: center;
            line-height: 1.6;
        }
.tabs{display:inline-flex;background:#F2F4F7;border-radius:8px;padding:3px;gap:2px;margin-bottom:14px;transition:background-color .3s ease}
.tab{padding:6px 16px;font-size:12.5px;font-weight:500;color:#4E5969;border-radius:6px;cursor:pointer;transition:all .2s ease;white-space:nowrap;user-select:none}
.tab:hover{color:#1F2329}
.tab.active{background:#FFF;color:#E50914;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.tab-content{display:none}
.tab-content.active{display:block}
.duplicate-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.duplicate-list li{padding:10px 14px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:6px;font-size:13px;color:#1F2329;word-break:break-all;line-height:1.6;transition:background-color .3s ease,border-color .3s ease}
.duplicate-list li:hover{background:#F2F4F7}
.duplicate-list li.duplicate-item{border-left:3px solid #E50914}
#no-duplicates,#no-unique,#no-clean{text-align:center;padding:32px 20px;color:#8F959E!important;font-size:13px}
.result-section{margin-top:22px;padding-top:20px;border-top:1px solid #F2F4F7;transition:border-color .3s ease}
.notification{position:fixed;left:50%;bottom:40px;transform:translate(-50%,16px);background:#1F2329;color:#FFF;font-size:13px;padding:12px 22px;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.25);opacity:0;visibility:hidden;transition:all .28s ease;z-index:9999;max-width:calc(100vw - 40px);text-align:center}
.notification.show{opacity:1;visibility:visible;transform:translate(-50%,0)}

/* =========================================================
   文本处理 / 替换 / 编码工具
   ========================================================= */
.dual-panel{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.panel{display:flex;flex-direction:column;min-width:0}
.panel-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.panel-header h2{font-size:13.5px;font-weight:600;color:#1F2329;display:flex;align-items:center;gap:6px;margin:0}
.panel-header h2::before{content:'';width:3px;height:14px;border-radius:2px;flex-shrink:0}
.panel-original .panel-header h2::before{background:#3B82F6}
.panel-processed .panel-header h2::before{background:#00A870}
.counter{font-size:12px;color:#8F959E;white-space:nowrap}
.counter span{display:inline-block;padding:1px 7px;background:#F2F4F7;border-radius:4px;color:#4E5969;font-weight:600;font-size:11.5px;margin-left:2px;min-width:20px;text-align:center}
.tool-tip{font-size:11.5px;color:#8F959E;font-weight:400}
.textarea-container{position:relative}
#originalText,#processedText,#inputText,#outputText,#linkInput,#sourceInput,#text-input,#sourceText,#resultText,#text-area{width:100%;padding:12px 14px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;resize:vertical;min-height:200px;transition:all .2s ease;box-sizing:border-box}
#text-input,#sourceText,#resultText{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Microsoft YaHei",sans-serif;font-size:14px;line-height:1.75}
#originalText:focus,#inputText:focus,#linkInput:focus,#sourceInput:focus,#text-input:focus,#sourceText:focus,#text-area:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
#processedText:not([readonly]):focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
#processedText[readonly],#outputText[readonly],#resultText[readonly],#result[readonly]{background:#F8F9FA}
.text-info{font-size:11.5px;color:#8F959E;margin-top:6px}
.result-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.result-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 18px;border-radius:8px;font-size:13px;font-weight:500;border:1px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.result-actions button svg,.result-actions button i{width:14px;height:14px;font-size:13px;line-height:1}
#copyBtn:hover:not(:disabled){background:#008F5F}
#copyBtn:disabled{background:#F8F9FA;color:#C9CDD4;cursor:not-allowed}
#enableEditBtn{background:#3B82F6;color:#FFF}
#enableEditBtn:hover{background:#2563EB}
#clearProcessedBtn{background:#FFF;color:#F59E0B;border-color:#FCD34D}
#clearProcessedBtn:hover{background:#FFFBEB;border-color:#F59E0B}
.setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.setting-block{padding:0}
.setting-block h3{font-size:13.5px;font-weight:600;color:#1F2329;margin:0 0 12px;display:flex;align-items:center;gap:6px}
.setting-block h3 svg{width:15px;height:15px;fill:#8F959E}
.checkbox-grid{display:flex;flex-direction:column;gap:8px}
.checkbox-grid label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:#4E5969;line-height:1.6;cursor:pointer;padding:5px 0}
.checkbox-grid input[type="checkbox"]{appearance:none;-webkit-appearance:none;width:16px;height:16px;flex-shrink:0;border:1.5px solid #D1D5DB;border-radius:4px;background:#FFF;cursor:pointer;position:relative;transition:all .2s ease;margin:0}
.checkbox-grid input[type="checkbox"]:checked{background:#E50914;border-color:#E50914}
.checkbox-grid input[type="checkbox"]:checked::after{content:'';position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid #FFF;border-width:0 1.8px 1.8px 0;transform:rotate(45deg)}
.checkbox-grid input[type="checkbox"]:focus-visible{box-shadow:0 0 0 3px rgba(229,9,20,.18)}
.action-group{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.action-group button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:11px 20px;border-radius:8px;font-size:13px;font-weight:500;border:1px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.action-group button svg,.action-group button i{width:15px;height:15px;font-size:14px;line-height:1}
#processBtn{background:#E50914;color:#FFF}
#processBtn:hover{background:#C40812}
#clearAllBtn{background:#FFF;color:#E50914;border-color:#F0A3A8}
#clearAllBtn:hover{background:#FFF1F0;border-color:#E50914}
#exampleBtn{background:#FFF;color:#4E5969;border-color:#E5E6EB}
#exampleBtn:hover{background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
.tip-box{padding:12px 14px;background:#EFF6FF;border:1px solid #BFDBFE;border-radius:8px;transition:background-color .3s ease,border-color .3s ease}
.tip-box h4{font-size:12.5px;font-weight:600;color:#1E40AF;margin:0 0 6px;display:flex;align-items:center;gap:5px}
.tip-box h4 svg{width:13px;height:13px;fill:currentColor}
.tip-box p{font-size:12px;color:#1E40AF;line-height:1.7;margin:0 0 4px;opacity:.9}
.tip-box p:last-child{margin-bottom:0}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.stat-value{font-size:24px;font-weight:700;color:#E50914;line-height:1.2;margin-bottom:4px;word-break:break-all}
.stat-label{font-size:11.5px;color:#8F959E;line-height:1.5}
#notification{position:fixed;left:50%;bottom:40px;transform:translate(-50%,20px);display:flex;align-items:stretch;background:#1F2329;color:#FFF;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.25);opacity:0;visibility:hidden;transition:all .28s ease;z-index:9999;max-width:calc(100vw - 40px);overflow:hidden;min-width:280px}
#notification.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
#notification.success{background:#065F46}
#notification.error{background:#B91C1C}
#notification.info{background:#1E40AF}
.notification-content{display:flex;align-items:center;gap:12px;padding:12px 16px;flex:1}
.notification-icon{width:22px;height:22px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.notification-icon svg,.notification-icon i{width:18px;height:18px;font-size:16px;line-height:1}
.notification-text{flex:1;min-width:0}
.notification-title{font-size:12px;font-weight:600;opacity:.85;margin-bottom:2px}
#notificationMessage{font-size:13px;line-height:1.5}
.notification-close{background:transparent;border:none;color:rgba(255,255,255,.7);font-size:18px;width:32px;flex-shrink:0;cursor:pointer;transition:color .2s ease;font-family:inherit;padding:0}
.notification-close:hover{color:#FFF}

/* =========================================================
   m3u8 / 链接转换
   ========================================================= */
.input-group{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.input-group:last-child{margin-bottom:0}
.input-group label{font-size:12.5px;font-weight:500;color:#4E5969}
#videoUrl,#fileName{width:100%;padding:9px 12px;font-size:13px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box;font-family:inherit}
#videoUrl:focus,#fileName:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
#videoUrl::placeholder,#fileName::placeholder{color:#A9AFB8}
.filename-input{position:relative}
.filename-input #fileName{padding-right:62px}
.filename-input>span{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:13px;font-family:'Menlo','Consolas',monospace;color:#8F959E;pointer-events:none}
.generate-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:11px 24px;border-radius:8px;font-size:13.5px;font-weight:500;border:none;cursor:pointer;background:#E50914;color:#FFF;transition:all .2s ease;font-family:inherit;margin-top:6px}
.generate-btn:hover{background:#C40812}
#result{margin-top:22px;padding-top:20px;border-top:1px solid #F2F4F7;transition:border-color .3s ease}
#result h3{font-size:13.5px;font-weight:600;color:#1F2329;margin:0 0 10px;display:flex;align-items:center;gap:6px}
#result h3::before{content:'';width:3px;height:14px;border-radius:2px;background:#00A870;flex-shrink:0}
#m3u8Content{width:100%;padding:12px 14px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;resize:vertical;min-height:140px;transition:all .2s ease;box-sizing:border-box}
#m3u8Content[readonly]{background:#F8F9FA}
.result-actions button svg{width:14px;height:14px;fill:currentColor;flex-shrink:0}
.copy-btn{background:#00A870;color:#FFF}
.copy-btn:hover{background:#008F5F}
    .copy-btn.visible {
        opacity: 1;
        visibility: visible;
    }
#directLink{display:inline-flex;align-items:center;gap:6px;padding:9px 18px;border-radius:8px;font-size:13px;font-weight:500;color:#E50914;background:#FFF;border:1px solid #F0A3A8;text-decoration:none;transition:all .2s ease;white-space:nowrap;min-height:38px;box-sizing:border-box}
#directLink:empty{display:none}
#directLink:hover{background:#FFF1F0;border-color:#E50914}
#directLink a{color:inherit;text-decoration:none}
#result>p{font-size:13px;font-weight:600;color:#4E5969;margin:16px 0 8px}
#result>ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:12.5px;color:#8F959E;line-height:1.7}
#result>ol li code{font-family:'Menlo','Consolas',monospace;font-size:12px;padding:1px 6px;background:#F2F4F7;border-radius:4px;color:#E50914}
.control-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:16px 0;padding:14px 16px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;transition:background-color .3s ease,border-color .3s ease}
#convertBtn{background:#E50914;color:#FFF}
#convertBtn:hover{background:#C40812}
.options{display:flex;align-items:center;gap:8px}
.options label{font-size:12.5px;font-weight:500;color:#4E5969;white-space:nowrap}
#separator{padding:8px 32px 8px 12px;font-size:13px;color:#1F2329;background:#FFF;border:1px solid #E5E6EB;border-radius:8px;outline:none;cursor:pointer;transition:all .2s ease;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234E5969'><path d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/></svg>");background-repeat:no-repeat;background-position:right 10px center;background-size:14px;font-family:inherit}
#separator:focus{border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.success{display:none;padding:9px 14px;font-size:12.5px;color:#065F46;background:#ECFDF5;border:1px solid #A7F3D0;border-radius:6px;}
#resultLink{display:block;padding:12px 14px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#3B82F6;word-break:break-all;transition:all .2s ease;text-decoration:none;min-height:42px}
#resultLink:hover{background:#EFF6FF;border-color:#BFDBFE;color:#1D4ED8}
#resultLink:empty::before{content:'處理後的鏈接將顯示在這裏';color:#8F959E;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:13px}
#result p{font-size:12.5px;color:#8F959E;margin:0 0 8px}

/* =========================================================
   通用参数 / 表单 / 按钮 / 样例
   ========================================================= */
.tool-textarea{width:100%;padding:12px 14px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;resize:vertical;min-height:160px;transition:all .2s ease;box-sizing:border-box}
.tool-textarea:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.tool-param-row{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;margin-top:18px;align-items:end}
.tool-param-item,.tool-form-group{display:flex;flex-direction:column;gap:6px;min-width:0}
.tool-param-item label,.tool-form-group label{font-size:12.5px;font-weight:500;color:#4E5969}
.tool-input{width:100%;padding:9px 12px;font-size:13.5px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box}
.tool-input::placeholder{color:#A9AFB8}
.tool-input:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.tool-radio-wrap{display:flex;align-items:center;gap:8px;padding:9px 14px;font-size:13px;color:#4E5969;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;cursor:pointer;white-space:nowrap;transition:all .2s ease;user-select:none;box-sizing:border-box;height:38px}
.tool-radio-wrap:hover{border-color:#D1D5DB}
.tool-radio-wrap input{margin:0;cursor:pointer;accent-color:#E50914}
.tool-radio-wrap span{line-height:1}
.tool-actions,.tool-btn-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.tool-btn-primary,.tool-btn-outline,.tool-btn,.btn-primary,.btn-secondary,.btn-warning,.btn-success,.btn-outline,.btn-default,.btn-grey,.btn-danger-outline,.btn-dark,.btn-green,.btn-gray,.primary-btn,.secondary-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 20px;border-radius:8px;font-size:13px;font-weight:500;border:1px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.tool-btn-primary,.btn-primary,.primary-btn{background:#E50914;color:#FFF}
.tool-btn-primary:hover:not(:disabled),.btn-primary:hover:not(:disabled),.primary-btn:hover{background:#C40812}
.tool-btn-primary:disabled,.btn-primary:disabled{background:#F0A3A8;cursor:not-allowed;color:#FFF}
.tool-btn-outline,.btn-outline,.btn-default,.btn-grey,.btn-gray,.btn-secondary{background:#FFF;color:#4E5969;border-color:#E5E6EB}
.tool-btn-outline:hover,.btn-outline:hover,.btn-default:hover,.btn-grey:hover,.btn-gray:hover,.btn-secondary:hover:not(:disabled){background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
.btn-secondary{color:#3B82F6;border-color:#BFDBFE}
.btn-secondary:hover:not(:disabled){background:#EFF6FF;border-color:#3B82F6}
.btn-warning{background:#FFF;color:#F59E0B;border-color:#FCD34D}
.btn-warning:hover{background:#FFFBEB;border-color:#F59E0B}
.btn-success,.secondary-btn{background:#00A870;color:#FFF}
.btn-success:hover,.secondary-btn:hover{background:#008F5F}
.btn-danger-outline{background:#FFF;color:#E50914;border-color:#F0A3A8}
.btn-danger-outline:hover{background:#FFF1F0;border-color:#E50914}
.btn-dark{background:#1F2329;color:#FFF}
.btn-dark:hover{background:#333A42}
.btn-green{background:#00A870;color:#FFF}
.btn-green:hover{background:#008F5F}
.tool-btn-outline svg,.tool-btn svg,.btn-outline svg{width:15px;height:15px;fill:currentColor}
.tool-btn-row .spacer{flex:1}
.tool-sample-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.tool-sample-grid>div{display:flex;flex-direction:column;gap:8px}
.tool-sample-label{font-size:12.5px;font-weight:500;color:#8F959E;display:flex;align-items:center;gap:6px}
.tool-sample-grid .tool-textarea{min-height:200px;font-size:12px;line-height:1.7}
.tool-empty-hint{padding:40px 20px;text-align:center;color:#8F959E;font-size:13px;background:#FFF;border:1px dashed #D1D5DB;border-radius:8px}
.tool-example{margin-top:18px;padding:16px 18px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;transition:background-color .3s ease,border-color .3s ease}
.tool-example-title{font-size:12.5px;font-weight:600;color:#4E5969;margin-bottom:8px}
.tool-example-code{font-family:'Menlo','Consolas',monospace;font-size:12px;line-height:1.8;color:#4E5969;white-space:pre-wrap;word-break:break-all;margin:0}
.tool-example-box{padding:12px 14px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;font-family:'Menlo','Consolas',monospace;font-size:12.5px;line-height:1.75;color:#4E5969;margin:12px 0;word-break:break-all;transition:background-color .3s ease,border-color .3s ease}
.tool-example-box .label{color:#8F959E}
.tool-escape-list{list-style:none;padding:0;margin:10px 0 0;display:flex;flex-direction:column;gap:8px;font-size:12.5px;color:#4E5969;line-height:1.6}
.tool-escape-list li{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#F8F9FA;border-radius:6px;transition:background-color .3s ease}
.tool-escape-list code{font-family:'Menlo','Consolas',monospace;font-size:12px;padding:1px 8px;background:#FFF;border:1px solid #E5E6EB;border-radius:4px;color:#E50914;min-width:44px;text-align:center;transition:background-color .3s ease,border-color .3s ease}
.tool-example-section,.example-section{margin-top:18px;padding:16px 18px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;transition:background-color .3s ease,border-color .3s ease}
.example-section h4,.example h3{font-size:13px;font-weight:600;color:#1F2329;margin:0 0 6px}
.example-section p,.example p{font-size:12.5px;color:#8F959E;line-height:1.65;margin:0 0 4px}
.example pre{margin:0;padding:10px 14px;font-family:'Menlo','Consolas',monospace;font-size:12px;line-height:1.65;color:#4E5969;background:#FFF;border:1px solid #E5E6EB;border-radius:6px;white-space:pre-wrap;word-break:break-all;transition:background-color .3s ease,border-color .3s ease}

/* =========================================================
   输入输出容器 / 行内按钮 / 进度 / 表格 / 状态
   ========================================================= */
.text-container,.input-container,.text-area-container{position:relative}
.text-container textarea{width:100%;padding:12px 44px 12px 14px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;resize:vertical;min-height:220px;transition:all .2s ease;box-sizing:border-box}
.text-container textarea:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.inner-btn,.absolute-clear{position:absolute;top:10px;right:10px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:#FFF;color:#8F959E;border:1px solid #E5E6EB;cursor:pointer;opacity:0;transition:all .2s ease;padding:0;font-family:inherit}
.inner-btn:hover,.absolute-clear:hover{background:#F2F4F7;color:#E50914}
.inner-btn svg,.inner-btn i,.absolute-clear svg,.absolute-clear i{width:14px;height:14px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;line-height:1}
.text-container .output-inner-group{position:absolute;top:10px;right:10px;display:flex;flex-direction:column;gap:6px}
.text-container .output-inner-group .inner-btn{position:static;opacity:0}
.info{display:flex;align-items:flex-start;gap:6px;margin-top:8px;font-size:12px;color:#8F959E;line-height:1.65}
.info i,.info svg{font-size:12px;margin-top:2px;flex-shrink:0}
.process-btn{background:#E50914;color:#FFF}
.process-btn:hover:not(:disabled){background:#C40812}
.process-btn:disabled{background:#F0A3A8;cursor:not-allowed}
.clear-input-btn{background:#FFF;color:#E50914;border-color:#F0A3A8}
.clear-input-btn:hover{background:#FFF1F0;border-color:#E50914}
.clear-output-btn{background:#FFF;color:#F59E0B;border-color:#FCD34D}
.clear-output-btn:hover{background:#FFFBEB;border-color:#F59E0B}
.copy-btn{background:#3B82F6;color:#FFF}
.copy-btn:hover{background:#2563EB}
.export-btn{background:#00A870;color:#FFF}
.export-btn:hover{background:#008F5F}
.sample-btn,.swap-btn{background:#FFF;color:#4E5969;border-color:#E5E6EB}
.sample-btn:hover,.swap-btn:hover{background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
#copy-notification,#export-notification{display:none;align-items:center;gap:6px;margin-top:10px;padding:9px 14px;border-radius:6px;font-size:12.5px;background:#ECFDF5;color:#065F46;border:1px solid #A7F3D0}
.error-log{display:none;background:#FFF1F0;border:1px solid #FCA5A5;border-radius:8px;padding:14px 16px;margin-bottom:18px;transition:all .2s ease}
.error-log h3{font-size:13px;font-weight:600;color:#E50914;margin:0 0 8px;display:flex;align-items:center;gap:6px}
.error-log pre{margin:0;font-family:'Menlo','Consolas',monospace;font-size:12px;color:#B91C1C;white-space:pre-wrap;word-break:break-all;line-height:1.65;max-height:120px;overflow-y:auto}
.progress-info{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.progress-info .stat-label{font-size:12.5px;color:#8F959E;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.progress-info .stat-value{font-weight:600;color:#1F2329}
.progress-info .stat-success{color:#00A870}
.progress-container{height:8px;border-radius:4px;background:#F2F4F7;overflow:hidden;transition:background-color .3s ease}
.progress-bar{height:100%;background:linear-gradient(90deg,#E50914,#F59E0B);border-radius:4px;transition:width .35s ease}
.status-text{margin-top:10px;font-size:12.5px;color:#8F959E;line-height:1.6}
.tabs .tab-btn,.tab-btn{padding:6px 14px;font-size:12.5px;font-weight:500;color:#4E5969;border-radius:6px;border:none;background:transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap}
.tab-btn:hover{color:#1F2329}
.tab-btn.tab-active{background:#FFF;color:#E50914;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.table-container{overflow-x:auto;border:1px solid #E5E6EB;border-radius:8px;transition:border-color .3s ease}
.table-container table{width:100%;border-collapse:collapse;font-size:13px}
.table-container thead th{background:#F8F9FA;font-weight:600;color:#4E5969;padding:11px 14px;text-align:left;white-space:nowrap;border-bottom:1px solid #E5E6EB;transition:background-color .3s ease,border-color .3s ease}
.table-container tbody td{padding:10px 14px;border-bottom:1px solid #F2F4F7;color:#1F2329;word-break:break-all;line-height:1.6}
.table-container tbody tr:last-child td{border-bottom:none}
.table-container tbody tr:hover td{background:#F8F9FA}
.badge-ok{display:inline-flex;align-items:center;gap:4px;padding:2px 9px;font-size:12px;font-weight:500;border-radius:4px;color:#00A870;background:rgba(0,168,112,.1);white-space:nowrap}
.badge-fail{display:inline-flex;align-items:center;gap:4px;padding:2px 9px;font-size:12px;font-weight:500;border-radius:4px;color:#E50914;background:#FFF1F0;white-space:nowrap}
.noResults{display:none;padding:36px 20px;text-align:center;color:#8F959E;font-size:13px;background:#FFF;border:1px dashed #D1D5DB;border-radius:8px;margin-top:12px;transition:background-color .3s ease,border-color .3s ease}
.noResults.show{display:block}
.output-container{min-height:180px;max-height:400px;overflow-y:auto;padding:12px 14px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;box-sizing:border-box;transition:background-color .3s ease,border-color .3s ease}
.output-container pre{margin:0;white-space:pre-wrap;word-break:break-all;font-family:inherit;font-size:inherit;line-height:inherit;color:inherit}
.output-placeholder{color:#8F959E;text-align:center;padding:60px 20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:13px}
.output-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.history-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.history-header h2{font-size:15px;font-weight:600;color:#1F2329;display:flex;align-items:center;gap:8px;margin:0}
.history-header h2 svg{width:16px;height:16px;fill:#8F959E}
#clearHistoryBtn{padding:6px 14px;font-size:12.5px;font-weight:500;color:#8F959E;background:transparent;border:1px solid #E5E6EB;border-radius:6px;cursor:pointer;transition:all .2s ease;font-family:inherit}
#clearHistoryBtn:hover{color:#E50914;border-color:#F0A3A8;background:#FFF1F0}
.history-container{display:flex;flex-direction:column;gap:10px;margin-top:14px;max-height:360px;overflow-y:auto}
.history-placeholder{text-align:center;padding:32px 20px;color:#8F959E;font-size:13px}
.history-item{padding:12px 14px;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;transition:background-color .3s ease,border-color .3s ease}
.history-item:hover{background:#F2F4F7}
.history-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.history-time{font-size:12px;color:#8F959E}
.history-load{padding:4px 12px;font-size:12px;color:#E50914;background:#FFF;border:1px solid #F0A3A8;border-radius:5px;cursor:pointer;transition:all .2s ease;font-family:inherit}
.history-load:hover{background:#FFF1F0;border-color:#E50914}
.history-content{font-family:'Menlo','Consolas',monospace;font-size:12px;color:#4E5969;line-height:1.6;white-space:pre-wrap;word-break:break-all}
.intro-desc{font-size:13px;color:#4E5969;line-height:1.75;margin:0 0 16px}
.rules-title{font-size:12.5px;font-weight:600;color:#4E5969;margin-bottom:10px}
#rulesList{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px;font-size:12.5px;color:#4E5969;line-height:1.65;max-height:132px;overflow:hidden;transition:max-height .35s ease}
#rulesList.expanded{max-height:620px;overflow-y:auto}
#rulesList li{display:flex;align-items:flex-start;gap:6px;padding:6px 10px;background:#F8F9FA;border-radius:6px;transition:background-color .3s ease}
#rulesList li i{flex-shrink:0;margin-top:2px;font-size:12px}
.show-more-btn{display:inline-flex;align-items:center;gap:4px;margin-top:10px;padding:6px 14px;font-size:12.5px;color:#E50914;background:transparent;border:none;cursor:pointer;font-family:inherit;transition:color .2s ease}
.show-more-btn:hover{color:#C40812}
#toast{position:fixed;left:50%;bottom:40px;transform:translate(-50%,16px);display:flex;align-items:center;gap:8px;background:#1F2329;color:#FFF;font-size:13px;padding:12px 22px;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.25);opacity:0;visibility:hidden;transition:all .28s ease;z-index:9999;max-width:calc(100vw - 40px);text-align:center;pointer-events:none}
#toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}

/* =========================================================
   替换规则 / 文件上传 / 搜索
   ========================================================= */
.rule-item{display:grid;grid-template-columns:1fr 1fr 32px;gap:10px;margin-bottom:10px;align-items:center}
.rule-input{width:100%;padding:9px 12px;font-size:13px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box}
.rule-input:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.rule-input::placeholder{color:#A9AFB8}
.remove-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:#FFF;color:#8F959E;border:1px solid #E5E6EB;cursor:pointer;font-size:18px;line-height:1;transition:all .2s ease;padding:0;font-family:inherit}
.remove-btn:hover{background:#FFF1F0;border-color:#F0A3A8;color:#E50914}
.add-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;margin-bottom:18px;border-radius:8px;background:#FFF;color:#4E5969;border:1px dashed #D1D5DB;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease;font-family:inherit}
.add-btn:hover{border-color:#E50914;color:#E50914;background:#FFF1F0}
.add-btn .icon{font-size:16px;line-height:1}
.file-upload{position:relative;display:inline-block;margin-right:10px;margin-bottom:14px}
.file-upload input[type="file"],.file-input{position:absolute;left:0;top:0;opacity:0;width:100%;height:100%;cursor:pointer}
.file-upload label,.file-label{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border-radius:8px;background:#FFF;color:#3B82F6;border:1px solid #BFDBFE;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease;white-space:nowrap}
.file-upload label:hover,.file-label:hover{background:#EFF6FF;border-color:#3B82F6}
.search-box{display:flex;gap:8px;margin-bottom:18px;flex-wrap:wrap}
.search-input{flex:1;min-width:160px;padding:9px 12px;font-size:13px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box}
.search-input:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
.search-btn{padding:9px 20px;border-radius:8px;background:#3B82F6;color:#FFF;font-size:13px;font-weight:500;border:none;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.search-btn:hover{background:#2563EB}
.text-area-container>div{min-height:350px;padding:12px 14px;border:1px solid #E5E6EB;border-radius:8px;background:#FFF;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;white-space:pre-wrap;word-break:break-all;overflow:auto;cursor:pointer;box-sizing:border-box}
.search-highlight{background:#FEF3C7;color:#92400E;padding:0 2px;border-radius:2px}
.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.replace-btn{background:#E50914;color:#FFF}
.replace-btn:hover{background:#C40812}
.reset-btn{background:#FFF;color:#4E5969;border-color:#E5E6EB}
.reset-btn:hover{background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
.download-btn{background:#00A870;color:#FFF}
.download-btn:hover{background:#008F5F}
.stats p{margin:0}
.stats .highlight{color:#E50914;font-weight:600}

/* =========================================================
   控制面板 / 内容包装 / 通知条
   ========================================================= */
.control-panel{margin-bottom:18px}
.control-group{display:flex;flex-direction:column;gap:6px}
.control-group label{font-size:12.5px;font-weight:500;color:#4E5969}
#removeContent{width:100%;padding:9px 12px;font-size:13px;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;outline:none;transition:all .2s ease;box-sizing:border-box}
#removeContent:focus{background:#FFF;border-color:#E50914;box-shadow:0 0 0 3px rgba(229,9,20,.1)}
#removeContent::placeholder{color:#A9AFB8}
.hint{font-size:12px;color:#8F959E;line-height:1.65}
.content-wrapper{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.content-wrapper .input-section,.content-wrapper .output-section{display:flex;flex-direction:column;min-width:0}
.stats span{display:inline-flex;align-items:center;padding:2px 9px;background:#F2F4F7;border-radius:4px;transition:background-color .3s ease,color .3s ease}
.buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.buttons button{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 20px;border-radius:8px;font-size:13px;font-weight:500;border:1px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.tertiary{background:#FFF;color:#4E5969;border-color:#E5E6EB}
.tertiary:hover{background:#F2F4F7;border-color:#D1D5DB;color:#1F2329}
.tertiary.danger{color:#E50914;border-color:#F0A3A8}
.tertiary.danger:hover{background:#FFF1F0;border-color:#E50914}
.secondary{background:#3B82F6;color:#FFF}
.secondary:hover{background:#2563EB}
.download-btn.m3u{background:#F59E0B}
.download-btn.m3u:hover{background:#D97706}
.status-message{margin-top:14px;padding:0;max-height:0;overflow:hidden;opacity:0;font-size:12.5px;line-height:1.6;border-radius:6px;transition:all .25s ease}
.status-message.show{padding:9px 14px;max-height:80px;opacity:1}
.status-message.success{background:#ECFDF5;color:#065F46;border:1px solid #A7F3D0}
.status-message.error{background:#FFF1F0;color:#B91C1C;border:1px solid #FCA5A5}
.status-message.info{background:#EFF6FF;color:#1E40AF;border:1px solid #BFDBFE}
.actions .action-btn.opacity-50{opacity:.5}
.actions .action-btn.cursor-not-allowed{cursor:not-allowed}
.actions .action-btn.cursor-pointer{cursor:pointer}
.char-count{font-size:12.5px;color:#8F959E;margin-right:auto}
.controls-section{margin-top:22px;padding-top:20px;border-top:1px solid #F2F4F7;transition:border-color .3s ease}
.controls-section h2{font-size:13.5px;font-weight:600;color:#1F2329;margin:0 0 12px;display:flex;align-items:center;gap:6px}
.controls-section h2::before{content:'';width:3px;height:14px;border-radius:2px;background:#3B82F6;flex-shrink:0}
.buttons-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.convert-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;border-radius:8px;font-size:13px;font-weight:500;border:1px solid transparent;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.convert-btn svg,.convert-btn i{width:15px;height:15px;font-size:14px;line-height:1}
.convert-btn.primary{background:#E50914;color:#FFF}
.convert-btn.primary:hover{background:#C40812}
.convert-btn.accent{background:#F59E0B;color:#FFF}
.convert-btn.accent:hover{background:#D97706}
.convert-btn.secondary{background:#3B82F6;color:#FFF}
.convert-btn.secondary:hover{background:#2563EB}
#notification.show{padding:9px 14px;max-height:60px;opacity:1}
#notification svg,#notification i{width:14px;height:14px;flex-shrink:0}
#copy-notification.show,#export-notification.show{display:flex}

/* 排序 / 输入结果双列 / 结果容器 */
.sort-options{display:flex;flex-direction:column;gap:14px}
.option-group{display:flex;flex-direction:column;gap:8px}
.option-group>label{font-size:12.5px;font-weight:500;color:#4E5969}
.sort-buttons{display:flex;flex-wrap:wrap;gap:8px}
.sort-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;font-size:12.5px;font-weight:500;color:#4E5969;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;cursor:pointer;transition:all .2s ease;white-space:nowrap;font-family:inherit}
.sort-btn:hover{border-color:#D1D5DB;background:#F2F4F7}
.sort-btn.sort-active{color:#E50914;background:#FFF1F0;border-color:#E50914;font-weight:600}
.input-result-container{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.input-column,.result-column{display:flex;flex-direction:column;min-width:0}
#sourceInput{padding:12px 40px 12px 14px}
.result-container{min-height:300px;max-height:500px;overflow-y:auto;padding:12px 14px;font-family:'Menlo','Consolas','Courier New',monospace;font-size:13px;line-height:1.65;color:#1F2329;background:#F8F9FA;border:1px solid #E5E6EB;border-radius:8px;word-break:break-all;transition:background-color .3s ease,border-color .3s ease}
.result-container>div{border-bottom:1px dashed #EEF0F3;transition:border-color .3s ease}
.result-container>div:last-child{border-bottom:none}
.result-container .empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:240px;color:#8F959E;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:13px;text-align:center;border-bottom:none}
.result-container .empty-state i,.result-container .empty-state svg{font-size:24px;opacity:.6}
.result-container>div[style*="display: flex"]{color:#8F959E!important}
.group{background:#FFF;border:1px solid #E5E6EB;border-radius:6px;margin-bottom:8px;overflow:hidden;transition:background-color .3s ease,border-color .3s ease}
.group:last-child{margin-bottom:0}
.group-header{display:flex;align-items:center;gap:8px;padding:10px 14px;cursor:pointer;font-size:13px;font-weight:600;color:#1F2329;background:#F8F9FA;user-select:none;transition:background-color .2s ease}
.group-header:hover{background:#F2F4F7}
.group-header i{display:inline-block;width:8px;height:8px;border-right:1.8px solid #4E5969;border-bottom:1.8px solid #4E5969;transform:rotate(45deg);transition:transform .2s ease;margin-top:-3px;flex-shrink:0;font-style:normal}
.group-header i.rotate-180{transform:rotate(-135deg);margin-top:3px}
.group-header .count{font-weight:400;font-size:12px;color:#8F959E}
.group-content{max-height:0;overflow:hidden;transition:max-height .3s ease}
.group-list{list-style:none;margin:0;padding:6px 12px 10px;display:flex;flex-direction:column;gap:4px}
.group-item{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:4px;font-size:12.5px;line-height:1.6;transition:background-color .2s ease}
.group-item:hover{background:#F8F9FA}
.group-item .name{flex-shrink:0;min-width:90px;max-width:180px;font-weight:500;color:#1F2329;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.group-item .url{flex:1;min-width:0;color:#8F959E;font-family:'Menlo','Consolas',monospace;font-size:12px;word-break:break-all}
.result-hint{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:10px;font-size:12px;color:#8F959E}
.result-hint a{color:#E50914;font-weight:500;transition:color .2s ease}
.result-hint a:hover{color:#C40812}
.result-hint span{color:#D1D5DB;margin:0 4px}
.result-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.result-stats{font-size:12.5px;color:#8F959E;margin:4px 0 0}

    /* 状态消息 */
    .status-msg {
        padding: 0;
        margin: 0;
        font-size: 12.5px;
        line-height: 1.6;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: all 0.25s ease;
        border-radius: 6px;
    }

    .status-msg.show {
        padding: 9px 14px;
        margin: 4px 0 14px;
        max-height: 80px;
        opacity: 1;
    }

    .status-msg.info {
        background-color: #EFF6FF;
        color: #1E40AF;
        border: 1px solid #BFDBFE;
    }

    .status-msg.success {
        background-color: #ECFDF5;
        color: #065F46;
        border: 1px solid #A7F3D0;
    }

    .status-msg.error {
        background-color: #FFF1F0;
        color: #B91C1C;
        border: 1px solid #FCA5A5;
    }
        .result-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
    }

    .result-stats {
        font-size: 12.5px;
        color: #8F959E;
        margin: 4px 0 0;
    }
        .badge {
        display: inline-flex;
        align-items: center;
        padding: 2px 9px;
        font-size: 11.5px;
        font-weight: 500;
        border-radius: 4px;
        color: #4E5969;
        background-color: #F2F4F7;
        margin-left: auto;
        transition: background-color 0.3s ease, color 0.3s ease;
    }
        #result {
        margin-top: 22px;
        padding-top: 20px;
        border-top: 1px solid #F2F4F7;
        transition: border-color 0.3s ease;
    }

    #result h3 {
        font-size: 13.5px;
        font-weight: 600;
        color: #1F2329;
        margin: 0 0 10px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    #result h3::before {
        content: '';
        width: 3px;
        height: 14px;
        border-radius: 2px;
        background-color: #00A870;
        flex-shrink: 0;
    }
        .result-title {
        font-size: 13.5px;
        font-weight: 600;
        color: #1F2329;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .result-title::before {
        content: '';
        width: 3px;
        height: 14px;
        border-radius: 2px;
        background-color: #E50914;
        flex-shrink: 0;
    }
        .output-area {
        position: relative;
        background-color: #F8F9FA;
        border: 1px solid #E5E6EB;
        border-radius: 8px;
        transition: background-color 0.3s ease, border-color 0.3s ease;
        overflow: hidden;
    }
        .output-content {
        padding: 12px 90px 12px 14px;
        font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
        font-size: 13px;
        line-height: 1.65;
        color: #1F2329;
        white-space: pre-wrap;
        word-break: break-all;
        min-height: 80px;
        max-height: 320px;
        overflow-y: auto;
        cursor: text;
    }

    .output-content.placeholder {
        color: #8F959E;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 13px;
        cursor: default;
    }
        .steps-area {
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px solid #F2F4F7;
        transition: border-color 0.3s ease;
    }

    .step-label {
        font-size: 12.5px;
        font-weight: 600;
        color: #4E5969;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .step-label::before {
        content: '';
        width: 3px;
        height: 12px;
        border-radius: 2px;
        background-color: #3B82F6;
        flex-shrink: 0;
    }

    .step-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 260px;
        overflow-y: auto;
        padding-right: 4px;
    }

    .step-item {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 12px;
        background-color: #F8F9FA;
        border: 1px solid #E5E6EB;
        border-radius: 6px;
        font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
        font-size: 12px;
        line-height: 1.6;
        color: #4E5969;
        word-break: break-all;
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }

    .step-item.final {
        border-color: #A7F3D0;
        background-color: #ECFDF5;
        color: #065F46;
    }

    .step-num {
        flex-shrink: 0;
        font-weight: 600;
        color: #8F959E;
    }

    .step-item.final .step-num {
        color: #00A870;
    }
            .success-message,
        .info-message {
            display: none;
            align-items: center;
            gap: 6px;
            margin-top: 12px;
            padding: 9px 14px;
            border-radius: 6px;
            font-size: 12.5px;
            line-height: 1.6;
        }
        .success-message {
            background-color: #ECFDF5;
            color: #065F46;
            border: 1px solid #A7F3D0;
        }
        .info-message {
            background-color: #EFF6FF;
            color: #1E40AF;
            border: 1px solid #BFDBFE;
        }
          .download-section {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            transition: border-color 0.3s ease;
        }
        .download-section label {
            font-size: 12.5px;
            color: #8F959E;
        }
        #filename {
            padding: 7px 12px;
            font-size: 13px;
            color: #1F2329;
            background-color: #F8F9FA;
            border: 1px solid #E5E6EB;
            border-radius: 8px;
            outline: none;
            transition: all 0.2s ease;
            max-width: 200px;
            flex: 1;
            min-width: 120px;
        }
        #filename:focus {
            background-color: #FFFFFF;
            border-color: #E50914;
            box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
        }
        .file-extension {
            font-size: 12.5px;
            color: #8F959E;
            margin-left: -4px;
        }
                .input-section h2,
        .output-section h2 {
            font-size: 13.5px;
            font-weight: 600;
            color: #1F2329;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
            line-height: 1.5;
        }
        .input-section h2::before,
        .output-section h2::before {
            content: '';
            width: 3px;
            height: 14px;
            border-radius: 2px;
            flex-shrink: 0;
        }
        .input-section h2::before { background-color: #3B82F6; }
        .output-section h2::before { background-color: #00A870; }
/* =========================================================
   深色模式（公共 + 模块特有）
   ========================================================= */
body.dark-mode .tool-page-head,
body.dark-mode .tool-card,
body.dark-mode .empty-state,
body.dark-mode .noResults,
body.dark-mode .tool-empty-hint{background:#1E1E1E;border-color:#333}
body.dark-mode .tool-page-head h1{color:#E4E6EB}
body.dark-mode .tool-page-head p{color:#8F959E}
body.dark-mode .tool-card-head{border-bottom-color:#333}
body.dark-mode .tool-card-head h2{color:#E4E6EB}
body.dark-mode .tool-card-head h2 svg{fill:#6B7280}
body.dark-mode .area-title,
body.dark-mode .tool-section-title,
body.dark-mode .section-title,
body.dark-mode .input-section h2,
body.dark-mode .output-section h2,
body.dark-mode .result-title,
body.dark-mode .result-header h3,
body.dark-mode .panel-header h2,
body.dark-mode .setting-block h3,
body.dark-mode .controls-section h2{color:#E4E6EB}
body.dark-mode .area-hint,
body.dark-mode .hint,
body.dark-mode .tool-tip,
body.dark-mode .text-info,
body.dark-mode .char-count,
body.dark-mode .info,
body.dark-mode .stat-label,
body.dark-mode .result-stats,
body.dark-mode .history-time,
body.dark-mode .tool-sample-label{color:#6B7280}
body.dark-mode #search-country,
body.dark-mode .search-input,
body.dark-mode .channel-input,
body.dark-mode .player-url-input,
body.dark-mode #qr-content,
body.dark-mode #qr-size,
body.dark-mode #qr-errorlevel,
body.dark-mode #videoUrl,
body.dark-mode #fileName,
body.dark-mode #m3u8Content,
body.dark-mode #inputText,
body.dark-mode #outputText,
body.dark-mode #linkInput,
body.dark-mode #sourceInput,
body.dark-mode #text-input,
body.dark-mode #sourceText,
body.dark-mode #resultText,
body.dark-mode #text-area,
body.dark-mode #originalText,
body.dark-mode #processedText,
body.dark-mode #inputA,
body.dark-mode #inputB,
body.dark-mode #result,
body.dark-mode .output-container,
body.dark-mode .result-container,
body.dark-mode .input-area,
body.dark-mode .tool-textarea,
body.dark-mode .tool-input,
body.dark-mode #removeContent,
body.dark-mode #filename,
body.dark-mode .rule-input,
body.dark-mode .nettv-tool-page .uk-textarea,
body.dark-mode .nettv-tool-page .uk-input,
body.dark-mode .text-container textarea,body.dark-mode .output-area{background:#2A2A2A;border-color:#3A3A3A;color:#E4E6EB}
body.dark-mode #search-country::placeholder,
body.dark-mode .search-input::placeholder,
body.dark-mode .channel-input::placeholder,
body.dark-mode .player-url-input::placeholder,
body.dark-mode #qr-content::placeholder,
body.dark-mode #inputText::placeholder,
body.dark-mode #outputText::placeholder,
body.dark-mode #sourceInput::placeholder,
body.dark-mode #text-input::placeholder,
body.dark-mode #sourceText::placeholder,
body.dark-mode #resultText::placeholder,
body.dark-mode #originalText::placeholder,
body.dark-mode #processedText::placeholder,
body.dark-mode .tool-textarea::placeholder,
body.dark-mode .tool-input::placeholder,
body.dark-mode #removeContent::placeholder,
body.dark-mode #filename::placeholder,
body.dark-mode .rule-input::placeholder,
body.dark-mode .nettv-tool-page .uk-textarea::placeholder,
body.dark-mode .nettv-tool-page .uk-input::placeholder{color:#6B7280}
body.dark-mode #search-country:focus,
body.dark-mode .search-input:focus,
body.dark-mode .channel-input:focus,
body.dark-mode .player-url-input:focus,
body.dark-mode #qr-content:focus,
body.dark-mode #qr-size:focus,
body.dark-mode #qr-errorlevel:focus,
body.dark-mode #videoUrl:focus,
body.dark-mode #fileName:focus,
body.dark-mode #inputText:focus,
body.dark-mode #linkInput:focus,
body.dark-mode #sourceInput:focus,
body.dark-mode #text-input:focus,
body.dark-mode #sourceText:focus,
body.dark-mode #text-area:focus,
body.dark-mode #originalText:focus,
body.dark-mode #processedText:not([readonly]):focus,
body.dark-mode #inputA:focus,
body.dark-mode #inputB:focus,
body.dark-mode #removeContent:focus,
body.dark-mode .rule-input:focus,
body.dark-mode .nettv-tool-page .uk-textarea:focus,
body.dark-mode .nettv-tool-page .uk-input:focus,
body.dark-mode .text-container textarea:focus{background:#2A2A2A;border-color:#E50914}
body.dark-mode #processedText[readonly],
body.dark-mode #outputText[readonly],
body.dark-mode #resultText[readonly],
body.dark-mode #result[readonly],
body.dark-mode #m3u8Content[readonly],
body.dark-mode #outputText[readonly],
body.dark-mode .nettv-tool-page .uk-input[readonly]{background:#222}
body.dark-mode .letter-filter{border-top-color:#333}
body.dark-mode .letter-btn{background:#2A2A2A;border-color:#3A3A3A;color:#B0B3B8}
body.dark-mode .letter-btn:hover{background:#333;border-color:#4A4A4A;color:#E4E6EB}
body.dark-mode .letter-btn.active{background:#E50914;border-color:#E50914;color:#FFF}
body.dark-mode .country-grid>*{background:#2A2A2A;border-color:#3A3A3A;color:#E4E6EB}
body.dark-mode .country-grid>*:hover{background:#333;border-color:#4A4A4A}
body.dark-mode .country-grid code{background:#1E1E1E;border-color:#3A3A3A;color:#F87171}
body.dark-mode .empty-state{color:#6B7280}
body.dark-mode .empty-state .empty-icon{opacity:.4}
body.dark-mode .loading-overlay{background:rgba(30,30,30,.9)}
body.dark-mode .loading-overlay h3{color:#E4E6EB}
body.dark-mode .loading-overlay p{color:#8F959E}
body.dark-mode .loading-overlay .spinner{border-color:#333;border-top-color:#F87171}
body.dark-mode .status-box.error-box,
body.dark-mode .status-message.error,
body.dark-mode .error-log{background:rgba(248,113,113,.1);border-color:rgba(248,113,113,.3);color:#FCA5A5}
body.dark-mode .status-box.success-box,
body.dark-mode .status-message.success,
body.dark-mode .success,
body.dark-mode #copy-notification,
body.dark-mode #export-notification{background:rgba(52,211,153,.08);border-color:rgba(52,211,153,.3);color:#6EE7B7}
body.dark-mode .status-message.info,
body.dark-mode .tip-box,
body.dark-mode .info-message{background:rgba(59,130,246,.1);border-color:rgba(59,130,246,.3);color:#93C5FD}
body.dark-mode .tip-box h4,body.dark-mode .tip-box p{color:#93C5FD}
body.dark-mode .info-card{background:#2A2A2A;border-color:#3A3A3A}
body.dark-mode .info-row{border-bottom-color:#333}
body.dark-mode .info-value{color:#E4E6EB}
body.dark-mode .channel-id-box{background:#1E1E1E;border-color:#3A3A3A;color:#F87171}
body.dark-mode #channelUrl{color:#60A5FA}
body.dark-mode .action-buttons{border-top-color:#333}
body.dark-mode .action-btn.copy-btn,
body.dark-mode .result-actions .action-btn.copy,
body.dark-mode .action-btn.open-btn{background:#1E1E1E;border-color:rgba(52,211,153,.3);color:#34D399}
body.dark-mode .action-btn.copy-btn:hover,
body.dark-mode .result-actions .action-btn.copy:hover{background:rgba(52,211,153,.1)}
body.dark-mode .action-btn.open-btn{border-color:rgba(59,130,246,.3);color:#60A5FA}
body.dark-mode .action-btn.open-btn:hover{background:rgba(59,130,246,.1)}
body.dark-mode .action-btn.test-btn{background:#E4E6EB;color:#1F2329}
body.dark-mode .action-btn.test-btn:hover{background:#FFF}
body.dark-mode .example-tag{background:#2A2A2A;color:#B0B3B8}
body.dark-mode .example-tag:hover{background:rgba(248,113,113,.1);color:#F87171}
body.dark-mode .player-url-label{color:#B0B3B8}
body.dark-mode .player-url-label small{color:#6B7280}
body.dark-mode .player-placeholder{background:#121212}
body.dark-mode .player-placeholder p{color:#6B7280}
body.dark-mode .nettv-tool-page .uk-button-default,
body.dark-mode .tool-btn-outline,
body.dark-mode .btn-outline,
body.dark-mode .btn-default,
body.dark-mode .btn-grey,
body.dark-mode .btn-gray,
body.dark-mode .btn-secondary,
body.dark-mode .tertiary,
body.dark-mode .reset-btn,
body.dark-mode .sample-btn,
body.dark-mode .swap-btn,
body.dark-mode #clearBtn,
body.dark-mode #clearAllBtn,
body.dark-mode #exampleBtn,
body.dark-mode .clear-input-btn,
body.dark-mode .result-actions .action-btn{background:#1E1E1E;border-color:#333;color:#B0B3B8}
body.dark-mode .nettv-tool-page .uk-button-default:hover,
body.dark-mode .tool-btn-outline:hover,
body.dark-mode .btn-outline:hover,
body.dark-mode .btn-default:hover,
body.dark-mode .btn-grey:hover,
body.dark-mode .btn-gray:hover,
body.dark-mode .btn-secondary:hover,
body.dark-mode .tertiary:hover,
body.dark-mode .reset-btn:hover,
body.dark-mode .sample-btn:hover,
body.dark-mode .swap-btn:hover,
body.dark-mode #clearBtn:hover,
body.dark-mode #clearAllBtn:hover,
body.dark-mode #exampleBtn:hover,
body.dark-mode .clear-input-btn:hover{background:#2A2A2A;border-color:#4A4A4A;color:#E4E6EB}
body.dark-mode .nettv-tool-page .uk-button-danger,
body.dark-mode .btn-danger-outline,
body.dark-mode .tertiary.danger,
body.dark-mode .clear-output-btn,
body.dark-mode #clearProcessedBtn,
body.dark-mode .repeat-duplicates-btn,
body.dark-mode #directLink{background:#1E1E1E;border-color:#6B2A2E;color:#F87171}
body.dark-mode .nettv-tool-page .uk-button-danger:hover,
body.dark-mode .btn-danger-outline:hover,
body.dark-mode .tertiary.danger:hover,
body.dark-mode .clear-output-btn:hover,
body.dark-mode #clearProcessedBtn:hover,
body.dark-mode .repeat-duplicates-btn:hover,
body.dark-mode #directLink:hover{background:rgba(248,113,113,.1)}
body.dark-mode .nettv-tool-page .uk-tab,
body.dark-mode .tabs{background:#2A2A2A}
body.dark-mode .nettv-tool-page .uk-tab>li>a,
body.dark-mode .tab,
body.dark-mode .tab-btn{color:#B0B3B8}
body.dark-mode .nettv-tool-page .uk-tab>li>a:hover,
body.dark-mode .tab:hover,
body.dark-mode .tab-btn:hover{color:#E4E6EB}
body.dark-mode .nettv-tool-page .uk-tab>li.uk-active>a,
body.dark-mode .tab.active,
body.dark-mode .tab-btn.tab-active{background:#1E1E1E;color:#F87171}
body.dark-mode .nettv-tool-page .uk-badge{background:#E50914;color:#FFF}
body.dark-mode .nettv-tool-page .uk-badge-success{background:#008F5F}
body.dark-mode .nettv-tool-page .uk-badge-warning{background:#D97706}
body.dark-mode .nettv-tool-page .uk-alert-primary{background:rgba(59,130,246,.1);border-color:rgba(59,130,246,.3);color:#93C5FD}
body.dark-mode .nettv-tool-page .uk-alert-success{background:rgba(52,211,153,.08);border-color:rgba(52,211,153,.3);color:#6EE7B7}
body.dark-mode .nettv-tool-page .uk-alert-warning{background:rgba(251,191,36,.08);border-color:rgba(251,191,36,.3);color:#FBBF24}
body.dark-mode .nettv-tool-page .uk-alert-danger{background:rgba(248,113,113,.1);border-color:rgba(248,113,113,.3);color:#FCA5A5}
body.dark-mode .nettv-tool-page .uk-placeholder{background:#2A2A2A;border-color:#4A4A4A;color:#6B7280}
body.dark-mode .result-item{background:#2A2A2A;border-color:#3A3A3A;border-left-color:#60A5FA}
body.dark-mode .result-item.expired{border-left-color:#F87171}
body.dark-mode .result-item.future{border-left-color:#34D399}
body.dark-mode .result-item.no-timestamp{border-left-color:#4A4A4A}
body.dark-mode .timestamp-detail{background:#1E1E1E;border-color:#3A3A3A}
body.dark-mode .timestamp-highlight{background:rgba(251,191,36,.25);color:#FBBF24}
body.dark-mode .time-ago.past{color:#F87171;background:rgba(248,113,113,.12)}
body.dark-mode .time-ago.future{color:#34D399;background:rgba(52,211,153,.12)}
body.dark-mode .nettv-tool-page .uk-label{background:#2A2A2A;color:#B0B3B8}
body.dark-mode .nettv-tool-page .uk-label-success{background:rgba(52,211,153,.12);color:#34D399}
body.dark-mode .nettv-tool-page .uk-label-warning{background:rgba(251,191,36,.12);color:#FBBF24}
body.dark-mode .nettv-tool-page .uk-card-default{background:#2A2A2A;border-color:#3A3A3A}
body.dark-mode .nettv-tool-page .uk-text-small,
body.dark-mode .nettv-tool-page .uk-text-meta{color:#6B7280}
body.dark-mode .nettv-tool-page .uk-text-danger{color:#F87171}
body.dark-mode .nettv-tool-page .uk-text-success{color:#34D399}
body.dark-mode .nettv-tool-page code,
body.dark-mode .tool-help-list code,
body.dark-mode .tool-desc code{background:#2A2A2A;color:#F87171}
body.dark-mode .nettv-tool-page .uk-list-divider>li{color:#B0B3B8;border-bottom-color:#333}
body.dark-mode .nettv-tool-page .uk-list-divider>li strong{color:#E4E6EB}
body.dark-mode .nettv-tool-page .uk-form-icon{color:#6B7280}
body.dark-mode .tool-help-list{color:#B0B3B8}
body.dark-mode .tool-help-list strong{color:#E4E6EB}
body.dark-mode .tool-help-list li::before{background:rgba(248,113,113,.15);color:#F87171}
body.dark-mode .tool-help-list ul li{color:#6B7280}
body.dark-mode .tool-help-list ul li::before{background:#4A4A4A}
body.dark-mode .tool-ad-body{color:#6B7280}
body.dark-mode #qr-color,body.dark-mode #qr-bgcolor{background:#2A2A2A;border-color:#3A3A3A}
body.dark-mode .output-section{border-top-color:#333}
body.dark-mode #qrcode{background:#FFF;border-color:#4A4A4A}
body.dark-mode #qrcode p{color:#6B7280}
body.dark-mode #download-btn:disabled{background:#2A2A2A;color:#4A4A4A}
body.dark-mode .stat-item{background:#2A2A2A;border-color:#3A3A3A}
body.dark-mode .stat-value{color:#F87171}
body.dark-mode .stat-label{color:#6B7280}
body.dark-mode .duplicate-list li{background:#2A2A2A;border-color:#3A3A3A;color:#E4E6EB}
body.dark-mode .duplicate-list li:hover{background:#333}
body.dark-mode #no-duplicates,body.dark-mode #no-unique,body.dark-mode #no-clean{color:#6B7280!important}
body.dark-mode .result-section,body.dark-mode .steps-area,body.dark-mode .controls-section,body.dark-mode .button-group,body.dark-mode .action-buttons,body.dark-mode .download-section{border-top-color:#333}
body.dark-mode .notification,body.dark-mode #toast{background:#2A2A2A;color:#E4E6EB}
body.dark-mode #notification.success{background:#047857}
body.dark-mode #notification.error{background:#991B1B}
body.dark-mode #notification.info{background:#1E3A8A}
body.dark-mode .panel-header h2{color:#E4E6EB}
body.dark-mode .counter{color:#6B7280}
body.dark-mode .counter span{background:#2A2A2A;color:#B0B3B8}
body.dark-mode #copyBtn:disabled,body.dark-mode .export-btn:disabled{background:#2A2A2A;color:#4A4A4A}
body.dark-mode #enableEditBtn{background:#2563EB}
body.dark-mode #enableEditBtn:hover{background:#1D4ED8}
body.dark-mode .checkbox-grid label{color:#B0B3B8}
body.dark-mode .checkbox-grid input[type="checkbox"]{background:#2A2A2A;border-color:#4A4A4A}
body.dark-mode .checkbox-grid input[type="checkbox"]:checked{background:#E50914;border-color:#E50914}
body.dark-mode .history-header h2{color:#E4E6EB}
body.dark-mode .history-header h2 svg{fill:#6B7280}
body.dark-mode #clearHistoryBtn{border-color:#333;color:#8F959E}
body.dark-mode #clearHistoryBtn:hover{background:rgba(248,113,113,.1);border-color:#6B2A2E;color:#F87171}
body.dark-mode .history-item{background:#2A2A2A;border-color:#3A3A3A}
body.dark-mode .history-item:hover{background:#333}
body.dark-mode .history-load{background:#1E1E1E;border-color:#6B2A2E;color:#F87171}
body.dark-mode .history-load:hover{background:rgba(248,113,113,.1)}
body.dark-mode .history-content{color:#B0B3B8}
body.dark-mode .history-placeholder,body.dark-mode .output-placeholder{color:#6B7280}
body.dark-mode .intro-desc,body.dark-mode .rules-title,body.dark-mode #rulesList{color:#B0B3B8}
body.dark-mode #rulesList li{background:#2A2A2A}
body.dark-mode .show-more-btn{color:#F87171}
body.dark-mode .output-container{background:#2A2A2A;border-color:#3A3A3A;color:#E4E6EB}
body.dark-mode .btn-warning{background:#1E1E1E;border-color:#78350F;color:#FBBF24}
body.dark-mode .btn-warning:hover{background:rgba(251,191,36,.1)}
body.dark-mode .tool-example,body.dark-mode .tool-example-box,body.dark-mode .example,body.dark-mode .example-section,body.dark-mode .tool-example-section{background:#2A2A2A;border-color:#3A3A3A;color:#B0B3B8}
body.dark-mode .tool-example-title,body.dark-mode .example-section h4,body.dark-mode .example h3{color:#B0B3B8}
body.dark-mode .tool-example-code,body.dark-mode .example-section p,body.dark-mode .example p{color:#B0B3B8}
body.dark-mode .example pre{background:#1E1E1E;border-color:#3A3A3A;color:#B0B3B8}
body.dark-mode .tool-escape-list{color:#B0B3B8}
body.dark-mode .tool-escape-list li{background:#2A2A2A}
body.dark-mode .tool-escape-list code{background:#1E1E1E;border-color:#3A3A3A;color:#F87171}
body.dark-mode .inner-btn,body.dark-mode .absolute-clear{background:#1E1E1E;border-color:#333;color:#8F959E}
body.dark-mode .inner-btn:hover,body.dark-mode .absolute-clear:hover{background:#2A2A2A;color:#F87171}
body.dark-mode .error-log h3{color:#F87171}
body.dark-mode .error-log pre{color:#FCA5A5}
body.dark-mode .progress-container{background:#2A2A2A}
body.dark-mode .status-text{color:#6B7280}
body.dark-mode .table-container{border-color:#333}
body.dark-mode .table-container thead th{background:#2A2A2A;border-bottom-color:#3A3A3A;color:#B0B3B8}
body.dark-mode .table-container tbody td{border-bottom-color:#2A2A2A;color:#E4E6EB}
body.dark-mode .table-container tbody tr:hover td{background:#2A2A2A}
body.dark-mode .badge-ok{color:#34D399;background:rgba(52,211,153,.12)}
body.dark-mode .badge-fail{color:#F87171;background:rgba(248,113,113,.12)}
body.dark-mode .tool-btn-primary:disabled{background:#6B2A2E}
body.dark-mode .tool-btn-outline:disabled{background:#2A2A2A;border-color:#333;color:#4A4A4A}
body.dark-mode .tool-footer-note{border-top-color:#333;color:#6B7280}
body.dark-mode #sourceInput,body.dark-mode .result-container{background:#2A2A2A;border-color:#3A3A3A;color:#E4E6EB}
body.dark-mode .result-container>div{border-bottom-color:#333}
body.dark-mode .result-container .empty-state{color:#6B7280}
body.dark-mode .option-group>label{color:#B0B3B8}
body.dark-mode .sort-btn{background:#2A2A2A;border-color:#3A3A3A;color:#B0B3B8}
body.dark-mode .sort-btn:hover{background:#333;border-color:#4A4A4A}
body.dark-mode .sort-btn.sort-active{background:rgba(248,113,113,.12);border-color:#E50914;color:#F87171}
body.dark-mode .group{background:#1E1E1E;border-color:#333}
body.dark-mode .group-header{background:#2A2A2A;color:#E4E6EB}
body.dark-mode .group-header:hover{background:#333}
body.dark-mode .group-header i{border-color:#B0B3B8}
body.dark-mode .group-header .count{color:#6B7280}
body.dark-mode .group-item:hover{background:#2A2A2A}
body.dark-mode .group-item .name{color:#E4E6EB}
body.dark-mode .group-item .url{color:#6B7280}
body.dark-mode .result-hint{color:#6B7280}
body.dark-mode .result-hint a{color:#F87171}
body.dark-mode .result-hint span{color:#4A4A4A}
body.dark-mode .result-container>div[style*="display: flex"]{color:#6B7280!important}
body.dark-mode .input-box{background:#2A2A2A;border-color:#3A3A3A}
body.dark-mode .input-header h3{color:#E4E6EB}
body.dark-mode .file-label{background:#1E1E1E;border-color:#1E40AF;color:#60A5FA}
body.dark-mode .file-label:hover{background:rgba(59,130,246,.1)}
body.dark-mode .action-btn.copy{background:#1E1E1E;border-color:#333;color:#B0B3B8}
body.dark-mode .action-btn.copy:hover{background:#2A2A2A;border-color:#4A4A4A;color:#E4E6EB}
body.dark-mode .button.danger{background:#1E1E1E;border-color:#6B2A2E;color:#F87171}
body.dark-mode .button.danger:hover{background:rgba(248,113,113,.1)}
body.dark-mode #inputA,body.dark-mode #inputB,body.dark-mode #result{background:#2A2A2A;border-color:#3A3A3A;color:#E4E6EB}
body.dark-mode #inputA::placeholder,body.dark-mode #inputB::placeholder,body.dark-mode #result::placeholder{color:#6B7280}
body.dark-mode #result[readonly]{background:#222}
body.dark-mode .tooltiptext{background:#333;color:#E4E6EB}
body.dark-mode .tooltiptext::after{border-top-color:#333}
body.dark-mode .duplicate-list{background:rgba(251,191,36,.08);border-color:rgba(251,191,36,.3)}
body.dark-mode .duplicate-list h4{color:#FBBF24}
body.dark-mode #duplicateItems>*{background:#2A2A2A;border-color:rgba(251,191,36,.25);color:#B0B3B8}
body.dark-mode .result-actions .action-btn{background:#1E1E1E;border-color:#333;color:#B0B3B8}
body.dark-mode .result-actions .action-btn:hover{background:#2A2A2A;border-color:#4A4A4A;color:#E4E6EB}
body.dark-mode .result-actions .action-btn.copy{color:#34D399;border-color:rgba(52,211,153,.3)}
body.dark-mode .result-actions .action-btn.copy:hover{background:rgba(52,211,153,.1)}
body.dark-mode .tool-help-list a{color:#F87171}
body.dark-mode .text-area-container>div{background:#2A2A2A!important;border-color:#3A3A3A!important;color:#E4E6EB!important}
body.dark-mode .search-highlight{background:rgba(251,191,36,.25);color:#FBBF24}
body.dark-mode .stats{color:#6B7280}
body.dark-mode .stats .highlight{color:#F87171}
body.dark-mode .stats span{background:#2A2A2A}
body.dark-mode #notification{background:rgba(52,211,153,.08);color:#6EE7B7;border-color:rgba(52,211,153,.3)}
body.dark-mode .control-group label{color:#B0B3B8}
body.dark-mode #removeContent{background:#2A2A2A;border-color:#3A3A3A;color:#E4E6EB}
body.dark-mode #removeContent::placeholder{color:#6B7280}
body.dark-mode #removeContent:focus{background:#2A2A2A;border-color:#E50914}
body.dark-mode #notification{background:#008F5F}

/* =========================================================
   响应式（公共 + 模块特有）
   ========================================================= */
@media(max-width:1024px){
  .tool-grid{grid-template-columns:1fr}
  .setting-grid{grid-template-columns:1fr}
}
@media(max-width:900px){
  .dual-panel,.content-wrapper,.input-result-container{grid-template-columns:1fr}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:768px){
  .nettv-tool-page{padding:16px;gap:16px}
  .tool-grid{gap:16px}
  .tool-card-head{padding:14px 16px}
  .tool-card-body{padding:16px}
  .tool-page-head{padding:16px 18px}
  .tool-page-head h1{font-size:18px}
  .tool-page-head p{font-size:12px}
  .country-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
  .letter-btn{min-width:30px;height:30px;padding:0 9px;font-size:12px}
  .input-wrapper,.player-url-input-group{flex-direction:column}
  .fetch-btn,.player-test-btn{width:100%}
  .info-row{flex-direction:column;align-items:flex-start;gap:4px}
  .info-value{text-align:left;width:100%}
  .action-buttons{flex-direction:column}
  .action-btn{width:100%}
  .player-container{aspect-ratio:16/10}
  .nettv-tool-page .uk-button{width:100%}
  .nettv-tool-page .uk-grid-small>.uk-width-1-3,
  .nettv-tool-page .uk-grid-small>.uk-width-1-2,
  .nettv-tool-page .uk-grid-small>.uk-width-1-4,
  .nettv-tool-page .uk-grid-small>.uk-width-3-4{width:100%}
  .nettv-tool-page .uk-tab>li>a{font-size:11.5px;padding:6px 8px}
  .options{grid-template-columns:1fr}
  #qrcode{min-width:200px;min-height:200px}
  .result-actions button{flex:1 1 100%}
  .action-group button{width:100%}
  .stat-grid{grid-template-columns:1fr}
  .panel-header{flex-direction:column;align-items:flex-start;gap:4px}
  .result-actions{flex-direction:column;align-items:stretch}
  .result-actions button,#directLink{width:100%;justify-content:center}
  .tool-param-row{grid-template-columns:1fr}
  .tool-sample-grid{grid-template-columns:1fr}
  .tool-btn-primary{width:100%}
  .tool-actions .tool-btn-outline{flex:1}
  .tool-btn-row{flex-direction:column}
  .tool-btn-primary,.tool-btn-outline{width:100%}
  .tool-btn-row .spacer{display:none}
  .tool-btn{flex:1}
  .table-container thead th,.table-container tbody td{padding:9px 10px;font-size:12.5px}
  .btn-group{flex-direction:column}
  .btn-group>button{width:100%}
  .result-header{flex-direction:column;align-items:flex-start}
  .export-btn{width:100%;justify-content:center}
  .group-item{flex-direction:column;align-items:flex-start;gap:2px}
  .group-item .name{max-width:100%}
  .input-header{flex-direction:column;align-items:flex-start}
  .input-actions{width:100%}
  .button-group{flex-direction:column}
  .primary-btn,.secondary-btn{width:100%}
  .result-actions{width:100%}
  .result-actions .action-btn{flex:1}
  .tooltiptext{max-width:calc(100vw - 80px);white-space:normal}
  .rule-item{grid-template-columns:1fr;gap:8px}
  .remove-btn{width:100%;height:32px;justify-content:center}
  .actions{flex-direction:column}
  .action-btn{width:100%}
  .search-box{flex-direction:column}
  .search-btn{width:100%}
  .file-upload{display:block;margin-right:0}
  .file-upload label{width:100%;justify-content:center}
  .buttons{flex-direction:column}
  .buttons button{width:100%}
  .btn-row button{flex:1 1 100%}
  .buttons-grid{grid-template-columns:1fr}
  .action-buttons{flex-direction:column;align-items:stretch}
  .char-count{margin-right:0;text-align:right}
  .action-btn{width:100%}
  .download-section{flex-direction:column;align-items:stretch}
  .download-section button{width:100%}
  #filename{max-width:100%}
  .stats{gap:6px 12px}
  .example-section>div{flex-direction:column;gap:14px!important}
  .text-container textarea{padding-right:44px}
  .output-content{padding:12px 14px 46px}
  .copy-btn{top:auto;bottom:10px;right:10px}
  .sort-buttons{flex-direction:column}
  .sort-btn{justify-content:center}
}
@media(max-width:480px){
  .stat-grid{grid-template-columns:1fr}
  .panel-header{flex-direction:column;align-items:flex-start;gap:4px}
}