@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Noto+Sans+TC:wght@400;700;900&display=swap');

:root {
  --sat: env(safe-area-inset-top, 20px);
  --sab: env(safe-area-inset-bottom, 15px);
}

body {
  font-family: 'Noto Sans TC', sans-serif;
  background-color: #070a13;
  color: #f3f4f6;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.title-font {
  font-family: 'Cinzel', serif;
}

/* iPhone 安全區適配 */
.safe-top-bar {
  padding-top: max(var(--sat), 16px) !important;
  height: calc(3.8rem + max(var(--sat), 16px)) !important;
}

.safe-bottom-nav {
  padding-bottom: max(var(--sab), 10px) !important;
  height: calc(4.2rem + max(var(--sab), 10px)) !important;
}

/* 稀有度光芒特效 */
.glow-ssr {
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.7);
  border-color: #eab308 !important;
}
.glow-sr {
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
  border-color: #a855f7 !important;
}
.glow-r {
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  border-color: #3b82f6 !important;
}
.glow-n {
  border-color: #64748b !important;
}

.playable-card {
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.85);
  border-color: #38bdf8 !important;
  transform: translateY(-4px);
}

/* 旋轉召喚陣 */
@keyframes spinCircle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes spinCircleReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
.anim-magic-circle {
  animation: spinCircle 10s linear infinite;
}
.anim-magic-circle-rev {
  animation: spinCircleReverse 14s linear infinite;
}

/* 戰鬥動畫 */
.anim-dash-up {
  animation: dashUp 0.35s ease-in-out;
}
@keyframes dashUp {
  0% { transform: translateY(0); }
  50% { transform: translateY(-70px) scale(1.15); }
  100% { transform: translateY(0); }
}

.anim-dash-down {
  animation: dashDown 0.35s ease-in-out;
}
@keyframes dashDown {
  0% { transform: translateY(0); }
  50% { transform: translateY(70px) scale(1.15); }
  100% { transform: translateY(0); }
}

.anim-shake {
  animation: shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* 浮動跳字 */
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  30% { opacity: 1; transform: translateY(-20px) scale(1.3); }
  100% { opacity: 0; transform: translateY(-50px) scale(1); }
}
.damage-pop {
  position: absolute;
  pointer-events: none;
  font-weight: 900;
  animation: floatUp 0.8s ease-out forwards;
  z-index: 50;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

/* 大廳吉祥物浮動呼吸 */
@keyframes floatPet {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.anim-float-pet {
  animation: floatPet 3.5s ease-in-out infinite;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
