body {
  margin: 0;
  font-family: Arial, sans-serif;
}
.intro-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #0f1226, #988889);
  overflow: hidden;
  position: relative;
}
.stickyman {
  font-size: 12rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#funnyBtn {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 18px;
  border: none;
  background: #333;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: left 0.3s, top 0.3s;
  z-index: 5;
}

:root {
  --bg: #0f1226;
  --card: #161a35;
  --accent: #ffd166;
  --accent2: #70e1ff;
  --text: #e9ecff;
}
html,
body {
  height: 100%;
}
.cards-body {
  background: radial-gradient(
      1200px 800px at 20% -10%,
      #1b1f47 0%,
      transparent 60%
    ),
    radial-gradient(1200px 800px at 120% 0%, #151735 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

header {
  max-width: 1100px;
  margin: 32px auto 16px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.title {
  font-size: clamp(20px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.5px;
}
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
button {
  appearance: none;
  border: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #2a2f6b, #1b1f47);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
button:hover {
  transform: translateY(-2px);
}
button:active {
  transform: translateY(0) scale(0.98);
}
.grid {
  --cols: 4;
  max-width: 1100px;
  margin: 10px auto 60px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 1024px) {
  .grid {
    --cols: 3;
  }
}
@media (max-width: 768px) {
  .grid {
    --cols: 2;
  }
}
@media (max-width: 480px) {
  .grid {
    --cols: 1;
  }
}
.card {
  perspective: 1100px;
  position: relative;
  overflow: visible; /* added for burst */
}
.card-inner {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 125%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  background: radial-gradient(
      120% 120% at 100% 0%,
      rgba(255, 255, 255, 0.06),
      transparent 40%
    ),
    var(--card);
}
.card:hover .card-inner {
  transform: rotateY(180deg);
}
.card.is-flipped .card-inner {
  transform: rotateY(180deg);
}
.burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  font-size: 2.2rem; /* bigger */
  animation: burstAnim 0.8s ease-out forwards;
  pointer-events: none;
}
@keyframes burstAnim {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3) rotate(20deg);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.8) rotate(-20deg);
    opacity: 0;
  }
}
.popup-text {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem; /* bigger */
  font-weight: bold;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  animation: popupAnim 1s ease-out forwards;
  pointer-events: none;
}
@keyframes popupAnim {
  0% {
    transform: translate(-50%, 0) scale(0.5);
    opacity: 0;
  }
  40% {
    transform: translate(-50%, -15px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -40px) scale(1);
    opacity: 0;
  }
}
.face {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;

  backface-visibility: hidden; /* 👈 yeh dono sides ke liye */
  -webkit-backface-visibility: hidden;
}
.front {
  transform: rotateY(0deg);
  z-index: 2; /* 👈 front ko upar rakho */
}
.back {
  transform: rotateY(180deg);
  z-index: 1;
}
.blob {
  position: absolute;
  inset: -10%;
  filter: blur(18px) saturate(120%);
  opacity: 0.15;
}
.emoji {
  font-size: clamp(56px, 8vw, 96px);
  line-height: 1;
}
.label {
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(12px, 2.2vw, 14px);
}
.desc {
  font-size: clamp(12px, 2.2vw, 14px);
  text-align: center;
}
.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
