[hidden] {
  display: none !important;
}
.bg-mountain {
  background-image:
    radial-gradient(
      ellipse at 50% -10%,
      rgba(255, 90, 60, 0.3),
      transparent 55%
    ),
    linear-gradient(180deg, #5d0d0e 0%, #4a0f14 45%, #371218 100%);
}
.bg-teal-mountain {
  background-image:
    radial-gradient(
      ellipse at 50% -10%,
      rgba(95, 156, 204, 0.22),
      transparent 55%
    ),
    linear-gradient(180deg, #0e384a 0%, #0b2c3a 45%, #08222e 100%);
}
.mountain-img {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.pattern-fan {
  position: absolute;
  top: -40px;
  left: 50%;
  width: min(1100px, 150vw);
  max-width: none;
  transform: translateX(-50%);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}
.card {
  perspective: 1200px;
}
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.card.flipped .card-inner,
.card.matched .card-inner {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-back {
  background-size: cover;
  background-position: center;
}
.card-front {
  transform: rotateY(180deg);
}

/* Dancer footer -- decorative row of traditional dancers along the mountain skyline */
.dancer-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(19vw, 165px);
  min-height: 104px;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}
.dancer {
  position: absolute;
  bottom: 0;
  height: 58%;
  width: auto;
  object-fit: contain;
  transform-origin: bottom center;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
  will-change: transform;
}
.dancer.depth-back {
  opacity: 0.55;
  filter: brightness(0.72) saturate(0.9)
    drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3));
  z-index: 1;
}
.dancer.depth-front {
  height: 92%;
  opacity: 1;
  z-index: 2;
}

/* Category screen's dancer footer sized independently from landing/results */
#category .dancer-footer {
  height: min(26vw, 220px);
  min-height: 150px;
}
/* On the category screen, don't split dancers into a dim back layer --
   show all of them at full strength so they stand out. */
#category .dancer.depth-back,
#category .dancer.depth-front {
  height: 66%;
  opacity: 1;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.35));
  z-index: 2;
}

/* Question / Answer badge on each card */
.qa-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Welcome screen ribbon banners */
.banner-selamat,
.banner-datang {
  font-family: "Fraunces", serif;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: clamp(1.5rem, 4.2vw, 2.4rem);
  padding: 12px 34px;
  transform: skewX(-8deg);
  box-shadow: 0 14px 26px -10px rgba(0, 0, 0, 0.55);
  width: max-content;
}
.banner-selamat {
  background: linear-gradient(135deg, #fdeaa6, #ffd83a 55%, #e3a812);
  color: #5d0d0e;
}
.banner-datang {
  background: linear-gradient(135deg, #a3181a, #7a1211 55%, #5d0d0e);
  color: #fdeaa6;
  margin-top: -8px;
  margin-left: 22px;
}
.banner-selamat > span,
.banner-datang > span {
  display: inline-block;
  transform: skewX(8deg);
}

/* Results screen score ribbon */
.score-banner-top {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #fdeaa6, #ffd83a 55%, #e3a812);
  color: #5d0d0e;
  padding: 10px 46px 8px;
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0% 100%);
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
}
.score-banner-bottom {
  font-family: "Fraunces", serif;
  font-weight: 900;
  background: linear-gradient(135deg, #8a1418, #5d0d0e 60%, #4a0f14);
  color: #fff;
  padding: 16px 60px 18px;
  margin-top: -4px;
  clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%);
  font-size: clamp(2.2rem, 7vw, 3.2rem);
}

/* Category cards */
.cat-card {
  box-shadow: 0 14px 26px -12px rgba(0, 0, 0, 0.5);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 32px -12px rgba(0, 0, 0, 0.55);
}
.cat-card:active {
  transform: translateY(-1px) scale(0.98);
}
