:root {
    --jc-bg: #f7f8fb;
    --jc-card: #ffffff;
    --jc-text: #1e293b;
    --jc-muted: #64748b;
    --jc-line: #e6eaf0;
    --jc-accent: #ff6b58;
    --jc-accent-soft: #fff0ed;
    --jc-blue: #3b82f6;
    --jc-shadow: 0 16px 40px rgba(30, 41, 59, .07);
    --jc-radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--jc-text);
    background: var(--jc-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input, select { font: inherit; }

img { max-width: 100%; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.jc-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.jc-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(230, 234, 240, .86);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
}

.jc-header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.jc-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--jc-text);
    text-decoration: none;
}

.jc-brand img {
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(59, 130, 246, .15);
}

.jc-brand span { display: grid; gap: 1px; }
.jc-brand strong { font-size: 16px; letter-spacing: .02em; }
.jc-brand small { color: var(--jc-muted); font-size: 11px; letter-spacing: .14em; }

.jc-header-nav { display: flex; align-items: center; gap: 8px; }

.jc-header-nav a {
    padding: 9px 14px;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.jc-header-nav a:hover,
.jc-header-nav a[aria-current="page"] {
    color: var(--jc-accent);
    background: var(--jc-accent-soft);
}

.jc-hero {
    position: relative;
    padding: 64px 0 54px;
    overflow: hidden;
    background:
        radial-gradient(circle at 8% 18%, rgba(255, 107, 88, .13), transparent 30%),
        radial-gradient(circle at 88% 5%, rgba(59, 130, 246, .11), transparent 29%),
        linear-gradient(180deg, #fff 0%, #f7f8fb 100%);
}

.jc-hero::after {
    content: "";
    position: absolute;
    right: 8%;
    bottom: 22px;
    width: 110px;
    height: 110px;
    border: 22px solid rgba(255, 107, 88, .06);
    border-radius: 34px;
    transform: rotate(18deg);
}

.jc-eyebrow,
.jc-section-label {
    margin: 0 0 8px;
    color: var(--jc-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2em;
}

.jc-hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -.04em;
}

.jc-hero > .jc-shell > p:not(.jc-eyebrow) {
    margin: 16px 0 0;
    color: var(--jc-muted);
    font-size: 16px;
    line-height: 1.8;
}

.jc-search-panel {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
    width: min(760px, 100%);
    margin-top: 30px;
}

.jc-search {
    flex: 1;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid var(--jc-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(30, 41, 59, .07);
}

.jc-search > span { color: var(--jc-muted); font-size: 26px; transform: rotate(-18deg); }

.jc-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--jc-text);
    background: transparent;
    font-size: 15px;
}

.jc-search input::placeholder { color: #94a3b8; }

.jc-mobile-category { display: none; }

.jc-layout {
    display: grid;
    grid-template-columns: 238px minmax(0, 1fr);
    gap: 28px;
    padding: 40px 0 70px;
    align-items: start;
}

.jc-sidebar { position: sticky; top: 94px; }

.jc-sidebar-card {
    padding: 20px;
    border: 1px solid var(--jc-line);
    border-radius: var(--jc-radius);
    background: var(--jc-card);
    box-shadow: var(--jc-shadow);
}

.jc-sidebar-card h2 {
    margin: 0 0 15px;
    font-size: 16px;
}

.jc-category-list { display: grid; gap: 5px; }

.jc-category-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px;
    border: 0;
    border-radius: 10px;
    color: #475569;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.jc-category-button:hover { color: var(--jc-accent); transform: translateX(2px); }

.jc-category-button.is-active {
    color: var(--jc-accent);
    background: var(--jc-accent-soft);
    font-weight: 700;
}

.jc-category-button span:last-child {
    min-width: 24px;
    padding: 2px 6px;
    border-radius: 99px;
    color: #94a3b8;
    background: #f1f5f9;
    font-size: 11px;
    text-align: center;
}

.jc-results-header {
    min-height: 52px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.jc-results-header h2 { margin: 0; font-size: 26px; letter-spacing: -.03em; }

.jc-result-count {
    padding: 6px 11px;
    border: 1px solid var(--jc-line);
    border-radius: 99px;
    color: var(--jc-muted);
    background: #fff;
    font-size: 12px;
}

.jc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.jc-card {
    min-width: 0;
    display: flex;
    gap: 15px;
    padding: 17px;
    border: 1px solid var(--jc-line);
    border-radius: var(--jc-radius);
    color: inherit;
    background: var(--jc-card);
    box-shadow: 0 6px 22px rgba(30, 41, 59, .04);
    cursor: pointer;
    text-align: left;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.jc-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 107, 88, .35);
    box-shadow: var(--jc-shadow);
}

.jc-card-media {
    flex: 0 0 92px;
    height: 82px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #ff8c7b, #ff5d49);
    font-size: 24px;
    font-weight: 800;
}

.jc-card-media img { width: 100%; height: 100%; object-fit: cover; }

.jc-card-body { min-width: 0; display: flex; flex: 1; flex-direction: column; }

.jc-card-category {
    margin-bottom: 7px;
    color: var(--jc-accent);
    font-size: 11px;
    font-weight: 750;
}

.jc-card-title {
    margin: 0;
    display: -webkit-box;
    overflow: hidden;
    color: var(--jc-text);
    font-size: 15px;
    font-weight: 720;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.jc-card-more {
    margin-top: auto;
    padding-top: 10px;
    color: var(--jc-muted);
    font-size: 12px;
}

.jc-empty {
    min-height: 260px;
    display: grid;
    place-content: center;
    gap: 8px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--jc-radius);
    color: var(--jc-muted);
    text-align: center;
}

.jc-empty[hidden],
#jc-list-view[hidden],
#jc-hero[hidden] { display: none; }

.jc-empty strong { color: var(--jc-text); }

.jc-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 28px;
    padding: 38px 0 72px;
    align-items: start;
}

.jc-detail[hidden] { display: none; }

.jc-back {
    margin-bottom: 14px;
    padding: 9px 13px;
    border: 1px solid var(--jc-line);
    border-radius: 10px;
    color: #475569;
    background: #fff;
    cursor: pointer;
}

.jc-detail-card {
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--jc-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--jc-shadow);
}

.jc-breadcrumb {
    margin-bottom: 16px;
    color: var(--jc-muted);
    font-size: 12px;
}

.jc-breadcrumb button {
    padding: 0;
    border: 0;
    color: var(--jc-accent);
    background: transparent;
    cursor: pointer;
}

.jc-detail-card > h1 {
    margin: 0;
    font-size: clamp(25px, 4vw, 38px);
    line-height: 1.35;
    letter-spacing: -.035em;
}

.jc-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 15px 0 22px;
    color: var(--jc-muted);
    font-size: 12px;
}

.jc-detail-cover {
    width: 100%;
    max-height: 380px;
    margin-bottom: 24px;
    padding: 10px;
    object-fit: contain;
    border: 1px solid var(--jc-line);
    border-radius: 16px;
    background: #fff;
}

.jc-video-box {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid var(--jc-line);
    border-radius: 16px;
    background: #f8fafc;
}

.jc-video-box h2 { margin: 0 0 13px; font-size: 17px; }

.jc-video-box video,
.jc-video-box iframe {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
    background: #0f172a;
}

.jc-video-box video { object-fit: contain; }

.jc-article-content {
    color: #3f4c5f;
    font-size: 15px;
    line-height: 2;
    overflow-wrap: anywhere;
}

.jc-article-content:empty::before { content: "当前教程暂未填写正文内容。"; color: var(--jc-muted); }

.jc-article-content p { margin: 0 0 14px; }
.jc-article-content h1,
.jc-article-content h2,
.jc-article-content h3,
.jc-article-content h4 { color: var(--jc-text); line-height: 1.5; }

.jc-article-content img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 12px;
    background: #f1f5f9;
}

.jc-article-content video,
.jc-article-content iframe { max-width: 100%; border-radius: 12px; }

.jc-article-content a { color: #2563eb; text-decoration: underline; text-underline-offset: 3px; }

.jc-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--jc-line);
}

.jc-detail-actions button,
.jc-detail-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--jc-line);
    border-radius: 11px;
    color: #475569;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.jc-related { position: sticky; top: 94px; }
.jc-related-list { display: grid; gap: 8px; }

.jc-related-button {
    padding: 11px 12px;
    border: 1px solid var(--jc-line);
    border-radius: 11px;
    color: #475569;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.jc-related-button:hover { color: var(--jc-accent); border-color: rgba(255, 107, 88, .35); }

.jc-footer {
    padding: 25px 0;
    border-top: 1px solid var(--jc-line);
    color: var(--jc-muted);
    background: #fff;
    font-size: 12px;
}

.jc-footer .jc-shell { display: flex; justify-content: space-between; gap: 20px; }
.jc-footer a { color: var(--jc-text); text-decoration: none; }

@media (max-width: 900px) {
    .jc-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
    .jc-grid { grid-template-columns: 1fr; }
    .jc-detail { grid-template-columns: minmax(0, 1fr); }
    .jc-related { position: static; }
}

@media (max-width: 680px) {
    .jc-shell { width: min(100% - 24px, 1180px); }
    .jc-header-inner { min-height: 62px; }
    .jc-brand img { width: 34px; height: 34px; }
    .jc-header-nav { gap: 2px; }
    .jc-header-nav a { padding: 8px; font-size: 12px; }
    .jc-header-nav a:first-child { display: none; }
    .jc-hero { padding: 42px 0 34px; }
    .jc-hero > .jc-shell > p:not(.jc-eyebrow) { font-size: 14px; }
    .jc-search-panel { display: grid; margin-top: 22px; }
    .jc-search { min-height: 50px; }
    .jc-mobile-category { display: block; }
    .jc-mobile-category select {
        width: 100%;
        min-height: 48px;
        padding: 0 14px;
        border: 1px solid var(--jc-line);
        border-radius: 13px;
        color: var(--jc-text);
        background: #fff;
    }
    .jc-layout { display: block; padding: 28px 0 52px; }
    .jc-sidebar { display: none; }
    .jc-results-header { align-items: center; }
    .jc-results-header h2 { font-size: 22px; }
    .jc-card { padding: 14px; }
    .jc-card-media { flex-basis: 78px; height: 72px; }
    .jc-detail { padding: 24px 0 52px; }
    .jc-detail-card { padding: 20px 16px; border-radius: 18px; }
    .jc-detail-cover { max-height: 260px; }
    .jc-video-box { padding: 12px; }
    .jc-article-content { font-size: 14px; line-height: 1.9; }
    .jc-footer .jc-shell { display: grid; text-align: center; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; }
}
