/* ============================================================
   江湖春点（黑话）辞典 —— 页面私有样式（/tool/jianghu-heihua）
   颜色只用 --c-* 变量，自动适配黑夜模式
   ============================================================ */

/* ---------- 页头 ---------- */
.jh-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
}

.jh-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--c-text);
}

.jh-lead {
    margin: 8px 0 0;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--c-text-sub);
    max-width: 760px;
}

/* ---------- 随机切口 · 镇场卡片 ---------- */
.jh-hero {
    position: relative;
    overflow: hidden;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    padding: 26px 24px 22px;
    text-align: center;
}

.jh-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% -10%, rgba(91, 108, 255, .16), transparent 62%);
    pointer-events: none;
}

.jh-hero-label {
    position: relative;
    font-size: 12px;
    letter-spacing: .18em;
    color: var(--c-text-muted);
    margin-bottom: 12px;
}

.jh-hero-word {
    position: relative;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--c-text);
    letter-spacing: .04em;
    word-break: break-word;
}

.jh-hero-mean {
    position: relative;
    margin-top: 12px;
    font-size: 15px;
    color: var(--c-text-sub);
    min-height: 22px;
}

.jh-hero-note {
    position: relative;
    margin-top: 6px;
    font-size: 13px;
    color: var(--c-text-muted);
}

.jh-hero-actions {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* ---------- 通用卡片 ---------- */
.jh-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    padding: 20px 22px;
    margin-top: 16px;
}

.jh-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.jh-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
}

.jh-card-title .jh-sub {
    font-size: 13px;
    font-weight: 400;
    color: var(--c-text-muted);
    margin-left: 8px;
}

/* ---------- 搜索 + 分类 ---------- */
.jh-search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.jh-input {
    flex: 1 1 240px;
    min-width: 0;
    padding: 10px 14px;
    font-size: 15px;
    color: var(--c-text);
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.jh-input::placeholder { color: var(--c-text-muted); }

.jh-input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-soft);
}

.jh-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.jh-cat {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--c-text-sub);
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s;
}

.jh-cat:hover {
    color: var(--c-primary);
    border-color: var(--c-primary);
}

.jh-cat.active {
    color: #fff;
    background: var(--c-primary);
    border-color: var(--c-primary);
}

/* ---------- 辞典列表 ---------- */
.jh-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 12px;
}

.jh-item {
    position: relative;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 14px 16px 13px;
    transition: border-color .18s, transform .18s;
}

.jh-item:hover {
    border-color: var(--c-primary);
    transform: translateY(-2px);
}

.jh-item-word {
    font-size: 19px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: .04em;
    padding-right: 52px;
    word-break: break-word;
}

.jh-item-cat {
    position: absolute;
    top: 13px;
    right: 14px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--c-primary);
    background: var(--c-primary-soft);
}

.jh-item-mean {
    margin-top: 7px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--c-text-sub);
}

.jh-item-note {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--c-text-muted);
}

.jh-item-note::before {
    content: "※ ";
}

.jh-empty {
    padding: 30px 10px;
    text-align: center;
    font-size: 14px;
    color: var(--c-text-muted);
}

/* ---------- 盘道闯关 ---------- */
.jh-game-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.jh-game-stat {
    font-size: 14px;
    color: var(--c-text-sub);
}

.jh-game-stat b {
    color: var(--c-text);
    font-size: 16px;
}

.jh-lives {
    display: inline-flex;
    gap: 3px;
    margin-left: 6px;
    vertical-align: -1px;
}

.jh-life {
    font-size: 15px;
    filter: grayscale(0);
    transition: filter .2s, opacity .2s;
}

.jh-life.dead {
    filter: grayscale(1);
    opacity: .32;
}

.jh-question {
    font-size: 17px;
    line-height: 1.7;
    color: var(--c-text);
    font-weight: 600;
    margin: 4px 0 16px;
}

.jh-question em {
    font-style: normal;
    color: var(--c-primary);
    font-size: 20px;
}

.jh-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.jh-option {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 13px 16px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--c-text-sub);
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .16s;
}

.jh-option:hover:not(:disabled) {
    color: var(--c-text);
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
}

.jh-option:disabled { cursor: default; }

.jh-option .jh-key {
    flex: 0 0 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text-muted);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 7px;
}

.jh-option.correct {
    color: #0b7a55;
    border-color: #00c896;
    background: rgba(0, 200, 150, .12);
}

.jh-option.correct .jh-key {
    color: #fff;
    background: #00c896;
    border-color: #00c896;
}

.jh-option.wrong {
    color: #b3282d;
    border-color: #e5484d;
    background: rgba(229, 72, 77, .12);
}

.jh-option.wrong .jh-key {
    color: #fff;
    background: #e5484d;
    border-color: #e5484d;
}

.jh-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.65;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-bg-soft);
    color: var(--c-text-sub);
}

.jh-feedback.ok {
    border-color: rgba(0, 200, 150, .45);
    background: rgba(0, 200, 150, .10);
    color: #0b7a55;
}

.jh-feedback.bad {
    border-color: rgba(229, 72, 77, .45);
    background: rgba(229, 72, 77, .10);
    color: #b3282d;
}

.jh-result {
    text-align: center;
    padding: 26px 18px;
}

.jh-result-emoji { font-size: 42px; line-height: 1; }

.jh-result-title {
    margin-top: 12px;
    font-size: 21px;
    font-weight: 800;
    color: var(--c-text);
}

.jh-result-desc {
    margin-top: 8px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--c-text-sub);
}

.jh-result-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- 难度选择 ---------- */
.jh-diff-tip {
    margin: -4px 0 12px;
    font-size: 12.5px;
    color: var(--c-text-muted);
}

/* ---------- 限时进度 ---------- */
.jh-timebar {
    display: inline-block;
    width: 72px;
    height: 6px;
    margin-left: 8px;
    border-radius: 999px;
    background: var(--c-border);
    overflow: hidden;
    vertical-align: middle;
}

.jh-timebar i {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--c-primary);
    transition: width .95s linear, background .3s;
}

.jh-timebar.low i { background: #e5484d; }

/* ---------- 切口接龙 ---------- */
.jh-chain-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--c-text-sub);
}

.jh-chain-bar b {
    color: var(--c-text);
    font-size: 16px;
}

.jh-chain-bar .hot { color: var(--c-primary); font-weight: 700; }

.jh-chain-plain {
    padding: 16px 18px;
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-primary);
    border-radius: 12px;
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--c-text);
}

.jh-chain-plain .k {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    letter-spacing: .1em;
    color: var(--c-text-muted);
}

.jh-chain-ask {
    margin: 14px 0 12px;
    font-size: 14.5px;
    color: var(--c-text-sub);
}

.jh-chain-opts { grid-template-columns: 1fr; }

.jh-chain-opts .jh-option { font-size: 15px; }

/* ---------- 分享卡 ---------- */
.jh-share-preview {
    display: flex;
    justify-content: center;
}

.jh-share-preview img {
    display: block;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    border: 1px solid var(--c-border);
}

/* ---------- 报万儿 ---------- */
.jh-bao-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.jh-bao-row .jh-input { flex: 0 0 150px; }

.jh-bao-result {
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px dashed var(--c-border);
    background: var(--c-bg-soft);
}

.jh-bao-main {
    font-size: 22px;
    font-weight: 800;
    color: var(--c-text);
    letter-spacing: .05em;
}

.jh-bao-man {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--c-primary);
    background: var(--c-primary-soft);
    border-radius: 8px;
}

.jh-bao-line {
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.75;
    color: var(--c-text-sub);
}

.jh-bao-tip {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--c-text-muted);
}

/* ---------- 免责声明 ---------- */
.jh-note {
    margin-top: 16px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--c-text-muted);
    background: var(--c-bg-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    .jh-hero { padding: 20px 16px 18px; }
    .jh-hero-word { font-size: 23px; }
    .jh-list { grid-template-columns: 1fr; }
    .jh-options { grid-template-columns: 1fr; }
    .jh-card { padding: 16px 14px; }
    .jh-question { font-size: 16px; }
    .jh-bao-row .jh-input { flex: 1 1 100%; }
    .jh-bao-main { font-size: 19px; }
}
