:root {
    --ytpanel-primary: #2f6fff;
    --ytpanel-primary-end: #1a53ea;
    --ytpanel-danger: #ff5d63;
    --ytpanel-bg-panel: rgba(30, 32, 38, .60);
    --ytpanel-border: rgba(255, 255, 255, .12);
    --ytpanel-text: #d9dee6;
    --ytpanel-text-dim: #8d96a3;
    --ytpanel-radius: 26px;
    --ytpanel-code-bg: #1f2329;
    --ytpanel-shadow: 0 22px 60px -22px rgba(0, 0, 0, .85), 0 8px 34px -16px rgba(0, 0, 0, .6);
    --ytpanel-max-width: 1380px;
    --ytpanel-font-size: 16px;
    --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

.ytpanel-wrapper {
    max-width: var(--ytpanel-max-width);
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ytpanel-text);
    font-size: var(--ytpanel-font-size);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

.ytpanel-progress {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, .06);
    z-index: 300;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ytpanel-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--ytpanel-primary), var(--ytpanel-primary-end));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), 0 0 10px -2px rgba(47, 111, 255, .75);
    transition: width .2s ease-out;
}

.ytpanel-header {
    background: var(--ytpanel-bg-panel);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid var(--ytpanel-border);
    border-radius: var(--ytpanel-radius);
    padding: 38px clamp(20px, 2.4vw, 46px) 34px;
    box-shadow: var(--ytpanel-shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 26px;
}

.ytpanel-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 40%), radial-gradient(circle at 18% 22%, rgba(47, 111, 255, .25), transparent 65%);
    pointer-events: none;
    opacity: .6;
    mix-blend-mode: overlay;
}

.ytpanel-title {
    margin: 0 0 16px;
    font-size: clamp(24px, 3.2vw, 38px);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .8px;
    background: linear-gradient(90deg, #fff, #b8c6dd);
    -webkit-background-clip: text;
    color: transparent;
}

.ytpanel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    font-size: 12.5px;
    letter-spacing: .4px;
    color: var(--ytpanel-text-dim);
    margin: 0 0 18px;
}

.ytpanel-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .08);
    padding: 6px 12px;
    border-radius: 14px;
    line-height: 1.2;
    position: relative;
}

.ytpanel-meta svg {
    width: 16px;
    height: 16px;
    opacity: .9;
}

.ytpanel-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.tool-btn {
    border: none;
    background: linear-gradient(145deg, #23262d, #191b20);
    color: #d6dce5;
    font-size: 12.5px;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 500;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background .3s, transform .35s var(--ease-bounce);
    box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.tool-btn:hover {
    background: linear-gradient(145deg, #282c34, #1e2025);
    transform: translateY(-4px);
}

.tool-btn:active {
    transform: translateY(0) scale(.92);
}

.ytpanel-breadcrumb {
    font-size: 12.5px;
    letter-spacing: .4px;
    color: var(--ytpanel-text-dim);
    margin: 0 0 22px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ytpanel-breadcrumb .crumb {
    text-decoration: none;
    color: #8fa6c6;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    transition: background .3s;
}

.ytpanel-breadcrumb .crumb:hover {
    background: rgba(255, 255, 255, .15);
}

.ytpanel-breadcrumb .crumb.current {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.ytpanel-breadcrumb .sep {
    opacity: .4;
}

.ytpanel-article {
    background: var(--ytpanel-bg-panel);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--ytpanel-border);
    border-radius: 28px;
    padding: 42px clamp(18px, 2.6vw, 54px) 50px;
    box-shadow: var(--ytpanel-shadow);
    position: relative;
    overflow: hidden;
}

.ytpanel-article::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 45%), radial-gradient(circle at 20% 24%, rgba(47, 111, 255, .18), transparent 60%);
    opacity: .55;
    pointer-events: none;
}

.chapter-title {
    margin: 0 0 24px;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .5px;
    color: #fff;
}

.ytpanel-article-body {
    font-size: var(--ytpanel-font-size);
    line-height: 1.85;
    letter-spacing: .3px;
    color: var(--ytpanel-text);
    word-break: break-word;
    display: flex;
    justify-content: center;
}

.ytpanel-article-body p {
    margin: 0 0 1.1em;
}

.ytpanel-article-body img {
    max-width: 100%;
    display: block;
    border-radius: 0px;
    background: #121418;
    box-shadow: 0 8px 30px -14px rgba(0, 0, 0, .65);
    transition: transform .6s var(--ease-bounce), box-shadow .6s;
    cursor: zoom-in;
}

.ytpanel-article-body img:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 46px -16px rgba(0, 0, 0, .75);
}

.ytpanel-article-body h2,
.ytpanel-article-body h3,
.ytpanel-article-body h4 {
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: .6px;
    color: #fff;
    scroll-margin-top: 90px;
}

.ytpanel-article-body h2 {
    font-size: 1.6em;
    margin: 1.8em 0 .9em;
}

.ytpanel-article-body h3 {
    font-size: 1.35em;
    margin: 1.6em 0 .8em;
    color: #e5e9f0;
}

.ytpanel-article-body h4 {
    font-size: 1.15em;
    margin: 1.4em 0 .7em;
    color: #dae0e8;
}

.ytpanel-article-body blockquote {
    margin: 1.6em 0;
    padding: 16px 20px;
    background: linear-gradient(145deg, #22262d, #181a1f);
    border: 1px solid #2e343b;
    border-left: 5px solid var(--ytpanel-primary);
    border-radius: 14px;
    color: #ccd2da;
    position: relative;
    font-size: 15px;
}

.ytpanel-article-body pre {
    background: var(--ytpanel-code-bg);
    color: #d6e1ef;
    padding: 18px 20px;
    border-radius: 16px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .6);
    margin: 1.6em 0;
    position: relative;
}

.ytpanel-article-body pre code {
    background: transparent;
    padding: 0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

.code-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border: none;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    color: #111;
    background: linear-gradient(135deg, var(--ytpanel-primary), var(--ytpanel-primary-end));
    cursor: pointer;
    box-shadow: 0 8px 16px -8px rgba(47, 111, 255, .7);
}

.ytpanel-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 14px;
    overflow: hidden;
    border-radius: 16px;
}

.ytpanel-article-body table th,
.ytpanel-article-body table td {
    border: 1px solid rgba(255, 255, 255, .15);
    padding: 10px 14px;
    text-align: left;
}

.ytpanel-article-body table th {
    background: linear-gradient(135deg, var(--ytpanel-primary), var(--ytpanel-primary-end));
    color: #fff;
    font-weight: 600;
    letter-spacing: .4px;
}

.ytpanel-inner-pages {
    margin: 40px -10px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inner-page-link {
    text-decoration: none;
    font-size: 12.5px;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    color: #dbe2ea;
    letter-spacing: .4px;
    transition: background .25s, transform .25s;
}

.inner-page-link:hover {
    background: rgba(255, 255, 255, .18);
    transform: translateY(-3px);
}

.inner-page-link.active {
    background: linear-gradient(135deg, var(--ytpanel-primary), var(--ytpanel-primary-end));
    color: #fff;
    box-shadow: 0 8px 20px -10px rgba(47, 111, 255, .75);
}

.ytpanel-nav-nextprev {
    margin: 50px 0 16px;
    display: grid;
    gap: 18px;
    grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
}

.np-card {
    position: relative;
    text-decoration: none;
    padding: 16px 18px 20px;
    border-radius: 18px;
    background: linear-gradient(145deg, #22262d, #181a1f);
    border: 1px solid #2c3138;
    color: #dfe4ec;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform .45s var(--ease-bounce), box-shadow .45s;
    overflow: hidden;
}

.np-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 24% 20%, rgba(47, 111, 255, .25), transparent 65%);
    opacity: .4;
    mix-blend-mode: overlay;
    transition: opacity .5s;
}

.np-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8);
}

.np-card:hover::before {
    opacity: .7;
}

.np-label {
    font-size: 11px;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #8aa1c6;
}

.np-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .4px;
    line-height: 1.45;
    color: #fff;
    max-height: 3em;
    overflow: hidden;
}

.ytpanel-tags {
    margin: 34px 0 10px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    letter-spacing: .4px;
}

.ytpanel-tags .tag {
    text-decoration: none;
    background: linear-gradient(145deg, #24272e, #17191d);
    color: #dbe2ea;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12.5px;
    transition: background .3s, transform .3s;
    box-shadow: 0 4px 12px -8px rgba(0, 0, 0, .6);
}

.ytpanel-tags .tag:hover {
    background: linear-gradient(145deg, #2a2d35, #1d1f24);
    transform: translateY(-3px);
}

.ytpanel-share {
    margin: 32px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    border: none;
    background: linear-gradient(145deg, #23262d, #191b20);
    color: #d6dde6;
    font-size: 12.5px;
    padding: 10px 16px;
    border-radius: 14px;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background .3s, transform .35s var(--ease-bounce);
    box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.share-btn:hover {
    background: linear-gradient(145deg, #282c34, #1e2025);
    transform: translateY(-4px);
}

.share-btn:active {
    transform: translateY(0) scale(.92);
}

.ytpanel-img-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: .35s;
    backdrop-filter: blur(8px);
}

.ytpanel-img-viewer.active {
    opacity: 1;
    visibility: visible;
}

.ytpanel-img-viewer img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 20px;
    box-shadow: 0 28px 80px -22px rgba(0, 0, 0, .9);
    animation: pop .55s var(--ease-bounce);
    cursor: zoom-out;
}

@keyframes pop {
    0% {
        transform: translateY(30px) scale(.85);
        opacity: 0;
    }
    60% {
        transform: translateY(-6px) scale(1.03);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.ytpanel-quickbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 66px;
    z-index: 500;
    display: none;
    background: rgba(24, 26, 32, .86);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .75);
}

.qb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    margin: 0 4px;
    padding: 8px 12px;
    font-size: 12.5px;
    border-radius: 12px;
    text-decoration: none;
    color: #e6ebf3;
    background: rgba(255, 255, 255, .08);
}

.qb-btn:hover {
    background: rgba(255, 255, 255, .15);
}

.qb-btn.disabled {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 980px) {
    .ytpanel-quickbar {
        display: flex;
    }
}

@media print {
    .ytpanel-progress, .ytpanel-tools, .ytpanel-toc, .ytpanel-breadcrumb, .ytpanel-share, .ytpanel-tags, .ytpanel-nav-nextprev, .ytpanel-inner-pages, .ytpanel-quickbar {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .ytpanel-wrapper {
        padding: 0;
        max-width: 100%;
    }

    .ytpanel-header, .ytpanel-article {
        box-shadow: none;
        background: #fff;
        border: none;
    }

    .ytpanel-header::before, .ytpanel-article::before {
        display: none;
    }

    .ytpanel-title {
        background: none;
        -webkit-background-clip: initial;
        color: #000;
    }

    .ytpanel-article-body img {
        box-shadow: none;
    }
}

/* 章节导航 */
.ytpanel-nav-chapters {
    margin: 42px 0 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: stretch;
    background: linear-gradient(145deg, #22262d, #181a1f);
    border: 1px solid #2c3138;
    border-radius: 22px;
    padding: 18px 20px;
    position: relative;
    box-shadow: 0 10px 30px -16px rgba(0, 0, 0, .65);
}

.chap-card {
    flex: 1 1 260px;
    min-width: 200px;
    text-decoration: none;
    background: linear-gradient(145deg, #262b33, #1d2025);
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #d6dce4;
    position: relative;
    overflow: hidden;
    transition: transform .45s var(--ease-bounce), box-shadow .45s;
}

.chap-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 25%, rgba(47, 111, 255, .25), transparent 65%);
    opacity: .45;
    mix-blend-mode: overlay;
    pointer-events: none;
    transition: .45s;
}

.chap-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .75);
}

.chap-card:hover::before {
    opacity: .75;
}

.chap-label {
    font-size: 11px;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #8aa1c6;
}

.chap-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.chap-status {
    flex: 0 0 auto;
    align-self: center;
    font-size: 13px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    letter-spacing: .4px;
    color: #c5ced8;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 680px) {
    .ytpanel-nav-chapters {
        flex-direction: column;
        padding: 16px 16px 18px;
    }

    .chap-card {
        flex: 1 1 auto;
    }

    .chap-status {
        width: 100%;
        justify-content: center;
    }
}

/* ===== 猜你喜欢紧凑版 ===== */
.guesslike-block {
    margin: 34px 0 26px;
    padding: 18px clamp(12px, 1.8vw, 26px) 24px;
    border-radius: 20px;
    background: linear-gradient(145deg, #22262d, #181a1f);
    border: 1px solid #2c3138;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px -18px rgba(0, 0, 0, .65);
}

.guesslike-block::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 18% 20%, rgba(255, 170, 0, .18), transparent 60%);
    mix-blend-mode: overlay;
    opacity: .55;
    pointer-events: none;
}

.guesslike-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
}

.guesslike-title {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: .55px;
    color: #fff;
}

.guesslike-title .gl-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8a00, #ffcf4d);
    box-shadow: 0 0 0 3px rgba(255, 138, 0, .18), 0 4px 14px -6px rgba(255, 138, 0, .6);
}

.gl-desc {
    font-size: 11.5px;
    color: #8b97a4;
    letter-spacing: .3px;
}

.guesslike-grid {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px 14px;
}

.gl-item {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: linear-gradient(145deg, #272d32, #1c1f23);
    border: 1px solid #2c3238;
    border-radius: 14px;
    padding: 10px 10px 12px;
    gap: 6px;
    color: #d8dee6;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .4s, border-color .35s;
    overflow: hidden;
}

.gl-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 24% 20%, rgba(255, 170, 0, .28), transparent 65%);
    opacity: .3;
    mix-blend-mode: overlay;
    pointer-events: none;
    transition: opacity .45s;
}

.gl-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .72);
    border-color: rgba(255, 170, 0, .35);
}

.gl-item:hover::before {
    opacity: .55;
}

.gl-cover {
    position: relative;
    aspect-ratio: 5/3.4;
    background: #181a1d;
    border-radius: 10px;
    overflow: hidden;
}

.gl-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s ease;
}

.gl-item:hover .gl-cover img {
    transform: scale(1.08);
}

.gl-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 22px;
}

.gl-badge-cat {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: linear-gradient(135deg, #ffab26, #ff8a00);
    color: #111;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: .4px;
    box-shadow: 0 5px 16px -8px rgba(255, 170, 0, .65);
}

.gl-body {
    padding: 6px 4px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.gl-name {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: .35px;
    max-height: 2.7em;
    overflow: hidden;
    color: #fff;
}

.gl-meta {
    font-size: 10.5px;
    gap: 4px;
    line-height: 1.2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    color: #92a1b0;
}

@media (max-width: 780px) {
    .guesslike-block {
        padding: 18px 16px 22px;
        margin: 30px 0 24px;
    }

    .guesslike-grid {
        gap: 10px 12px;
        grid-template-columns:repeat(auto-fill, minmax(120px, 1fr));
    }

    .gl-item {
        padding: 8px 8px 10px;
    }

    .gl-name {
        font-size: 12.5px;
    }

    .gl-meta {
        font-size: 10px;
    }

    .gl-cover {
        aspect-ratio: 5/3.8;
    }
}

@media (max-width: 520px) {
    .guesslike-head {
        margin-bottom: 10px;
    }

    .gl-meta span:nth-child(2),
    .gl-meta span:nth-child(4) {
        display: none;
    }

    .gl-cover {
        aspect-ratio: 16/11;
    }

    .gl-item:hover {
        transform: translateY(-3px);
    }
}

@media (max-width: 400px) {
    .gl-meta {
        display: none;
    }

    .gl-name {
        max-height: 2.4em;
    }
}