@font-face {
  font-family: '思源宋体-思源宋体-SemiBold';
  src: url('./webfonts/思源宋体-思源宋体-SemiBold.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: '思源宋体-思源宋体-Regular';
  src: url('./webfonts/思源宋体-思源宋体-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: '思源宋体-思源宋体-Medium';
  src: url('./webfonts/思源宋体-思源宋体-Medium.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: '思源宋体-思源宋体-ExtraLight';
  src: url('./webfonts/思源宋体-思源宋体-ExtraLight.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

.text-ExtraLight {
  font-family: '思源宋体-思源宋体-ExtraLight', SimSun, 'Songti SC', 'Source Han Serif SC';
}

.text-Medium {
  font-family: '思源宋体-思源宋体-Medium', SimSun, 'Songti SC', 'Source Han Serif SC';
}

.text-SemiBold {
  font-family: '思源宋体-思源宋体-SemiBold', SimSun, 'Songti SC', 'Source Han Serif SC';
}

* {
  box-sizing: border-box;
}

html {
  --yor-theme-card-mask-image-top: url(/fade-top.svg);
  --yor-theme-card-mask-image-left: url(/fade-left.svg);
  --yor-theme-card-mask-image-right: url(/fade-right.svg);
  --yor-theme-card-mask-position-top: center bottom;
  --yor-theme-card-mask-position-left: right center;
  --yor-theme-card-mask-position-right: left center;
  --yor-theme-page-bg-image: url(b211d4af2da24a358573f15b489921e2c3ca1827195f9d1f8e257158.webp);
}

body {
  margin: 0;
  padding: 0;
  font-family: '思源宋体-思源宋体-Regular', SimSun, 'Songti SC', 'Source Han Serif SC';
  /* background-image: var(--yor-theme-page-bg-image); */
  background-color: #fff;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: #334;
}

#root {
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(0.5rem) sepia(10%);
  /* background-color: rgba(248, 249, 250, 0.9); */
  background-attachment: fixed;
  background-image: linear-gradient(0deg, rgba(244, 248, 255, 0.8), rgba(244, 248, 255, 0.9), rgba(244, 248, 255, 0.8));
}

#root>header,
#root>footer {
  width: 100%;
}

#root>main,
#root>section {
  width: 55vh;
  max-width: 100%;
  /* background-color: rgba(0,0,0,0.4); */
}

@media (min-width: 1280px) {

  #root>main,
  #root>section {
    width: 100vh;
    max-width: 90%;

  }
}


@media (min-width: 1536px) {

  #root>main,
  #root>section {
    width: 150vh;
    max-width: 90%;
  }
}


@media (max-width: 750px) {
  main>section {
    padding: 1rem 1.2rem;
  }
}

.poem-card-ct{
  position: relative;
}
.poem-card-ct>a[id]{
  height: 0; width: 1rem; position: absolute; top: -0.5rem; left: 50%; z-index: -1;
}
.top-image {
  border-radius: 0.5rem 0.5rem 0 0;
}
.top-image.mask {
  mask-image: var(--yor-theme-card-mask-image-top);
  mask-position: var(--yor-theme-card-mask-position-top);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

.poem-content {
  word-break: break-word;
  word-wrap: break-word;
  font-size: 1.125rem;
  line-height: 1.8;
  font-family: '思源宋体-思源宋体-Medium', SimSun, 'Songti SC', 'Source Han Serif SC';
  min-height: 17rem;

}
.poem-content p{
  min-height: 1rem;
  line-height: 1.4;
  margin-bottom: 0.7rem;
}

[js-role="last-char"]{
  display: inline-block;
}
.poem-card {
  width: 100%;
  display: flex;
  position: relative;
  border-radius: 0.75rem;
  position: relative;
  min-height: 20vh;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.05);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 0 0.25rem 0.38rem -1px rgba(0, 0, 0, 0.1), 0 0.125rem 0.25rem -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.3s ease;
  flex-direction: column;


}

.poem-card:hover {
  box-shadow: 0 0.625rem 1.25rem rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.poem-card::after {
  content: '';
  box-sizing: border-box;
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  border-image: linear-gradient(0deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.7)) 1;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s;
}

.back-to-top:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

/* 悬浮导航 */
.floating-nav-buttons {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 100;
}

.nav-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(74, 85, 104, 0.7);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0.25rem 0.38rem rgba(0, 0, 0, 0.1);
}

.nav-btn:focus {
  outline: none;
}

.nav-btn:hover {
  background-color: rgba(67, 175, 229, 0.9);
  transform: translateY(-3px);
}

.toc-btn {
  /* background-color: rgba(66, 153, 225, 0.8); */
}

.toc-btn:hover {
  background-color: rgba(66, 153, 225, 1);
}

.floating-nav-buttons .nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 左侧气泡提示样式 */
.floating-nav-buttons .tooltip.left-tooltip {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.38rem 0.63rem;
  border-radius: 0.25rem;
  font-size: 0.81rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-right: 0.75rem;
  pointer-events: none;
}

.floating-nav-buttons .tooltip.left-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.85);
}

/* 初始显示 */
.floating-nav-buttons .tooltip.show-on-load {
  opacity: 1;
  visibility: visible;
}

/* 分享面板 */
.share-options {
  display: flex;
  justify-content: space-around;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 25%;
  opacity: 0.5;
}
.share-option:hover {
  opacity: 1;
}

.share-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  box-shadow: 0 0.13rem 0.31rem rgba(0, 0, 0, 0.1);
}

.share-icon-i {
  color: white;
  font-size: 1.25rem;
}

.share-name {
  font-size: 0.75rem;
  color: #666;
  white-space: nowrap;
}

.dark-bg .share-name {
  color: white;
}

/* toast 提示 */
.toast {
  position: fixed;
  bottom: 7.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 1rem;
}

.toast.show {
  opacity: 1;
}

/* 海报弹窗样式 */
.poster-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.poster-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(0.2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.poster-card {
  position: relative;
  width: 85vw;
  height: 75vh;
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1001;
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.3);
}

.poster-header {
  height: 30%;
  background-size: cover;
  position: relative;
  background-position: center 50%
}

.poster-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
}

.poster-content-box {
  height: 30%;
  border-bottom: 1px dashed #eee;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  overflow: hidden;
}

.poster-content {
  text-align: center;
  white-space: pre-line;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  line-height: 1.6;
  max-height: calc(1.6rem * 6);
  width: 100%;
}

.poster-qrcode {
  padding: 1rem;
  text-align: center;
  height: 20%;
  display: flex;
  justify-content: center;
}

.poster-qrcode img {
  max-width: 7rem;
  max-height: 7rem;
}

.poster-origin {
  font-size: 1rem;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.poster-save-btn {
  display: block;
  color: white;
  border: none;
  border-radius: 0.25rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 1.5rem;
}

.poster-save-btn:hover {
  transform: translateY(-1px);
}

.poster-save-btn:active {
  transform: translateY(0);
  -webkit-transform: translateY(0);
  -moz-transform: translateY(0);
  -ms-transform: translateY(0);
  -o-transform: translateY(0);
}

.poster-author {
  padding: 1.5rem;
  text-align: center;
  font-size: 1rem;
  color: #000;
  background: rgba(255, 255, 255, 0.9);
}

.poster-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.poster-canvas {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.3);
}

.reGen {
  display: none;
}