@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100..900&family=ZCOOL+KuaiLe&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

body h2 {
    font-size: 1.8rem !important;
    /* 修改标题的大小 */
    /* color: #1b22fd; */
    /* 修改标题颜色 */
    text-align: left;
    /* font-weight: bold !important; */
    /* 加粗标题 */
    font-family: "ZCOOL KuaiLe", serif;
}

/* 为所有 h2 添加标记 */
.md-typeset h2::before {
    content: "\F285";
    /* 添加的标记，可以是文字、符号或图标 */
    font-family: "bootstrap-icons" !important;
    /* 必须指定字体为 bootstrap-icons */
    /* 标记颜色 */
    font-size: 1.5rem;
    /* 标记大小 */
    margin-right: 0.5rem;
    /* 与标题之间的间距 */
    display: inline-block;
    /* 确保标记与标题对齐 */
}

.flip-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 10px auto;
    display: flex;
    align-items: flex-start;
    /* 对齐顶部 */
    justify-content: flex-end;
    /* 将文字放置右上角 */
}

.image-container {
    position: relative;
    position: relative;
    width: 300px;
    height: 300px;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 1s;
}

.image-container img:first-child {
    z-index: 1;
    backface-visibility: hidden;
}

.image-container img:last-child {
    z-index: 0;
    transform: rotateY(180deg);
    backface-visibility: hidden;
}

.image-container:hover img:first-child {
    transform: rotateY(180deg);
    z-index: 2;
}

.image-container:hover img:last-child {
    transform: rotateY(0deg);
    z-index: 3;
}

.hover-block {
    position: absolute;
    top: 10px;
    /* 调整文字位置 */
    right: -20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10;
    /* 确保文字在图片上方 */
    display: none;
    /* 默认隐藏 */
}

.image-container:hover+.hover-block {
    display: block;
    /* 鼠标悬停时显示文字 */
}


/* 整个容器样式，保证子元素相对定位 */
.hover-zoom {
    /* background: linear-gradient(135deg, #ff7eb3, #ff758c); */
    color: #fff;
    text-align: center;
    /* padding: 20px 40px; */
    /* font-size: 24px; */
    font-weight: bold;
    border-radius: 20px;
    /* box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); */
    transition: all 0.3s ease-out;
    transform-origin: center;
}

/* 图片的默认样式 */
.hover-zoom img {
    transition: transform 0.5s ease-out;
    /* 平滑放大过渡 */
    display: block;
    /* 防止图片下方出现间隙 */
}

/* 当鼠标悬停时放大并平移 */
.hover-zoom:hover img {
    transform: scale(1.5);
    /* box-shadow: 0 10px 30px rgba(255, 118, 156, 0.6); */
    /* background: linear-gradient(135deg, #ff758c, #ff7eb3); */
    /* 挤出放大并右移 */
}

/* 居中对齐通用样式 */
.center-text {
    text-align: center;
    /* 水平居中 */
    margin: 0 auto;
    /* 自动调整外边距 */
}

/* 示例：为标题或段落内容居中 */
p.center-text {
    text-align: center;
}