:root {
  --bg: #120a06;
  --bg-deep: #070403;
  --ink: #fff8ee;
  --muted: #ead7bd;
  --gold: #ffd21f;
  --gold-2: #ff9a1a;
  --line: rgba(255, 210, 70, 0.24);
  --card: rgba(255, 244, 220, 0.045);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: #070403;
  background-image:
    linear-gradient(rgba(7, 4, 3, 0.84), rgba(7, 4, 3, 0.92)),
    url("/assets/images/big321-gaming-background-malaysia.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: "Segoe UI", ui-sans-serif, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--gold);
  color: #2a1404;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 10px;
}

.app {
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg);
  background-image:
    radial-gradient(120% 42% at 50% 0%, rgba(255, 176, 40, 0.2), transparent 58%),
    linear-gradient(rgba(18, 10, 6, 0.78), rgba(18, 10, 6, 0.88)),
    url("/assets/images/big321-gaming-background-malaysia.webp");
  background-size: auto, auto, cover;
  background-position: center, center, center top;
  background-repeat: no-repeat;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: #120a06;
  border-bottom: 1px solid transparent;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.logo {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 10px;
  text-decoration: none;
  animation: float 4.6s ease-in-out infinite;
}

.logo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 28%, rgba(255, 255, 255, 0.72) 50%, transparent 72%);
  transform: translateX(-130%);
  animation: sheen 3.2s ease-in-out infinite;
  pointer-events: none;
}

.logo img {
  display: block;
  width: auto;
  height: 48px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  text-decoration: none;
}

.lang a[aria-current="page"] {
  border-color: var(--gold);
}

.flag {
  display: block;
  width: 32px;
  height: 18px;
  animation: sway 2.4s ease-in-out infinite;
}

.lang a:nth-child(2) .flag {
  animation-delay: 0.35s;
}

.hero {
  padding: 8px 18px 0;
}

.hero-wrap {
  position: relative;
  margin: 0 -18px 18px;
}

.hero-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 8% 6% 0;
  background: radial-gradient(ellipse at center, rgba(255, 170, 40, 0.55), transparent 68%);
  filter: blur(16px);
  animation: glow 6.8s ease-in-out infinite;
}

.hero-visual {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 28px;
  background: transparent;
  animation: float 7s ease-in-out infinite;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 420 / 502;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-align: center;
  background-image: linear-gradient(
    100deg,
    #fff8ee 0%,
    #fff8ee 28%,
    #ffe56a 44%,
    #ff9a1a 50%,
    #ffe56a 56%,
    #fff8ee 72%,
    #fff8ee 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shine 1.6s linear infinite, title-pop 1.6s ease-in-out infinite;
}

.tagline {
  margin: 8px 0 0;
  color: var(--gold);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  animation: gold-shift 2.2s ease-in-out infinite;
}

.lead {
  margin: 12px auto 0;
  max-width: 36em;
  color: var(--muted);
  text-align: center;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  color: #2a1404;
  background: linear-gradient(180deg, #ffe56a 0%, var(--gold) 42%, var(--gold-2) 100%);
  box-shadow: 0 10px 24px rgba(255, 166, 20, 0.22);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  transform: translateX(-130%);
  animation: sheen 2.6s ease-in-out infinite;
  pointer-events: none;
}

.btn-ghost {
  color: var(--gold);
  background: transparent;
  border: 1.5px solid rgba(255, 210, 31, 0.72);
}

.quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
}

.quick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 76px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.quick svg,
.features svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.panel,
.features,
.brandline {
  margin-right: 18px;
  margin-left: 18px;
}

.panel {
  margin-top: 18px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 210, 70, 0.07), rgba(255, 244, 220, 0.03));
  animation: rise 0.6s ease both;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.panel p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.features li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 78px;
  padding: 12px 6px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  animation: rise 0.7s ease both;
}

.features li:nth-child(2) {
  animation-delay: 0.08s;
}

.features li:nth-child(3) {
  animation-delay: 0.16s;
}

.features svg {
  animation: bob 3.8s ease-in-out infinite;
}

.features li:nth-child(2) svg {
  animation-delay: 0.35s;
}

.features li:nth-child(3) svg {
  animation-delay: 0.7s;
}

.stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 18px 0;
}

.store {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  text-decoration: none;
}

.store svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.store:nth-child(1) svg {
  animation: rock 1.8s ease-in-out infinite;
}

.store:nth-child(2) svg {
  animation: pop 1.6s ease-in-out infinite;
}

.store span {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
}

.store small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pay {
  margin: 14px 18px 0;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
}

.pay .eyebrow {
  margin-bottom: 10px;
}

.pay img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  animation: pulse 3.2s ease-in-out infinite;
}

.fab {
  position: fixed;
  z-index: 32;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: 62px;
  animation: wobble 2.4s ease-in-out infinite;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45));
}

.fab img {
  display: block;
  width: 100%;
  height: auto;
}

.foot {
  padding: 16px 18px calc(78px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
}

.legal {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.sheet {
  position: fixed;
  z-index: 30;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  padding: 16px;
  border: 1px solid rgba(255, 210, 70, 0.38);
  border-radius: 22px;
  background: #2a1810;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.46);
  transform: translateY(150%);
  transition: transform 0.35s ease;
}

.sheet.is-open {
  transform: translateY(0);
}

.sheet[hidden] {
  display: none;
}

html.has-sheet .app {
  padding-bottom: 188px;
}

html.has-sheet .fab {
  bottom: calc(188px + env(safe-area-inset-bottom));
}

.sheet h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.sheet p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.sheet .btn {
  min-height: 48px;
  border-radius: 14px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes sheen {
  0%,
  42% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(140%);
  }
}

@keyframes title-shine {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes title-pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-7px) scale(1.06);
  }
  62% {
    transform: translateY(1px) scale(0.98);
  }
}

@keyframes gold-shift {
  0%,
  100% {
    color: #ffd21f;
    letter-spacing: 0;
  }
  50% {
    color: #fff4b0;
    letter-spacing: 0.035em;
  }
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-7deg);
  }
  50% {
    transform: rotate(7deg);
  }
}

@keyframes rock {
  0%,
  100% {
    transform: rotate(-10deg) scale(1);
  }
  50% {
    transform: rotate(10deg) scale(1.14);
  }
}

@keyframes pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-5px) scale(1.18);
  }
  70% {
    transform: translateY(0) scale(0.94);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

@keyframes wobble {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-8px) rotate(6deg);
  }
}

@media (hover: hover) {
  .btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
  }

  .btn-ghost:hover,
  .quick a:hover,
  .lang a:hover {
    filter: brightness(1.08);
  }

  .fab:hover {
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.45)) brightness(1.08);
  }
}

@media (min-width: 880px) {
  body {
    display: block;
    padding: 24px 0;
    background-image:
      linear-gradient(rgba(7, 4, 3, 0.7), rgba(7, 4, 3, 0.82)),
      url("/assets/images/big321-gaming-background-malaysia.webp");
    background-size: cover;
    background-position: center;
  }

  .app {
    width: 420px;
    min-height: calc(100dvh - 48px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 206, 70, 0.24);
    border-radius: 36px;
    box-shadow:
      0 24px 80px rgba(0, 0, 0, 0.55),
      0 0 80px rgba(255, 160, 40, 0.08);
  }

  .hero-visual {
    animation: none;
  }

  .hero-wrap {
    animation: float 7s ease-in-out infinite;
  }

  .fab {
    right: 16px;
    bottom: 16px;
  }

  .sheet {
    left: 50%;
    right: auto;
    width: 420px;
    bottom: 0;
    border-radius: 22px 22px 0 0;
    transform: translateX(-50%) translateY(150%);
  }

  .sheet.is-open {
    transform: translateX(-50%) translateY(0);
  }

  html.has-sheet .fab {
    bottom: 16px;
  }
}

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
