html {
  font-size: calc(100vw / 1440);
  height: 100%;
  margin: 0;
}

body {
  background-color: #0b0214;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================
  Desktop Header Structure
========================================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10rem 80rem 0 69rem;
  background: url(../images/header-bg.webp) top center no-repeat;
  box-shadow: 0 4rem 15rem rgba(0, 0, 0, 0.5);
  height: 90rem;
  background-size: 100% 100%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1500;
  /* position: relative; */
  background-color: #150021b2;
  max-width: 1440rem;
  left: 50%;
  transform: translateX(-50%);
}
.navbar::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  backdrop-filter: blur(5rem);
  z-index: -1;
}

.logo-header {
  position: absolute;
  top: 0;
  left: 69rem;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  aspect-ratio: 160/109;
  width: 160rem;
}

.logo-header img {
  max-width: 100%;
}

.logo-header:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 8rem rgba(255, 215, 0, 0.6));
}

/* Main Navigation Menu */
.main-nav {
  border-radius: 10rem;
  border: 1rem solid #b4146c;
  margin-left: 166rem;
  padding-inline: 27rem 57rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  align-items: center;
}

.main-nav ul li {
  position: relative;
}

.main-nav ul li a {
  display: block;
  padding: 14rem 20rem 12rem;
  color: white;
  text-decoration: none;
  font-size: 16rem;
  line-height: calc(20 / 16);
  font-weight: 500;
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease;
}

.main-nav .nav-active-icon {
  width: 24rem;
  height: 24rem;
  position: absolute;
  bottom: -9rem;
  z-index: 99;
  left: 50%;
  transform: translateX(-50%);
  display: none;
}

.main-nav .nav-active-icon img {
  width: 100%;
}

.main-nav ul li.active .nav-active-icon,
.main-nav ul li:hover .nav-active-icon {
  display: block;
}

.main-nav ul li.active a {
  background: linear-gradient(180deg, #fecb45 0%, #ffe7ab 100%);
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.main-nav ul li::after {
  content: "";
  position: absolute;
  bottom: 0rem;
  left: 50%;
  width: 0;
  height: 3rem;
  background: linear-gradient(90deg, #ff0077, #ffcc00);
  transition:
    width 0.2s ease,
    left 0.2s ease;
}

.main-nav ul li.active::after,
.main-nav ul li:hover::after {
  width: 80%;
  left: 10%;
  height: 3rem;
  background: linear-gradient(90deg, #ff0077, #ffcc00);
  border-radius: 2rem;
  box-shadow: 0 0 8rem #ff0077;
}

/* Right Side Actions Layout */
.right-actions {
  display: flex;
  gap: 15rem;
  align-items: center;
}

/* new css for langquage */
.header-language-dropdown {
  position: relative;
  display: inline-block;
}

.header-language-dropdown .lang-toggle {
  display: flex;
  align-items: center;
  gap: 8rem;
  text-decoration: none;
  color: #d1c2e0;
  cursor: pointer;
}

.header-language-dropdown > a {
  text-decoration: none;
}

.header-language-dropdown > a > img {
  max-width: 100%;
}
.header-language-dropdown .dropdown-icon {
  width: 16rem;
  height: 16rem;
}
.header-language-dropdown .arrow {
  font-size: 11rem;
  transition: transform 0.2s ease;
}

.header-language-dropdown.open .arrow {
  transform: rotate(180deg);
}

.nav-dropdown {
  background: #26071c4d;
  text-align: center;
  position: absolute;
  top: 120%;
  right: 0;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1rem solid #3e1141;
  border-radius: 8rem;
  list-style: none;
  width: 160rem;
  padding: 0;
  margin: 0;
  box-shadow: 0 6rem 20rem rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10rem);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s;
  z-index: 600;
}

.nav-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown li {
  list-style: none;
}

.nav-dropdown li:first-child a {
  padding: 25rem 39rem 20rem;
}

.nav-dropdown li:last-child a {
  padding: 20rem 39rem 25rem;
}

.nav-dropdown li a {
  display: block;
  color: #d1c2e0;
  font-size: 17rem;
  line-height: calc(20 / 17);
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.nav-dropdown li a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fffbbf;
}

.nav-dropdown li + li {
  border-top: 1rem solid #3e1141;
}

.action-btn {
  background: transparent;
  border: none;
}

.action-btn > a,
.header-language-dropdown > a {
  background: #26071c4d;
  border: 1rem solid #3e1141;
  color: white;
  padding: 11rem 16rem;
  border-radius: 8rem;
  font-size: 17rem;
  line-height: calc(20 / 17);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8rem;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.action-btn img,
.header-language-dropdown > a img {
  height: 24rem;
  width: 24rem;
}

.action-btn > a:hover,
.header-language-dropdown > a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.currentLangText {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
}

.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* =========================================
  Mobile Viewport Drawer Container & Effects
========================================= */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: url("../images/mobile-menu-bg.webp") fixed top center
    no-repeat;
  background-size: contain;
  background-color: #080105;
  z-index: 2000;
  padding: 20rem;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease,
    visibility 0.3s;
  overflow-y: auto;
}

.mobile-menu-drawer.drawer-active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.drawer-logo-container {
  text-align: center;
}

.drawer-logo {
  width: 130rem;
  aspect-ratio: 130/89;
}

.drawer-header {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
}

.drawer-close-btn {
  background: none;
  border: none;
  color: #f1f1f1;
  font-size: 32rem;
  cursor: pointer;
  padding: 10rem;
}

.drawer-divider {
  width: 148rem;
  margin-block: 13rem 32rem;
  height: 1rem;
  margin-inline: auto;
  background: linear-gradient(90deg, #ffc53c -1.12%, #e8384a 100.84%);
  box-shadow: 0px 0px 7px 0px #ff5a99cf;
}

.drawer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.drawer-scroll {
  flex: 1;
  overflow-y: auto;
}

.drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  max-width: 160rem;
  margin: 0 auto;
  width: 100%;
}

.drawer-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-size: 18rem;
  font-weight: 400;
  padding: 18rem 0;
  border-bottom: 1rem solid rgba(255, 255, 255, 0.03);
  transition: color 0.3s ease;
  gap: 17rem;
  justify-content: center;
}

.drawer-item span:last-of-type {
  width: 103rem;
}

.drawer-item .drawer-icon {
  display: inline-block;
  background: white;
  vertical-align: middle;
  width: 24rem;
  height: 24rem;
  justify-content: flex-start;
}

.drawer-item.active .drawer-icon {
  background: linear-gradient(180deg, #fecb45 0%, #ffe7ab 100%);
}

.drawer-item.active .drawer-text {
  background: linear-gradient(180deg, #fecb45 0%, #ffe7ab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.icon-home {
  -webkit-mask: url("../icon/home-icon.svg") no-repeat center / contain;
  mask: url("../icon/home-icon.svg") no-repeat center / contain;
}

.icon-spade {
  -webkit-mask: url("../icon/spade-icon.svg") no-repeat center / contain;
  flex-shrink: 0;
  mask: url("../icon/spade-icon.svg") no-repeat center / contain;
}

.icon-coins {
  -webkit-mask: url("../icon/coins-icon.svg") no-repeat center / contain;
  flex-shrink: 0;
  mask: url("../icon/coins-icon.svg") no-repeat center / contain;
}

.icon-info {
  -webkit-mask: url("../icon/info-icon.svg") no-repeat center / contain;
  mask: url("../icon/info-icon.svg") no-repeat center / contain;
}

.icon-images {
  -webkit-mask: url("../icon/images-icon.svg") no-repeat center / contain;
  mask: url("../icon/images-icon.svg") no-repeat center / contain;
}

.icon-diamond {
  -webkit-mask: url("../icon/diamond-icon.svg") no-repeat center /
    contain;
  mask: url("../icon/diamond-icon.svg") no-repeat center / contain;
}

/* Visual Glow and Sparkle Configurations */
.bg-sparkle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.top-glow-point {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300rem;
  height: 300rem;
  background: radial-gradient(
    circle,
    rgba(230, 32, 224, 0.25) 0%,
    transparent 70%
  );
  filter: blur(30rem);
}

.gradient-line {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 80%;
  height: 1rem;
  background: linear-gradient(
    90deg,
    transparent,
    #ff0077,
    #ffcc00,
    transparent
  );
}
/* ── Scroll to top button ──────────────────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 24rem;
  right: 24rem;
  width: 48rem;
  height: 48rem;
  background: linear-gradient(
    203.35deg,
    rgba(212, 36, 162, 0.8) 13.03%,
    rgba(80, 12, 78, 0.8) 89.87%
  );
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  box-shadow: 0px 4px 4px 0px #0000004d;
}

.scroll-top-btn.visible {
  display: flex;
}

.scroll-top-btn:hover {
  transform: translateY(-2rem);
}

.scroll-top-btn svg {
  width: 22rem;
  height: 22rem;
  fill: white;
}

/* =========================================
  Responsive Adjustments (Mobile Breakpoint)
========================================= */
@media screen and (max-width: 768px) {
  html {
    font-size: calc(100vw / 402);
  }

  .currentLangText img,
  .language-icon {
    display: none;
  }

  .back-header {
    top: 46.75rem;
    left: 27.75rem;
    width: 16.5rem;
    aspect-ratio: 16.5 / 9;
    position: absolute;
    z-index: 9999;
    text-decoration: none;
    transition:
      transform 0.2s ease,
      filter 0.2s ease;
  }

  .logo-header {
    top: 19rem;
    left: 12rem;
    width: 122rem;
  }

  .navbar {
    background: url(../images/header-bg-mb.webp) top center no-repeat;
    background-size: 100% 100%;
    justify-content: flex-end;
    gap: 11rem;
    padding: 34rem 15rem 14rem;
    background-color: #150021b2;
    max-width: 402rem;
    left: 0;
    transform: unset;
  }

  .main-nav,
  .action-btn {
    display: none !important;
  }

  .action-btn.mobile {
    display: block !important;
    max-width: 172rem;
    margin-top: 40rem;
    width: 100%;
    margin-inline: auto;
  }

  .action-btn.mobile a {
    justify-content: center;
  }

  .right-actions {
    gap: 10rem;
  }

  .fa-solid.fa-language {
    display: none;
  }

  /* .lang-dropdown li {
    padding: 12rem 14rem;
    text-align: center;
  }

  .lang-dropdown li:hover::before {
    color: #fffbbf;
  }

  .lang-selector {
    padding: 8rem 12rem;
    border-radius: 10rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1rem solid rgba(255, 255, 255, 0.1);
  } */

  .menu-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1rem solid #3e1141;
    width: 42rem;
    height: 42rem;
    border-radius: 10rem;
    padding: 0;
  }

  .menu-toggle-btn img {
    width: 22rem;
    height: auto;
  }

  .menu-toggle-btn:active {
    transform: scale(0.95);
  }
}
