/* 导入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Poppins:wght@600&display=swap');

/* 游戏圆环容器样式 */
.game-ring-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
}

/* 游戏圆环背景样式 */
.game-ring {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e6c346, #f5d75e);
  border: 4px solid #d4af37;
  box-shadow: 
    0 0 20px rgba(212, 175, 55, 0.6),
    inset 0 0 20px rgba(183, 149, 11, 0.4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 圆环格子纹理 */
.game-ring::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
  opacity: 0.5;
}

/* 中心按钮样式 */
.game-ring-center {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, #c0a02e, #e6c346);
  border: 3px solid #a88b26;
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.2),
    inset 0 2px 5px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.game-ring-center:hover {
  transform: scale(1.05);
  box-shadow: 
    0 6px 15px rgba(0, 0, 0, 0.3),
    inset 0 2px 5px rgba(255, 255, 255, 0.3),
    0 0 15px rgba(212, 175, 55, 0.6);
}

.game-ring-center:active {
  transform: scale(0.95);
  box-shadow: 
    0 2px 5px rgba(0, 0, 0, 0.2),
    inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

/* 方向按钮基础样式 */
.game-ring-direction {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f5d75e, #e6c346);
  border: 2px solid #d4af37;
  color: #8b6914;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0.9;
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 3px rgba(255, 255, 255, 0.4);
}

/* 方向按钮位置 */
.game-ring-up {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.game-ring-down {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.game-ring-left {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.game-ring-right {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* 方向按钮悬停效果 */
.game-ring-direction:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: linear-gradient(145deg, #ffea71, #f5d75e);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 3px rgba(255, 255, 255, 0.4),
    0 0 10px rgba(212, 175, 55, 0.7);
  opacity: 1;
}

.game-ring-left:hover {
  transform: translateY(-50%) translateX(-45%) scale(1.1);
}

.game-ring-right:hover {
  transform: translateY(-50%) translateX(-55%) scale(1.1);
}

/* 方向按钮激活效果 */
.game-ring-direction:active {
  transform: translate(-50%, -50%) scale(0.9);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 3px rgba(255, 255, 255, 0.4);
}

.game-ring-left:active {
  transform: translateY(-50%) translateX(-50%) scale(0.9);
}

.game-ring-right:active {
  transform: translateY(-50%) translateX(-50%) scale(0.9);
}

/* 方向按钮点击动画 */
.game-ring-direction.animate {
  animation: game-ring-ripple 0.4s ease;
}

@keyframes game-ring-ripple {
  0% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.game-ring-left.animate {
  animation: game-ring-left-ripple 0.4s ease;
}

@keyframes game-ring-left-ripple {
  0% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.15); }
  100% { transform: translateY(-50%) scale(1); }
}

.game-ring-right.animate {
  animation: game-ring-right-ripple 0.4s ease;
}

@keyframes game-ring-right-ripple {
  0% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.15); }
  100% { transform: translateY(-50%) scale(1); }
}

/* 发光效果 */
.game-ring-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .game-ring-container {
    width: 160px;
    height: 160px;
  }
  
  .game-ring {
    width: 160px;
    height: 160px;
  }
  
  .game-ring-center {
    width: 60px;
    height: 60px;
  }
  
  .game-ring-direction {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .game-ring-up {
    top: 15px;
  }
  
  .game-ring-down {
    bottom: 15px;
  }
  
  .game-ring-left {
    left: 15px;
  }
  
  .game-ring-right {
    right: 15px;
  }
}

@media (max-width: 480px) {
  .game-ring-container {
    width: 140px;
    height: 140px;
  }
  
  .game-ring {
    width: 140px;
    height: 140px;
    border-width: 3px;
  }
  
  .game-ring-center {
    width: 50px;
    height: 50px;
  }
  
  .game-ring-direction {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .game-ring-up {
    top: 12px;
  }
  
  .game-ring-down {
    bottom: 12px;
  }
  
  .game-ring-left {
    left: 12px;
  }
  
  .game-ring-right {
    right: 12px;
  }
}