/* =====================================================================
   10 - BASE
   Page defaults, typography, scrollbar, film grain.
   ===================================================================== */

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-weight: 400;
    color: var(--text);
    /* Plain dark page; the textures are kept for buttons only. For a cracked-concrete page use: var(--ink-950) var(--tex-concrete) repeat */
    background: var(--ink-950);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Subtle animated film grain over everything */
body::before {
    content: '';
    position: fixed;
    inset: -50%;
    z-index: 2000;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
    opacity: .045;
    animation: grain 1.2s steps(6) infinite;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent-2); transition: color .2s; }
a:hover { color: #fff; text-decoration: none; }

h1, h2, h3, h4, h5, h6 { font-family: var(--font); font-weight: 700; font-stretch: var(--stretch-tight); color: #fff; }

.container { max-width: var(--container); padding-left: 20px; padding-right: 20px; }

/* Legacy Bootstrap/AdminLTE helpers re-coloured to the theme */
.text-muted { color: var(--text-dim) !important; }
.text-asia, .text-warning { color: var(--accent-2) !important; }
.wrapper, .content-wrapper, .bg-black { background: transparent !important; }

main { min-height: 70vh; animation: page-in .6s var(--ease-out) both; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-950); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent-hot), var(--accent)); border-radius: 10px; border: 2px solid var(--ink-950); }

/* Effect switches from config/theme.php (body data attributes) */
body[data-fx-grain="0"]::before { display: none; }
.is-hidden { display: none !important; }
.text-dim { color: var(--text-dim) !important; }
