.main-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  /* 移除overflow: hidden，允许滚动 */
  position: relative;
}

.main-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/background.png');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 0;
}

.menu-content {
  position: relative;
  z-index: 1;
  text-align: center;
  /* 添加内边距确保在小屏幕上内容不会被截断 */
  padding: 2rem;
}

.game-title {
  margin-bottom: 2rem;
  text-shadow: 0 0 10px rgba(0, 195, 255, 0.7);
}

.game-title h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: #ffffff;
}

.game-title h2 {
  font-size: 1.5rem;
  color: #00c3ff;
  font-weight: 400;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2rem;
}

.menu-button {
  position: relative;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  background: rgba(0, 77, 122, 0.7);
  border: 2px solid #00c3ff;
  border-radius: 5px;
  min-width: 250px;
  transition: all 0.3s ease;
  overflow: hidden;
  cursor: pointer;
}

.menu-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.5s ease;
}

.menu-button:hover {
  background: rgba(0, 111, 176, 0.8);
  box-shadow: 0 0 15px rgba(0, 195, 255, 0.5);
  transform: translateY(-3px);
}

.menu-button:hover::before {
  left: 100%;
}

.menu-button:active {
  transform: translateY(0);
  box-shadow: 0 0 5px rgba(0, 195, 255, 0.5);
}

/* 主菜单页面的footer位置固定 */
.footer {
  position: relative; /* 改为相对定位，而不是绝对定位，允许页面滚动 */
  margin-top: 2rem;
  width: 100%;
  text-align: center;
  color: #aaa;
  z-index: 1;
  padding: 1.5rem 0;
}

/* 添加媒体查询以优化小屏幕显示 */
@media (max-height: 600px) {
  .main-menu {
    justify-content: flex-start;
    padding-top: 2rem;
  }
}
