[x-cloak] { display: none !important; }
::-webkit-scrollbar { display: none; }
html, body { scroll-behavior: smooth; background-color: #f3f4f6; }
.pb-safe { padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }

@keyframes tool-fade-in {
  from { opacity: 0; transform: translateY(4px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-fade-in { animation: tool-fade-in .22s ease-out both; }

.game-icon-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
  background: #fff;
  cursor: pointer;
  transition: all .2s;
}
.game-icon-box:active { transform: scale(.95); background: #f9fafb; }

.card-container { perspective: 1000px; width: 80px; height: 110px; cursor: pointer; }
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform .6s;
  transform-style: preserve-3d;
}
.card-flipped .card-inner { transform: rotateY(180deg); }
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-front { background: linear-gradient(135deg, #6366f1, #8b5cf6); border: 2px solid #fff; }
.card-back { background: #fff; border: 2px solid #f59e0b; transform: rotateY(180deg); flex-direction: column; }

.wheel-container {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(from -60deg, #ef4444 0 120deg, #3b82f6 120deg 240deg, #10b981 240deg 360deg);
  border: 4px solid #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,.15);
  transition: transform 3s cubic-bezier(.25,.1,.25,1);
  position: relative;
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #f59e0b;
  z-index: 30;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.3));
}

.tool-ball {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  color: #333;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  transition: transform .1s;
}
.tool-ball:active { transform: scale(.9); }
.tool-ball-red { background-image: url("../../img/hong.png"); }
.tool-ball-blue { background-image: url("../../img/lan.png"); }
.tool-ball-green { background-image: url("../../img/lv.png"); }
.tool-ball-gray { background-image: url("../../img/hui.png"); }

.filter-btn {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background-color: #fff;
  color: #4b5563;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.filter-btn.active {
  background-color: #10b981;
  border-color: #10b981;
  color: #fff;
  font-weight: 700;
}
