* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Microsoft YaHei', sans-serif;
}

body {
  background-color: #1a1a2e;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 8px 20px;
}

.game-container {
  width: 100%;
  max-width: 600px;
  position: relative;
  /* background-image: url(background.jpg); */
  /* background-repeat: no-repeat;
  background-size: cover; */
}

.game-title {
    text-align: center;
    font-size: 27px;
    margin-bottom: 13px;
    color: #f8c537;
    text-shadow: 0 0 5px rgba(248, 197, 55, 0.5);
}

.steps-display {
    text-align: center;
    font-size: 18px;
    margin-bottom: 15px;
    background-image: url(../images/bushu.png);
    background-repeat: no-repeat;
    background-size: cover;
    height: 115px;
    width: 170px;
    margin: 0px auto;
}

#steps {
  line-height: 103px;
  color: #fe1e85;
  font-weight: 600;
  font-size: 26px;
}

.board {
  width: 100%;
  aspect-ratio: 1/1;
  /* background-color: #2d2d44; */
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  background-image: url(../images/qipan.png);
  background-repeat: no-repeat;
  background-size: cover;
}

.center-building {
  position: absolute;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  /* background-color: #8b4513; */
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #f8c537;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(139, 69, 19, 0.8);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect x="20" y="40" width="60" height="40" fill="%23d4a76a"/><rect x="30" y="30" width="40" height="10" fill="%23d4a76a"/><rect x="40" y="20" width="20" height="10" fill="%23d4a76a"/></svg>');
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
}

.path {
  position: absolute;
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border: 2px dashed #f8c537;
  border-radius: 50%;
}

.tile {
  position: absolute;
  width: 4%;
  height: 4%;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.3s;
}

.tile-1 {
  background-color: #ff6b6b;
  color: #fff;
}

.tile-2 {
  background-color: #4ecdc4;
  color: #fff;
}

.tile-3 {
  background-color: #ffd166;
  color: #333;
}

.tile-4 {
  background-color: #06d6a0;
  color: #fff;
}

.tile-5 {
  background-color: #000000;
  color: #fff;
}

.special-area {
  position: absolute;
  width: 15%;
  height: 15%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  text-align: center;
  font-weight: bold;
  color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.player {
  position: absolute;
  width: 30PX;
  height: 30px;
/*
  border-radius: 50%;
  background-color: #f8c537;
*/
  z-index: 10;
/*
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  box-shadow: 0 0 10px rgba(248, 197, 55, 0.8);
*/
    background-image: url(../images/qizi.png);
    background-repeat: no-repeat;
}

.player-perspective {
  margin-top: 15px;
  font-size: 14px;
  /* text-align: center; */
  margin: 3px 0 7px 0;
  background-image: url(../images/fanhui.png);
  background-repeat: no-repeat;
  background-size: cover;
  width: 100px;
height: 43px;
}
.player-perspective  a{
  color: #ea3b1f;
  text-decoration-line: none;
  display: block;
}

.power-cards {
  margin-top: 10px;
  width: 100%;
  /* background-color: #2d2d44; */
  border-radius: 10px;
  padding: 0px;
}

.power-cards-title {
  font-size: 16px;
  margin-bottom: 10px;
  color: #f8c537;
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.card {
  /* background-color: #3a3a5e; */
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  min-width: 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  height: 125px;
}

.card-1 {
  background-image: url(../images/gongneng1_hui.png);
  background-repeat: no-repeat;
  background-size: cover;
}

.card-2 {
  background-image: url(../images/gongneng2_hui.png);
  background-repeat: no-repeat;
  background-size: cover;
}

.card-3 {
  background-image: url(../images/gongneng3_hui.png);
  background-repeat: no-repeat;
  background-size: cover;
}

.card-4 {
  background-image: url(../images/gongneng4_hui.png);
  background-repeat: no-repeat;
  background-size: cover;
}

.card::after {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 30px;
  height: 30px;
  /* background-color: rgba(255, 255, 255, 0.1); */
  border-radius: 50%;
}

.dice-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.dice {
  width: 60px;
  height: 60px;
  background-color: #fff;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transition: transform 0.3s;
  position: relative;
  padding: 0;
}

.dot {
  width: 10px;
  height: 10px;
  background-color: #333;
  border-radius: 50%;
  position: absolute;
}

/* 骰子点数布局 */
/* 中心点 */
.dot-1 {
  top: 25px;
  left: 25px;
}

/* 左上 */
.dot-2 {
  top: 15px;
  left: 15px;
}

/* 右上 */
.dot-3 {
  top: 15px;
  right: 15px;
}

/* 左下 */
.dot-4 {
  bottom: 15px;
  left: 15px;
}

/* 右下 */
.dot-5 {
  bottom: 15px;
  right: 15px;
}

/* 左中 */
.dot-6 {
  top: 25px;
  left: 15px;
}

/* 右中 */
.dot-7 {
  top: 25px;
  right: 15px;
}

.hidden {
  display: none;
}

.dice:hover {
  transform: scale(1.05);
}

.instructions {
  margin-top: 20px;
  font-size: 14px;
  color: #aaa;
  text-align: center;
}

/* 棋子跳跃动画 */
@keyframes jump {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.moving {
  animation: jump 0.5s ease-in-out infinite;
}

/* 特殊卡片样式 */
.special-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 80%;
    max-width: 295px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0; 
    transition: all 0.5s ease;
    background-image: url(../images/first.png);
    background-repeat: no-repeat;
    background-size: cover;
    height: 153px;
}

.special-card.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.special-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.special-card p {
  font-size: 16px;
  margin-bottom: 15px;
}

.card-icon {
  font-size: 40px;
  margin-bottom: 10px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-10px);
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}