html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-ui) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

span,
div,
p,
label,
a,
small,
strong,
em {
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.heading-gaming {
  font-family: var(--font-heading) !important;
}

.tech-font,
label,
.available-date {
  font-family: var(--font-tech) !important;
}

html {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  scroll-behavior: smooth;
  background: #07101d;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: var(--text);
  background: #07101d;
  overflow-x: clip;
  overscroll-behavior: none;
  touch-action: pan-y;
}

/* TŁO STRONY - stabilne na iPhone, bez ujemnych z-indexów */
.page-bg-effects {
  position: fixed;
  inset: 0;
  z-index: 0 !important;
  width: 100vw;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  pointer-events: none;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(4, 8, 16, 0.34) 0%,
      rgba(6, 11, 20, 0.22) 38%,
      rgba(5, 9, 18, 0.34) 100%
    ),
    url("../../img/background-gaming.webp"),
    #07101d;
  background-size: cover, cover, cover;
  background-position: center top, center top, center top;
  background-repeat: no-repeat, no-repeat, no-repeat;
}

.page-bg-effects::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(185, 193, 208, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 193, 208, 0.11) 1px, transparent 1px);
  background-size: 82px 82px;
  background-position: center 0;
  opacity: 0.16;
  transform: perspective(1000px) rotateX(58deg) scale(1.12);
  transform-origin: center top;
  animation: gridMove 18s linear infinite;
}

.page-bg-effects::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.06), transparent 28%),
    radial-gradient(circle at 14% 26%, rgba(var(--primary-rgb), 0.07), transparent 34%),
    radial-gradient(circle at 86% 24%, rgba(var(--violet-rgb), 0.06), transparent 32%),
    radial-gradient(circle at 56% 76%, rgba(var(--accent-rgb), 0.045), transparent 20%);
  opacity: 0.62;
}

.page-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1 !important;
  width: 100vw;
  max-width: 100vw;
  pointer-events: none;
  overflow: hidden;
}

.page-bg-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(2, 5, 12, 0.04) 0%,
      rgba(2, 5, 12, 0.00) 42%,
      rgba(2, 5, 12, 0.14) 100%
    );
  opacity: 0.78;
}

.page-bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1 !important;
  width: 100vw;
  max-width: 100vw;
  pointer-events: none;
  opacity: 0.03;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.18) 0.75px, transparent 0.75px);
  background-size: 24px 24px;
  overflow: hidden;
}

/* Wszystko poza tłem ma być nad warstwami tła */
body > :not(.page-bg-effects):not(.page-bg-overlay):not(.page-bg-noise) {
  position: relative;
  z-index: 2;
}

::selection {
  background: rgba(var(--primary-rgb), 0.28);
  color: #fff;
}

.site-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.site-main {
  width: min(100%, calc(var(--container) + (var(--section-padding-x) * 2)));
  max-width: 100%;
  margin: 0 auto;
  padding: 18px 0 0;
  overflow-x: clip;
}

.site-main > * {
  width: 100%;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

#main-partner,
#youtube,
#twitch,
#free-rewards,
#active-giveaways,
#other-partners {
  scroll-margin-top: var(--header-offset);
}

.main-partner,
.youtube-channel,
.twitch-status,
.free-rewards,
.active-giveaways,
.other-partners {
  margin-top: var(--section-spacing);
}

@keyframes gridMove {
  0% {
    background-position: center 0;
  }

  100% {
    background-position: center 82px;
  }
}

@supports (-webkit-touch-callout: none) {
  html,
  body {
    background-color: #07101d;
  }

  body {
    min-height: -webkit-fill-available;
  }

  .page-bg-effects,
  .page-bg-overlay,
  .page-bg-noise {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
}

@media (max-width: 820px) {
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: none;
    scroll-behavior: auto;
    background: #07101d;
  }

  body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
    overscroll-behavior: none;
    touch-action: pan-y;
    background: #07101d;
  }

  .page-bg-effects {
    background:
      linear-gradient(
        180deg,
        rgba(4, 8, 16, 0.28) 0%,
        rgba(6, 11, 20, 0.16) 42%,
        rgba(5, 9, 18, 0.30) 100%
      ),
      url("../../img/background-gaming.webp"),
      #07101d;
    background-size: cover, cover, cover;
    background-position: center top, center top, center top;
    background-repeat: no-repeat, no-repeat, no-repeat;
  }

  .page-bg-effects::before {
    opacity: 0.07;
    background-size: 58px 58px;
    animation: none !important;
    transform: none !important;
  }

  .page-bg-effects::after {
    opacity: 0.36;
    transform: none !important;
  }

  .page-bg-overlay::before {
    opacity: 0.26;
  }

  .page-bg-noise {
    opacity: 0.012;
  }

  .site-shell,
  .site-main,
  .site-main > * {
    max-width: 100%;
    overflow-x: clip;
  }

  .site-main {
    padding-top: 14px;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-delay: 0s !important;
    transition-delay: 0s !important;
  }

  [data-animate],
  [data-reveal],
  .reveal,
  .scroll-reveal,
  .is-reveal,
  .animate-on-scroll {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .active-giveaways__item,
  .free-rewards__item,
  .other-partners__item,
  .main-partner,
  .youtube-channel,
  .twitch-status,
  .demo-submit {
    transition: none !important;
  }

  .active-giveaways__item:hover,
  .free-rewards__item:hover,
  .other-partners__item:hover,
  .main-partner:hover,
  .youtube-channel:hover,
  .twitch-status:hover,
  .demo-submit:hover {
    transform: none !important;
  }

  .active-giveaways__image--lazy,
  .active-giveaways__image--lazy.is-loading,
  .active-giveaways__image--lazy.is-loaded,
  .active-giveaways__image--lazy.is-error {
    opacity: 1 !important;
    transition: none !important;
  }
}

@media (max-width: 520px) {
  .page-bg-effects {
    background:
      linear-gradient(
        180deg,
        rgba(4, 8, 16, 0.24) 0%,
        rgba(6, 11, 20, 0.12) 42%,
        rgba(5, 9, 18, 0.28) 100%
      ),
      url("../../img/background-gaming.webp"),
      #07101d;
    background-size: cover, cover, cover;
    background-position: center top, center top, center top;
    background-repeat: no-repeat, no-repeat, no-repeat;
  }

  .page-bg-effects::before {
    background-size: 54px 54px;
    opacity: 0.05;
  }

  .page-bg-effects::after {
    opacity: 0.28;
  }

  .page-bg-overlay::before {
    opacity: 0.18;
  }

  .page-bg-noise {
    opacity: 0.01;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}