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

.font-handwritten {
  font-family: 'Poppins', sans-serif;
}

.font-main {
  font-family: 'Poppins', sans-serif;
}

/* ================= SHAKE (CHIT MIXING) ================= */
/* smoother + more realistic hand-mixing */
@keyframes shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  15%  { transform: translate(-6px, -4px) rotate(-5deg); }
  30%  { transform: translate(6px, 4px) rotate(4deg); }
  45%  { transform: translate(-4px, 6px) rotate(-3deg); }
  60%  { transform: translate(4px, -6px) rotate(5deg); }
  75%  { transform: translate(-6px, 4px) rotate(-4deg); }
  90%  { transform: translate(4px, -4px) rotate(3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.shake-animation {
  animation: shake var(--shake-speed, 0.35s) linear infinite;
  transform-origin: center;
}

/* ================= FLOAT ================= */
/* gentle idle movement */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

/* ================= WINNER GLOW ================= */
/* richer glow for winner */
@keyframes pulse-glow {
  0% {
    box-shadow:
      0 0 15px rgba(251, 191, 36, 0.5),
      0 0 30px rgba(251, 191, 36, 0.35);
  }
  50% {
    box-shadow:
      0 0 30px rgba(251, 191, 36, 0.9),
      0 0 60px rgba(251, 191, 36, 0.6);
  }
  100% {
    box-shadow:
      0 0 15px rgba(251, 191, 36, 0.5),
      0 0 30px rgba(251, 191, 36, 0.35);
  }
}

.winner-glow {
  animation: pulse-glow 1.6s ease-in-out infinite;
  border-radius: 18px;
}

/* ================= CONFETTI ================= */
@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(500px) rotate(900deg);
    opacity: 0;
  }
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  animation: confetti 3.2s ease-out forwards;
  pointer-events: none;
  z-index: 999;
  border-radius: 2px;
}

/* ================= PAPER SLIP (NAME CHIT) ================= */
.paper-slip {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f7f3e7 100%);
  border: 1px solid #e4dfcf;
  border-radius: 14px;
  box-shadow:
    0 6px 15px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.9);
  padding: 10px 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.paper-slip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.35) 50%,
    transparent 100%
  );
  opacity: 0.4;
  pointer-events: none;
}

.paper-slip:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 10px 25px rgba(0,0,0,0.22);
}

/* ================= INPUTS ================= */
.input-field {
  transition: all 0.25s ease;
}

.input-field:focus {
  transform: scale(1.03);
}

/* ================= BUTTONS ================= */
.btn-primary {
  transition: all 0.25s ease;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.45);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* ================= HISTORY CARDS ================= */
.history-card {
  transition: all 0.3s ease;
}

.history-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

/* ===== SHUFFLE PAPER BOX ===== */
.shuffle-box {
  width: 150px;
  height: 70px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f7f3e7);
  border: 1px solid #e5dfcf;
  box-shadow: 0 6px 15px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  animation: shuffle var(--speed, 1.2s) infinite ease-in-out;
}

.shuffle-box:nth-child(2) { animation-delay: -0.4s; }
.shuffle-box:nth-child(3) { animation-delay: -0.8s; }

@keyframes shuffle {
  0%   { transform: translateY(0) scale(1.1); z-index: 3; }
  25%  { transform: translateY(-60px) scale(1); z-index: 1; }
  50%  { transform: translateY(0) scale(0.85); z-index: 0; }
  75%  { transform: translateY(60px) scale(1); z-index: 1; }
  100% { transform: translateY(0) scale(1.1); z-index: 3; }
}

@keyframes flip {
  0%   { transform: rotateX(0deg); opacity: 1; }
  50%  { transform: rotateX(90deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

.flip-animation {
  animation: flip 0.25s ease-in-out;
  transform-origin: center bottom;
  perspective: 800px;
}
.logo-img {
    height: 4.5rem;
    width: auto;
}