:root {
  --theme-accent-color: #e00857;
  --theme-accent-color-rgb: 224, 8, 87;
  --site-font-family: "PingFang SC", "Source Han Sans CN", "Noto Sans CJK SC",
    "Microsoft YaHei", Helvetica, Arial, sans-serif;
}

/* 隐藏版权部分 */
.copyright.pull-right {
  display: none;
}

/* 单篇文章链接样式 */
.single-post-wrap a:not(.post-fancybox-link),
.entry-content a:not(.post-fancybox-link),
.section-text a:not(.post-fancybox-link) {
  color: var(--content-color, inherit);
  font-family: var(--site-font-family);
  border-bottom: 2px solid #e91e63;
  text-decoration: none;
  line-height: inherit;
}

/* 文章正文链接保留原来的悬停效果 */
.single-post-wrap a:not(.post-fancybox-link):hover,
.entry-content a:not(.post-fancybox-link):hover,
.section-text a:not(.post-fancybox-link):hover {
  -webkit-transition: box-shadow 0.2s linear;
  transition: box-shadow 0.2s linear;
  box-shadow: inset 0 -10px #e91e63;
}

/* 页面级可点击文字：菜单、页脚、卡片标题等 */
.navbar .navbar-nav > li > a:not(.btn):hover,
.navbar .navbar-nav > li > a:not(.btn):focus-visible,
.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus-visible,
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus-visible,
.footer a:hover,
.footer a:focus-visible,
.footer-brand a:hover,
.footer-brand a:focus-visible,
.footer-big h4 a:hover,
.footer-big h4 a:focus-visible,
.footer-big h5 a:hover,
.footer-big h5 a:focus-visible,
.hestia-title a:hover,
.hestia-title a:focus-visible,
.title a:hover,
.title a:focus-visible,
.card-title a:hover,
.card-title a:focus-visible,
.info-title a:hover,
.info-title a:focus-visible,
.media .media-heading a:hover,
.media .media-heading a:focus-visible,
.card-blog a.moretag:hover,
.card-blog a.moretag:focus-visible,
.pagination a:hover,
.pagination a:focus-visible,
.woocommerce.archive .blog-post .products .product-category h2 a:hover,
.woocommerce.archive .blog-post .products .product-category h2 a:focus-visible {
  background-color: var(--theme-accent-color) !important;
  color: #fff !important;
  border-bottom-color: var(--theme-accent-color);
  box-shadow: 0 0 0 0.18em var(--theme-accent-color);
  text-decoration: none !important;
  border-radius: 3px;
}

.navbar .navbar-brand:hover p,
.navbar .navbar-brand:focus-visible p {
  color: #fff !important;
}

/* 文章图片 Fancybox 触发链接，避开插件内部图片样式 */
.single-post-wrap figure.wp-block-image > a,
.entry-content figure.wp-block-image > a,
.section-text figure.wp-block-image > a,
.single-post-wrap .wp-caption > a,
.entry-content .wp-caption > a,
.section-text .wp-caption > a,
.single-post-wrap a.post-fancybox-link,
.entry-content a.post-fancybox-link,
.section-text a.post-fancybox-link {
  display: inline-block;
  max-width: 100%;
  border-bottom: 0;
  text-decoration: none;
  line-height: normal;
  vertical-align: bottom;
}

.single-post-wrap figure.wp-block-image > a:hover,
.entry-content figure.wp-block-image > a:hover,
.section-text figure.wp-block-image > a:hover,
.single-post-wrap .wp-caption > a:hover,
.entry-content .wp-caption > a:hover,
.section-text .wp-caption > a:hover,
.single-post-wrap a.post-fancybox-link:hover,
.entry-content a.post-fancybox-link:hover,
.section-text a.post-fancybox-link:hover {
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
}

.single-post-wrap figure.wp-block-image > a img,
.entry-content figure.wp-block-image > a img,
.section-text figure.wp-block-image > a img,
.single-post-wrap .wp-caption > a img,
.entry-content .wp-caption > a img,
.section-text .wp-caption > a img,
.single-post-wrap a.post-fancybox-link img,
.entry-content a.post-fancybox-link img,
.section-text a.post-fancybox-link img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* 去掉鼠标点击链接后浏览器默认的蓝色焦点框 */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible),
.navbar a:focus,
.navbar a:active,
.single-post-wrap a.post-fancybox-link:focus,
.single-post-wrap a.post-fancybox-link:active,
.entry-content a.post-fancybox-link:focus,
.entry-content a.post-fancybox-link:active,
.section-text a.post-fancybox-link:focus,
.section-text a.post-fancybox-link:active {
  outline: 0 !important;
  outline-offset: 0 !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}

.navbar a,
.single-post-wrap a.post-fancybox-link,
.entry-content a.post-fancybox-link,
.section-text a.post-fancybox-link {
  -webkit-tap-highlight-color: transparent;
}

/* 键盘 Tab 访问时保留可见焦点，但不用浏览器默认蓝色 */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgba(var(--theme-accent-color-rgb), 0.75);
  outline-offset: 3px;
}

.navbar a:focus-visible,
.single-post-wrap a.post-fancybox-link:focus-visible,
.entry-content a.post-fancybox-link:focus-visible,
.section-text a.post-fancybox-link:focus-visible {
  outline: 2px solid rgba(var(--theme-accent-color-rgb), 0.75) !important;
  outline-offset: 3px !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}

/* 全局字体样式 */
body,
ul,
.tooltip-inner {
  color: var(--content-color, inherit);
  font-family: var(--site-font-family);
  font-weight: 400;
}

/* 标题字体样式 */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--content-color, inherit);
  font-family: var(--site-font-family);
  font-weight: 600;
}

.navbar .navbar-brand,
.navbar .navbar-brand p,
.hestia-title,
.title,
.card-title,
.info-title,
.media .media-heading {
  font-family: var(--site-font-family);
  font-weight: 600;
}

.navbar .navbar-nav > li > a,
.navbar .hestia-toggle-search,
.dropdown-menu > li > a,
.footer,
.footer a,
.single-post-wrap,
.entry-content,
.section-text {
  font-family: var(--site-font-family);
}

.navbar .navbar-nav > li > a,
.navbar .hestia-toggle-search {
  font-weight: 500;
}

.single-post-wrap p,
.entry-content p,
.section-text p,
.single-post-wrap li,
.entry-content li,
.section-text li,
.single-post-wrap blockquote,
.entry-content blockquote,
.section-text blockquote,
.wp-block-image figcaption,
.wp-caption-text,
.gallery-caption,
cite {
  font-family: var(--site-font-family);
  font-weight: 300;
  line-height: 1.85;
}

.single-post-wrap p,
.entry-content p,
.section-text p,
.single-post-wrap li,
.entry-content li,
.section-text li {
  line-height: 1.85;
}

.single-post-wrap p,
.entry-content p,
.section-text p {
  margin-bottom: 1.15em;
}

.single-post-wrap blockquote,
.entry-content blockquote,
.section-text blockquote,
.wp-block-quote,
.wp-block-pullquote {
  line-height: 1.85;
  margin-top: 1.4em;
  margin-bottom: 1.4em;
}

.single-post-wrap strong,
.entry-content strong,
.section-text strong,
.single-post-wrap b,
.entry-content b,
.section-text b {
  font-weight: 700;
}

/* 首页大标题打字机光标 */
.hestia-typewriter-title {
  min-height: 1.2em;
}

.hestia-typewriter-text {
  white-space: pre-wrap;
}

.hestia-typewriter-cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.9em;
  margin-left: 0.08em;
  background: currentColor;
  vertical-align: -0.08em;
  animation: hestia-typewriter-cursor 0.82s steps(2, start) infinite;
}

@keyframes hestia-typewriter-cursor {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

/* 移动端固定导航展开菜单：修复滚动后 collapse 高度为 0 的问题 */
@media (max-width: 768px) {
  .navbar.navbar-fixed-top .navbar-collapse.collapse.in,
  .navbar.navbar-fixed-top .navbar-collapse.collapsing {
    display: block !important;
    height: calc(100vh - 70px) !important;
    max-height: calc(100vh - 70px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .navbar.navbar-fixed-top .navbar-collapse.collapse.in .navbar-nav,
  .navbar.navbar-fixed-top .navbar-collapse.collapsing .navbar-nav {
    min-height: 1px;
  }
}

/* PJAX 页面切换反馈：只影响可替换的主体区域，不影响固定音乐播放器 */
html.hestia-pjax-loading .page-header,
html.hestia-pjax-loading .main {
  opacity: 0.58;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

/* 行内代码样式 */
:not(pre) > code {
  display: inline;
  padding: 0.15em 0.35em;
  background: rgba(233, 30, 99, 0.12);
  color: var(--content-color, inherit);
  font-family: var(--site-font-family);
  border-radius: 4px;
}

/* 预格式化文本样式 */
pre {
  position: relative;
  padding: 4.2rem 1.5rem 1.5rem !important;
  margin: 1rem 0 !important;
  background: #1d1f21 !important;
  overflow: auto;
  overflow-x: hidden;
  border: 2px solid rgba(0, 0, 0, 0.72);
  border-radius: 0.8rem;
  color: #fff;
  font-family: var(--site-font-family);
  tab-size: 4;
}

pre code,
pre code.hljs {
  display: block;
  padding: 0 !important;
  margin: 0;
  overflow: visible;
  background: transparent !important;
  color: inherit;
  border: 0;
  border-radius: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre code *,
pre code.hljs * {
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
}

/* 预格式化文本的自定义前缀圆点样式 */
pre::before {
  content: " ";
  display: block;
  position: absolute;
  top: 1.55rem;
  left: 1.9rem;
  width: 12px;
  height: 12px;
  margin-top: 0;
  border-radius: 50%;
  background: #ff5f56;
  -webkit-box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f;
  box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f;
}

/* 预格式化文本的自定义后缀样式 */
pre::after {
  content: none;
}

/* 代码块复制按钮 */
.code-copy-button {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.code-copy-button svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
}

.code-copy-button:hover,
.code-copy-button:focus {
  border-color: rgba(233, 30, 99, 0.65);
  background: rgba(233, 30, 99, 0.2);
  color: #fff;
  outline: none;
}

.code-copy-button.is-copied {
  border-color: rgba(39, 201, 63, 0.7);
  background: rgba(39, 201, 63, 0.18);
  color: #fff;
}

/* 图片标题样式 */
.wp-block-image figcaption {
  color: pink;
  text-align: center;
}

/* 暗黑模式下的样式调整 */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: linear-gradient(#3d3c3d, #383738, #343334);
    --background-color-2: #323130;
    --background-color-3: #222122;
    --background-color-4: #292929;
    --content-color: #e0dfdf;
    --content-color-2: #000;
  }

  /* 单产品页面背景颜色调整 */
  .woocommerce.single-product .blog-post {
    background: var(--background-color-2);
  }

  /* 页面背景颜色调整。不要把 .navbar 和 ul 全局刷背景，否则首页透明导航会失效。 */
  body,
  .tooltip-inner {
    background: var(--background-color-3);
  }

  /* 首页顶部透明导航：保留 Hestia 原本覆盖在 banner 上的透明效果。 */
  .navbar.navbar-transparent,
  .navbar.navbar-transparent.navbar-default,
  .navbar.navbar-transparent > .container,
  .navbar.navbar-transparent .navbar-nav {
    background: transparent !important;
    box-shadow: none !important;
  }

  /* 滚动后或内页的固定导航：使用半透明暗色，而不是纯色块。 */
  .navbar.navbar-not-transparent,
  .navbar.navbar-default.navbar-not-transparent,
  .navbar.navbar-color-on-scroll.navbar-not-transparent {
    background: rgba(34, 33, 34, 0.86) !important;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.24);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
  }

  .navbar.navbar-not-transparent .navbar-nav,
  .navbar.navbar-not-transparent > .container {
    background: transparent !important;
  }

  .navbar .navbar-brand,
  .navbar .navbar-brand p,
  .navbar .navbar-nav > li > a,
  .navbar .navbar-nav > li > a:hover,
  .navbar .navbar-nav > li > a:focus,
  .navbar .hestia-toggle-search {
    color: var(--content-color) !important;
  }

  /* 各类文章和卡片背景颜色调整 */
  .blog-post,
  .section-gray,
  .hestia-blogs,
  .card-blog {
    background: var(--background-color-2);
  }

  /* 文字和链接颜色调整 */
  .title-logo-wrapper,
  .hestia-title,
  .card-description,
  .card-blog a.moretag,
  .card-title a {
    color: var(--content-color);
  }

  /* 页脚背景颜色调整：保留一点透明层次感。 */
  footer.footer.footer-black.footer-big {
    background: rgba(34, 33, 34, 0.92);
    backdrop-filter: saturate(140%) blur(6px);
    -webkit-backdrop-filter: saturate(140%) blur(6px);
  }

  /* 产品卡片背景颜色调整 */
  .card-product {
    background: var(--background-color-4);
  }

  /* 标题、卡片标题等文字颜色调整 */
  .hestia-title,
  .hestia-title a,
  .hestia-title a:hover,
  .title,
  .title a,
  .title a:hover,
  .card-title,
  .card-title a,
  .card-title a:hover,
  .info-title,
  .info-title a,
  .info-title a:hover,
  .footer-brand,
  .footer-brand a,
  .footer-brand a:hover,
  .footer-big h4,
  .footer-big h4 a,
  .footer-big h4 a:hover,
  .footer-big h5,
  .footer-big h5 a,
  .footer-big h5 a:hover,
  .media .media-heading,
  .media .media-heading a,
  .media .media-heading a:hover,
  .woocommerce.archive .blog-post .products .product-category h2,
  .woocommerce.archive .blog-post .products .product-category h2 a,
  .woocommerce.archive .blog-post .products .product-category h2 a:hover {
    color: var(--content-color);
  }

  /* 文章内容文字颜色调整 */
  .blog-post .media p {
    color: var(--content-color);
  }

  /* 文章作者和发布时间等元信息颜色调整 */
  article .posted-by,
  article .posted-by.vcard.author,
  article .byline,
  article .entry-meta,
  article .post-meta,
  article .post-category,
  article .post-date,
  article .author,
  article .vcard,
  article .fn,
  article .posted-by a,
  article .posted-by.vcard.author a,
  article .byline a,
  article .entry-meta a,
  article .post-meta a,
  article .post-category a,
  article .post-date a,
  article .author a,
  article .vcard a,
  article .fn a,
  .blog-post .posted-by,
  .blog-post .posted-by.vcard.author,
  .blog-post .byline,
  .blog-post .entry-meta,
  .blog-post .post-meta,
  .blog-post .post-category,
  .blog-post .post-date,
  .blog-post .author,
  .blog-post .vcard,
  .blog-post .fn,
  .blog-post .posted-by a,
  .blog-post .posted-by.vcard.author a,
  .blog-post .byline a,
  .blog-post .entry-meta a,
  .blog-post .post-meta a,
  .blog-post .post-category a,
  .blog-post .post-date a,
  .blog-post .author a,
  .blog-post .vcard a,
  .blog-post .fn a,
  .posted-by,
  .posted-by.vcard.author,
  .posted-by a,
  .posted-by.vcard.author a {
    color: var(--content-color) !important;
  }

  article .posted-by a:hover,
  article .posted-by.vcard.author a:hover,
  article .byline a:hover,
  article .entry-meta a:hover,
  article .post-meta a:hover,
  .blog-post .posted-by a:hover,
  .blog-post .posted-by.vcard.author a:hover,
  .blog-post .byline a:hover,
  .blog-post .entry-meta a:hover,
  .blog-post .post-meta a:hover,
  .posted-by a:hover,
  .posted-by.vcard.author a:hover {
    color: #fff !important;
  }

  /* 下拉菜单背景颜色调整 */
  .navbar .navbar-nav > li .dropdown-menu {
    background: var(--background-color-3);
  }

  /* 下拉菜单链接颜色调整 */
  .dropdown-menu > li > a {
    color: var(--content-color);
  }

  /* 暗黑模式下的移动端导航背景颜色调整 */
  @media (max-width: 768px) {
    .navbar.navbar-fixed-top .navbar-collapse {
      background: rgba(34, 33, 34, 0.95);
    }

    .navbar.navbar-transparent > .container {
      background: transparent !important;
    }
  }
}

/* 按钮和输入框的阴影效果去除 */
body:not(.woocommerce-page)
  button:not([class^="fl-"]):not(.hestia-scroll-to-top):not(
    .navbar-toggle
  ):not(.close),
body:not(.woocommerce-page)
  .button:not([class^="fl-"]):not(.hestia-scroll-to-top):not(
    .navbar-toggle
  ):not(.add_to_cart_button),
div.wpforms-container .wpforms-form button[type="submit"].wpforms-submit,
input[type="submit"],
input[type="button"],
.btn.btn-primary,
.widget_product_search button[type="submit"],
.hestia-sidebar-open.btn.btn-rose,
.hestia-sidebar-close.btn.btn-rose {
  -webkit-box-shadow: none;
  box-shadow: none;
}

/* 按钮和输入框的悬停阴影效果去除 */
body:not(.woocommerce-page)
  .button:not([class^="fl-"]):not(.hestia-scroll-to-top):not(
    .navbar-toggle
  ):not(.add_to_cart_button):hover,
body:not(.woocommerce-page)
  button:not([class^="fl-"]):not(.hestia-scroll-to-top):not(
    .navbar-toggle
  ):not(.close):hover,
div.wpforms-container .wpforms-form button[type="submit"].wpforms-submit:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input#searchsubmit:hover,
.widget_product_search button[type="submit"]:hover,
.pagination span.current,
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active,
.btn.btn-primary.active,
.btn.btn-primary:active:focus,
.btn.btn-primary:active:hover,
.hestia-sidebar-open.btn.btn-rose:hover,
.hestia-sidebar-close.btn.btn-rose:hover,
.pagination span.current:hover {
  -webkit-box-shadow: none;
  box-shadow: none;
}

/* Fancybox 按钮位置调整 */
.fancybox-button {
  top: 50px;
}

/* Fancybox 工具栏裁剪样式 */
.fancybox-toolbar {
  clip-path: inset(0 0 -50px 90px);
}

/* 移动端播放器容器样式调整 */
@media (max-width: 860px) {
  #player-container {
    max-width: 100px;
    max-height: 200px;
    left: 50px;
  }
}

/* 引用文字大小调整 */
cite {
  font-size: small;
}

/* 段落文字对齐样式 */
.section-text p {
  text-align: justify;
}
