html {
  font-size: 16px;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-height: 100vh;
  margin: 0;

  font-family: var(--font-family);

  color: var(--color-text);

  background: var(--color-background);

  text-rendering: optimizeLegibility;

  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;

  overflow-x: hidden;
  overflow-y: auto;
}

main {
  width: 100%;
  height: 100%;
}

.container {
  width: min(var(--container-width), calc(100% - 48px));

  margin-inline: auto;
}

.hidden {
  display: none;
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;

    transform: translateY(15px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

::selection {
  background: rgba(37, 99, 235, 0.18);

  color: #0f172a;
}

html {
  scrollbar-width: thin;
  scrollbar-color: #9ca3af transparent;
}

body {
  scrollbar-width: thin;
  scrollbar-color: #9ca3af transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0;
}

::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
  transition: background 0.25s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
  background-clip: content-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
  }

  img,
  video,
  iframe {
    max-width: 100%;
  }
}


/* =========================================================
   BAC TRUTH — UNIVERSAL PAGE SCROLLBAR
   Matches the Quran page exactly.
   ========================================================= */
html,
body {
  scrollbar-width: thin;
  scrollbar-color: #b8bec8 transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 5px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #b8bec8;
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #aab1bc;
}
