/* =========================================================
   Squirrel 网址导航页（/links）· v1.5.8 一比一还原 ZibTF 模板样式
   主色体系：Google 蓝 #4285f4（与 tf_links 模板一致）
   ========================================================= */
.sq-links-wrap {
    max-width: 1200px;
    margin: 24px auto 40px;
    padding: 0 15px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ---------- 左侧分类导航（ZibTF 侧栏） ---------- */
.sq-links-nav { width: 220px; flex-shrink: 0; }
.sq-links-nav-box {
    position: sticky;
    top: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,.06);
    overflow: hidden;
}
.sq-links-nav-head {
    padding: 16px 20px;
    background: linear-gradient(120deg, #4285f4, #3367d6);
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sq-links-nav-head i { font-size: 18px; }
.sq-links-nav-list { list-style: none; margin: 0; padding: 8px 0; }
.sq-links-nav-list li { margin: 4px 0; }
.sq-links-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all .25s;
    position: relative;
}
.sq-links-nav-link::before {
    content: '';
    width: 4px; height: 4px;
    border-radius: 50%;
    background-color: #6c757d;
    opacity: 0;
    transition: opacity .25s;
}
.sq-links-nav-link:hover { background-color: #f5f7fa; color: #4285f4; }
.sq-links-nav-link.active { background-color: #e8f0fe; color: #4285f4; font-weight: 500; }
.sq-links-nav-link.active::before { opacity: 1; background-color: #4285f4; }
.sq-links-nav-empty { display: block; padding: 0 20px; font-size: 14px; color: #6c757d; }
.sq-apply-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px auto;
    padding: 12px 0;
    text-align: center;
    background-color: #4285f4;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 2px 6px rgba(66,133,244,.2);
}
.sq-apply-btn:hover { background-color: #3367d6; color: #fff; box-shadow: 0 4px 8px rgba(66,133,244,.3); transform: translateY(-1px); }

/* ---------- 右侧主体 ---------- */
.sq-links-content { flex: 1 1 0; min-width: 0; }

/* 大图搜索区（ZibTF：320px + 半透明遮罩） */
.sq-links-hero {
    position: relative;
    height: 320px;
    background: linear-gradient(135deg, #3d68db 0%, #7c5cf0 100%);
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
}
.sq-links-hero-mask {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,.35);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.sq-links-hero-in {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    max-width: 900px;
    margin: 0 auto;
}
.sq-links-hero-title {
    color: #fff;
    font-size: 26px;
    margin: 0 0 20px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.sq-links-hero-sub { color: rgba(255,255,255,.92); font-size: 14px; margin: -12px 0 16px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* 场景标签 */
.sq-search-tmenu {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}
.sq-search-tmenu li {
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    opacity: .9;
    transition: all .2s;
}
.sq-search-tmenu li:hover { opacity: 1; background-color: rgba(255,255,255,.1); }
.sq-search-tmenu li.active { opacity: 1; font-weight: 500; background-color: rgba(255,255,255,.2); }

/* 搜索框（白底 52px + 蓝 100px 按钮） */
.sq-search-sousk { width: 100%; margin-bottom: 18px; }
.sq-search-form {
    width: 100%;
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.sq-search-form input {
    flex-grow: 1;
    height: 52px;
    padding: 0 20px;
    border: none;
    font-size: 15px;
    outline: none;
    background-color: #fff;
    color: #333;
    min-width: 0;
}
.sq-search-form button {
    width: 100px;
    height: 52px;
    border: none;
    background-color: #4285f4;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .2s;
    flex-shrink: 0;
}
.sq-search-form button:hover { background-color: #3367d6; }

/* 场景引擎胶囊 */
.sq-search-subnav { width: 100%; }
.sq-search-scene-item { display: none; }
.sq-search-scene-item.active { display: block; }
.sq-search-engines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.sq-search-engines li {
    padding: 6px 14px;
    background-color: rgba(255,255,255,.15);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.sq-search-engines li:hover { background-color: rgba(255,255,255,.25); }
.sq-search-engines li.active { background-color: #4285f4; font-weight: 500; }

/* 分类区块（白卡 + 蓝竖条标题 + 数量） */
.sq-links-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,.06);
    margin-bottom: 30px;
    transition: box-shadow .25s;
}
.sq-links-section:hover { box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.sq-links-section-head {
    padding-bottom: 12px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sq-links-section-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sq-links-section-title::before { content: ''; width: 4px; height: 20px; background-color: #4285f4; border-radius: 2px; }
.sq-links-section-count { color: #6c757d; font-size: 14px; margin-left: 10px; font-weight: normal; }

/* 链接卡片（灰底横条 + 圆图标 + 名称/描述/热度 + 按钮） */
.sq-links-list { display: flex; flex-direction: column; gap: 12px; }
.sq-link-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #f5f7fa;
    border-radius: 8px;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.sq-link-card:hover,
.sq-link-card.hovered { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(78,124,242,.3); }
.sq-link-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background-color: #fff;
    overflow: hidden;
    margin-right: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.sq-link-icon img { width: 100%; height: 100%; object-fit: cover; }
.sq-link-content { flex-grow: 1; overflow: hidden; min-width: 0; }
.sq-link-name {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}
.sq-link-desc {
    font-size: 13px;
    color: #6c757d;
    margin: 0 0 4px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sq-link-heat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
    margin: 0;
}
.sq-link-stars i { font-size: 12px; margin: 0 1px; color: #ffc107; }
.sq-link-stars i.fa-star-o { color: #ddd; }
.sq-link-status { font-size: 12px; }
.sq-link-status i { font-size: 7px; margin-right: 4px; vertical-align: 1px; }
.sq-link-status.ok { color: #2f9e44; }
.sq-link-status.pending { color: #f59e0b; }
.sq-link-actions { display: flex; gap: 10px; margin-left: 15px; flex-shrink: 0; }
.sq-link-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all .25s;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}
.sq-link-detail { background-color: #fff; color: #4285f4; border-color: #4285f4; }
.sq-link-detail:hover { background-color: #4285f4; color: #fff; }
.sq-link-go { background-color: #4285f4; color: #fff; border-color: #4285f4; }
.sq-link-go:hover { background-color: #3367d6; color: #fff; border-color: #3367d6; }

/* 空状态 */
.sq-links-empty {
    background-color: #fff;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,.06);
    margin-top: 24px;
}
.sq-links-empty-icon { font-size: 48px; color: #e9ecef; margin-bottom: 16px; }
.sq-links-empty-text { font-size: 16px; color: #6c757d; margin: 0 0 20px; }
.sq-links-empty-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: #4285f4;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all .25s;
}
.sq-links-empty-btn:hover { background-color: #3367d6; color: #fff; }

/* ---------- 详情页（ZibTF 详情） ---------- */
.sq-links-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 0;
    font-size: 14px;
    color: #6c757d;
}
.sq-links-crumb a { color: #4285f4; text-decoration: none; transition: color .2s; }
.sq-links-crumb a:hover { color: #3367d6; }
.sq-links-crumb span { margin: 0 6px; color: #c3c9d4; }
.sq-links-crumb .current { color: #6b7280; }
.sq-detail-wrap {
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 3px 12px rgba(0,0,0,.06);
    margin-top: 0;
}
.sq-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.sq-detail-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background-color: #f5f7fa;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,.08);
}
.sq-detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.sq-detail-header-content { flex: 1 1 0; min-width: 200px; }
.sq-detail-title { font-size: 24px; font-weight: 500; margin: 0 0 8px; color: #333; }
.sq-detail-header-heat { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sq-detail-heat-count { font-size: 14px; color: #6c757d; }
.sq-detail-heat-stars i { font-size: 14px; margin: 0 2px; color: #ffc107; }
.sq-detail-heat-stars i.fa-star-o { color: #ddd; }
.sq-detail-url { font-size: 14px; color: #4285f4; margin: 0; word-break: break-all; }
.sq-detail-url a { color: #4285f4; text-decoration: none; }
.sq-detail-url a:hover { text-decoration: underline; }
.sq-detail-header-actions { display: flex; gap: 12px; flex-shrink: 0; }
.sq-detail-header-actions .sq-link-btn { padding: 8px 20px; font-size: 14px; }
.sq-detail-content { padding: 0; }
.sq-detail-section { margin-bottom: 24px; }
.sq-detail-section-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sq-detail-section-title::before { content: ''; width: 4px; height: 16px; background-color: #4285f4; border-radius: 2px; }
.sq-detail-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin: 0;
    padding: 12px;
    background-color: #f5f7fa;
    border-radius: 8px;
}
.sq-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 12px;
    background-color: #f5f7fa;
    border-radius: 8px;
}
.sq-detail-meta-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6c757d; }
.sq-detail-meta-label { font-weight: 500; color: #333; }
.sq-detail-meta-item i { font-size: 12px; color: #ffc107; margin: 0 1px; }
.sq-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f5f7fa;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all .25s;
    margin-top: 10px;
}
.sq-detail-back:hover { background-color: #e8f0fe; color: #4285f4; }

/* ---------- 申请入驻弹窗 ---------- */
.sq-modal { display: none; position: fixed; inset: 0; z-index: 9999; }
.sq-modal.open { display: block; }
.sq-modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,.55); }
.sq-modal-box {
    position: relative;
    width: 620px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 60px);
    margin: 60px auto 0;
    background: #fff;
    border-radius: 12px;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(15,23,42,.35);
    animation: sqModalIn .25s ease;
}
@keyframes sqModalIn {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.sq-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f2f5;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
}
.sq-modal-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: #333; }
.sq-modal-head h3 i { color: #4285f4; margin-right: 8px; }
.sq-modal-close {
    width: 30px; height: 30px;
    border: none;
    border-radius: 50%;
    background: #f0f2f5;
    color: #6b7280;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all .2s;
}
.sq-modal-close:hover { background: #ffe9e9; color: #e5484d; }
.sq-modal-body { padding: 20px 22px 24px; }
.sq-apply-rules {
    list-style: none;
    margin: 0 0 18px;
    padding: 14px 16px;
    background: #f5f7fa;
    border-radius: 8px;
    border-left: 3px solid #4285f4;
}
.sq-apply-rules li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #555;
    padding: 3px 0;
    line-height: 1.6;
}
.sq-apply-rules li i { color: #4285f4; margin-top: 3px; flex-shrink: 0; }
.sq-form-row { display: flex; gap: 14px; margin-bottom: 14px; }
.sq-form-col { flex: 1; min-width: 0; }
.sq-form-col label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 6px; }
.sq-form-col input[type="text"],
.sq-form-col input[type="url"],
.sq-form-col select,
.sq-form-col textarea {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color .2s, background .2s;
}
.sq-form-col input:focus, .sq-form-col select:focus, .sq-form-col textarea:focus { border-color: #4285f4; }
.sq-form-col textarea { resize: vertical; }
.sq-logo-upload { position: relative; }
.sq-logo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px dashed #4285f4;
    border-radius: 8px;
    background: #e8f0fe;
    color: #4285f4;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.sq-logo-btn:hover { background: #d5e2fd; }
.sq-logo-preview {
    width: 64px; height: 64px;
    border-radius: 8px;
    object-fit: cover;
    margin-top: 10px;
    border: 1px solid #dee2e6;
}
.sq-logo-tip { margin: 8px 0 0; font-size: 12px; color: #999; }
.sq-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
}
.sq-form-msg { margin: 0; font-size: 13px; color: #e5484d; }
.sq-form-msg.ok { color: #2f9e44; }
.sq-apply-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    border: none;
    border-radius: 8px;
    background-color: #4285f4;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .2s, transform .2s;
}
.sq-apply-submit:hover { background-color: #3367d6; }
.sq-apply-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- 移动端固定横滑分类导航 ---------- */
.sq-links-fixed-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.sq-links-fixed-nav-in { padding: 12px 15px; }
.sq-links-fixed-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.sq-links-fixed-nav-list::-webkit-scrollbar { display: none; }
.sq-links-fixed-nav-list li { flex-shrink: 0; }
.sq-links-fixed-link {
    display: inline-block;
    padding: 6px 14px;
    color: #666;
    background: #f5f7fa;
    border-radius: 20px;
    font-size: 13px;
    line-height: 20px;
    white-space: nowrap;
    text-decoration: none;
    transition: color .25s, background-color .25s;
}
.sq-links-fixed-link:hover,
.sq-links-fixed-link.active { color: #4285f4; background: #e8f0fe; }
.sq-links-fixed-link.active { font-weight: 500; }
.sq-links-fixed-apply { background-color: #4285f4; color: #fff; }
.sq-links-fixed-apply:hover { background-color: #3367d6; color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .sq-link-actions,
    .sq-detail-header-actions { flex-direction: row; gap: 8px; }
    .sq-link-btn,
    .sq-detail-header-actions .sq-link-btn { padding: 5px 12px; font-size: 12px; }
    .sq-detail-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .sq-detail-header-actions { width: auto; flex-direction: row; justify-content: flex-end; margin-top: 0; }
    .sq-search-tmenu { gap: 15px; }
    .sq-search-tmenu li { font-size: 14px; }
    .sq-search-engines { gap: 8px; }
    .sq-search-engines li { padding: 5px 12px; font-size: 12px; }
}
@media (max-width: 768px) {
    .sq-links-nav { display: none; }
    .sq-links-wrap { flex-direction: column; gap: 15px; margin-top: 15px; padding-top: 48px; }
    .sq-links-hero { height: 280px; margin-bottom: 20px; }
    .sq-links-hero-title { font-size: 22px; margin-bottom: 15px; }
    .sq-search-form input { height: 48px; font-size: 14px; }
    .sq-search-form button { width: 90px; height: 48px; font-size: 14px; }
    .sq-link-card { padding: 12px; }
    .sq-link-icon { width: 48px; height: 48px; margin-right: 14px; }
    .sq-links-fixed-nav { display: block; top: 50px; }
    .sq-detail-wrap { padding: 16px; }
    .sq-detail-icon { width: 60px; height: 60px; }
    .sq-detail-title { font-size: 20px; }
    .sq-detail-meta { gap: 15px; }
    .sq-form-row { flex-direction: column; }
    .sq-modal-box { margin-top: 24px; }
}
@media (max-width: 420px) {
    .sq-links-wrap { padding-right: 10px; padding-left: 10px; }
    .sq-search-tmenu { justify-content: space-between; width: 100%; gap: 4px; }
    .sq-search-tmenu li { padding-right: 6px; padding-left: 6px; }
    .sq-search-form input { padding-right: 12px; padding-left: 12px; }
    .sq-search-form button { flex: 0 0 78px; width: 78px; }
    .sq-search-engines { gap: 6px; }
    .sq-search-engines li { padding-right: 10px; padding-left: 10px; }
    .sq-links-section { padding: 14px; }
    .sq-link-card { width: 100%; }
    .sq-link-actions { justify-content: stretch; width: 100%; margin-left: 0; margin-top: 10px; flex-direction: row; }
    .sq-link-actions .sq-link-btn { flex: 1 1 0; min-width: 0; }
    .sq-detail-wrap { padding: 14px; }
    .sq-detail-header { align-items: flex-start; }
}

/* ---------- 深色模式适配 ---------- */
html[data-bs-theme="dark"] .sq-links-nav-box,
html[data-bs-theme="dark"] .sq-links-section,
html[data-bs-theme="dark"] .sq-detail-wrap,
html[data-bs-theme="dark"] .sq-modal-box,
html[data-bs-theme="dark"] .sq-links-fixed-nav,
html[data-bs-theme="dark"] .sq-links-empty {
    background: #1c2534;
    box-shadow: 0 3px 12px rgba(0,0,0,.35);
}
html[data-bs-theme="dark"] .sq-links-section:hover { box-shadow: 0 6px 16px rgba(0,0,0,.45); }
html[data-bs-theme="dark"] .sq-links-section-title,
html[data-bs-theme="dark"] .sq-detail-title,
html[data-bs-theme="dark"] .sq-detail-section-title,
html[data-bs-theme="dark"] .sq-modal-head h3,
html[data-bs-theme="dark"] .sq-form-col label,
html[data-bs-theme="dark"] .sq-detail-meta-label { color: #e2e8f0; }
html[data-bs-theme="dark"] .sq-links-section-head,
html[data-bs-theme="dark"] .sq-detail-header,
html[data-bs-theme="dark"] .sq-modal-head,
html[data-bs-theme="dark"] .sq-form-foot { border-color: #2d3a4f; }
html[data-bs-theme="dark"] .sq-links-nav-link { color: #94a3b8; }
html[data-bs-theme="dark"] .sq-links-nav-link:hover { background-color: #26324a; color: #93b4ff; }
html[data-bs-theme="dark"] .sq-links-nav-link.active { background-color: #26324a; color: #93b4ff; }
html[data-bs-theme="dark"] .sq-link-card { background-color: #232f42; }
html[data-bs-theme="dark"] .sq-link-card:hover,
html[data-bs-theme="dark"] .sq-link-card.hovered { background-color: #232f42; box-shadow: 0 4px 12px rgba(78,124,242,.3); }
html[data-bs-theme="dark"] .sq-link-name { color: #e2e8f0; }
html[data-bs-theme="dark"] .sq-link-desc,
html[data-bs-theme="dark"] .sq-link-heat,
html[data-bs-theme="dark"] .sq-links-crumb,
html[data-bs-theme="dark"] .sq-detail-heat-count,
html[data-bs-theme="dark"] .sq-detail-meta-item,
html[data-bs-theme="dark"] .sq-logo-tip,
html[data-bs-theme="dark"] .sq-links-empty-text { color: #94a3b8; }
html[data-bs-theme="dark"] .sq-link-icon { background-color: #26324a; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
html[data-bs-theme="dark"] .sq-link-detail { background-color: #26324a; color: #93b4ff; border-color: #3d5a99; }
html[data-bs-theme="dark"] .sq-link-detail:hover { background-color: #4285f4; color: #fff; }
html[data-bs-theme="dark"] .sq-detail-icon { background-color: #26324a; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
html[data-bs-theme="dark"] .sq-detail-desc,
html[data-bs-theme="dark"] .sq-detail-meta,
html[data-bs-theme="dark"] .sq-apply-rules { background-color: #232f42; color: #cbd5e1; }
html[data-bs-theme="dark"] .sq-detail-url a { color: #93b4ff; }
html[data-bs-theme="dark"] .sq-detail-back { background-color: #232f42; color: #cbd5e1; }
html[data-bs-theme="dark"] .sq-detail-back:hover { background-color: #26324a; color: #93b4ff; }
html[data-bs-theme="dark"] .sq-links-crumb a { color: #93b4ff; }
html[data-bs-theme="dark"] .sq-modal-head,
html[data-bs-theme="dark"] .sq-form-foot { background: #1c2534; }
html[data-bs-theme="dark"] .sq-modal-close { background: #26324a; color: #94a3b8; }
html[data-bs-theme="dark"] .sq-form-col input,
html[data-bs-theme="dark"] .sq-form-col select,
html[data-bs-theme="dark"] .sq-form-col textarea { background: #232f42; color: #cbd5e1; border-color: #334155; }
html[data-bs-theme="dark"] .sq-form-col input:focus,
html[data-bs-theme="dark"] .sq-form-col select:focus,
html[data-bs-theme="dark"] .sq-form-col textarea:focus { border-color: #4285f4; background: #26324a; }
html[data-bs-theme="dark"] .sq-apply-rules li { color: #cbd5e1; }
html[data-bs-theme="dark"] .sq-links-fixed-nav { box-shadow: 0 2px 8px rgba(0,0,0,.4); }
html[data-bs-theme="dark"] .sq-links-fixed-link { background: #26324a; color: #94a3b8; }
html[data-bs-theme="dark"] .sq-links-fixed-link:hover,
html[data-bs-theme="dark"] .sq-links-fixed-link.active { color: #93b4ff; background: #1c2534; }
html[data-bs-theme="dark"] .sq-links-empty-icon { color: #334155; }
html[data-bs-theme="dark"] .sq-apply-rules { border-left-color: #4285f4; }


/* ---------- LOGO 区增强（v1.6.2） ---------- */
.sq-logo-row { display: flex; gap: 8px; margin-bottom: 10px; }
.sq-logo-row:last-of-type { margin-bottom: 0; }
.sq-logo-input {
    flex: 1; min-width: 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color .2s;
}
.sq-logo-input:focus { border-color: #4285f4; }
.sq-logo-fetch {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px;
    border: none; border-radius: 8px;
    background-color: #4285f4; color: #fff;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: background-color .2s;
    flex-shrink: 0;
}
.sq-logo-fetch:hover { background-color: #3367d6; }
.sq-logo-clear {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px;
    border: 1px solid #dee2e6; border-radius: 8px;
    background: #fff; color: #6b7280;
    font-size: 13px; cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}
.sq-logo-clear:hover { border-color: #e5484d; color: #e5484d; background: #fff5f5; }
html[data-bs-theme="dark"] .sq-logo-input { background: #232f42; color: #cbd5e1; border-color: #334155; }
html[data-bs-theme="dark"] .sq-logo-input:focus { border-color: #4285f4; }
html[data-bs-theme="dark"] .sq-logo-clear { background: #232f42; color: #94a3b8; border-color: #334155; }
html[data-bs-theme="dark"] .sq-logo-clear:hover { color: #f87171; border-color: #e5484d; background: #2a1f24; }


/* ---------- 网站地址行：输入框 + 自动获取（v1.6.3） ---------- */
.sq-url-row { display: flex; gap: 8px; align-items: center; }
.sq-url-row input[type="url"] { flex: 1; min-width: 0; }
.sq-url-row .sq-logo-fetch { flex-shrink: 0; }


/* ============ v1.6.13 新版风格（横版，一行三个） ============ */
.sq-h-wrap { flex-direction: column; }
.sq-h-wrap .sq-links-content { width: 100%; }
.sq-h-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sq-h-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background-color: #f5f7fa;
    border-radius: 10px;
    transition: all .25s;
    position: relative;
}
.sq-h-card:hover,
.sq-h-card.hovered { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(78,124,242,.3); background-color: #f5f7fa; }
.sq-h-icon {
    width: 64px; height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.sq-h-icon img { width: 100%; height: 100%; object-fit: contain; }
.sq-h-main { flex: 1; min-width: 0; }
.sq-h-main .sq-link-name { font-size: 15px; font-weight: 600; margin: 2px 0 6px; }
.sq-h-main .sq-link-desc {
    font-size: 12.5px;
    color: #6c757d;
    line-height: 1.55;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sq-h-main .sq-link-heat { font-size: 12px; color: #6c757d; margin: 0 0 12px; }
.sq-h-actions { display: flex; gap: 8px; }
.sq-h-actions .sq-link-btn { padding: 6px 14px; font-size: 12.5px; }

/* 申请详情板块 */
.sq-h-detail {
    margin-top: 18px;
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 3px 12px rgba(0,0,0,.06);
}
.sq-h-detail-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    padding-left: 12px;
    border-left: 4px solid #4285f4;
    color: #333;
}
.sq-h-detail-hl { font-weight: 700; }
.sq-h-detail-body h4 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; color: #333; }
.sq-h-detail-body h4:first-child { margin-top: 0; }
.sq-h-detail-body p { font-size: 13.5px; color: #555; line-height: 1.85; margin: 0 0 8px; }
.sq-h-detail-body p:last-child { margin-bottom: 0; }
.sq-h-detail-apply { margin-top: 20px; text-align: center; }
.sq-h-detail-btn { display: inline-block; width: auto; padding: 11px 34px; margin: 0; }

/* 深色适配（新版风格） */
html[data-bs-theme="dark"] .sq-h-card { background-color: #232f42; }
html[data-bs-theme="dark"] .sq-h-card:hover,
html[data-bs-theme="dark"] .sq-h-card.hovered { background-color: #232f42; box-shadow: 0 4px 12px rgba(78,124,242,.3); }
html[data-bs-theme="dark"] .sq-h-icon { background-color: #26324a; }
/* 深色模式下详情板块随页面变黑（深色背景），标题文字与高亮文字统一为白色 */
html[data-bs-theme="dark"] .sq-h-detail { background: #1c2534; box-shadow: 0 3px 12px rgba(0,0,0,.35); }
html[data-bs-theme="dark"] .sq-h-detail-title { color: #fff; border-left-color: #4285f4; }
html[data-bs-theme="dark"] .sq-h-detail-hl { color: #fff !important; }
html[data-bs-theme="dark"] .sq-h-detail-body h4 { color: #e2e8f0; }
html[data-bs-theme="dark"] .sq-h-detail-body p { color: #94a3b8; }

/* 横版窄屏适配 */
@media (max-width: 1200px) { .sq-h-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .sq-h-grid { grid-template-columns: 1fr; } }
