.main img {
    border-radius: 2px;
}

/* 分类菜单样式 */
.sidebar {
    font-size: .95rem;
    /* padding: 20px;
    height: 100%;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 40; */
}

.sidebar ul {
    list-style-type: none;
    /* gap: 1rem; */
}

.sidebar a {
    text-decoration: none;
    color: var(--color-foreground);
    text-decoration: none;
    display: block;
}

/* 内容区域样式 */
.content {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    column-gap: 1rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 1rem;
}

/* 接口项目样式 */
.gallery-item {
    position: relative;
    display: flex;
    overflow: hidden;
    align-self: flex-end;
    flex-direction: column;
    justify-content: flex-start;
    max-height: 24rem;
    cursor: pointer;
    border: 0.5px solid var(--color-border);
    border-radius: 2px;
}

.gallery-item img {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 24rem;
    transition-timing-function: cubic-bezier(.4, 0, 0.2, 1);
    transition-duration: 150ms;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
    vertical-align: middle;
    opacity: 1;
    /* border: 0.5px solid var(--color-border); */
    background-color: rgba(0, 0, 0, 0.05);
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
    /* 平滑过渡效果，持续时间0.3秒 */
    transform-origin: center;
    /* 变换的基点为图片中心 */
}

.nav-icon {
    color: #fff;
}

/* 定义当鼠标悬停在gallery-item上时img的状态 */
.gallery-item:hover img {
    transform: scale(1.05);
    /* 将图片放大10% */
}

.gallery-item h3 {
    margin-top: 10px;
}

/* 图片数量角标样式 */
.image-count {
    font-size: .875rem;
    position: absolute;
    z-index: 30;
    right: 0.5rem;
    bottom: 0.5rem;
    display: flex;
    align-content: center;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    height: 22px;
    margin-top: unset !important;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: rgb(255 255 255/1);
    border-radius: 0.25rem;
    box-shadow: transparent 0 0 0 0, transparent 0 0 0 0, rgba(0, 0, 0, 0.04) 0 0 0 1px inset;
    backdrop-filter: blur(8px) brightness(.5);
    -webkit-backdrop-filter: blur(8px) brightness(0.5);
}

.gallery-detail {
    position: relative !important;
}

.image-list {
    display: grid;
    align-content: center;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 2rem;
    column-count: 1;
    break-inside: avoid-column;
    gap: 1rem;
    justify-items: center;
}

.image-list img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border: 0.5px solid var(--color-border);
}

.gallery-main {
    display: grid;
    min-height: 100vh;
    padding: 1rem;
    grid-template-columns: minmax(0, 320px) 1fr;
    gap: 1em;
}

.gallery-info {
    font-size: .9rem !important;
    position: sticky;
    top: calc(var(--navigation-height) + 1.5rem);
    display: flex;
    align-self: flex-start;
    flex-direction: column;
    padding: 0 0 0 1rem;
    border-left: 0.5px solid var(--color-border) !important;
    gap: 2rem;
}

.info-box {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.info-box.notes {
    padding: .5rem 0.75rem 0.75rem 0.75rem;
    border-radius: var(--radius-inner);
    background-color: var(--color-card);
}

.gallery-item>a,
.gallery-item>a::before {
    all: unset !important;
    cursor: pointer;
}

.info-box a {
    max-width: 100%;
    cursor: alias;
    white-space: unset !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.info-box a::before {
    all: unset !important;
}

.tag-single {
    line-height: 1;
    display: inline-flex;
    padding: 0.35rem 0.625rem;
    cursor: pointer;
    text-decoration: inherit;
    opacity: .68;
    color: inherit;
    border-radius: 0.25rem;
    background-color: var(--color-border);
}

.tag-single:hover {
    opacity: 1;
}

.tag-single>a,
.tag-single a::before {
    display: inline-block;
    width: fit-content;
    text-decoration: none !important;
    all: unset;
}

.tag-single>a:hover::before {
    all: unset;
}

.tag-single>a {
    font-size: .9rem !important;
}

span-title {
    font-size: .9rem;
    opacity: .8;
    /* margin-left: 0.125rem; */
    color: var(--color-grey);
}

.info-box>a {
    display: inline-block;
    width: fit-content;
}

.tags-content {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    margin-left: 0.125rem;
    padding: 0;
    list-style: none;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
}

.hidden {
    display: none;
}

.color-single {
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 0 solid #E5E7EB;
    gap: 0.25em;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
}

.colors-content {
    display: flex;
    flex-direction: column;
    margin: 0;
    margin-left: 0.125rem;
    padding: 0;
    list-style: none;
    column-gap: 0.375rem;
    row-gap: 0.5rem;
}

.color-block {
    width: 20px;
    height: 20px;
}

.color-code {
    font-size: .9rem;
}

.description-content {
    opacity: .8;
    line-height: 1.4;
}

.sidebar a,
.sidebar a span {
    all: unset;
    text-align: right;
    text-align: right;
    text-decoration: none !important;
    opacity: .8;
    color: var(--color-grey) !important;
}

.sidebar a:hover,
.sidebar a:hover span,
s .sidebar a.selected,
.sidebar a.selected span {
    color: var(--color-foreground) !important;
}

.sidebar a:hover::before,
.sidebar a.selected::before {
    all: unset;
}

/*.sidebar, .sidebar * {*/
/*    width: 100% !important;*/
/*}*/

.sidebar li {
    all: unset;
    border: none;
    cursor: pointer;
}

.sidebar li.menu-list {
    /* display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer; */
}

.menu-list a::before {
    all: unset !important;
}

aside.sidebar {
    position: sticky;
    top: calc(var(--navigation-height) + 1.5rem);
    align-self: flex-start;
}

.sidebar a.selected,
.sidebar a:hover {
    color: var(--color-foreground) !important;
}

.menu-list a {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

[data-tooltip] {
    position: relative;
    display: inline-block;
}

[data-tooltip]::after {
    position: absolute;
    z-index: 1000;
    top: -36px;
    left: 30px;
    padding: 4px 8px;
    content: attr(data-tooltip);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateX(-50%) translateY(-10px);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    color: var(--color-background);
    border-radius: 4px;

    /* 添加transition */
    background: var(--color-foreground);
}

/* 当有data-tooltip时显示tooltip */
[data-tooltip]:not([data-tooltip=""])::after {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.sidebar a::before {
    background: none !important;
}

.gallery-detail-nav a::before {
    background: none !important;
}

aside.sidebar ul a {
    margin-left: 0 !important;
    padding: 0.3rem 0;
}

a.nav-svg {
    cursor: pointer;
}

.gallery-detail-nav {
    position: sticky;
    z-index: 2;
    top: calc(var(--navigation-height) + 0rem);
    display: grid;
    align-content: center;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 0;
    background-color: var(--blur-background);
    grid-template-columns: 1fr 2fr 1fr;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}


/* main a:not(.button)::before, main .link::before, .footer a:not(.button)::before, .footer .link::before {
    all: unset !important;
}

main a:not(.button), main .link, .footer a:not(.button), .footer .link {
    margin-left: 0 !important;
    background: none !important;
} */

.pagenav.left {
    margin-right: auto;
}

.pagenav.right {
    height: 24px;
    margin-left: auto;
}

.current-article-info {
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis !important;
    grid-column-start: 2;
}

span.categories a {
    text-decoration: none !important;
    opacity: .8;
    color: var(--color-grey);
}

span.categories:hover a {
    color: var(--color-foreground);
}

.tippy-box[data-theme~='light'] {
    z-index: 99;
    margin-bottom: 6px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-background) !important;
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}

/* 新增CSS样式，设置默认为1列，并为激活状态添加样式 */

.view-switch {
    font-size: .875rem;
    line-height: 1;
    position: sticky;
    z-index: 40;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-bottom: 4rem;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-inner);
    background-color: rgba(50, 50, 50, 0.5);
    box-shadow: transparent 0 0 0 0, transparent 0 0 0 0, rgba(0, 0, 0, 0.04) 0 0 0 1px inset;
    backdrop-filter: blur(8px) brightness(.5);
    -webkit-backdrop-filter: blur(8px) brightness(0.5);
    column-gap: 0.5rem;
    row-gap: 0.5rem;
}

.nsfw-overlay {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /*transition: opacity 150ms cubic-bezier(.4, 0, 0.2, 1);*/
    pointer-events: none;
    ;
    color: rgb(255 255 255 / 90%);
    border-radius: 2px;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* Switch样式 */
.switch-container {
    display: flex;
    align-content: center;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.3rem;
}

.menu-head {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

input#nsfw-switch {
    display: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 28px !important;
    height: 16px;
    cursor: pointer;
}

.switch-radio {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 16px;
    background-color: var(--color-border);
}

.switch-radio:before {
    position: absolute;
    bottom: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    content: "";
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
    background-color: var(--color-background);
}

input:checked+.switch-radio {
    background-color: var(--color-foreground);
}

input:focus+.switch-radio {
    box-shadow: 0 0 0px var(--color-foreground);
}

input:checked+.switch-radio:before {
    -ms-transform: translateX(12px);
    -webkit-transform: translateX(12px);
    transform: translateX(12px);
}

.menu-title {
    width: fit-content;
    color: var(--color-grey);
    opacity: .8;
}

.switch-label {
    font-size: .9rem;
    color: var(--color-grey);
    opacity: .8;
}

.gallery-recommend {
    padding-bottom: 3rem;
}

.recommend-title {
    padding: 3rem 0 1rem 0;
    border-top: 1px solid var(--color-border);
    font-size: inherit;
    font-weight: 700;
}

.no-recommendations {
    font-size: .9rem;
    opacity: .8;
    color: var(--color-grey);
    white-space: nowrap;
}

/* 定义手机端样式 */
@media screen and (max-width: 768px) {
    .content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-info {
        padding: 0 !important;
        border-left: none !important;
    }
}
