/* Ball Bounce Game Styles */
.main-text {
  margin-top: 100px;
}

.fortune-section {
  max-width: 780px;
  margin: 60px auto 0 auto;
  padding: 0;
  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;
  position: relative;
  overflow: hidden;
}

.fortune-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;
}

.canvas-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  position: relative;
  z-index: 1;
}

.fb-canvas-hud {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: none;
}

.fb-canvas-stat {
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: auto;
}

.fb-canvas-stat-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(13, 16, 32, 0.6);
}

.fb-canvas-stat-value {
  font-size: 2.35rem;
  font-weight: 900;
  color: #0d1020;
  line-height: 1.1;
  text-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

#fortune-canvas {
  width: 100%;
  height: 560px;
  display: block;
  touch-action: none;
}

.fb-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;
}

.fb-overlay-card {
  width: min(440px, 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);
  position: relative;
  z-index: 1;
}

.fb-overlay-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: #0d1020;
  letter-spacing: 0.01em;
}

.fb-overlay-subtitle {
  margin-top: 6px;
  font-size: 1.02rem;
  font-weight: 600;
  color: rgba(13, 16, 32, 0.75);
}

.fb-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);
}

.fb-score-label-tight {
  margin-top: 12px;
}

.fb-score {
  margin-top: 6px;
  font-size: 4.1rem;
  font-weight: 900;
  line-height: 1;
  color: #0d1020;
}

.fb-score-small {
  font-size: 2.4rem;
  opacity: 0.9;
}

.fb-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;
}

.fb-overlay-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.1);
  box-shadow: 0 22px 52px rgba(0,0,0,0.28);
}

.fb-overlay-btn:active {
  transform: translateY(0px) scale(0.99);
}

.fortune-hint {
  margin-top: 10px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

@media (max-width: 600px) {
  .main-text {
      margin-top: 60px;
  }
  .fortune-section {
      max-width: 90%;
      margin: 20px auto 0 auto;
      padding: 12px 14px;
  }
  #fortune-canvas {
    height: 460px;
  }
  .fb-overlay-card {
    padding: 18px 18px 16px;
  }
  .fb-overlay-title {
    font-size: 1.8rem;
  }
  .fb-overlay-subtitle {
    font-size: 0.95rem;
  }
  .fb-score {
    font-size: 1.8rem;
  }
  .fb-score-small {
    font-size: 1.4rem;
  }
}
