/* 儿童游戏乐园 - 公共样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: 'Comic Sans MS', 'Marker Felt', '华文圆体', '微软雅黑', sans-serif;
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ffdde1 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 顶部返回栏 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(255, 150, 180, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  background: linear-gradient(135deg, #ff9a9e, #fad0c4);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 154, 158, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
}

.back-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 15px rgba(255, 154, 158, 0.5);
}

.back-btn:active {
  transform: scale(0.95);
}

.game-title {
  font-size: 28px;
  color: #ff6b9d;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

/* 游戏容器 */
.game-container {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  box-shadow: 0 10px 40px rgba(255, 150, 180, 0.25);
  min-height: 70vh;
}

/* 通用大按钮 */
.big-btn {
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  color: #5a4a6a;
  border: 4px solid white;
  padding: 15px 35px;
  border-radius: 25px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(168, 237, 234, 0.5);
  transition: all 0.2s;
  margin: 10px;
}

.big-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(168, 237, 234, 0.6);
}

.big-btn:active {
  transform: scale(0.95);
}

.big-btn.pink {
  background: linear-gradient(135deg, #ff9a9e, #fecfef);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 154, 158, 0.5);
}

.big-btn.purple {
  background: linear-gradient(135deg, #c471f5, #fa71cd);
  color: white;
  box-shadow: 0 6px 20px rgba(196, 113, 245, 0.5);
}

.big-btn.green {
  background: linear-gradient(135deg, #84fab0, #8fd3f4);
  color: #2d5a3d;
  box-shadow: 0 6px 20px rgba(132, 250, 176, 0.5);
}

.big-btn.yellow {
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  color: #8b5a2b;
  box-shadow: 0 6px 20px rgba(252, 182, 159, 0.5);
}

/* 星星评分 */
.stars {
  font-size: 30px;
  margin: 10px 0;
}

.star {
  display: inline-block;
  transition: transform 0.3s;
}

.star.active {
  animation: starPop 0.5s ease;
}

@keyframes starPop {
  0% { transform: scale(0) rotate(-180deg); }
  50% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: linear-gradient(135deg, #fff5f7, #ffe0ec);
  border-radius: 30px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(255, 107, 157, 0.4);
  transform: scale(0.8);
  transition: transform 0.3s;
  max-width: 400px;
  border: 5px solid white;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal h2 {
  font-size: 32px;
  color: #ff6b9d;
  margin-bottom: 15px;
}

.modal p {
  font-size: 20px;
  color: #6a5a6a;
  margin-bottom: 20px;
}

/* 漂浮装饰 */
.floating {
  position: fixed;
  pointer-events: none;
  font-size: 30px;
  opacity: 0.6;
  animation: floatUp 8s linear infinite;
  z-index: 0;
}

@keyframes floatUp {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* 分数显示 */
.score-display {
  background: linear-gradient(135deg, #ffecd2, #fcb69f);
  padding: 10px 25px;
  border-radius: 20px;
  font-size: 22px;
  font-weight: bold;
  color: #8b5a2b;
  box-shadow: 0 4px 10px rgba(252, 182, 159, 0.4);
}

/* 响应式 */
@media (max-width: 600px) {
  .game-title { font-size: 20px; }
  .game-container { padding: 15px; margin: 10px; }
  .big-btn { font-size: 18px; padding: 12px 25px; }
  .top-bar { padding: 10px 15px; }
}
