/*******************************
* 文件名：pages.css
* 所属模板：xiaok（小K风格导航）
* 创建时间：2026-09-28
* 功能描述：单页（申请收录/收费快审/在线工具/关于本站/文章归档/购买广告/排行榜单）专用样式
*   说明：仅补充 xiaok/4dj 已有样式（style.css / page.css）之外的结构；
*         表单基础样式见 tijiao.css（1:1 取自 4dj），关于/广告页样式见 page-about.css / page-pay.css
*******************************/

/* ============================================================
   1. 单页标题（4dj submit.html 的 .content-item-head 结构）
   ============================================================ */
.content-item-head-left h1,
.content-item-head-left h2 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1a202c !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}
.content-item-head-left h1 i,
.content-item-head-left h2 i { color: #4a6cf7 !important; }

/* ============================================================
   2. 通用白色面板（用于统计行 / 列表 / 说明块）
   ============================================================ */
.xk-panel {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #eef2f6;
    padding: 22px 26px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .02);
}
.xk-panel + .xk-panel { margin-top: 16px; }

.xk-panel-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.xk-panel-title i { color: #4a6cf7; }
.xk-panel-title .xk-more {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: #a0aec0;
    text-decoration: none;
}
.xk-panel-title .xk-more:hover { color: #4a6cf7; }

.xk-muted { color: #718096; font-size: 13px; }
.xk-text { color: #4a5568; font-size: 14px; line-height: 1.9; }

/* 统计行 */
.xk-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    font-size: 14px;
    color: #4a5568;
}
.xk-stat-row strong { color: #e53e3e; font-weight: 600; }

/* ============================================================
   3. 表单补充（配合 tijiao.css 的 .submit-form）
   ============================================================ */
.submit-form .field-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.submit-form .field-row .field-protocol { flex: 0 0 auto; min-width: 100px; width: auto; }
.submit-form .field-row .field-domain { flex: 1; min-width: 160px; }

.submit-form .btn-ghost {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #4a6cf7;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
.submit-form .btn-ghost:hover { border-color: #4a6cf7; background: #f0f5ff; }

.submit-form .btn-reset {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 500;
}
.submit-form .btn-reset:hover { border-color: #e53e3e; }

.submit-form .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}
.submit-form .form-actions .btn-submit { width: auto; flex: 1; }

.submit-form .form-note {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 6px;
    line-height: 1.7;
}

/* 支付方式单选 */
.xk-pay-ways { display: flex; flex-wrap: wrap; gap: 10px; }
.xk-pay-way {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f7fafc;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}
.xk-pay-way:hover { border-color: #4a6cf7; }
.xk-pay-way input { accent-color: #4a6cf7; margin: 0; }
.xk-pay-way.on { border-color: #4a6cf7; background: #f0f5ff; color: #4a6cf7; }

/* 关闭提示 */
.xk-closed {
    text-align: center;
    padding: 46px 16px;
    color: #718096;
}
.xk-closed i { font-size: 52px; color: #e2e8f0; display: block; margin-bottom: 12px; }
.xk-closed h3 { font-size: 19px; color: #4a5568; margin-bottom: 8px; font-weight: 600; }
.xk-closed p { font-size: 14px; }

/* ============================================================
   4. 在线工具列表
   ============================================================ */
.xk-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 1024px) { .xk-tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .xk-tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .xk-tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.xk-tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 14px;
    text-decoration: none;
    transition: all .25s ease;
}
.xk-tool-card:hover {
    border-color: #4a6cf7;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 108, 247, .08);
}
.xk-tool-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0f5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.xk-tool-icon img { width: 24px; height: 24px; object-fit: contain; }
.xk-tool-icon i { font-size: 20px; color: #4a6cf7; }
.xk-tool-body { min-width: 0; flex: 1; }
.xk-tool-body h3 {
    font-size: 14.5px;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.xk-tool-body p {
    font-size: 12.5px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   5. 排行榜单（复用 page.css 的 .rank-card / .rank-list）
   ============================================================ */
.xk-rank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}
@media (max-width: 992px) { .xk-rank-grid { grid-template-columns: 1fr; } }

.xk-rank-grid .rank-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .02);
}

/* ============================================================
   6. 文章归档（资源专区）
   ============================================================ */
.xk-arch-banner { border-radius: 16px; overflow: hidden; }
.xk-arch-banner img { width: 100%; display: block; border-radius: 16px; }

.xk-arch-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (max-width: 768px) { .xk-arch-cols { grid-template-columns: 1fr; } }

.xk-post-list { list-style: none; margin: 0; padding: 0; }
.xk-post-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed #eef2f6;
    font-size: 14px;
}
.xk-post-list li:last-child { border-bottom: none; }
.xk-post-list li.new a { color: #e53e3e; }
.xk-post-list .xk-post-idx {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 5px;
    background: #f0f5ff;
    color: #4a6cf7;
    font-size: 12px;
    font-style: normal;
}
.xk-post-list .xk-post-date { flex: 0 0 auto; color: #a0aec0; font-size: 12px; }
.xk-post-list a {
    color: #4a5568;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xk-post-list a:hover { color: #4a6cf7; }

/* 热搜卡片（沿用 DHPro 结构，配色对齐 xiaok） */
.xk-hot-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 1024px) { .xk-hot-panel { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .xk-hot-panel { grid-template-columns: 1fr; } }

.xk-hot-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 14px;
    padding: 14px 16px 6px;
    /* 【溢出修复】作为 .xk-hot-panel（repeat(4,1fr)）的 grid 子项时，min-width 默认为 auto，
       会按内容 min-content 撑开轨道——热榜长标题（nowrap，如 31 字）把 4 条轨道顶到
       549/374/323/309（合计 1599 > 1074），文章归档页横向溢出 432px。
       置 0 后轨道回归 1fr 等分，内部 .xk-hot-list a 已有的 overflow:hidden + ellipsis 生效。 */
    min-width: 0;
}
.xk-hot-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2f5f9;
}
.xk-hot-head img { width: 17px; height: 17px; border: none; }
.xk-hot-title { font-size: 15px; font-weight: 600; color: #1a202c; }
.xk-hot-unit { margin-left: auto; font-size: 12px; color: #a0aec0; }
.xk-hot-body { max-height: 360px; overflow: auto; padding: 6px 2px; }
.xk-hot-list {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    padding: 5px 0;
}
.xk-hot-list a {
    flex: 1;
    min-width: 0;
    color: #4a5568;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xk-hot-list a:hover { color: #4a6cf7; }
.xk-hot-index {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 4px;
    background: #edf2f7;
    color: #718096;
    font-size: 12px;
}
.xk-hot-list:nth-child(1) .xk-hot-index { background: #FE2D46; color: #fff; }
.xk-hot-list:nth-child(2) .xk-hot-index { background: #F60; color: #fff; }
.xk-hot-list:nth-child(3) .xk-hot-index { background: #FAA90E; color: #fff; }
.xk-hot-rank { flex: 0 0 auto; color: #a0aec0; font-size: 12px; }
.xk-hot-time {
    display: block;
    text-align: right;
    padding: 8px 0 10px;
    border-top: 1px solid #f2f5f9;
    margin-top: 4px;
    color: #a0aec0;
    font-size: 12px;
}

/* ============================================================
   7. 深色模式
   ============================================================ */
body.dark-mode .content-item-head-left h1,
body.dark-mode .content-item-head-left h2 { color: #e2e8f0 !important; }

body.dark-mode .xk-panel,
body.dark-mode .xk-tool-card,
body.dark-mode .xk-rank-grid .rank-card { background: #16213e; border-color: #2a3a5a; }
body.dark-mode .xk-panel-title,
body.dark-mode .xk-tool-body h3,
body.dark-mode .xk-hot-title { color: #e2e8f0; }
body.dark-mode .xk-text,
body.dark-mode .xk-stat-row { color: #cbd5e0; }
body.dark-mode .xk-muted,
body.dark-mode .xk-tool-body p { color: #a0aec0; }
body.dark-mode .xk-tool-icon { background: #1a2a4a; }

body.dark-mode .submit-form .btn-ghost { background: #1a2a4a; border-color: #2a3a5a; }
body.dark-mode .submit-form .btn-reset { background: #3a1a1a; border-color: #9b2c2c; color: #fc8181; }
body.dark-mode .xk-pay-way { background: #1a2a4a; border-color: #2a3a5a; color: #cbd5e0; }
body.dark-mode .xk-pay-way.on { background: #1e2f52; border-color: #4a6cf7; color: #7ea2ff; }
body.dark-mode .xk-closed h3 { color: #cbd5e0; }

body.dark-mode .xk-post-list li { border-bottom-color: #2a3a5a; }
body.dark-mode .xk-post-list .xk-post-idx { background: #1a2a4a; }
body.dark-mode .xk-post-list a,
body.dark-mode .xk-hot-list a { color: #cbd5e0; }
body.dark-mode .xk-hot-card { background: #16213e; border-color: #2a3a5a; }
body.dark-mode .xk-hot-head { border-bottom-color: #2a3a5a; }
body.dark-mode .xk-hot-index { background: #2a3a5a; color: #a0aec0; }
body.dark-mode .xk-hot-time { border-top-color: #2a3a5a; }
