/* ===== 賽博龐克戰鬥房間樣式 ===== */

/* 賽博龐克色彩變數 */
:root {
  --arena-primary: #ff006e;
  --arena-secondary: #00f5ff;
  --arena-accent: #bf00ff;
  --arena-warning: #ffaa00;
  --arena-success: #00ff41;
  --arena-danger: #ff0040;

  --neon-pink: #ff006e;
  --neon-cyan: #00f5ff;
  --neon-purple: #bf00ff;
  --neon-green: #00ff41;
  --neon-orange: #ffaa00;

  --arena-bg-dark: #0a0a0f;
  --arena-bg-darker: #050507;
  --arena-bg-card: rgba(15, 15, 26, 0.95);
  --arena-bg-glass: rgba(15, 15, 26, 0.85);
  --arena-bg-panel: rgba(26, 26, 46, 0.9);

  --arena-border: rgba(0, 245, 255, 0.4);
  --arena-border-bright: rgba(0, 245, 255, 0.8);
  --arena-border-active: rgba(255, 0, 110, 0.6);

  --arena-text-primary: #ffffff;
  --arena-text-secondary: #00f5ff;
  --arena-text-muted: #8b8b9a;

  --arena-glow-cyan: 0 0 20px #00f5ff, 0 0 40px #00f5ff;
  --arena-glow-pink: 0 0 20px #ff006e, 0 0 40px #ff006e;
  --arena-glow-purple: 0 0 20px #bf00ff, 0 0 40px #bf00ff;

  --arena-transition: 0.3s ease;
  --arena-transition-slow: 0.6s ease;
}

.battleroom-page .room_container {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    var(--arena-bg-darker) 0%,
    var(--arena-bg-dark) 25%,
    #1a1a2e 50%,
    #16213e 75%,
    var(--arena-bg-dark) 100%
  );
  overflow: hidden;
  font-family: "Orbitron", "JetBrains Mono", "Microsoft JhengHei", monospace;
  color: var(--arena-text-primary);
  padding: 20px;
  margin: 0;
  max-width: none;
  width: 100%;
}

/* ===== 動態背景效果 ===== */
.room_container::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 245, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 255, 0.1) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-flow 20s linear infinite;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.room_container::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 0, 110, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(0, 245, 255, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(191, 0, 255, 0.05) 0%,
      transparent 60%
    );
  animation: particle-drift 25s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes grid-flow {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(60px, 60px);
  }
}

@keyframes particle-drift {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.1) rotate(5deg);
  }
}

.room_header {
  display: flex;
  background: var(--arena-bg-panel);
  border: 2px solid var(--arena-border);
  border-radius: 0;
  clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  position: relative;
  backdrop-filter: blur(10px);
  transition: var(--arena-transition);
  z-index: 1;
}

.room_header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 245, 255, 0.05) 0%,
    transparent 50%,
    rgba(255, 0, 110, 0.05) 100%
  );
  z-index: -1;
}

.room_header:hover {
  border-color: var(--arena-border-bright);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(0, 245, 255, 0.15);
}

.round {
  font-size: 1.7rem;
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: var(--arena-bg-card);
  border: 1px solid var(--arena-border);
  clip-path: polygon(
    15px 0%,
    100% 0%,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0% 100%,
    0% 15px
  );
  margin: 10px;
  transition: var(--arena-transition);
}

.round:hover {
  border-color: var(--arena-border-bright);
  box-shadow: var(--arena-glow-cyan);
}

.round_info {
  color: var(--arena-text-secondary);
  font-size: 0.9rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.round_value {
  color: var(--arena-text-primary);
  font-size: 2rem;
  font-weight: 700;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.case_scroll_wrapper {
  position: relative;
  flex: 1;
  height: 130px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--arena-border);
  clip-path: polygon(
    15px 0%,
    100% 0%,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0% 100%,
    0% 15px
  );
  margin: 10px 5px;
  transition: var(--arena-transition);
}

.case_scroll_wrapper:hover {
  border-color: var(--arena-border-bright);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

.case_scroll_wrapper:hover .scroll_btn {
  opacity: 1;
  pointer-events: auto;
}

.scroll_btn {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--arena-secondary));
  border: none;
  border-radius: 50%;
  margin: 0px 10px;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) !important;
  cursor: pointer;
  z-index: 2;
  color: white;
  transition: var(--arena-transition);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);

  /* 預設隱藏（但仍保留佔位） */
  opacity: 0;
  pointer-events: none;
}

.scroll_btn:hover {
  background: linear-gradient(135deg, var(--arena-secondary), var(--neon-cyan));
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.8);
  transform: translateY(-50%) scale(1.1) !important;
}

/* 左右按鈕定位 */
.scroll_btn.left {
  left: 0;
}

.scroll_btn.right {
  right: 0;
}

.battleCaseContainer {
  padding-left: 30px;
  padding-right: 30px;
  height: 100%;
  display: flex;
  gap: 40px;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scroll-behavior: smooth;
}

.battleCaseContainer::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.battleCaseContainerPointer {
  position: absolute;
  left: 0px;
  width: 1px;
  height: 100%;
  z-index: 1;
  transition: transform 0.5s ease-in-out;
}

.battleCaseContainerPointer::before {
  content: "";
  position: absolute;
  transform: translateX(-50%);
  top: 0;
  width: 20px;
  height: 20px;
  background-color: rgba(255, 0, 64, 0.7);
  clip-path: polygon(0 0, 0 0, 100% 0%, 50% 100%, 50% 100%);
}

.battleCaseContainerPointer::after {
  content: "";
  position: absolute;
  transform: translateX(-50%);
  bottom: 0;
  width: 20px;
  height: 20px;
  background-color: rgba(255, 0, 64, 0.7);
  clip-path: polygon(0% 100%, 50% 0%, 50% 0%, 100% 100%, 100% 100%);
}

.caseitem {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  img {
    width: 100px;
    height: 100px;
    flex-shrink: 0; /* 不被壓縮 */
  }
}

.price_area {
  font-size: 1.7rem;
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  background: var(--arena-bg-card);
  border: 1px solid var(--arena-border);
  clip-path: polygon(
    15px 0%,
    100% 0%,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0% 100%,
    0% 15px
  );
  margin: 10px;
  transition: var(--arena-transition);
}

.price_area:hover {
  border-color: var(--arena-border-bright);
  box-shadow: var(--arena-glow-cyan);
}

.price {
  color: var(--neon-green);
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 700;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 15px rgba(0, 255, 65, 0.8);
  margin-bottom: 5px;
  white-space: nowrap;
}

.price_info {
  color: var(--arena-text-secondary);
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 3px;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.mode_info {
  color: var(--neon-orange);
  font-size: 0.7rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.button_area {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 80px;
}

.roombtu {
  padding: 12px 20px;
  background: linear-gradient(
    135deg,
    var(--arena-bg-card) 0%,
    rgba(0, 245, 255, 0.1) 100%
  );
  border: 2px solid var(--arena-border);
  color: var(--arena-text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: var(--arena-transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.roombtu::before {
  border-color: var(--arena-border-bright);
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.roombtu:hover {
  background: linear-gradient(
    135deg,
    rgba(0, 245, 255, 0.3) 0%,
    rgba(0, 245, 255, 0.2) 100%
  );
  border-color: var(--arena-border-bright);
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
  transform: translateY(-2px);
}

.roombtu:hover::before {
  left: 100%;
}

.roombtu:active {
  transform: translateY(0);
}

.room_body {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  justify-content: center;
  transition: all 0.5s ease;
  position: relative;
  z-index: 1;
}

.gacha_area {
  flex: 1;
  width: 100%;
  max-width: 500px;
  overflow: visible;
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    135deg,
    rgba(15, 20, 35, 0.95) 0%,
    rgba(25, 30, 45, 0.9) 100%
  );
  border: 2px solid rgba(100, 200, 255, 0.4);
  border-radius: 0;
  backdrop-filter: blur(10px);
  transition: var(--arena-transition);
  box-shadow:
    0 0 25px rgba(100, 200, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 16px;
  min-height: 300px;

  /* 科技感斜角邊框 */
  clip-path: polygon(
    20px 0%,
    100% 0%,
    100% calc(100% - 20px),
    calc(100% - 20px) 100%,
    0% 100%,
    0% 20px
  );
}

.gacha_area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 200, 255, 0.6),
    transparent
  );
  z-index: 1;
}

.gacha_area::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 200, 255, 0.6),
    transparent
  );
  z-index: 1;
}

.gacha_area:hover {
  border-color: rgba(100, 200, 255, 0.6);
  box-shadow:
    0 0 35px rgba(100, 200, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.joingame {
  padding: 12px 36px;
  background: rgba(255, 0, 64, 0.2);
  border-top: 1px solid var(--cyber-danger);
  border-bottom: 1px solid var(--cyber-danger);
  color: white;
  cursor: pointer;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--trans-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(
    24px 0,
    calc(100% - 24px) 0,
    100% 50%,
    calc(100% - 24px) 100%,
    24px 100%,
    0 50%
  );
}

.player {
  padding: 25px 25px 20px 25px; /* 🔧 調整padding避免內容被切掉 */
  border-radius: 0;
  height: 200px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: linear-gradient(
    135deg,
    rgba(15, 20, 35, 0.95) 0%,
    rgba(25, 30, 45, 0.9) 100%
  );
  border: 2px solid rgba(100, 200, 255, 0.4);
  z-index: 3;
  overflow: visible; /* 🔧 改為visible，防止內容被切掉 */
  position: relative;
  transition: var(--arena-transition);
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 15px rgba(100, 200, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);

  /* 科技感斜角邊框 - 調整以避免內容被切掉 */
  clip-path: polygon(
    15px 0%,
    100% 0%,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0% 100%,
    0% 15px
  );
}

.player::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 200, 255, 0.6),
    transparent
  );
  z-index: 2;
}

.player::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 200, 255, 0.6),
    transparent
  );
  z-index: 2;
}

.player:hover {
  border-color: rgba(100, 200, 255, 0.6);
  box-shadow:
    0 0 25px rgba(100, 200, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

/* .player:hover::before {
  content: '';
  position: absolute;
  left: -50%;
  bottom: -150%;
  width: 20px;
  height: 2000px;
  z-index: 1;
  background-color: #b8dff7;
  transform-origin: bottom left;
  animation: rotateBar 2s linear infinite;
}

.player:hover::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 2px;
  top: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  background: var(--bg-card);
  border-radius: 6px;
}

@keyframes rotateBar {
  0%   { transform: rotate(0deg); }
  5%   { transform: rotate(25deg); }
  90%  { transform: rotate(85deg); }
  100% { transform: rotate(360deg); }
} */

.playericon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.player:hover .playericon {
  animation: floatUpDown 2s infinite ease-in-out;
}

@keyframes floatUpDown {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

.playerinfo {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.player_name {
  margin-top: 10px;
}

.hiddencss {
  display: none !important;
}

.wheel {
  position: relative;
  height: 0px;
  transition: height 0.5s ease;
  overflow: hidden; /* 垂直動畫需要隱藏溢出 */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(
    135deg,
    rgba(15, 20, 35, 0.95) 0%,
    rgba(25, 30, 45, 0.9) 100%
  );
  border: 2px solid rgba(100, 200, 255, 0.4);
  border-radius: 0; /* 🔧 移除圓角 */
  backdrop-filter: blur(15px);
  box-shadow:
    0 0 15px rgba(100, 200, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pointer {
  --fa: rgba(255, 0, 64, 0.7);
  position: absolute;
  left: 50%;
  width: 1px;
  height: 100%;
  z-index: 1;
}

.pointer::before {
  content: "";
  position: absolute;
  transform: translateX(-50%);
  top: 0;
  width: 20px;
  height: 20px;
  background-color: var(--fa);
  clip-path: polygon(0 0, 0 0, 100% 0%, 50% 100%, 50% 100%);
}

.pointer::after {
  content: "";
  position: absolute;
  transform: translateX(-50%);
  bottom: 0;
  width: 20px;
  height: 20px;
  background-color: var(--fa);
  clip-path: polygon(0% 100%, 50% 0%, 50% 0%, 100% 100%, 100% 100%);
}

.caseanimation_inner {
  --tpx: 0px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  transform: translateX(var(--tpx));
  max-width: 100000% !important;
}

.wheelitem {
  width: 200px;
  height: 200px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  img {
    width: 110px;
    height: 110px;
    transition: scale 0.25s ease;
  }
}

.wheelitem::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(70, 130, 240, 0.5),
    transparent
  );
  pointer-events: none;
}

.weapon {
  min-height: 200px;
  padding: 10px;
  position: relative;
  align-items: flex-start;
  transition: height 0.5s ease;
  display: grid;
  justify-content: space-between;
  grid-template-columns: repeat(auto-fit, 110px);
  grid-template-rows: repeat(auto-fit, minmax(135px, auto));
  row-gap: 15px;
  column-gap: 8px;
  flex-grow: 1;
  white-space: nowrap;
  scroll-behavior: smooth;
  overflow: visible;
}

.weapon::-webkit-scrollbar {
  display: none;
}

.weapon_info {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  transition: height 0.5s ease;
  background: linear-gradient(
    135deg,
    rgba(15, 20, 35, 0.9) 0%,
    rgba(25, 30, 45, 0.8) 100%
  );
  border: 2px solid rgba(100, 200, 255, 0.3);
  border-radius: 0;
  position: relative;
  box-shadow:
    0 0 15px rgba(100, 200, 255, 0.2),
    inset 0 0 20px rgba(100, 200, 255, 0.05);

  /* 科技感斜角邊框 */
  clip-path: polygon(
    8px 0%,
    100% 0%,
    100% calc(100% - 8px),
    calc(100% - 8px) 100%,
    0% 100%,
    0% 8px
  );
}

.weapon_info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 200, 255, 0.6),
    transparent
  );
  z-index: 2;
}

.weapon_info::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 200, 255, 0.6),
    transparent
  );
  z-index: 2;
}

.weapon_image_price {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 65%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(100, 200, 255, 0.05) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
  border-bottom: 1px solid rgba(100, 200, 255, 0.2);
}

.weapon_image {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 8px rgba(100, 200, 255, 0.2));
  transition: all 0.3s ease;
}

.weapon_price {
  position: absolute;
  bottom: 5px;
  right: 5px;
  color: #00f5ff;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 6px;
  border-radius: 8px;
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
  font-family: "JetBrains Mono", monospace;
  z-index: 3;
}

.weapon_name {
  font-size: 0.7rem;
  color: #ffffff;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
  padding: 5px 8px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(15, 20, 35, 0.5) 100%
  );
  font-weight: 600;
  text-shadow: 0 0 8px rgba(100, 200, 255, 0.3);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.3px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  backdrop-filter: blur(2px);
}

.battle_resule_content {
  position: fixed;
  top: 50vh;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  height: 80vh;
  width: 75%;
  box-shadow: 0 8px 40px rgba(0, 245, 255, 0.3);
  background: var(--arena-bg-panel);
  border: 2px solid var(--arena-border);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  gap: 20px;
  z-index: 999; /* 確保在最上層 */
}

.battle_resule_header {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between; /* 左右對齊 */
  align-items: center; /* 垂直置中 */
  padding: 10px 24px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: var(--border-dim) 1px solid;
  border-radius: 8px;
  background-color: var(--bg-card);
  h2 {
    margin-bottom: 0px;
  }
}

.close_modal_btn {
  width: 35px;
  height: 35px;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--cyber-danger);
  border-radius: 50%;
  background: rgba(255, 0, 64, 0.2);
  box-shadow: none !important;
  transition: all var(--trans-normal);
  cursor: pointer;
}

.battle_resule_body {
  width: 100%;
  display: flex;
  flex-direction: column; /* 垂直排列 */
  gap: 10px;
  z-index: 1;
  flex: 1 1 0;
  overflow: hidden;
}

.wheel_area_body {
  width: 100%;
  display: flex;
  flex-direction: column; /* 垂直排列 */
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 1;
  flex: 1 1 0;
  overflow: hidden;
}

.wheel_area {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgb(255, 255, 255);
  position: relative;
}

.line {
  position: absolute;
  left: 50%;
  width: 2px;
  height: 50%;
  background-color: rgba(255, 0, 64, 0.7);
  transform-origin: bottom center;
  transform: rotate(var(--angle));
}

.wheel_player {
  position: absolute;
  top: 25%;
  width: 50%;
  height: 50%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: rotate(var(--angle));
  transform-origin: center right;
  * {
    transform: rotate(calc(-1 * var(--angle)));
  }
  img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid white;
  }
}

.winner_area {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex: 1 1 auto;
  overflow: hidden;
  padding: 1% 1%;
}

.winner {
  width: 25%;
  height: 100%;
  border: var(--border-dim) 1px solid;
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  padding: 3% 1% 3% 1%;
}

.rwinner {
  width: 25%;
}

.result_icon {
  border-radius: 50%;
  width: 150px;
  height: 150px;
}

.result_weapon {
  background: linear-gradient(
    135deg,
    rgba(15, 20, 35, 0.9) 0%,
    rgba(25, 30, 45, 0.8) 100%
  );
  border: 2px solid rgba(100, 200, 255, 0.3);
  border-radius: 12px;
  padding: 15px;
  position: relative;
  box-shadow:
    0 0 15px rgba(100, 200, 255, 0.2),
    inset 0 0 20px rgba(100, 200, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(10px);
  width: 200px;
  min-height: 200px;
}

.result_weapon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 200, 255, 0.6),
    transparent
  );
  z-index: 2;
}

.result_weapon_image {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6))
    drop-shadow(0 0 8px rgba(100, 200, 255, 0.2));
  transition: all 0.3s ease;
  margin-bottom: 10px;
}

.result_weapon_price {
  color: #00f5ff;
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: 12px;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.6);
  font-family: "JetBrains Mono", monospace;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 245, 255, 0.3);
}

.result_weapon_name {
  font-size: 0.9rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(100, 200, 255, 0.3);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.5px;
}

.battle_resule_footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between; /* 左右對齊 */
  align-items: center; /* 垂直置中 */
  padding: 10px 24px;
  background: linear-gradient(
    135deg,
    rgba(0, 245, 255, 0.1) 0%,
    transparent 100%
  );
  border-top: 1px solid var(--arena-border);
}

/* 🎯 價格領先狀態樣式 */
.player_reward {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 0; /* 🔧 移除圓角 */
  text-align: center;
  transition: all 0.3s ease;
  text-shadow: 0 0 10px currentColor;
  font-family: "JetBrains Mono", monospace;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 5; /* 🔧 提高層級，防止被切掉 */
  overflow: visible; /* 🔧 確保內容不被裁切 */
  min-width: 80px; /* 🔧 確保最小寬度 */
  margin: 4px 0; /* 🔧 添加上下邊距，防止被切掉 */
}

/* 領先狀態 - 綠色 */
.player_reward.leading {
  color: #00ff41;
  border-color: rgba(0, 255, 65, 0.5);
  background: rgba(0, 255, 65, 0.1);
  box-shadow:
    0 0 15px rgba(0, 255, 65, 0.3),
    inset 0 0 10px rgba(0, 255, 65, 0.1);
  animation: leading-pulse 2s ease-in-out infinite;
}

/* 落後狀態 - 紅色 */
.player_reward.trailing {
  color: #ff0040;
  border-color: rgba(255, 0, 64, 0.5);
  background: rgba(255, 0, 64, 0.1);
  box-shadow:
    0 0 15px rgba(255, 0, 64, 0.3),
    inset 0 0 10px rgba(255, 0, 64, 0.1);
}

/* 平手狀態 - 藍色 */
.player_reward.tied {
  color: #00f5ff;
  border-color: rgba(0, 245, 255, 0.5);
  background: rgba(0, 245, 255, 0.1);
  box-shadow:
    0 0 15px rgba(0, 245, 255, 0.3),
    inset 0 0 10px rgba(0, 245, 255, 0.1);
}

/* 領先狀態的脈衝動畫 */
@keyframes leading-pulse {
  0% {
    box-shadow:
      0 0 15px rgba(0, 255, 65, 0.3),
      inset 0 0 10px rgba(0, 255, 65, 0.1);
  }
  50% {
    box-shadow:
      0 0 25px rgba(0, 255, 65, 0.6),
      inset 0 0 15px rgba(0, 255, 65, 0.2);
  }
  100% {
    box-shadow:
      0 0 15px rgba(0, 255, 65, 0.3),
      inset 0 0 10px rgba(0, 255, 65, 0.1);
  }
}

/* ===== 新的戰鬥結果顯示樣式 ===== */

/* wheel容器中的勝負結果文字 */
.battle_result_text {
  font-family: "Orbitron", "JetBrains Mono", "Microsoft JhengHei", monospace;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px 20px;
  /* 🎨 切角效果：切掉左上角和右下角 */
  clip-path: polygon(
    15px 0%,
    100% 0%,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0% 100%,
    0% 15px
  );
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  animation: result-pulse 2s ease-in-out infinite;
  text-shadow: 0 0 10px currentColor;
  position: relative;
}

/* 勝利樣式 */
.battle_result_text.win {
  color: var(--neon-green);
  background: rgba(0, 255, 65, 0.15);
}

/* 勝利樣式的切角邊框效果 */
.battle_result_text.win::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(0, 255, 65, 0.8),
    rgba(0, 255, 65, 0.4),
    rgba(0, 255, 65, 0.8)
  );
  clip-path: polygon(
    15px 0%,
    100% 0%,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0% 100%,
    0% 15px
  );
  z-index: -1;
  opacity: 0.6;
}

/* 失敗樣式 */
.battle_result_text.loss {
  color: var(--arena-danger);
  background: rgba(255, 0, 64, 0.15);
  border-color: rgba(255, 0, 64, 0.6);
  box-shadow:
    0 0 20px rgba(255, 0, 64, 0.4),
    0 0 40px rgba(255, 0, 64, 0.2),
    inset 0 0 15px rgba(255, 0, 64, 0.1);
}

/* 失敗樣式的切角邊框效果 */
.battle_result_text.loss::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(255, 0, 64, 0.8),
    rgba(255, 0, 64, 0.4),
    rgba(255, 0, 64, 0.8)
  );
  clip-path: polygon(
    15px 0%,
    100% 0%,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    0% 100%,
    0% 15px
  );
  z-index: -1;
  opacity: 0.6;
}

/* 結果脈衝動畫 - 確保文字始終可見 */
@keyframes result-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== 最終結果視窗樣式（使用battle_resule_content） ===== */

/* 按鈕容器 */
.final_result_buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px;
}

/* 按鈕樣式 */
.final_result_btn {
  font-family: "Orbitron", "JetBrains Mono", "Microsoft JhengHei", monospace;
  font-size: 18px;
  font-weight: 600;
  padding: 18px 40px;
  border: 2px solid var(--arena-border);
  border-radius: 12px;
  background: var(--arena-bg-panel);
  color: var(--arena-text-primary);
  cursor: pointer;
  transition: all var(--arena-transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 320px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0, 245, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 按鈕懸停效果 */
.final_result_btn:hover {
  transform: translateY(-2px);
  border-color: var(--arena-border-bright);
  box-shadow:
    0 0 20px rgba(0, 245, 255, 0.4),
    inset 0 0 15px rgba(0, 245, 255, 0.1);
}

/* 回到大廳按鈕 */
.final_result_btn.back_to_lobby {
  background: linear-gradient(
    45deg,
    var(--arena-bg-panel),
    rgba(0, 245, 255, 0.1)
  );
}

.final_result_btn.back_to_lobby:hover {
  background: linear-gradient(
    45deg,
    rgba(0, 245, 255, 0.2),
    rgba(0, 245, 255, 0.1)
  );
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

/* 再次建立按鈕 */
.final_result_btn.create_again {
  background: linear-gradient(
    45deg,
    var(--arena-bg-panel),
    rgba(0, 255, 65, 0.1)
  );
  border-color: rgba(0, 255, 65, 0.6);
}

.final_result_btn.create_again:hover {
  background: linear-gradient(
    45deg,
    rgba(0, 255, 65, 0.2),
    rgba(0, 255, 65, 0.1)
  );
  border-color: rgba(0, 255, 65, 0.8);
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green);
  box-shadow:
    0 0 20px rgba(0, 255, 65, 0.4),
    inset 0 0 15px rgba(0, 255, 65, 0.1);
}

/* 按鈕點擊效果 */
.final_result_btn:active {
  transform: translateY(0);
  box-shadow:
    0 0 10px rgba(0, 245, 255, 0.3),
    inset 0 0 10px rgba(0, 245, 255, 0.2);
}

/* modal出現動畫 */
@keyframes modal-appear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 邊框光暈動畫 */
@keyframes border-glow {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 0.3;
  }
}

/* 響應式設計 */
@media (max-width: 768px) {
  .final_result_btn {
    font-size: 16px;
    min-width: 280px;
    padding: 15px 30px;
  }

  .battle_result_text {
    font-size: 20px;
    padding: 8px 16px;
  }

  .final_result_buttons {
    padding: 15px;
  }
}

/* ================================
   平手轉盤樣式
   ================================ */

/* 平手轉盤模式的容器 */
.case_scroll_wrapper.tiebreaker-mode {
  background: linear-gradient(
    135deg,
    rgba(0, 20, 40, 0.95) 0%,
    rgba(20, 40, 80, 0.98) 50%,
    rgba(40, 20, 60, 0.95) 100%
  );
  border: 2px solid rgba(0, 245, 255, 0.4);
  box-shadow:
    0 0 20px rgba(0, 245, 255, 0.3),
    inset 0 0 30px rgba(0, 245, 255, 0.1);
}

/* 平手轉盤主容器 */
.tiebreaker-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  width: 100%;
}

/* 轉盤容器 */
.tiebreaker-roulette-container {
  position: relative;
  height: 140px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(0, 245, 255, 0.2);
}

/* 轉盤指針 */
.tiebreaker-pointer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 4px;
  height: 100px;
  pointer-events: none;
}

.tiebreaker-pointer .pointer-body {
  width: 4px;
  height: 80px;
  background: linear-gradient(
    180deg,
    rgba(255, 0, 136, 0.9) 0%,
    rgba(0, 245, 255, 0.9) 100%
  );
  border-radius: 2px;
  box-shadow:
    0 0 10px rgba(0, 245, 255, 0.8),
    0 0 20px rgba(255, 0, 136, 0.6);
  animation: pointer-pulse 2s ease-in-out infinite;
}

.tiebreaker-pointer .pointer-tip {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid rgba(0, 245, 255, 0.9);
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.8));
}

@keyframes pointer-pulse {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(0, 245, 255, 0.8),
      0 0 20px rgba(255, 0, 136, 0.6);
  }
  50% {
    box-shadow:
      0 0 15px rgba(0, 245, 255, 1),
      0 0 30px rgba(255, 0, 136, 0.8);
  }
}

/* 轉盤軌道 */
.tiebreaker-track {
  display: flex;
  align-items: center;
  height: 100%;
  transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  padding: 10px 0;
}

/* 玩家卡片 */
.tiebreaker-card {
  flex-shrink: 0;
  width: 180px;
  height: 120px;
  background: linear-gradient(
    135deg,
    rgba(20, 30, 50, 0.9) 0%,
    rgba(30, 40, 70, 0.95) 50%,
    rgba(25, 35, 60, 0.9) 100%
  );
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 12px;
  margin-right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tiebreaker-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(0, 245, 255, 0.4) 0%,
    rgba(255, 0, 136, 0.3) 25%,
    rgba(191, 0, 255, 0.4) 50%,
    rgba(0, 255, 136, 0.3) 75%,
    rgba(0, 245, 255, 0.4) 100%
  );
  background-size: 400% 400%;
  animation: card-border-flow 4s ease-in-out infinite;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tiebreaker-card:hover::before {
  opacity: 1;
}

.tiebreaker-card.winner-card {
  border-color: rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.tiebreaker-card.winner-card::before {
  background: linear-gradient(
    45deg,
    rgba(255, 215, 0, 0.6) 0%,
    rgba(255, 165, 0, 0.5) 50%,
    rgba(255, 215, 0, 0.6) 100%
  );
  opacity: 0.8;
}

@keyframes card-border-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 玩家頭像容器 */
.player-avatar-container {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 8px;
}

.player-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(0, 245, 255, 0.5);
  object-fit: cover;
  transition: all 0.3s ease;
}

.avatar-glow {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: rgba(0, 245, 255, 0.2);
  filter: blur(8px);
  z-index: -1;
  animation: avatar-glow-rotate 4s linear infinite;
}

@keyframes avatar-glow-rotate {
  0% {
    transform: rotate(0deg);
    filter: blur(8px) hue-rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
    filter: blur(8px) hue-rotate(360deg);
  }
}

/* 玩家信息 */
.player-info {
  text-align: center;
  width: 100%;
}

.player-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-name {
  font-size: 0.7rem;
  color: var(--neon-cyan);
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.6);
}

/* 結果彈窗 */
.tiebreaker-result-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.result-modal-content {
  background: linear-gradient(
    135deg,
    rgba(20, 30, 50, 0.95) 0%,
    rgba(30, 40, 70, 0.98) 50%,
    rgba(25, 35, 60, 0.95) 100%
  );
  border: 2px solid rgba(0, 245, 255, 0.4);
  border-radius: 16px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow:
    0 0 30px rgba(0, 245, 255, 0.3),
    inset 0 0 50px rgba(0, 245, 255, 0.1);
  animation: modal-slide-up 0.4s ease;
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-header h2 {
  color: var(--neon-cyan);
  text-align: center;
  margin: 0 0 20px 0;
  font-family: "Orbitron", monospace;
  text-shadow: 0 0 15px rgba(0, 245, 255, 0.8);
}

.winner-display {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.winner-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.6);
  object-fit: cover;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.winner-info h3 {
  color: #ffffff;
  margin: 0 0 8px 0;
  font-size: 1.3rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.winner-info .team-name {
  color: var(--neon-cyan);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.winner-info .result-text {
  color: rgba(255, 215, 0, 0.9);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.fairness-info {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid rgba(0, 245, 255, 0.2);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--arena-text-secondary);
  margin-bottom: 20px;
}

.fairness-info p {
  margin: 8px 0;
}

.fairness-info strong {
  color: var(--neon-cyan);
}

.result-footer {
  text-align: center;
}

.close-result-btn {
  background: linear-gradient(135deg, var(--neon-cyan), var(--arena-secondary));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
}

.close-result-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 245, 255, 0.6);
}

/* 響應式設計 */
@media (max-width: 768px) {
  .tiebreaker-card {
    width: 150px;
    height: 100px;
    padding: 8px;
  }

  .player-avatar-container {
    width: 50px;
    height: 50px;
  }

  .player-name {
    font-size: 0.8rem;
  }

  .team-name {
    font-size: 0.65rem;
  }

  .result-modal-content {
    padding: 20px;
  }

  .winner-display {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .winner-avatar {
    width: 70px;
    height: 70px;
  }
}

/* 機器人卡片特殊樣式 */
.tiebreaker-card.robot-card {
  border-color: rgba(255, 165, 0, 0.6);
  background: linear-gradient(
    135deg,
    rgba(40, 30, 20, 0.9) 0%,
    rgba(50, 40, 30, 0.95) 50%,
    rgba(45, 35, 25, 0.9) 100%
  );
}

.tiebreaker-card.robot-card::before {
  background: linear-gradient(
    45deg,
    rgba(255, 165, 0, 0.4) 0%,
    rgba(255, 140, 0, 0.3) 25%,
    rgba(255, 165, 0, 0.4) 50%,
    rgba(255, 140, 0, 0.3) 75%,
    rgba(255, 165, 0, 0.4) 100%
  );
  opacity: 0.6;
}

/* 機器人指示器 */
.robot-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 24px;
  height: 24px;
  background: rgba(255, 165, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid rgba(255, 165, 0, 0.8);
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.6);
  z-index: 5;
}

/* 玩家類型標籤 */
.player-type {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.robot-card .player-type {
  color: rgba(255, 165, 0, 0.9);
  border-color: rgba(255, 165, 0, 0.3);
  background: rgba(255, 165, 0, 0.1);
}

/* 機器人頭像特殊效果 */
.robot-card .player-avatar {
  border-color: rgba(255, 165, 0, 0.6);
}

.robot-card .avatar-glow {
  background: rgba(255, 165, 0, 0.2);
  animation: robot-glow-rotate 3s linear infinite;
}

@keyframes robot-glow-rotate {
  0% {
    transform: rotate(0deg);
    filter: blur(8px) hue-rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
    filter: blur(8px) hue-rotate(60deg);
  }
}

/* 🎯 平手動畫樣式 - 基於一般開箱動畫系統 */

/* 平手動畫容器樣式 */
.tiebreaker-animation-container {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(5, 10, 20, 0.95) 0%,
    rgba(15, 25, 40, 0.9) 25%,
    rgba(10, 20, 35, 0.95) 50%,
    rgba(20, 30, 50, 0.9) 75%,
    rgba(8, 15, 28, 0.95) 100%
  );
  overflow: hidden;
}

/* 平手模式樣式調整 */
.tiebreaker-mode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(10, 15, 25, 0.8) 0%,
    rgba(20, 25, 35, 0.9) 50%,
    rgba(15, 20, 30, 0.8) 100%
  );
}

/* 平手動畫 - 賽博龐克動畫效果 */
@keyframes cyber-pointer-pulse {
  0%,
  100% {
    opacity: 0.8;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.6));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(0, 245, 255, 0.8));
  }
}

@keyframes cyberGrid {
  0% {
    background-position: 0 0;
    opacity: 0.4;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    background-position: 30px 30px;
    opacity: 0.4;
  }
}

@keyframes cyberScan {
  0% {
    left: -100%;
    opacity: 0;
  }
  20% {
    opacity: 0.5;
  }
  80% {
    opacity: 0.5;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

@keyframes borderGlow {
  0%,
  100% {
    background-position: 0% 50%;
    opacity: 0.3;
  }
  25% {
    background-position: 100% 50%;
    opacity: 0.5;
  }
  50% {
    background-position: 200% 50%;
    opacity: 0.4;
  }
  75% {
    background-position: 300% 50%;
    opacity: 0.5;
  }
}

/* 平手動畫浮動粒子效果 */
@keyframes floatParticle {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.4;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-10px) translateX(-15px);
    opacity: 0.6;
  }
  75% {
    transform: translateY(-30px) translateX(5px);
    opacity: 0.9;
  }
}

/* 平手結果彈窗樣式 */
.tiebreaker-result-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.result-modal-content {
  background: linear-gradient(
    135deg,
    rgba(15, 20, 35, 0.95) 0%,
    rgba(25, 30, 45, 0.9) 100%
  );
  border: 2px solid rgba(255, 215, 0, 0.6);
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.3),
    inset 0 0 30px rgba(255, 215, 0, 0.05);
  animation: slideInScale 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.result-header h2 {
  color: #ffd700;
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.winner-display {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  gap: 20px;
}

.winner-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.8);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.winner-info h3 {
  color: #ffd700;
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  margin: 0 0 5px 0;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.team-name {
  color: #ffa500;
  font-size: 14px;
  margin-bottom: 5px;
}

.result-text {
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

.fairness-info {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.fairness-info p {
  color: #ccc;
  font-size: 12px;
  margin: 5px 0;
  font-family: "JetBrains Mono", monospace;
}

.close-result-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.2) 0%,
    rgba(255, 165, 0, 0.3) 100%
  );
  border: 2px solid rgba(255, 215, 0, 0.6);
  color: #ffd700;
  padding: 12px 30px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.close-result-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.3) 0%,
    rgba(255, 165, 0, 0.4) 100%
  );
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  transform: translateY(-2px);
}

/* 動畫關鍵幀 */
@keyframes slideInScale {
  0% {
    transform: scale(0.8) translateY(-20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* 響應式設計 */
@media (max-width: 768px) {
  .tiebreaker-animation-container {
    height: 150px;
    margin: 10px 0;
  }

  .result-modal-content {
    padding: 20px;
    margin: 20px;
  }

  .winner-display {
    flex-direction: column;
    gap: 10px;
  }

  .winner-avatar {
    width: 60px;
    height: 60px;
  }
}

/* 🎯 整合一般開箱動畫的樣式類 */
.new-case-track-container {
  /* 基礎樣式在 TieBreakerAnimation 類中通過 style.cssText 設置 */
}

.new-case-track {
  /* 基礎樣式在 TieBreakerAnimation 類中通過 style.cssText 設置 */
}

.new-case-card {
  /* 基礎樣式在 TieBreakerAnimation 類中通過 style.cssText 設置 */
}

.new-case-pointer {
  /* 基礎樣式在 TieBreakerAnimation 類中通過 style.cssText 設置 */
}
