* {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

html,
.fancybox__viewport.is-draggable {
    cursor: url(../images/alternate.png) 16 16, auto!important;
}

a,
button,
input,
img,
/* 兼容fancybox */
.f-button,
.is-modern .f-thumbs__track::before,
.fancybox__viewport.is-dragging {
    cursor: url(../images/link.png) 16 16, pointer!important;
}

p,
span,
h2,
label {
    cursor: url(../images/text.png) 16 16, text!important;
}
/* fancybox样式优化 */
img.fancybox-image {
    border-radius: 8px;
}
.f-button {
	backdrop-filter: blur(5px);
}
@media (hover: hover) {
    .f-button:hover:not([disabled]) {
        border-radius: 50%!important;
    }
}

body {
	margin: 0;
	padding: 0;
	display: flex;
	justify-content: center;
	background: url(../images/bg.webp) no-repeat 100% 100%;
	background-size: cover;
	background-attachment: fixed;
	-webkit-tap-highlight-color: transparent;
}

@media screen and (max-width: 1000px) {
	.gallery {
		-moz-column-count: 4 !important;
		     column-count: 4 !important;
	}
}

@media screen and (max-width: 900px) {
	.gallery {
		-moz-column-count: 3 !important;
		     column-count: 3 !important;
	}
}

@media screen and (max-width: 560px) {
	.gallery {
		-moz-column-count: 2 !important;
		     column-count: 2 !important;
	}
}

@media screen and (max-width: 200px) {
	.gallery {
		-moz-column-count: 1 !important;
		     column-count: 1 !important;
	}
}

.gallery,
.custom-confirm,
.page-link,
.rightside a,
.loading-indicator,
#current-total-pages,
.page-input {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / 20%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(120deg, rgb(255 255 255 / 20%) 0, rgb(170 170 170 / 20%) 100%);
}

/*图片主体*/
.gallery {
	display: none;
	-moz-column-count: 5;
	     column-count: 5;
	-moz-column-gap: 10px;
	     column-gap: 10px;
	max-width: 1200px;
	padding: 20px;
	margin: 20px 10px 40px 10px;
	border-radius: 10px;
	z-index: 20;
	-webkit-animation: fadeIn 0.5s ease-in-out forwards;
	        animation: fadeIn 0.5s ease-in-out forwards;
}

.gallery-item {
	-moz-column-break-inside: avoid;
	     break-inside: avoid;
	margin-bottom: 10px;
	position: relative;
	/*min-height: 135px;*/
	/*display: flex;*/
	/*justify-content: center;*/
	/*align-items: center;*/
}

.gallery-item img {
	width: 100%;
	height: auto;
	max-width: 230px;
	border-radius: 8px;
}

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(../images/svg/replace.svg)no-repeat center;
    z-index: 1;
}
.image-info {
    position: absolute;
    bottom: 10px;
    left: 5%;
    z-index: 30;
    width: 90%;
    opacity: 0;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    pointer-events: none;
    transition: opacity .6s, transform .6s;
    backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, .3);
    box-sizing: border-box;
    transform: translateY(10px) scale(0.9);
}

.gallery-item:hover .image-info {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.info-p {
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
}

.lazy-image {
    opacity: 0;
    transition: opacity .6s ease-in-out;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

.lazy-image.loaded {
    opacity: 1;
}

/*复制和删除按钮*/
.action-buttons {
	display: flex;
	position: absolute;
	top: 0;
	right: 0;
	gap: 5px;
	margin: 5px;
	z-index: 3;
}

.delete-btn,
.copy-btn {
	border-radius: 8px;
	padding: 5px 5px 1px 5px;
	border: 1px solid rgb(255 255 255 / 20%);
	background-color: rgb(0 0 0 / 20%);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
	outline: none;
	transition: background-color 0.3s, color 0.3s;
}

.delete-btn:hover {
	background-color: rgb(255 0 0 / .7);
}

.copy-btn:hover {
	background-color: rgb(10 141 16 / .7);
}
.delete-btn img, .copy-btn img {
	transition: transform .4s ease-in-out;
}
.delete-btn:hover img {
	transform: rotate(180deg);
}
.copy-btn:hover img {
	-webkit-animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
	        animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
}
/*复制按钮动画*/
@-webkit-keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-2px, 0, 0); }
    40%, 60% { transform: translate3d(2px, 0, 0); }
}
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-2px, 0, 0); }
    40%, 60% { transform: translate3d(2px, 0, 0); }
}

/*分页按钮*/
.pagination {
	display: flex;
	position: fixed;
	bottom: 0;
	transform: translateX(-50%);
	z-index: 10;
	-webkit-animation: fadeIn 0.5s ease-in-out forwards;
	        animation: fadeIn 0.5s ease-in-out forwards;
}

.page-link {
	display: inline-block;
	border-radius: 5px;
	width: 30px;
	height: 30px;
	margin: 5px;
	text-align: center;
	line-height: 30px;
	color: #eee;
	text-decoration: none;
	transition: background-color 0.3s, color 0.3s;
}

a.page-link.active {
	background-color: rgb(88 221 32 / 54%);
}

a.ellipsis {
	line-height: revert;
	pointer-events: none;
	cursor: default;
	text-align: center;
}
.prev-page,.next-page {
	font-size: 24px;
    line-height: 24px;
}

/*侧边按钮*/
.rightside {
	position: fixed;
	right: 20px;
	bottom: 40px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	z-index: 30;
}

.rightside a {
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
}

.floating-link, .logout-link {
    transition: transform 0.5s, background-color 0.4s ease-in-out, color 0.4s ease-in-out;
}

.top-link {
	transform: translateX(70px) translateY(-50px);
	transition: transform 0.4s ease-in-out, background-color 0.4s ease-in-out, color 0.4s ease-in-out;
}

.top-link.visible {
    transform: translateX(0) translateY(-50px);
}

.rightside.shifted .floating-link, .rightside.shifted .logout-link {
    transform: translateY(-50px);
}
.rightside a img{
    transition: transform 0.3s ease;
}
.rightside a:hover img{
    transform: scale(1.1);
}
#current-total-pages {
	margin-top: 10px;
}
/*按钮悬浮样式*/
#cancel-delete:hover,
#confirm-delete:hover,
.rightside a:hover,
.page-link:hover {
	background-color: rgb(0 0 0 / .3);
	color: #fff;
}

/* 消息弹窗样式 */
.msg {
    position: fixed;
    top: 20px;
    right: 15px;
    padding: 15px;
    border-radius: 8px;
    color: #fff;
    -webkit-backdrop-filter: blur(5px);
            backdrop-filter: blur(5px);
    z-index: 9999;
    border: 1px solid rgb(255 255 255 / 20%);
    -webkit-animation: fadeInTop .6s forwards;
            animation: fadeInTop .6s forwards;
}

/* 背景颜色样式 */
.msg-green { background-color: rgba(0, 126, 0, 0.7); }
.msg-red { background-color: rgba(166, 19, 19, 0.7); }

/* 向右侧淡出 */
.msg-right { -webkit-animation: fadeOutRight .8s forwards; animation: fadeOutRight .8s forwards; }

/* 顶部淡入动画 */
@-webkit-keyframes fadeInTop {
    0% { opacity: 0; transform: translateY(-100%); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInTop {
    0% { opacity: 0; transform: translateY(-100%); }
    100% { opacity: 1; transform: translateY(0); }
}
/* 向右淡出动画 */
@-webkit-keyframes fadeOutRight {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}
@keyframes fadeOutRight {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}
/*	淡入动画 */
@-webkit-keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
/* 淡出动画 */
@-webkit-keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/*删除确认弹窗*/
.custom-confirm {
	position: fixed;
	top: 35%;
	padding: 20px;
	border-radius: 10px;
	z-index: 30;
	border: 1px solid rgb(255 255 255 / 20%);
	-webkit-animation: fadeIn 0.3s ease-in-out forwards;
	        animation: fadeIn 0.3s ease-in-out forwards;
}

.fade-out {
	-webkit-animation: fadeOut 0.3s ease-out forwards;
	        animation: fadeOut 0.3s ease-out forwards;
}

.confirm-message {
	padding: 15px;
	margin-bottom: 15px;
	font-size: 24px;
}

.confirm-buttons {
	display: flex;
	justify-content: center;
	gap: 50px;
}

#cancel-delete,
#confirm-delete {
	border-radius: 8px;
	border: 1px solid rgb(255 255 255 / 20%);
	padding: 10px 25px;
	font-size: 16px;
	background-color: rgba(255, 255, 255, 0.2);
	transition: background-color 0.3s, color 0.3s;
}

/*加载动画*/
.loading-indicator {
	display: none;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 999;
	padding: 30px;
	border-radius: 8px;
}

.spinner {
	width: 60px;
	height: 60px;
	border: 4px solid #bbb;
	border-top: 4px solid #0099ff;
	border-radius: 50%;
	margin: auto;
	-webkit-animation: spin 1s linear infinite;
	        animation: spin 1s linear infinite;
}

.loading-text {
	margin-top: 10px;
	font-size: 24px;
	color: #222;
}

/* 旋转动画 */
@-webkit-keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
/*总页*/
#current-total-pages {
    position: fixed;
    border-radius: 8px;
    bottom: 50px;
    width: 40px;
    height: 40px;
    color: #eee;
    display: grid !important;
    place-items: center;
    font-size: 12px;
}

/*输入页数跳转*/
.page-input::-webkit-inner-spin-button,
.page-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.page-input {
	position: fixed;
	border-radius: 8px;
	bottom: 50px;
	width: 40px;
	height: 40px;
	color: #eee;;
	padding: 0;
	font-size: 16px;
	outline: none;
	text-align: center;
	border: 1px solid rgb(255 255 255 / 20%);
	-webkit-animation-fill-mode: forwards;
	        animation-fill-mode: forwards;
	-moz-appearance: textfield;
	-webkit-appearance: textfield;
	        appearance: textfield;
}

/*全局滚动条*/
::-webkit-scrollbar {
	width: 0;
}