@font-face{font-family:Poppins;src:url("fonts/poppins-400.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Poppins;src:url("fonts/poppins-500.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:Poppins;src:url("fonts/poppins-700.woff2") format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:Poppins;src:url("fonts/poppins-900.woff2") format("woff2");font-weight:900;font-display:swap}
@font-face{font-family:Spartan;src:url("fonts/spartan-400.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Spartan;src:url("fonts/spartan-600.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:Spartan;src:url("fonts/spartan-700.woff2") format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:Spartan;src:url("fonts/spartan-900.woff2") format("woff2");font-weight:900;font-display:swap}

:root {
    --mdx2-orange: #ff6740;
    --mdx2-orange-dark: #e95734;
    --mdx2-bg: #ffffff;
    --mdx2-panel: #f1f2f3;
    --mdx2-panel-2: #e9eaec;
    --mdx2-text: #29292c;
    --mdx2-muted: #65666a;
    --mdx2-border: #dedfe1;
    --mdx2-shadow: 0 2px 9px rgba(0, 0, 0, .16);
    --mdx2-sidebar: 256px;
    --mdx2-topbar: 56px;
    font-family: Poppins, "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
    color-scheme: light;
}

html[data-mdx2-theme="dark"] {
    --mdx2-bg: #18191b;
    --mdx2-panel: #25272a;
    --mdx2-panel-2: #303236;
    --mdx2-text: #f2f2f2;
    --mdx2-muted: #b7b8bc;
    --mdx2-border: #3d3f43;
    --mdx2-shadow: 0 2px 10px rgba(0, 0, 0, .44);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.mdx2-body {
    margin: 0;
    min-width: 320px;
    background: var(--mdx2-bg);
    color: var(--mdx2-text);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

.mdx2-body a { color: inherit; text-decoration: none; }
.mdx2-body button, .mdx2-body input { font: inherit; }
.mdx2-body button { color: inherit; }
.mdx2-body img { display: block; max-width: 100%; }
.mdx2-body .md-icon { width: 24px; height: 24px; flex: 0 0 auto; }
.mdx2-app { min-height: 100vh; background: var(--mdx2-bg); }

/* 左侧菜单 */
.mdx2-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 70;
    display: flex;
    width: var(--mdx2-sidebar);
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--mdx2-border);
    background: var(--mdx2-panel);
}
.mdx2-sidebar-head {
    display: flex;
    height: 56px;
    flex: 0 0 56px;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 8px 16px;
}
.mdx2-logo { display: inline-flex; min-width: 0; align-items: center; gap: 5px; }
.mdx2-logo > img:first-child { width: 36px; height: 36px; object-fit: contain; }
.mdx2-logo-word { width: 116px; height: 29px; object-fit: contain; }
html[data-mdx2-theme="dark"] .mdx2-logo-word { filter: invert(1); }
.mdx2-icon-btn, .mdx2-profile-btn {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}
.mdx2-icon-btn:hover, .mdx2-profile-btn:hover { background: var(--mdx2-panel-2); }
.mdx2-sidebar-close { width: 32px; height: 32px; }
.mdx2-nav { flex: 1; overflow-y: auto; padding: 8px 26px 20px 16px; scrollbar-width: thin; }
.mdx2-nav-link {
    display: flex;
    min-height: 28px;
    align-items: center;
    gap: 9px;
    margin-bottom: 8px;
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 650;
}
.mdx2-nav-link.is-active { background: var(--mdx2-orange); color: #fff; }
.mdx2-nav-link:not(.is-active):hover, .mdx2-subnav a:hover, .mdx2-subnav button:hover { background: var(--mdx2-panel-2); }
.mdx2-nav-badge {
    margin-left: auto;
    padding: 1px 4px;
    border: 1px solid var(--mdx2-orange);
    border-radius: 4px;
    color: var(--mdx2-orange);
    font-size: 12px;
    line-height: 1.2;
}
.mdx2-nav-title { display: flex; align-items: center; gap: 9px; margin: 14px 8px 3px; font-size: 15px; }
.mdx2-subnav { display: grid; gap: 1px; margin-left: 8px; }
.mdx2-subnav a, .mdx2-subnav button {
    display: flex;
    width: 100%;
    min-height: 27px;
    align-items: center;
    padding: 3px 8px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--mdx2-text);
    cursor: pointer;
    font-size: 14px;
    text-align: left;
}
.mdx2-circle-badge {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: 50%;
    background: var(--mdx2-orange);
    color: #fff;
    font-size: 11px;
}
.mdx2-sidebar-foot { flex: 0 0 auto; margin: 0 24px; padding: 18px 0 15px; border-top: 1px solid var(--mdx2-border); }
.mdx2-social { display: flex; gap: 26px; justify-content: center; margin-bottom: 14px; font-size: 25px; }
.mdx2-sidebar-foot small { display: block; color: var(--mdx2-muted); font-size: 11px; line-height: 1.6; text-align: center; }
.mdx2-drawer-shade { display: none; }

/* 顶栏 */
.mdx2-main { min-height: 100vh; margin-left: var(--mdx2-sidebar); }
.mdx2-topbar {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: var(--mdx2-sidebar);
    display: flex;
    height: var(--mdx2-topbar);
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 6px 16px;
    background: color-mix(in srgb, var(--mdx2-bg) 90%, transparent);
    backdrop-filter: blur(8px);
}
.mdx2-menu-btn, .mdx2-mobile-logo, .mdx2-mobile-search { display: none; }
.mdx2-top-search {
    display: grid;
    width: 300px;
    height: 40px;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 0 9px 0 16px;
    border-radius: 18px;
    background: transparent;
}
.mdx2-top-search label { white-space: nowrap; font-size: 16px; }
.mdx2-top-search input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--mdx2-text); opacity: 0; }
.mdx2-top-search:focus-within input { opacity: 1; }
.mdx2-top-search:focus-within label { display: none; }
.mdx2-top-search button { display: inline-flex; padding: 0; border: 0; background: transparent; cursor: pointer; }
.mdx2-shortcut { display: flex; gap: 4px; }
.mdx2-shortcut kbd { padding: 1px 4px; border-radius: 3px; background: var(--mdx2-panel-2); color: var(--mdx2-muted); font-size: 12px; }
.mdx2-profile-btn { width: 40px; height: 40px; background: var(--mdx2-panel); }
.mdx2-profile-btn .md-icon { width: 29px; height: 29px; }
.mdx2-profile-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.mdx2-profile-panel {
    position: fixed;
    z-index: 90;
    top: 51px;
    right: 16px;
    display: none;
    width: 220px;
    padding: 14px;
    border: 1px solid var(--mdx2-border);
    border-radius: 8px;
    background: var(--mdx2-bg);
    box-shadow: var(--mdx2-shadow);
}
.mdx2-profile-panel.is-open { display: grid; gap: 7px; }
.mdx2-profile-panel small { color: var(--mdx2-muted); }
.mdx2-profile-panel button, .mdx2-profile-panel a { padding: 8px 10px; border: 0; border-radius: 4px; background: var(--mdx2-panel); color: inherit; cursor: pointer; text-align: left; text-decoration: none; }
.mdx2-search-sheet { display: none; }

/* 首页通用 */
.mdx2-content { width: 100%; padding: var(--mdx2-topbar) 16px 80px; overflow: hidden; }
.mdx2-section { width: min(100%, 1440px); margin: 0 auto; }
.mdx2-section h1, .mdx2-section h2 { margin: 0; letter-spacing: -.02em; }
.mdx2-popular { position: relative; }
.mdx2-popular > h1 { height: 40px; font-size: 29px; line-height: 40px; }
.mdx2-popular-stage { position: relative; height: 336px; overflow: hidden; }
.mdx2-feature {
    position: absolute;
    inset: 0;
    display: grid;
    visibility: hidden;
    grid-template-columns: 216px minmax(0, 1fr);
    gap: 16px;
    overflow: hidden;
    padding-top: 16px;
    opacity: 0;
    transition: opacity .2s ease;
}
.mdx2-feature::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    content: "";
    background-image: linear-gradient(90deg, color-mix(in srgb, var(--mdx2-bg) 85%, transparent) 5%, color-mix(in srgb, var(--mdx2-bg) 74%, transparent) 100%), var(--mdx2-backdrop);
    background-position: center 28%;
    background-size: cover;
    filter: blur(18px);
    opacity: .28;
    transform: scale(1.08);
}
.mdx2-feature::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--mdx2-bg) 48%, transparent)); }
.mdx2-feature.is-active { visibility: visible; opacity: 1; }
.mdx2-feature-cover { width: 216px; height: 306px; overflow: hidden; border-radius: 3px; box-shadow: var(--mdx2-shadow); }
.mdx2-feature-cover img { width: 100%; height: 100%; object-fit: cover; }
.mdx2-feature-copy { display: flex; min-width: 0; flex-direction: column; padding: 0 28px 20px 0; }
.mdx2-feature-copy h2 { margin: 0 0 8px; overflow: hidden; font-family:Spartan,Poppins,sans-serif;font-size: clamp(28px, 2.55vw, 38px); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.mdx2-feature-copy p { display: -webkit-box; max-width: 980px; margin: 14px 0 0; overflow: hidden; font-size: 15px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 6; }
.mdx2-feature-copy em { margin-top: auto; padding-bottom: 2px; font-size: 16px; font-weight: 600; }
.mdx2-feature-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mdx2-tag { padding: 2px 7px; border-radius: 3px; background: var(--mdx2-panel-2); font-size: 10px; font-weight: 750; line-height: 1.3; text-transform: uppercase; }
.mdx2-tag.is-rating { background: #e87900; color: #fff; }
.mdx2-slide-number { position: absolute; right: 112px; bottom: 23px; font-size: 14px; }
.mdx2-carousel-controls { position: absolute; right: 0; bottom: 23px; z-index: 5; display: flex; align-items: center; gap: 18px; }
.mdx2-carousel-controls button { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 35px; font-weight: 300; }
.mdx2-carousel-controls button:hover { background: var(--mdx2-panel); }
.mdx2-carousel-controls span { display: none; min-width: 54px; color: var(--mdx2-muted); font-size: 13px; text-align: center; }

/* 首页章节更新 */
.mdx2-section-heading { display: flex; min-height: 56px; align-items: center; justify-content: space-between; }
.mdx2-section-heading h2 { font-size: 29px; }
.mdx2-section-heading > a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; }
.mdx2-section-heading > a:hover { background: var(--mdx2-panel); }
.mdx2-updates-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.mdx2-update-card { display: grid; min-width: 0; min-height: 96px; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 8px 12px 8px 8px; background: var(--mdx2-panel); }
.mdx2-update-cover { width: 56px; height: 80px; overflow: hidden; border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.22); }
.mdx2-update-cover img { width: 100%; height: 100%; object-fit: cover; }
.mdx2-update-main { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 5px; }
.mdx2-update-title { overflow: hidden; font-size: 16px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.mdx2-update-chapter { overflow: hidden; color: var(--mdx2-muted); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.mdx2-update-group { display: flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; color: var(--mdx2-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mdx2-update-group .md-icon { width: 18px; height: 18px; }
.mdx2-update-side { display: flex; min-width: 88px; flex-direction: column; align-items: flex-end; justify-content: space-between; padding: 8px 0 2px; color: var(--mdx2-muted); font-size: 13px; white-space: nowrap; }
.mdx2-update-side span { display: flex; align-items: center; gap: 4px; }
.mdx2-update-side .md-icon { width: 17px; height: 17px; }

/* 封面区 */
.mdx2-card-section { margin-top: 34px; }
.mdx2-cover-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.mdx2-cover-card { min-width: 0; }
.mdx2-cover-image { position: relative; display: block; aspect-ratio: 5 / 7; overflow: hidden; border-radius: 4px; background: var(--mdx2-panel); box-shadow: 0 1px 5px rgba(0,0,0,.17); }
.mdx2-cover-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.mdx2-cover-card:hover .mdx2-cover-image img { transform: scale(1.025); }
.mdx2-cover-score { position: absolute; right: 6px; bottom: 6px; display: flex; align-items: center; gap: 3px; padding: 3px 6px; border-radius: 4px; background: rgba(18,18,18,.84); color: #fff; font-size: 12px; font-weight: 700; }
.mdx2-cover-score .md-icon { width: 14px; height: 14px; color: #ffc23d; }
.mdx2-cover-card > a > strong { display: block; margin-top: 7px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.mdx2-cover-card > small { display: block; margin-top: 3px; overflow: hidden; color: var(--mdx2-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mdx2-bottom-nav { display: none; }

.mdx2-toast { position: fixed; z-index: 120; left: 50%; bottom: 30px; visibility: hidden; padding: 10px 16px; border-radius: 6px; background: #222; color: #fff; box-shadow: var(--mdx2-shadow); opacity: 0; transform: translate(-50%, 12px); transition: .18s ease; }
.mdx2-toast.is-visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 1536px) {
    .mdx2-content { padding-right: 24px; padding-left: 24px; }
}

@media (max-width: 1024px) {
    :root { --mdx2-sidebar: 220px; }
    .mdx2-logo-word { width: 106px; }
    .mdx2-cover-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mdx2-cover-card:nth-child(n+5) { display: none; }
}

@media (max-width: 1023px) {
    :root { --mdx2-topbar: 48px; }
    body.mdx2-body { padding-bottom: 62px; }
    .mdx2-main { margin-left: 0; }
    .mdx2-topbar { position: fixed; right: 0; left: 0; height: 48px; justify-content: flex-start; gap: 4px; padding: 4px 12px 4px 16px; background: color-mix(in srgb, var(--mdx2-bg) 78%, transparent); }
    .mdx2-menu-btn, .mdx2-mobile-logo, .mdx2-mobile-search { display: inline-flex; }
    .mdx2-menu-btn { width: 34px; height: 40px; justify-content: flex-start; }
    .mdx2-mobile-logo { min-width: 0; }
    .mdx2-mobile-logo .mdx2-logo { gap: 3px; }
    .mdx2-mobile-logo .mdx2-logo > img:first-child { width: 39px; height: 39px; }
    .mdx2-mobile-logo .mdx2-logo-word { width: 107px; height: 28px; }
    .mdx2-mobile-search { width: 40px; margin-left: auto; background: color-mix(in srgb, var(--mdx2-panel) 84%, transparent); }
    .mdx2-profile-btn { width: 40px; height: 40px; }
    .mdx2-profile-btn .md-icon { width: 28px; height: 28px; }
    .mdx2-top-search { display: none; }

    .mdx2-sidebar { width: min(320px, 86vw); transform: translateX(-102%); transition: transform .22s ease; }
    .mdx2-sidebar.is-open { transform: translateX(0); }
    .mdx2-drawer-shade { position: fixed; z-index: 65; inset: 0; display: block; visibility: hidden; background: rgba(0,0,0,.46); opacity: 0; transition: .2s ease; }
    .mdx2-app.is-drawer-open .mdx2-drawer-shade { visibility: visible; opacity: 1; }
    .mdx2-sidebar-head { padding-left: 16px; }
    .mdx2-nav { padding-bottom: 90px; }
    .mdx2-sidebar-foot { display: none; }

    .mdx2-search-sheet { position: fixed; z-index: 100; inset: 0; display: block; visibility: hidden; padding: 8px 12px; background: var(--mdx2-bg); opacity: 0; transition: .15s ease; }
    .mdx2-search-sheet.is-open { visibility: visible; opacity: 1; }
    .mdx2-search-sheet form { display: grid; height: 44px; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
    .mdx2-search-sheet input { width: 100%; height: 40px; border: 0; border-bottom: 2px solid var(--mdx2-orange); outline: 0; background: transparent; color: var(--mdx2-text); }
    .mdx2-search-sheet button { padding: 9px 4px; border: 0; background: transparent; cursor: pointer; }
    .mdx2-profile-panel { top: 49px; right: 12px; }

    .mdx2-content { padding: 48px 16px 30px; }
    .mdx2-section { width: 100%; }
    .mdx2-popular { height: 268px; }
    .mdx2-popular > h1 { height: 32px; font-size: 23px; line-height: 32px; }
    .mdx2-popular-stage { height: 204px; overflow: visible; }
    .mdx2-feature { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; overflow: visible; padding-top:0; }
    .mdx2-feature::before { inset: -80px -16px -28px; background-image: linear-gradient(90deg, color-mix(in srgb, var(--mdx2-bg) 76%, transparent), color-mix(in srgb, var(--mdx2-bg) 70%, transparent)), var(--mdx2-backdrop); filter: blur(11px); opacity: .32; }
    .mdx2-feature::after { inset: -60px -16px -24px; }
    .mdx2-feature-cover { width: 112px; height: 160px; border-radius: 2px; }
    .mdx2-feature-copy { height: 160px; padding: 0; }
    .mdx2-feature-copy h2 { display: -webkit-box; margin: 0; overflow: hidden; font-size: 21px; line-height: 1.2; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
    .mdx2-feature-copy p { display: none; }
    .mdx2-feature-copy em { margin-top: auto; padding-bottom: 0; overflow: hidden; font-size: 15px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
    .mdx2-feature-tags { position: absolute; top: 178px; left: 0; max-width: 100%; gap: 5px; overflow: hidden; flex-wrap: nowrap; }
    .mdx2-tag { flex: 0 0 auto; padding: 2px 6px; font-size: 9px; }
    .mdx2-slide-number { display: none; }
    .mdx2-carousel-controls { right: 0; bottom: 0; left: 0; justify-content: space-between; }
    .mdx2-carousel-controls button { width: 28px; height: 28px; background: #6b6c6f; color: #fff; font-size: 28px; line-height: 1; }
    .mdx2-carousel-controls span { display: block; }

    .mdx2-section-heading { min-height: 54px; }
    .mdx2-section-heading h2 { font-size: 24px; }
    .mdx2-section-heading > a { width: 36px; height: 36px; }
    .mdx2-updates-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
    .mdx2-update-card { min-height: 88px; grid-template-columns: 55px minmax(0, 1fr) 40px; gap: 10px; padding: 5px 0; background: transparent; }
    .mdx2-update-cover { width: 55px; height: 79px; }
    .mdx2-update-title { font-size: 15px; }
    .mdx2-update-chapter { font-size: 14px; }
    .mdx2-update-group { font-size: 12px; }
    .mdx2-update-side { min-width: 40px; padding-top: 10px; font-size: 12px; }
    .mdx2-update-side time { margin-top: auto; }
    .mdx2-card-section { margin-top: 27px; }
    .mdx2-cover-grid { display: flex; width: calc(100% + 16px); gap: 12px; overflow-x: auto; padding: 1px 16px 10px 0; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .mdx2-cover-grid::-webkit-scrollbar { display: none; }
    .mdx2-cover-card, .mdx2-cover-card:nth-child(n) { display: block; width: 124px; flex: 0 0 124px; scroll-snap-align: start; }
    .mdx2-cover-card > a > strong { font-size: 14px; }

    .mdx2-bottom-nav { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: grid; height: 62px; grid-template-columns: repeat(5, 1fr); padding: 4px max(6px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); border-top: 1px solid var(--mdx2-border); background: color-mix(in srgb, var(--mdx2-bg) 94%, transparent); backdrop-filter: blur(10px); }
    .mdx2-bottom-nav a, .mdx2-bottom-nav button { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; border: 0; background: transparent; color: var(--mdx2-muted); cursor: pointer; font-size: 11px; }
    .mdx2-bottom-nav .md-icon { width: 22px; height: 22px; }
    .mdx2-bottom-nav .is-active { color: var(--mdx2-orange); font-weight: 700; }
    .mdx2-toast { bottom: 76px; max-width: calc(100vw - 32px); white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .mdx2-feature, .mdx2-sidebar, .mdx2-drawer-shade, .mdx2-toast { transition: none; }
}
