/* Find the Ball Game Styles */
.main-text{
 margin-top: 100px;
}
.find-ball-section {
  max-width: 500px;
  margin: 60px auto 0 auto;
  padding: 32px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0));
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.74);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.find-ball-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.65), rgba(255,255,255,0) 40%);
  pointer-events: none;
  opacity: 0.55;
}

.ftb-top-prompt {
  margin-bottom: 12px;
  padding: 0;
  border-radius: 999px;
  /* background: rgba(255,255,255,0.72); */
  /* border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.06); */
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #0d1020;
  position: relative;
  z-index: 1;
}

.ftb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 14, 22, 0.68);
  backdrop-filter: blur(8px);
  z-index: 30;
}

.ftb-overlay-card {
  width: min(420px, calc(100% - 48px));
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 22px 22px 20px;
  text-align: center;
  box-shadow: 0 28px 70px rgba(0,0,0,0.35);
}

/* Game Over card: slightly tighter so it doesn't feel oversized */
#ftb-game-over-overlay .ftb-overlay-card {
  width: min(380px, calc(100% - 56px));
  padding: 18px 18px 16px;
  border-radius: 20px;
}

#ftb-game-over-overlay .ftb-overlay-title {
  font-size: 1.95rem;
}

#ftb-game-over-overlay .ftb-score-label {
  margin-top: 12px;
}

#ftb-game-over-overlay .ftb-score {
  font-size: 3.2rem;
}

#ftb-game-over-overlay .ftb-score-small {
  font-size: 2rem;
}

#ftb-game-over-overlay .ftb-overlay-btn {
  margin-top: 14px;
  padding: 11px 38px;
}

@media (max-width: 420px) {
  #ftb-game-over-overlay .ftb-overlay-card {
    width: min(360px, calc(100% - 40px));
  }
  #ftb-game-over-overlay .ftb-score {
    font-size: 2.9rem;
  }
}

.ftb-overlay-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: #0d1020;
  letter-spacing: 0.01em;
}

.ftb-overlay-subtitle {
  margin-top: 6px;
  font-size: 1.02rem;
  font-weight: 600;
  color: rgba(13, 16, 32, 0.75);
}

.ftb-score-label {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(13, 16, 32, 0.55);
}

.ftb-score-label-tight {
  margin-top: 12px;
}

.ftb-score {
  margin-top: 6px;
  font-size: 4.1rem;
  font-weight: 900;
  line-height: 1;
  color: #0d1020;
}

.ftb-score-small {
  font-size: 2.4rem;
  opacity: 0.9;
}

.ftb-overlay-btn {
  margin-top: 18px;
  padding: 12px 42px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  background: linear-gradient(90deg, #111 0%, #2a2f4a 100%);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
  font-family: 'Poppins', sans-serif;
}

.ftb-overlay-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.1);
  box-shadow: 0 22px 52px rgba(0,0,0,0.28);
}

.ftb-overlay-btn:active {
  transform: translateY(0px) scale(0.99);
}

.level-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 14, 22, 0.65);
  backdrop-filter: blur(6px);
  color: #fff;
  font-weight: 900;
  font-size: 3.2rem;
  border-radius: 18px;
  z-index: 20;
  letter-spacing: 0.02em;
  text-shadow: 0 14px 40px rgba(0,0,0,0.35);
}
.cups-container {
  display: flex;
  justify-content: center;
  gap: 38px;
  margin: 32px 0 24px 0;
  position: relative;
  padding-bottom: 22px;
  z-index: 1;
}

.status-display {
  text-align: center;
  line-height: 1.2;
}

.status-display .difficulty-tag {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-top: 0;
}

/* Difficulty colors (reusing existing site colors) */
.status-display.diff-easy .difficulty-tag {
  background: rgba(0, 137, 123, 0.14);
  color: #00897b;
}
.status-display.diff-medium .difficulty-tag {
  background: rgba(255, 152, 0, 0.18);
  color: #ff9800;
}
.status-display.diff-hard .difficulty-tag {
  background: rgba(255, 3, 3, 0.14);
  color: var(--main-color);
}
.status-display.diff-insanity .difficulty-tag {
  background: rgba(208, 2, 27, 0.14);
  color: #d0021b;
}
.status-display.diff-impossible .difficulty-tag {
  background: rgba(0, 0, 0, 0.12);
  color: #000;
}

.cup-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.cup-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(.4,2,.6,1);
  cursor: pointer;
  user-select: none;
  z-index: 1;
}
.cup-wrap.selected .cup-img {
  /* outline: 3px solid #ff9800; */
  z-index: 2;
}
.cup-wrap.lifted .cup-img {
  transform: translateY(-40px) scale(1.08);
  z-index: 2;
}
.ball {
  width: 32px;
  height: 32px;
  background:
    /* Curved highlight (top) */
    radial-gradient(140% 120% at 35% 10%, rgba(70, 70, 70, 0.55), rgba(255, 255, 255, 0) 58%),
    /* Curved darken (bottom) */
    radial-gradient(140% 115% at 50% 120%, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0) 62%),
    #ff0000;
  box-shadow:
    inset 0 10px 18px rgba(255, 255, 255, 0.20),
    inset 0 -14px 24px rgba(0, 0, 0, 0.18);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  z-index: 0;
  display: none;
  pointer-events: none;
}
.find-ball-result {
  min-height: 32px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #000000;
  text-align: center;
  margin: 10px 0 0 0;
  position: relative;
  z-index: 1;
}

/* Old HUD/buttons removed; overlays handle flow now */
.find-ball-title {
  text-align: center;
  font-size: var(--big-font);
  font-weight: 700;
  color: var(--third-color);
  margin: 54px 0 8px 0;
  letter-spacing: 0.01em;
  font-family: 'Poppins', sans-serif;
  position: relative;
}

@media (max-width: 600px) {
  .main-text {
      margin-top: 60px;
  }
  .find-ball-section {
      max-width: 90%;
      margin: 20px auto 0 auto;
      padding: 12px 14px;
  }
  .ftb-overlay-card {
    width: min(320px, calc(100% - 24px));
    padding: 12px 12px 10px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.22);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }

  .ftb-overlay-title {
    font-size: 1.2rem;
  }

  .ftb-overlay-subtitle {
    font-size: 0.95rem;
  }

  .ftb-score {
    font-size: 1rem;
  }

  .ftb-score-small {
    font-size: 1rem;
  }

  .ftb-overlay-btn {
    padding: 10px 18px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
  }

  /* Cups layout: reduce gap and cup size so three cups fit comfortably */
  .cups-container {
    gap: 14px;
    margin: 18px 0 12px 0;
    padding-bottom: 12px;
    min-height: 100px; /* Increase canvas height a bit */
  }

  .cup-img {
    width: 72px;
    height: 72px;
  }

  .cup-wrap.lifted .cup-img {
    transform: translateY(-28px) scale(1.05);
  }

  .ball {
    width: 22px;
    height: 22px;
    bottom: 18%;
  }

  .level-overlay {
    font-size: 2rem;
  }

  .find-ball-title {
    margin: 28px 0 6px 0;
    font-size: 1.1rem;
  }
}
