:root {
  --mg-bg: #eef4fb;
  --mg-surface: #ffffff;
  --mg-surface-2: #eef4ff;
  --mg-text: #172033;
  --mg-muted: #667085;
  --mg-line: #dde7f5;
  --mg-brand: #2563eb;
  --mg-brand-2: #00a8ff;
  --mg-accent: #ffb703;
  --mg-radius: 18px;
  --mg-shadow: 0 18px 50px rgba(31, 45, 82, 0.12);
  --mg-deep: #081426;
}

html {
  scroll-behavior: smooth;
}

body.bg-dark,
body {
  background:
    radial-gradient(circle at 12% 4%, rgba(0, 168, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 84% 8%, rgba(255, 183, 3, 0.16), transparent 24rem),
    linear-gradient(180deg, #f8fbff 0%, var(--mg-bg) 42rem);
  color: var(--mg-text);
}

.container-zon {
  max-width: 1480px;
}

.header-main {
  top: 0;
  z-index: 80;
  margin-bottom: 0 !important;
  padding: 10px 0 !important;
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom: 1px solid rgba(221, 231, 245, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(16, 24, 40, 0.06);
}

.header-main .container-zon {
  padding-left: 18px;
  padding-right: 18px;
}

.header-main ul a,
.opnal a {
  border-radius: 999px;
  font-weight: 700;
  color: #44546f !important;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-main ul a:hover,
.opnal a:hover {
  background: #eaf2ff;
  color: var(--mg-brand) !important;
  transform: translateY(-1px);
}

.search-bar {
  min-width: 330px;
  background: #f0f5ff !important;
  border: 1px solid #dce8fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-bar input {
  width: 100%;
  color: var(--mg-text) !important;
}

.mobile-header {
  display: none !important;
  z-index: 90;
  border-bottom: 1px solid var(--mg-line);
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08) !important;
}

.mobile-header a.no-search-component {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-header img {
  display: block;
  max-height: 58px;
  width: auto;
}

[mode-dark],
.mode-dark,
.dark\:block {
  display: none !important;
}

.dark-mode [mode-light],
.dark-mode .mode-light,
.dark-mode .dark\:hidden {
  display: none !important;
}

.dark-mode [mode-dark],
.dark-mode .mode-dark,
.dark-mode .dark\:block {
  display: block !important;
}

.mobile-header button {
  color: #111827;
}

.menu {
  display: none !important;
}

.search-bar-component {
  display: none !important;
}

.active-search .search-bar-component {
  display: flex !important;
}

.active-search .no-search-component {
  display: none !important;
}

.blur-overlay {
  background: rgba(255, 255, 255, 0.42);
  z-index: 99;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.offcanvas {
  transform: translateX(-200%);
  z-index: 999;
  transition: transform 0.2s ease;
}

.offcanvas.active {
  transform: translateX(0);
}

.offcanvas-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 300px;
  height: 100%;
  z-index: 999;
  box-sizing: border-box;
  padding: 10px;
  background: #fff;
}

.dropdown-content {
  height: 0;
  overflow: hidden;
}

.active-dropdown {
  height: fit-content !important;
}

.mg-hero {
  position: relative;
  overflow: hidden;
  margin: 18px auto 18px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(7, 19, 48, 0.92), rgba(25, 63, 146, 0.86)),
    url("../img/logo/logo.png");
  background-size: cover;
  color: #fff;
  box-shadow: var(--mg-shadow);
}

.mg-home {
  padding-bottom: 32px;
}

.mg-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(24px, 4vw, 58px);
  align-items: stretch;
  min-height: 500px;
  margin-top: 16px;
  background:
    linear-gradient(135deg, rgba(6, 19, 46, 0.96), rgba(19, 72, 169, 0.84) 52%, rgba(0, 168, 255, 0.62)),
    var(--mg-hero-image, url("../img/logo/logo.png"));
  background-position: center;
  background-size: cover;
}

.mg-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 11, 28, 0.82), rgba(5, 11, 28, 0.18)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  pointer-events: none;
}

.mg-home-hero::after {
  width: 34rem;
  height: 34rem;
  background: rgba(255, 183, 3, 0.2);
}

.mg-home-hero .mg-hero-content {
  align-self: center;
}

.mg-hero-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 660px);
  margin-top: 26px;
  padding: 8px 8px 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.mg-hero-search .fa {
  color: var(--mg-brand);
}

.mg-hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--mg-text);
  font-size: 15px;
}

.mg-hero-search button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--mg-brand), var(--mg-brand-2));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.mg-hero-search:focus-within {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.26), 0 0 0 5px rgba(0, 168, 255, 0.18);
}

.mg-hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  align-self: center;
}

.mg-hero-panel > div,
.mg-hero-panel > a {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.mg-hero-panel > a {
  transition: transform 0.2s ease, background 0.2s ease;
}

.mg-hero-panel > a:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
}

.mg-hero-panel > div {
  padding: 18px;
}

.mg-hero-panel strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.mg-hero-panel span {
  display: block;
  margin-top: 5px;
  color: #d8e8ff;
  font-size: 13px;
  font-weight: 800;
}

.mg-hero-panel a img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mg-hero-panel a span,
.mg-hero-panel a b {
  padding-inline: 16px;
}

.mg-hero-panel a span {
  margin-top: 14px;
  color: #a9c8ff;
}

.mg-hero-panel a b {
  display: block;
  padding-bottom: 16px;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}

.mg-category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 auto 10px;
  padding: 4px 16px 10px;
  scrollbar-width: none;
}

.mg-category-strip::-webkit-scrollbar {
  display: none;
}
  
.mg-category-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid #dae6f7;
  border-radius: 999px;
  background: #fff;
  color: #3d4f70;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.mg-category-pill:hover,
.mg-category-pill.is-hot {
  background: linear-gradient(135deg, var(--mg-brand), #0ea5e9);
  color: #fff;
}

.mg-mood-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 8px auto 22px;
  padding: 0 16px;
}

.mg-mood-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: #fff;
  color: var(--mg-text);
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mg-mood-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.mg-mood-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(16, 24, 40, 0.14);
}

.mg-mood-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f2557;
  font-size: 19px;
}

.mg-mood-card strong,
.mg-mood-card small {
  position: relative;
  z-index: 1;
}

.mg-mood-card strong {
  align-self: end;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
}

.mg-mood-card small {
  color: rgba(23, 32, 51, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.mood-popular {
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
}

.mood-new {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.mood-random {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.mood-category {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
}

.mg-home-content {
  display: grid;
  gap: 38px;
}

.mg-section {
  min-width: 0;
  padding: 4px 0;
}

.mg-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 4px 0 16px;
}

.mg-section-head h2 {
  margin: 0;
  color: var(--mg-text);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.05;
  font-weight: 900;
}

.mg-section-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--mg-brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mg-section-head > a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid #d8e4f4;
  border-radius: 999px;
  background: #fff;
  color: #40516d;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mg-section-head > a:hover {
  border-color: var(--mg-brand);
  color: var(--mg-brand);
  transform: translateY(-1px);
}

.mg-feature-grid {
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
}

.mg-game-card {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.74);
}

.mg-card-meta {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.mg-shelf {
  padding-top: 4px;
}

.mg-shelf-grid {
  grid-auto-rows: 142px;
}

.mg-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -42% auto;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  background: rgba(0, 168, 255, 0.22);
  filter: blur(10px);
}

.mg-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.mg-eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d8e8ff;
  font-size: 13px;
  font-weight: 800;
}

.mg-hero h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
  font-weight: 900;
}

.mg-hero p {
  margin-top: 18px;
  max-width: 620px;
  color: #d8e8ff;
  font-size: clamp(15px, 2vw, 18px);
}

.mg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.mg-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: #0f2557;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.mg-button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.cat-container {
  padding-top: 6px;
  padding-bottom: 6px;
}

.cat-item-container a,
.cat-box {
  border: 1px solid #dae6f7;
  border-radius: 999px !important;
  background: var(--mg-surface) !important;
  color: #3d4f70 !important;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.cat-item-container a:hover,
.cat-box:hover {
  background: var(--mg-brand) !important;
  color: #fff !important;
}

.body.container-zon {
  padding-left: 16px;
  padding-right: 16px;
}

.section-heading,
.heading h2,
h2.heading {
  color: var(--mg-text) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 16px;
}

.box {
  isolation: isolate;
  height: 100% !important;
  border-radius: var(--mg-radius) !important;
  background: #dce7f6;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
  transform: translateZ(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.box.large {
  grid-column-end: span 2;
  grid-row-end: span 2;
}

.box:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 20px 44px rgba(16, 24, 40, 0.18);
}

.box img {
  transition: transform 0.32s ease;
}

.box:hover img {
  transform: scale(1.08);
}

.overlay::before {
  background: linear-gradient(to top, rgba(3, 7, 18, 0.9), rgba(3, 7, 18, 0.08) 68%) !important;
  opacity: 1 !important;
}

.upward h2,
.box h2 {
  right: 0;
  bottom: 0;
  padding: 10px 12px !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  opacity: 1 !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.zon-loader .box {
  box-shadow: none;
  background: linear-gradient(90deg, #e8eef7, #f6f8fb, #e8eef7);
}

.advertisement {
  border-radius: 22px;
  background: #edf4ff;
  border: 1px dashed #b9c8df;
}

.screen {
  min-width: 0;
}

.gameplay {
  border-radius: 24px !important;
  background: #080d19 !important;
  border: 8px solid #111827;
  box-shadow: var(--mg-shadow);
}

.gameplay-footer {
  padding: 22px;
  border-radius: 24px;
  background: var(--mg-surface);
  border: 1px solid var(--mg-line);
  box-shadow: 0 12px 35px rgba(16, 24, 40, 0.08);
}

.description {
  margin-top: 22px !important;
  padding-top: 18px;
  border-top: 1px solid var(--mg-line);
}

.description p {
  color: #475467 !important;
  line-height: 1.8;
}

.form-card .form-actions {
  display: block !important;
  clear: both;
  margin: 1.25rem 0 0.75rem !important;
}

.form-card .submit-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-height: 48px;
  padding: 0.85rem 1rem !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, var(--mg-brand), var(--mg-brand-2)) !important;
  color: #fff !important;
  font-weight: 900 !important;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.25);
}

.form-card .submit-btn:hover {
  opacity: 0.92;
}

footer {
  background: #0f172a !important;
  color: #dbeafe;
  border-top: 0 !important;
}

footer a,
footer p {
  color: #dbeafe !important;
}

@media (max-width: 1100px) {
  .header-main,
  .categories,
  .header-main .search-bar {
    display: none !important;
  }

  .mobile-header {
    display: flex !important;
    top: 0;
  }

  .menu {
    display: block !important;
  }

  .profile {
    margin: 0 !important;
  }

  .mg-hero {
    margin: 12px;
    border-radius: 22px;
  }

  .mg-home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mg-hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mg-mood-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 12px;
  }

  .body.container-zon {
    padding-left: 12px;
    padding-right: 12px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    grid-auto-rows: 118px;
    gap: 12px;
  }

  .box.large {
    grid-column-end: span 2;
    grid-row-end: span 2;
  }
}

@media (max-width: 640px) {
  .mg-hero {
    padding: 28px 20px;
  }

  .mg-home-hero {
    gap: 22px;
  }

  .mg-hero-search {
    border-radius: 18px;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 12px;
  }

  .mg-hero-search input {
    flex-basis: calc(100% - 32px);
  }

  .mg-hero-search button {
    width: 100%;
  }

  .mg-hero-panel {
    grid-template-columns: 1fr 1fr;
  }

  .mg-hero-panel > a {
    grid-column: 1 / -1;
  }

  .mg-hero-actions {
    flex-direction: column;
  }

  .mg-button {
    justify-content: center;
  }

  .mg-category-strip {
    padding-inline: 12px;
  }

  .mg-category-pill {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .mg-mood-bar {
    grid-template-columns: 1fr;
  }

  .mg-mood-card {
    min-height: 104px;
    border-radius: 20px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 31vw;
    gap: 10px;
  }

  .mg-section-head {
    align-items: start;
    flex-direction: column;
  }

  .mg-section-head > a {
    width: 100%;
    text-align: center;
  }

  .box.large {
    grid-column-end: span 2;
    grid-row-end: span 2;
  }

  .upward h2,
  .box h2 {
    font-size: 11px;
    padding: 8px !important;
  }

  .gameplay {
    height: 430px !important;
    border-width: 4px;
    border-radius: 18px !important;
  }

  .gameplay-footer {
    padding: 16px;
    border-radius: 18px;
  }
}

@media (max-width: 700px) {
  .offcanvas-menu {
    width: 100%;
  }

  .resp {
    flex-direction: column;
  }
}
