/* Reset & Touch safety */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Ambient Top Light & Mahogany Vignette */
.spotlight-layer {
  background: radial-gradient(circle at 50% 25%, rgba(212, 175, 55, 0.18) 0%, rgba(10, 47, 29, 0.4) 40%, rgba(2, 10, 6, 0.95) 90%);
}

/* Velvet Felt Game Board */
.felt-board {
  background: radial-gradient(ellipse at center, #0e4428 0%, #0a2f1d 55%, #051910 100%);
  position: relative;
}

/* Cup Wrapper container */
.cup-wrap {
  width: 90px;
  height: 125px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  transition: transform 0.25s ease-out, filter 0.2s ease;
  will-change: transform, left;
}

@media (min-width: 640px) {
  .cup-wrap {
    width: 120px;
    height: 160px;
  }
}

/* Hover & Active touch states for interactive cups */
.cup-wrap.can-pick {
  cursor: pointer;
}
.cup-wrap.can-pick:hover {
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
}
.cup-wrap.can-pick:active {
  transform: translateY(-55%) scale(0.97);
}

/* Cup Shadow */
.cup-shadow {
  position: absolute;
  bottom: -6px;
  width: 84%;
  height: 16px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 75%);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Cup Body with Brass & Gold metallic sheen */
.cup-body {
  position: relative;
  width: 100%;
  height: 90%;
  clip-path: polygon(14% 0%, 86% 0%, 96% 100%, 4% 100%);
  background: linear-gradient(
    90deg,
    #5a4014 0%,
    #8b6820 12%,
    #d4af37 32%,
    #fff2a8 48%,
    #e5c058 55%,
    #996e1b 80%,
    #4a330e 100%
  );
  border-radius: 6px 6px 12px 12px;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.6), inset 0 3px 6px rgba(255, 255, 255, 0.4);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Top Finial Knob */
.cup-finial {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 14px;
  background: radial-gradient(circle at 35% 30%, #fff7b3, #d4af37 60%, #5d4111);
  border-radius: 12px 12px 4px 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Bottom Rim */
.cup-rim {
  position: absolute;
  bottom: 0;
  left: 2%;
  width: 96%;
  height: 10px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, #533a0f, #ffd700 50%, #462f09);
  box-shadow: 0 3px 6px rgba(0,0,0,0.7);
}

/* Embossed Classical Decorative Band */
.cup-ribbon {
  position: absolute;
  top: 42%;
  left: 7%;
  width: 86%;
  height: 8px;
  background: linear-gradient(90deg, #6c4e16, #fff099 50%, #5a4010);
  border-top: 1px solid rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(0,0,0,0.6);
}

/* Specular line */
.cup-metal-shine {
  position: absolute;
  top: 0;
  left: 36%;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.45) 50%, rgba(255,255,255,0));
  pointer-events: none;
}

/* Cup Lift Animation State */
.cup-wrap.lifted .cup-body {
  transform: translateY(-55px);
}
.cup-wrap.lifted .cup-shadow {
  transform: scale(0.65);
  opacity: 0.35;
}

@media (min-width: 640px) {
  .cup-wrap.lifted .cup-body {
    transform: translateY(-75px);
  }
}

/* Golden Ball Styling */
.golden-ball {
  width: 38px;
  height: 38px;
  top: 50%;
  transform: translateY(-10%);
  z-index: 5;
  transition: left 0.3s ease-out, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 640px) {
  .golden-ball {
    width: 48px;
    height: 48px;
    transform: translateY(-8%);
  }
}

.ball-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #fff176 25%, #ffd700 55%, #c68a0c 85%, #6a4200 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.7);
  position: relative;
}

.ball-specular {
  position: absolute;
  top: 15%;
  left: 20%;
  width: 25%;
  height: 25%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(1px);
}

.ball-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.5) 0%, rgba(255, 215, 0, 0) 70%);
  animation: pulse-glow 1.5s infinite alternate ease-in-out;
  pointer-events: none;
}

.ball-shadow {
  position: absolute;
  bottom: -6px;
  left: 10%;
  width: 80%;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
}

@keyframes pulse-glow {
  0% { transform: scale(0.9); opacity: 0.5; }
  100% { transform: scale(1.25); opacity: 0.9; }
}

/* Wrong Choice Shake Animation */
@keyframes shake-wrong {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  20% { transform: translateY(-50%) translateX(-8px) rotate(-3deg); }
  40% { transform: translateY(-50%) translateX(8px) rotate(3deg); }
  60% { transform: translateY(-50%) translateX(-6px) rotate(-2deg); }
  80% { transform: translateY(-50%) translateX(6px) rotate(2deg); }
}

.cup-wrong {
  animation: shake-wrong 0.45s ease-in-out;
}

/* Modal Entry Animation */
@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.85) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-pop {
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}