/*

Custom style

You can override the default class or style here

This file will not be overwritten by the updater

*/

:root {
  --homepage-bg: #f4f7fb;
  --homepage-surface: #ffffff;
  --homepage-border: #d9e2ed;
  --homepage-shadow: 0 10px 26px rgba(35, 60, 92, 0.05);
  --homepage-text: #1f3950;
  --homepage-muted: #657d95;
  --homepage-accent: #4a8ef7;
  --homepage-accent-soft: #eef5ff;
  --homepage-gap: 10px;
  --homepage-radius: 8px;
}

body {
  background: var(--homepage-bg);
  color: var(--homepage-text);
}

.top-nav {
  margin-bottom: 14px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(210, 221, 233, 0.8);
  box-shadow: 0 6px 18px rgba(37, 61, 89, 0.04);
}

.top-nav a,
.nav-link,
.search-bar .bi-search,
.b-white {
  color: var(--homepage-text);
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-title {
  color: var(--homepage-text);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.brand-tagline {
  color: var(--homepage-muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--homepage-text);
  border: 1px solid #d6e1ec;
  border-radius: 50%;
  background: #fff;
}

.nav-icon-btn:hover {
  background: #f4f8fc;
  color: var(--homepage-text);
}

.navbar-toggler {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d6e1ec;
  border-radius: 50%;
  background: #fff;
}

.navbar-dark .navbar-toggler-icon {
  filter: invert(16%) sepia(24%) saturate(1048%) hue-rotate(171deg) brightness(96%) contrast(91%);
}

.site-logo {
  max-height: 36px;
}

.search-bar input.search {
  height: 46px;
  background: #f3f7fb;
  border: 1px solid #dce6f0;
  color: var(--homepage-text);
}

.search-bar .form-control::placeholder {
  color: #8ca0b5;
  opacity: 1;
}

.navbar-collapse {
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  left: auto;
  z-index: 20;
  width: min(320px, calc(100vw - 24px));
  margin-top: 0;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e1e9f2;
  box-shadow: 0 20px 40px rgba(24, 47, 74, 0.12);
}

.navbar-nav {
  margin-right: 0;
  margin-bottom: 10px;
}

.nav-item {
  padding: 2px 0;
}

.dropdown-menu {
  border: 1px solid #e1e9f2;
  box-shadow: 0 16px 32px rgba(28, 49, 74, 0.08);
}

.homepage-shell {
  padding-bottom: 36px;
}

.homepage-hero,
.homepage-section {
  margin-bottom: 18px;
}

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

.section-title {
  margin: 0;
  color: var(--homepage-text);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--homepage-muted);
  font-size: 0.98rem;
}

.section-link {
  color: var(--homepage-accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.section-link:hover {
  color: #2f73db;
}

.featured-mosaic {
  display: grid;
  grid-template-columns: 2.2fr repeat(3, 1fr) 2fr;
  grid-template-areas:
    "lead lead tile2 tile3 tile4 spotlight"
    "lead lead tile5 tile6 tile7 spotlight";
  gap: var(--homepage-gap);
}

.tile-1 { grid-area: lead; }
.tile-2 { grid-area: tile2; }
.tile-3 { grid-area: tile3; }
.tile-4 { grid-area: tile4; }
.tile-5 { grid-area: tile5; }
.tile-6 { grid-area: tile6; }
.tile-7 { grid-area: tile7; }
.tile-8 { grid-area: spotlight; }

.featured-card,
.game-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--homepage-radius);
  background: var(--homepage-surface);
  border: 1px solid var(--homepage-border);
  box-shadow: var(--homepage-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.featured-card:hover,
.game-card:hover {
  transform: translateY(-2px);
  border-color: #bfd1e4;
  box-shadow: 0 14px 30px rgba(33, 57, 87, 0.08);
}

.featured-thumb,
.game-card-thumb {
  position: relative;
  display: block;
  width: 100%;
}

.featured-thumb {
  padding-top: 100%;
}

.is-lead .featured-thumb,
.is-spotlight .featured-thumb {
  padding-top: 66%;
  height: 100%;
}

.featured-thumb img,
.game-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px;
  background: linear-gradient(180deg, rgba(14, 31, 47, 0.04) 0%, rgba(12, 26, 40, 0.62) 100%);
}

.featured-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 4px;
  background: #91c84f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.featured-title {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
}

.is-lead .featured-title,
.is-spotlight .featured-title {
  font-size: 1.35rem;
}

.homepage-about {
  margin-top: 24px;
  padding: 22px 20px;
  border: 1px solid var(--homepage-border);
  border-radius: 14px;
  background: var(--homepage-surface);
  box-shadow: var(--homepage-shadow);
}

.about-freegames {
  margin-bottom: 26px;
}

.about-freegames p {
  margin: 0 0 12px;
  color: var(--homepage-text);
  font-size: 0.98rem;
  line-height: 1.7;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 22px;
}

.category-overview-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.category-overview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #edf4ff;
  border: 1px solid #dbe6f5;
  overflow: hidden;
}

.category-overview-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.category-overview-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.category-overview-name {
  color: var(--homepage-accent);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.category-overview-count {
  color: var(--homepage-muted);
  font-size: 0.88rem;
  margin-top: 3px;
}

.game-grid {
  display: grid;
  gap: var(--homepage-gap);
}

.game-grid-primary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.game-grid-secondary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.game-card-thumb {
  padding-top: 100%;
  background: #e8eef5;
}

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

.btn-load-more {
  background: var(--homepage-surface);
  color: var(--homepage-text);
  border: 1px solid var(--homepage-border);
  box-shadow: var(--homepage-shadow);
}

.btn-load-more:hover {
  background: var(--homepage-accent-soft);
  color: var(--homepage-accent);
}

.border-line,
.footer-copyright {
  border-color: rgba(210, 221, 233, 0.9);
}

.footer-copyright {
  background: rgba(255, 255, 255, 0.92);
  color: var(--homepage-muted);
}

.nav-user {
  margin-left: 12px;
}

.footer,
.widget-title,
.cat-name,
.single-title,
.page-title,
.item-title,
.list-title {
  color: var(--homepage-text);
}

.list-info,
.cat-game-amount,
.dsb-panel {
  color: var(--homepage-muted);
}

@media (max-width: 1199px) {
  .featured-mosaic {
    grid-template-columns: 1.8fr repeat(3, 1fr) 1.5fr;
    grid-template-areas:
      "lead lead tile2 tile3 spotlight"
      "lead lead tile4 tile5 spotlight"
      "lead lead tile6 tile7 spotlight";
  }

  .game-grid-primary,
  .game-grid-secondary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .top-nav {
    padding: 10px 0;
  }

  .navbar-collapse {
    left: 12px;
    width: auto;
  }

  .homepage-shell {
    padding-bottom: 36px;
  }

  .featured-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "lead lead tile2"
      "lead lead tile3"
      "lead lead tile4"
      "tile5 tile6 spotlight"
      "tile7 tile7 spotlight";
  }

  .game-grid-primary,
  .game-grid-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .top-nav {
    margin-bottom: 16px;
  }

  .site-logo {
    max-height: 34px;
  }

  .brand-tagline {
    font-size: 0.82rem;
  }

  .brand-title {
    font-size: 1.02rem;
  }

  .section-title {
    font-size: 1.05rem;
  }

  .section-subtitle {
    font-size: 0.88rem;
  }

  .featured-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "lead lead tile2"
      "lead lead tile3"
      "lead lead tile4"
      "tile5 tile5 spotlight"
      "tile6 tile7 spotlight";
    gap: 10px;
  }

  .featured-card,
  .game-card {
    border-radius: 12px;
  }

  .featured-title {
    font-size: 0.84rem;
  }

  .is-lead .featured-title,
  .is-spotlight .featured-title {
    font-size: 1rem;
  }

  .game-grid-primary,
  .game-grid-secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .game-card-title {
    position: absolute;
  }

  .btn-load-more {
    width: 100%;
    padding: 12px 20px;
  }

  .homepage-about {
    margin-top: 18px;
    padding: 16px 14px;
  }

  .about-freegames p {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .category-overview-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .category-overview-icon {
    width: 48px;
    height: 48px;
  }
}