@font-face {
  font-family: "Nunito";
  src: url("/public/fonts/nunito/Nunito-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/public/fonts/nunito/Nunito-Italic-VariableFont_wght.ttf") format("truetype");
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  background:
    radial-gradient(circle at 0 160px, var(--page-radial-a), transparent 220px),
    radial-gradient(circle at 100% 80px, var(--page-radial-b), transparent 180px),
    var(--page-bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.bg-image {
    background-image: var(--site-bg-image);
    background-size: 100%;
    background-attachment: fixed;
    background-position-x: center;
    background-position-y: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  background: linear-gradient(180deg, var(--header-bg-start), var(--header-bg-end));
  padding: 12px 16px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

.header-topline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
}

.brand {
  color: var(--brand);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
}

.brand img {
  display: block;
  width: auto;
  max-width: 190px;
  max-height: 30px;
  object-fit: contain;
}

#sticky-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--page-bg);
  border-bottom: 1px solid var(--border);
}

.theme-toggle {
  position: absolute;
  right: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0;
}

.theme-toggle-icon {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("/public/img/navbar/svg-image-3.svg") center / contain no-repeat;
  mask: url("/public/img/navbar/svg-image-3.svg") center / contain no-repeat;
  transition: background-color .2s ease;
}

:root[data-theme="light"] .theme-toggle-icon {
  -webkit-mask-image: url("/public/img/navbar/svg-image-2.svg");
  mask-image: url("/public/img/navbar/svg-image-2.svg");
}

.theme-toggle:hover,
.theme-toggle:focus {
  color: var(--text-strong);
  border-color: var(--accent-strong);
  outline: none;
}

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
  background-color:var(--page-bg);
}

.banner-carousel {
  position: relative;
  height: clamp(150px, 20vw, 235px);
  margin-bottom: 16px;
  overflow: hidden;
}

.banner-stage {
  position: relative;
  height: 100%;
}

.banner-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(42vw, 384px);
  aspect-ratio: 7 / 4;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.58);
  transition:
    opacity .35s ease,
    left .35s ease,
    transform .35s ease,
    filter .35s ease;
  pointer-events: none;
  filter: brightness(.72);
}

.banner-slide.is-active {
  z-index: 3;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  filter: brightness(1);
}

.banner-slide.is-prev {
  z-index: 2;
  opacity: .9;
  transform: translate(-115%, -50%) scale(.82);
}

.banner-slide.is-next {
  z-index: 2;
  opacity: .9;
  transform: translate(15%, -50%) scale(.82);
}

.banner-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 42px;
  color: var(--text-strong);
  background: var(--banner-control-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
}

.banner-nav:hover,
.banner-nav:focus {
  color: var(--accent-contrast);
  background: var(--brand);
}

.banner-nav-prev {
  left: 10px;
}

.banner-nav-next {
  right: 10px;
}

.banner-dots {
  position: absolute;
  left: 50%;
  bottom: 9px;
  z-index: 4;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

.banner-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  background: var(--dot-bg);
  border: 0;
  border-radius: 50%;
}

.banner-dot.is-active {
  width: 18px;
  background: var(--brand);
  border-radius: 999px;
}

@media (min-width: 701px) {
  .banner-carousel {
    height: clamp(230px, 32vw, 380px);
  }

  .banner-slide {
    width: 58%;
  }

  .banner-slide.is-prev {
    left: 10%;
    transform: translate(-50%, -50%) scale(.82);
  }

  .banner-slide.is-next {
    left: 90%;
    transform: translate(-50%, -50%) scale(.82);
  }
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -2px auto 10px;
  padding: 8px 7px 11px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
}

@media (min-width: 1024px) {
  .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.quick-actions a {
  display: grid;
  place-items: center;
  min-height: 36px;
  color: var(--text-muted);
  background: linear-gradient(180deg, var(--surface), var(--surface-strong));
  /* border: 1px solid var(--brand); 
  border-radius: 8px;*/
  box-shadow:
    0 1px 3px var(--accent),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  transform: translateY(0);
  transition:
    color .15s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.quick-actions a:hover,
.quick-actions a:focus {
  color: var(--text-strong);
  border-color: var(--accent);
  box-shadow:
    0 2px 0 var(--accent-strong),
    0 0 10px var(--shadow-accent),
    inset 0 1px 0 rgba(255, 255, 255, .1);
  transform: translateY(1px);
  outline: none;
}

.quick-actions a:active {
  box-shadow: inset 0 1px 3px var(--mobile-shadow);
  transform: translateY(3px);
}

.quick-actions a.is-highlighted {
  color: var(--text-strong);
}

.vendor-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  scrollbar-width: thin;
}

.vendor-tabs a {
  display: grid;
  grid-template-rows: 42px 1fr;
  align-items: center;
  justify-items: center;
  flex: 0 0 96px;
  width: 96px;
  min-height: 70px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}
.vendor-tabs a [data-theme="light"] {
  display: grid;
  grid-template-rows: 42px 1fr;
  align-items: center;
  justify-items: center;
  flex: 0 0 96px;
  width: 96px;
  min-height: 70px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.vendor-tabs a span:last-child {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

.vendor-tabs a.active {
  color: var(--text);
  background: var(--surface-active);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.vendor-logo {
  --provider-logo-width: 58px;
  --provider-logo-height: 40px;

  display: grid;
  place-items: center;
  width: var(--provider-logo-width);
  height: var(--provider-logo-height);
  color: var(--surface-strong);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  overflow: hidden;
}

.vendor-logo > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--text-muted));
  border-radius: 50%;
}

.vendor-logo img {
  display: block;
  width: var(--provider-logo-width);
  height: var(--provider-logo-height);
  object-fit: contain;
  object-position: center;
  transform: scale(var(--provider-icon-scale, 1));
}

.rtp-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.search-box {
  flex: 1 1 360px;
}

.search-box input {
  width: 100%;
  height: 34px;
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 12px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.pager-tools,
.per-page-control,
.pagination-control {
  display: flex;
  align-items: center;
}

.pager-tools {
  flex: 0 0 auto;
  gap: 12px;
}

.per-page-control,
.pagination-control {
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.per-page-control select,
.pagination-control button {
  height: 34px;
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.per-page-control select {
  min-width: 64px;
  padding: 0 8px;
}

.pagination-control button {
  width: 34px;
  font-size: 20px;
  line-height: 1;
}

.pagination-control button:disabled {
  cursor: default;
  opacity: .45;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  overflow: hidden;
  padding: 6px;
  box-shadow:
    inset 0 0 0 1px var(--shadow-soft),
    0 0 12px var(--shadow-soft);
}

.game-img {
  aspect-ratio: 1 / 1;
  background: var(--image-bg);
  border: 2px solid var(--accent-strong);
  border-radius: 6px;
  padding: 3px;
  box-shadow: 0 0 10px var(--shadow-accent);
}

.game-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.game-info {
  padding: 8px 4px 0;
}

.game-info h2 {
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rtp-bar {
  height: 18px;
  margin-top: 7px;
  background: var(--bar-bg);
  border-radius: 999px;
  overflow: hidden;
}

.rtp-fill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-radius: inherit;
  min-width: 28px;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 1px 2px var(--text-shadow);
}

.rtp-fill.green {
  background: repeating-linear-gradient(135deg, var(--green-fill-a) 0 6px, var(--green-fill-b) 6px 12px);
}

.rtp-fill.yellow {
  background: repeating-linear-gradient(135deg, var(--yellow-fill-a) 0 6px, var(--yellow-fill-b) 6px 12px);
}

.rtp-fill.red {
  background: repeating-linear-gradient(135deg, var(--red-fill-a) 0 6px, var(--red-fill-b) 6px 12px);
}

.jam-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
  font-size: 12px;
  color: var(--text-soft);
}

.jam-icon {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 50%;
  background: var(--text-soft);
}

.jam-icon::before,
.jam-icon::after {
  position: absolute;
  content: "";
  left: 6px;
  top: 3px;
  width: 1px;
  height: 4px;
  background: var(--surface-active);
  transform-origin: bottom center;
}

.jam-icon::after {
  top: 6px;
  width: 4px;
  height: 1px;
}

.pola-box {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1;
  color: var(--text-faint);
}

.pola-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 17px;
}

.pola-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pola-marks {
  display: flex;
  gap: 8px;
}

.pola-mark {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.pola-mark.good {
  color: var(--success);
  border: 1px solid var(--success-border);
}

.pola-mark.bad {
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.empty-state,
.alert-error {
  padding: 32px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  color: var(--text-soft);
}

.alert-error {
  margin-bottom: 16px;
  color: var(--error-text);
  border-color: var(--error-border);
}

.site-footer {
  display: grid;
  position: sticky;
  bottom: 0px;
  grid-template-columns: repeat(4, 1fr);
  height: 46px;
  padding: 0;
  background: var(--bottom-nav-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--bottom-nav-border);
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 -4px 16px var(--mobile-shadow);
}

.site-footer a {
  display: flex;
  min-width: 0;
  height: 45px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--bottom-nav-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
  transition:
    color .18s ease,
    background-color .18s ease;
}

.footer-nav-icon {
  display: block;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  background: currentColor;
  -webkit-mask: var(--icon-url) center / contain no-repeat;
  mask: var(--icon-url) center / contain no-repeat;
}

.site-footer a:first-child,
.site-footer a:hover,
.site-footer a:focus,
.site-footer a:active {
  color: var(--bottom-nav-active);
}

.site-footer a:hover,
.site-footer a:focus,
.site-footer a:active {
  background: var(--bottom-nav-hover-bg);
  outline: none;
}

.is-hidden {
  display: none !important;
}

.mobile-bottom-nav {
  display: none;
}

.scroll-top {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 25;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--accent-contrast);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border: 1px solid var(--accent-strong);
  border-radius: 50%;
  box-shadow: 0 8px 20px var(--mobile-shadow);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover,
.scroll-top:focus {
  outline: none;
  filter: brightness(1.08);
}

@media (max-width: 700px) {
  body {
    padding-bottom: 58px;
  }

  .page-wrap {
    padding: 12px;
  }

  .site-header {
    padding: 8px 10px;
  }

  .header-topline {
    justify-content: space-between;
  }

  .theme-toggle {
    position: static;
  }

  .banner-carousel {
    height: clamp(190px, 56vw, 230px);
    margin-left: -12px;
    margin-right: -12px;
  }

  .banner-slide {
    width: min(calc(100% - 16px), 402px);
  }

  .banner-slide.is-prev {
    opacity: .65;
    transform: translate(-98%, -50%) scale(.74);
  }

  .banner-slide.is-next {
    opacity: .65;
    transform: translate(-2%, -50%) scale(.74);
  }

  .banner-nav {
    width: 30px;
    height: 38px;
  }

  .banner-nav-prev {
    left: 8px;
  }

  .banner-nav-next {
    right: 8px;
  }

  .quick-actions {
    max-width: none;
    margin: -4px -8px 8px;
    padding: 7px 6px 10px;
    gap: 8px;
    border-radius: 6px;
  }

  .quick-actions a {
    min-height: 34px;
    border-radius: 7px;
    font-size: 11px;
  }

  .vendor-tabs {
    margin-left: -12px;
    margin-right: -12px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .vendor-tabs a {
    flex-basis: 82px;
    width: 82px;
  }

  .rtp-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pager-tools {
    justify-content: space-between;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .brand {
    font-size: 24px;
  }

  .site-footer {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--surface-strong);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px var(--mobile-shadow);
  }

  .mobile-bottom-nav a {
    display: grid;
    justify-items: center;
    gap: 4px;
    color: var(--text-muted);
    padding: 7px 4px 8px;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
  }

  .bottom-nav-icon {
    display: block;
    width: 22px;
    height: 22px;
    background: currentColor;
    -webkit-mask: var(--icon-url) center / contain no-repeat;
    mask: var(--icon-url) center / contain no-repeat;
  }

  .mobile-bottom-nav a:hover,.mobile-bottom-nav a:focus.mobile-bottom-nav a:active {
    color: var(--accent-contrast);
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  }

  .scroll-top {
    right: 12px;
    bottom: 68px;
    width: 34px;
    height: 34px;
  }
}
