::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: none;
}
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: var(--ghost-accent-color);
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--ghost-accent-color) 78%, var(--text-base));
}
* {
  scrollbar-color: var(--ghost-accent-color) transparent;
}
/* Menu */
header.header {
  border-radius: 0 0 20px 20px;
  transition: all 0.3s;
}
nav.mainMenu {
  justify-content: center !important;
}
/* Post tile */
h2.story-title {
  overflow: hidden !important;
  display: -webkit-box;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}
/* Popup ADS */
#banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 100000;
  box-sizing: border-box;
  width: min(100%, 22rem);
  max-height: min(16rem, 70vh);
  overflow: auto;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  background: var(--surface-elevated);
  color: var(--text-base);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--title-color) 18%, transparent);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  visibility: hidden;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

#banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#banner button:not(#banner-close-icon) {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--ghost-accent-color);
  border-radius: 0.45rem;
  background: var(--ghost-accent-color);
  color: var(--button-primary-color);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

#banner button:not(#banner-close-icon):hover {
  filter: brightness(0.94);
}

#banner-close-icon {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0.18rem;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-base);
  cursor: pointer;
}

#banner-close-icon:focus-visible,
#banner button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

@media only screen and (max-width: 600px) {
  #banner {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-width: none;
    max-height: 40vh;
    overflow: hidden;
    padding: 0.85rem 0.85rem 0.75rem;
    border-radius: 0.75rem;
  }

  #banner-close-icon {
    top: 0.4rem;
    right: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #banner {
    transition: none;
    transform: none;
  }
}
/* Preload */
#preload {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0);
  z-index: 1000000;
  animation: fadeOut 1s ease forwards;
  transition: all 400ms;
}
@keyframes load {
  0% {
    opacity: 0.08;
    filter: blur(5px);
    letter-spacing: 3px;
  }
  100% {
    opacity: 1;
    font-weight: 600;
    filter: blur(0);
  }
}
.animate {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  margin: auto;
  animation: load 1.2s infinite 0s ease-in-out;
  animation-direction: alternate;
  text-shadow: 0 0 1px white;
  transition: all 400ms;
}
/* Scroll To Top */
#scrollToTopBtn {
  display: none; /* Ẩn nút ban đầu */
  position: fixed;
  bottom: 0px;
  right: 0px;
  z-index: 99;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ghost-accent-color);
}
#scrollToTopBtn:focus-visible {
  outline: 2px solid var(--ghost-accent-color);
  outline-offset: 4px;
}
#scrollToTopBtn svg {
  padding: 0;
  width: 50px;
  color: var(--ghost-accent-color);
}
/* Keep Ghost Portal and membership surfaces available to site owners. */
.gh-header.is-classic.has-image.gh-outer {
  display: none !important;
}
