/* 乙的樣式。所有 class 用 c- 開頭，避免跟別人撞名。 */
.c-label { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center;
  white-space: nowrap; text-shadow: 0 1px 3px #000; pointer-events: none; }
.c-name { font-size: 14px; font-weight: 800; }
.c-bar { width: 110px; height: 8px; margin: 3px auto; border-radius: 4px; background: rgba(0, 0, 0, .5); overflow: hidden; }
.c-fill { height: 100%; background: #6fe37a; transition: width .15s; }
.c-tags { display: flex; gap: 4px; font-size: 12px; font-weight: 700; }
.c-tag { padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, .45); }
.c-tag-weak { color: #ffe27a; }
.c-tag-resist { color: #b9c2d6; }
.c-why { display: none; margin-top: 3px; padding: 2px 8px; border-radius: 8px; font-size: 12px; background: rgba(0, 0, 0, .5); }
.c-label.c-focus .c-why { display: block; }
/* 手上的武器打這隻有效：弱點標籤亮綠色、會跳；會被擋：抵抗標籤亮紅色 */
.c-label.c-good .c-tag-weak { color: #10240f; background: #7dff8a; text-shadow: none; animation: c-throb .8s ease-in-out infinite; }
.c-label.c-good .c-tag-weak::after { content: ' ✔'; }
.c-label.c-bad .c-tag-resist { color: #fff; background: #e5484d; text-shadow: none; }
.c-label.c-bad .c-tag-resist::after { content: ' ✖'; }
@keyframes c-throb { 50% { transform: scale(1.12); } }
.c-dmg { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center;
  font-size: 26px; font-weight: 900; color: #fff; line-height: 1.05; white-space: nowrap; pointer-events: none;
  text-shadow: 0 2px 4px #000, 0 0 2px #000; animation: c-float 1.1s ease-out forwards; }
.c-dmg b { font-weight: 900; }
@keyframes c-float { 0% { transform: translate(-50%, -50%) scale(.6); } 12% { transform: translate(-50%, -60%) scale(1.15); }
  25% { transform: translate(-50%, -70%) scale(1); } 100% { transform: translate(-50%, -170%); opacity: 0; } }
/* 弱點：大、金色、彈出來 */
.c-dmg.c-weak { color: #ffd23f; animation: c-pop 1.1s ease-out forwards; }
.c-dmg.c-weak b { font-size: 46px; color: #fff3b0; text-shadow: 0 0 12px #ff9d00, 0 3px 4px #000; letter-spacing: 2px; }
.c-dmg.c-weak span { font-size: 34px; }
@keyframes c-pop { 0% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } 10% { transform: translate(-50%, -50%) scale(.9); opacity: 1; }
  18% { transform: translate(-50%, -55%) scale(1.1); } 30% { transform: translate(-50%, -60%) scale(1); }
  100% { transform: translate(-50%, -150%); opacity: 0; } }
/* 被擋住：小、灰色、左右彈一下 */
.c-dmg.c-resist { color: #b9c2d6; font-size: 16px; animation: c-bounce 1.1s ease-out forwards; }
.c-dmg.c-resist b { font-size: 20px; color: #d8dee9; }
@keyframes c-bounce { 0% { transform: translate(-50%, -50%) rotate(0); } 8% { transform: translate(-30%, -60%) rotate(8deg); }
  16% { transform: translate(-70%, -65%) rotate(-8deg); } 24% { transform: translate(-45%, -70%) rotate(3deg); }
  32% { transform: translate(-50%, -72%) rotate(0); } 100% { transform: translate(-50%, -130%); opacity: 0; } }
.c-dmg.c-miss { color: #cfd6e4; font-size: 18px; }
/* 畫面上方的提示 */
.c-tip { position: absolute; left: 50%; top: 96px; transform: translate(-50%, -10px); max-width: 80vw; padding: 10px 20px;
  border-radius: 14px; background: rgba(12, 16, 30, .82); border: 2px solid #ffd23f; text-align: center; font-size: 18px;
  font-weight: 800; line-height: 1.4; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.c-tip b { color: #ffd23f; }
.c-tip small { font-size: 15px; color: #ffe27a; }
.c-tip.c-tip-show { opacity: 1; transform: translate(-50%, 0); }
/* 勝利、失敗畫面 */
.c-end { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px;
  background: rgba(8, 10, 20, .72); pointer-events: auto; animation: c-fade .5s ease-out; }
.c-end h1 { margin: 0; font-size: 56px; text-shadow: 0 4px 12px #000; }
.c-won h1 { color: #ffd23f; }
.c-lost h1 { color: #ff8a8a; }
.c-stats { display: grid; gap: 6px; min-width: 260px; font-size: 18px; }
.c-stats p { margin: 0 0 4px; font-size: 15px; opacity: .85; }
.c-row { display: flex; justify-content: space-between; gap: 24px; padding: 6px 14px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.c-row b { color: #ffe27a; }
.c-end button { font: inherit; font-size: 20px; font-weight: 800; padding: 12px 28px; border: 0;
  border-radius: 12px; background: #ffd23f; color: #1b1b1b; cursor: pointer; }
.c-key { font-size: 13px; opacity: .7; }
@keyframes c-fade { from { opacity: 0; } }
