.bb-egg-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.bb-egg-overlay[aria-hidden="false"] {
  display: flex;
}

.bb-egg-panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(180deg, #0f172a, #111827);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color: #fff;
}

.bb-egg-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.bb-egg-header {
  text-align: center;
  margin-bottom: 14px;
  padding-right: 40px;
}

.bb-egg-header h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.bb-egg-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.bb-egg-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.bb-egg-stat {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.bb-egg-stat span {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.bb-egg-stat strong {
  font-size: 22px;
}

#basketballEasterEggCanvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.bb-egg-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.bb-egg-control-group {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.bb-egg-control-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.bb-egg-control-group input[type="range"] {
  width: 100%;
}

.bb-egg-control-value {
  margin-top: 8px;
  font-weight: 700;
  color: #fbbf24;
}

.bb-egg-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.bb-egg-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.bb-egg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bb-egg-btn-primary {
  background: linear-gradient(180deg, #f59e0b, #ea580c);
}

.bb-egg-flash {
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translateX(-50%) scale(0.92);
  opacity: 0;
  pointer-events: none;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.96);
  color: #111827;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: all 0.18s ease;
  z-index: 100000;
}

.bb-egg-flash.is-visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

body.bb-egg-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .bb-egg-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bb-egg-controls {
    grid-template-columns: 1fr;
  }

  .bb-egg-header h2 {
    font-size: 22px;
  }

  .bb-egg-stat strong {
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  .bb-egg-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .bb-egg-close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
  }

  .bb-egg-header {
    margin-bottom: 10px;
  }

  .bb-egg-actions {
    gap: 8px;
  }

  .bb-egg-btn {
    width: 100%;
  }
}