*{
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
}

.container *{
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 25px;
}

header h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

header .subtitle {
  color: #666;
  font-size: 1rem;
  max-width: 90%;
  margin: auto;
}

.settings {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 20px;
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  margin: 25px auto;
  flex-wrap: wrap;
  border: 1px solid rgba(138, 178, 208, 0.3);
}

.setting-group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 15px;
  background: rgba(138, 178, 208, 0.1);
  border-radius: 10px;
}

.setting-group label {
  font-weight: 600;
  color: #4a6fa5;
  font-size: 1.1rem;
}

.switch {
  width: 60px;
  height: 30px;
  appearance: none;
  background: #ccc;
  border-radius: 15px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.switch:checked  {
  background: #4a6fa5;
}

.switch::before {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch:checked::before {
  transform: translateX(30px);
}

#bg-color {
  width: 55px;
  height: 30px;
  border: 2px solid white;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.btn {
  padding: 10.75px 30px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #4a6fa5, #3a5f90);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(74, 111, 165, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn:hover {
  background: linear-gradient(145deg, #3a5f90, #2a4f80);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(74, 111, 165, 0.45);
}

.btn:active {
  transform: translateY(1px);
}

#game-area {
  flex: 1;
  background-color: #8eb2d0;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  min-height: 650px;
  transition: background-color 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.bubble {
  position: absolute;
  width: 50px;
  height: 50px;
  background-image: url('normal.png');
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: transform 0.2s;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.bubble:hover {
  transform: scale(1.15);
}

.bubble.popped {
  animation: pop 0.4s forwards;
}

@keyframes pop {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.8;
  }

  100% {
    transform: scale(0);
    opacity: 0;
  }
}

footer {
  text-align: center;
  color: #555;
  line-height: 1.8;
  margin-top: 25px;
}

footer h3 {
  margin-bottom: 15px;
  color: #4a6fa5;
  font-size: 1.3rem;
}

.description {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 15px;
  padding: 20px;
  margin: 0 auto;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(138, 178, 208, 0.2);
  text-align: left;
}

.description p {
  margin-top: 10px;
  font-size: 1rem;
  padding-left: 25px;
  position: relative;
  opacity: 0.9;
}

.description p:before {
  content: "•";
  position: absolute;
  left: 10px;
  color: #4a6fa5;
  font-size: 1rem;
}

.notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 14px 40px;
  border-radius: 35px;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  pointer-events: none; /* ✅ 新增：隐藏时不阻挡点击 */
}

.notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
  pointer-events: auto; /* ✅ 显示时恢复点击 */
}

.stats {
    background: rgba(255, 255, 255, 0.92);
    padding: 10px 25px;
    border-radius: 12px;
    line-height: 1;
    font-weight: bold;
    color: #4a6fa5;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(138, 178, 208, 0.3);
}

.bubble-counter {
  font-size: 1.4rem;
  font-weight: 800;
  color: #e74c3c;
  min-width: 40px;
  display: inline-block;
  text-align: center;
}

.fullscreen-btn {
  position: absolute;
  bottom: 25px;
  right: 25px;
  z-index: 10;
}

.pop-effect {
  position: absolute;
  width: 100px;
  height: 100px;
  pointer-events: none;
  z-index: 5;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
}
