/* 独立插件命名空间：tknfbb- */
#tk-footer-bar {
    display: none !important;
}

#module_id_5.tknfbb-slot-ready {
    min-height: 0 !important;
}

#tknfbb-bookmark-anchor {
    position: relative;
    z-index: 1000;
    width: 100%;
    height: 64px;
    margin: 0;
    padding: 0;
}

#tknfbb-bookmark-anchor + footer.main-footer,
#tknfbb-bookmark-anchor + footer {
    margin-top: 0 !important;
}

.tknfbb-bookmark-bar {
    box-sizing: border-box;
    position: fixed;
    z-index: 100000;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 0;
    color: #fff;
    background: linear-gradient(90deg, #bd70fa 0%, #ad55f3 48%, #925cf6 100%);
    box-shadow: 0 -2px 12px rgba(84, 44, 137, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.tknfbb-bookmark-bar.is-docked {
    position: absolute;
    top: 0;
    bottom: auto;
}

.tknfbb-bookmark-bar.is-bookmarked-static {
    position: absolute;
    top: 0;
    bottom: auto;
    opacity: 1;
    transform: none;
}

.tknfbb-bookmark-bar.is-bookmarked {
    pointer-events: none;
    animation: tknfbb-bar-goodbye 0.46s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tknfbb-bookmark-bar__inner {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1600px, calc(100% - 48px));
    min-height: 64px;
    margin: 0 auto;
    gap: 32px;
    padding: 0 24px;
}

.tknfbb-bookmark-bar__brand,
.tknfbb-bookmark-bar__shortcut {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.tknfbb-bookmark-bar__wechat {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 0 0 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: inherit;
    background: transparent;
    cursor: pointer;
    overflow: visible;
    appearance: none;
}

.tknfbb-bookmark-bar__wechat::after {
    content: "♥";
    position: absolute;
    top: -5px;
    right: -4px;
    color: #fff;
    font-size: 9px;
    line-height: 1;
    opacity: 0;
    transform: translateY(3px) scale(0.4) rotate(-12deg);
    animation: tknfbb-heart-pop 3.8s ease-in-out infinite;
    text-shadow: 0 1px 4px rgba(81, 35, 130, 0.25);
}

.tknfbb-bookmark-bar__wechat > svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: #fff;
    transform-origin: 50% 60%;
    animation: tknfbb-wechat-cute 3.8s ease-in-out infinite;
}

.tknfbb-bookmark-bar__wechat:hover > svg,
.tknfbb-bookmark-bar__wechat:focus-visible > svg {
    animation-duration: 0.7s;
}

.tknfbb-bookmark-bar__wechat .tknfbb-bookmark-bar__eye {
    fill: #ad55f3;
    transform-box: fill-box;
    transform-origin: center;
    animation: tknfbb-eye-cute 3.8s ease-in-out infinite;
}

.tknfbb-bookmark-bar__wechat .tknfbb-bookmark-bar__eye:nth-of-type(5),
.tknfbb-bookmark-bar__wechat .tknfbb-bookmark-bar__eye:nth-of-type(6) {
    animation-delay: 0.12s;
}

.tknfbb-bookmark-bar__qr {
    box-sizing: border-box;
    position: absolute;
    z-index: 100001;
    left: 50%;
    bottom: calc(100% + 12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 190px;
    padding: 10px 10px 8px;
    border: 1px solid rgba(120, 80, 160, 0.14);
    border-radius: 12px;
    color: #4b3b5c;
    background: #fff;
    box-shadow: 0 12px 30px rgba(41, 21, 68, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 8px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.tknfbb-bookmark-bar__qr::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
}

.tknfbb-bookmark-bar__qr img {
    display: block;
    width: 168px;
    height: 168px;
    object-fit: contain;
}

.tknfbb-bookmark-bar__qr > span {
    position: relative;
    z-index: 1;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
}

.tknfbb-bookmark-bar__wechat:hover .tknfbb-bookmark-bar__qr,
.tknfbb-bookmark-bar__wechat:focus .tknfbb-bookmark-bar__qr,
.tknfbb-bookmark-bar__wechat:focus-within .tknfbb-bookmark-bar__qr {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.tknfbb-bookmark-bar__shortcut {
    justify-content: flex-end;
    gap: 10px;
    font-weight: 500;
}

.tknfbb-bookmark-bar__key {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 42px;
    padding: 0 13px;
    border: 0;
    border-radius: 7px;
    color: #8d55e8;
    background: #fff;
    box-shadow: none;
    font: 600 15px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tknfbb-bookmark-bar__key--modifier {
    min-width: 64px;
}

@keyframes tknfbb-wechat-cute {
    0%, 52%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
    58% { transform: translateY(-3px) scale(1.05, 0.96) rotate(-8deg); }
    64% { transform: translateY(0) scale(0.98, 1.04) rotate(7deg); }
    70% { transform: translateY(-2px) scale(1.04, 0.98) rotate(-5deg); }
    76% { transform: translateY(0) scale(1) rotate(3deg); }
    82% { transform: translateY(-1px) scale(1.02) rotate(0deg); }
}

@keyframes tknfbb-eye-cute {
    0%, 18%, 21%, 44%, 47%, 100% { transform: translateX(0) scaleY(1); }
    12%, 16% { transform: translateX(0.8px) scaleY(1); }
    19.5%, 45.5% { transform: translateX(0) scaleY(0.12); }
    30%, 38% { transform: translateX(-0.7px) scaleY(1); }
    62%, 72% { transform: translateX(0.6px) scaleY(1); }
}

@keyframes tknfbb-heart-pop {
    0%, 55%, 100% { opacity: 0; transform: translateY(3px) scale(0.4) rotate(-12deg); }
    61% { opacity: 1; transform: translateY(-2px) scale(1.12) rotate(8deg); }
    68% { opacity: 0.9; transform: translateY(-5px) scale(0.92) rotate(0deg); }
    76% { opacity: 0; transform: translateY(-9px) scale(0.7) rotate(4deg); }
}

@keyframes tknfbb-bar-goodbye {
    0% { opacity: 1; transform: translateY(0); }
    35% { opacity: 1; transform: translateY(-4px); }
    100% { opacity: 0; transform: translateY(110%); }
}

@media (prefers-reduced-motion: reduce) {
    .tknfbb-bookmark-bar__wechat > svg,
    .tknfbb-bookmark-bar__wechat::after,
    .tknfbb-bookmark-bar__wechat .tknfbb-bookmark-bar__eye {
        animation: none;
    }

    .tknfbb-bookmark-bar.is-bookmarked {
        animation-duration: 0.01ms;
    }
}

@media (max-width: 767px) {
    #tknfbb-bookmark-anchor,
    .tknfbb-bookmark-bar {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
    }
}
