/* ===== 賽博龐克風格變數定義 ===== */
:root {
    /* 賽博龐克主色調 */
    --cyber-primary: #ff006e;
    --cyber-secondary: #00f5ff;
    --cyber-accent: #ff10f0;
    --cyber-warning: #ffaa00;
    --cyber-success: #00ff41;
    --cyber-danger: #ff0040;
  
    /* 霓虹發光色 */
    --neon-pink: #ff006e;
    --neon-blue: #00f5ff;
    --neon-purple: #bf00ff;
    --neon-green: #00ff41;
    --neon-yellow: #ffde00;
  
    /* 背景色 */
    --bg-dark: #0a0a0f;
    --bg-darker: #050507;
    --bg-card: #0f0f1a;
    --bg-hover: #1a1a2e;
    --bg-glass: rgba(15, 15, 26, 0.85);
  
    /* 邊框和線條 */
    --border-neon: #00f5ff;
    --border-dim: rgba(0, 245, 255, 0.2);
    --grid-color: rgba(0, 245, 255, 0.1);
  
    /* 文字色彩 */
    --text-primary: #ffffff;
    --text-secondary: #00f5ff;
    --text-muted: #8b8b9a;
  
    /* 發光效果 */
    --glow-pink: 0 0 20px #ff006e, 0 0 40px #ff006e, 0 0 60px #ff006e;
    --glow-blue: 0 0 20px #00f5ff, 0 0 40px #00f5ff, 0 0 60px #00f5ff;
    --glow-purple: 0 0 20px #bf00ff, 0 0 40px #bf00ff, 0 0 60px #bf00ff;
    --glow-small: 0 0 10px currentColor;
    --glow-medium: 0 0 20px currentColor;
    --glow-large: 0 0 30px currentColor;
  
    /* 動畫時間 */
    --trans-fast: 0.2s ease;
    --trans-normal: 0.3s ease;
    --trans-slow: 0.5s ease;
  
    /* 稀有度顏色（保持原有） */
    --rarity-common: #b0c3d9;
    --rarity-rare: #4b69ff;
    --rarity-legendary: #d32ce6;
    --rarity-mythical: #eb4b4b;
  }
  
  /* ===== 全局樣式 ===== */
  * {
    box-sizing: border-box;
  }
  
  /* 桌面版保留正常滾動條 */
  
  body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
  }
  
  /* 手機版隱藏滾動條 */
  @media (max-width: 1270px) {
    body {
      height: 100vh;
      /* 固定高度為視口高度 */
      overflow-y: auto;
      /* 允許頁面級別的卷軸，但只有一個 */
      overflow-x: hidden;
      /* 防止水平卷軸 */
    }
  
    /* 手機版隱藏所有滾動條但保持滾動功能，但交換頁面的網格容器需要顯示滾動條 */
    * {
      -ms-overflow-style: none;
      /* IE and Edge */
      scrollbar-width: none;
      /* Firefox */
    }
  
    *::-webkit-scrollbar {
      display: none;
      /* Chrome, Safari, Opera */
    }
  
    .upgrade-items-grid {
      -ms-overflow-style: auto !important;
      /* IE and Edge */
      scrollbar-width: thin !important;
      /* Firefox */
    }
  
    .upgrade-items-grid::-webkit-scrollbar {
      display: block !important;
      /* Chrome, Safari, Opera */
      width: 8px !important;
    }
  
    .upgrade-items-grid::-webkit-scrollbar-track {
      background: var(--bg-dark) !important;
      border-radius: 4px !important;
    }
  
    .upgrade-items-grid::-webkit-scrollbar-thumb {
      background: var(--border-neon) !important;
      border-radius: 4px !important;
      border: 1px solid var(--bg-dark) !important;
    }
  
    .upgrade-items-grid::-webkit-scrollbar-thumb:hover {
      background: var(--neon-blue) !important;
    }
  }
  
  /* 賽博龐克背景效果 */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
      radial-gradient(ellipse at top, rgba(191, 0, 255, 0.1) 0%, transparent 50%),
      radial-gradient(
        ellipse at bottom,
        rgba(0, 245, 255, 0.1) 0%,
        transparent 50%
      );
    pointer-events: none;
    z-index: 0;
  }
  
  /* 網格背景 */
  body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
      linear-gradient(var(--grid-color) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: -1px -1px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    animation: grid-move 10s linear infinite;
  }
  
  @keyframes grid-move {
    0% {
      transform: translate(0, 0);
    }
  
    100% {
      transform: translate(50px, 50px);
    }
  }
  
  /* ===== 主容器 ===== */
  .exchange-main {
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 0px 20px;
    position: relative;
    z-index: 1;
  }
  
  .exchange-game-container::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
      45deg,
      var(--neon-pink),
      var(--neon-blue),
      var(--neon-purple)
    );
    z-index: -1;
    opacity: 0.5;
    filter: blur(10px);
    clip-path: inherit;
  }
  
  .exchange-left-column {
    order: -1;
  }
  
  .exchange-right-column {
    order: 1;
    justify-self: end;
    align-items: flex-end;
  }
  
  /* ===== 側邊面板（左右展示區） ===== */
  .exchange-side-panel {
    background: var(--bg-card);
    border: 2px solid var(--border-dim);
    padding: 20px;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 320px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
  }
  
  .exchange-side-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
      90deg,
      transparent,
      var(--neon-blue),
      transparent
    );
    animation: scan-line 3s linear infinite;
  }
  
  @keyframes scan-line {
    0% {
      transform: translateX(-100%);
    }
  
    100% {
      transform: translateX(100%);
    }
  }
  
  .exchange-side-panel:hover {
    border-color: var(--border-neon);
    box-shadow:
      inset 0 0 20px rgba(0, 245, 255, 0.1),
      0 0 20px rgba(0, 245, 255, 0.2);
  }
  
  .exchange-hexagon-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    position: relative;
    padding-left: 20px;
  }
  
  .exchange-hexagon-title::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--neon-pink);
    animation: blink 1s infinite;
  }
  
  @keyframes blink {
    0%,
    50% {
      opacity: 1;
    }
  
    51%,
    100% {
      opacity: 0;
    }
  }
  
  /* ===== 選中物品展示 ===== */
  .exchange-selected-item-wrapper {
    min-height: 250px;
    border: 1px dashed var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(0, 245, 255, 0.03) 10px,
      rgba(0, 245, 255, 0.03) 20px
    );
    flex: 1;
    overflow: hidden;
  }
  
  /* 選中物品容器 - 固定大小 */
  .exchange-selected-items-container {
    position: relative;
    width: 100%;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
  }
  
  /* 選中物品樣式調整 */
  .exchange-selected-item {
    padding: 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border-neon);
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 90%;
  }
  
  .exchange-selected-item-image-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  .exchange-selected-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .exchange-empty-state {
    text-align: center;
    opacity: 0.7;
  }
  
  .exchange-empty-icon-img {
    width: 100px;
    height: 100px;
    opacity: 0.3;
    filter: hue-rotate(180deg) brightness(1.5);
  }
  
  .exchange-empty-state p {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 0.9rem;
  }
  
  /* ===== 價格顯示 ===== */
  .exchange-price-display {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    padding: 15px;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 15px;
  }
  
  .exchange-price-display::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    animation: price-scan 2s linear infinite;
  }
  
  @keyframes price-scan {
    0% {
      transform: translateX(-100%);
    }
  
    100% {
      transform: translateX(100%);
    }
  }
  
  .exchange-price-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 5px;
  }
  
  .exchange-price-value {
    font-size: 1.5rem;
    font-weight: 700;
  }
  
  .exchange-left-price .exchange-price-value {
    color: var(--cyber-danger);
    text-shadow: var(--glow-small);
  }
  
  .exchange-right-price .exchange-price-value {
    color: var(--cyber-success);
    text-shadow: var(--glow-small);
  }
  
  /* 移除錯誤的section-header樣式 - 正確版本在下面定義 */
  
  .exchange-search-box {
    position: relative;
    display: flex;
    align-items: center;
  }
  
  .exchange-search-box i {
    position: absolute;
    left: 20px;
    color: var(--text-muted);
    font-size: 14px;
    width: 14px;
    height: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
  }
  
  .exchange-search-box input {
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    background: rgba(10, 10, 32, 0.7);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-family: var(--font-main);
    width: 180px;
    transition: all 0.3s ease;
  }
  
  .exchange-search-box input:focus {
    outline: none;
    border-color: var(--mystic-accent);
    box-shadow: 0 0 10px rgba(111, 0, 255, 0.3);
    width: 220px;
  }
  
  .exchange-filter-dropdown select {
    padding: 0.6rem 1rem;
    background: rgba(10, 10, 32, 0.7);
    border: 1px solid var(--border-soft);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .exchange-filter-dropdown select:focus {
    outline: none;
    border-color: var(--mystic-accent);
    box-shadow: 0 0 10px rgba(111, 0, 255, 0.3);
  }
  
  /* 物品卡片樣式 */
  .exchange-inventory-item,
  .exchange-target-item,
  .item-card {
    position: relative;
    background: linear-gradient(
      135deg,
      rgba(20, 23, 46, 0.8),
      rgba(10, 10, 32, 0.6)
    );
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(111, 0, 255, 0.1);
    min-height: 220px;
    /* 設置小卡的最小高度 */
    min-width: 150px;
    /* 設置小卡的最小寬度 */
    height: auto;
    /* 允許高度自適應 */
    width: 23%;
    display: flex;
    flex-direction: column;
  }
  
  .exchange-inventory-item::before,
  .exchange-target-item::before {
    content: none;
  }
  
  /* 為卡片添加plus-icon */
  .inventory-item .plus-icon,
  .target-item .plus-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    background-image: url("../../../../assets/images/plus-icon.svg");
    /* 修正路徑 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 20;
    /* 提高z-index值 */
    opacity: 0;
    transform-origin: center center;
    pointer-events: none;
    will-change: transform;
    transition: opacity 0.2s ease;
  }
  
  /* 在懸停和選中時顯示plus-icon */
  .exchange-inventory-item:hover .plus-icon,
  .exchange-target-item:hover .plus-icon,
  .exchange-inventory-item.selected .plus-icon,
  .exchange-target-item.selected .plus-icon {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }
  
  /* 定義正向旋轉動畫（選中時），不移動位置，只旋轉 */
  @keyframes rotate-icon {
    0% {
      transform: translate(-50%, -50%) rotate(0deg);
    }
  
    100% {
      transform: translate(-50%, -50%) rotate(765deg);
    }
  }
  
  /* 定義反向旋轉動畫（取消選中時），不移動位置，只旋轉 */
  @keyframes rotate-icon-reverse {
    0% {
      transform: translate(-50%, -50%) rotate(765deg);
    }
  
    100% {
      transform: translate(-50%, -50%) rotate(0deg);
    }
  }
  
  /* 選中時應用正向旋轉動畫 */
  .exchange-inventory-item.selected .plus-icon,
  .exchange-target-item.selected .plus-icon {
    opacity: 1;
    animation: rotate-icon 0.5s linear forwards !important;
    animation-delay: 0s;
    animation-fill-mode: forwards;
  }
  
  /* 取消選中時應用反向旋轉動畫 */
  .rotate-to-plus .plus-icon {
    opacity: 1;
    animation: rotate-icon-reverse 0.5s linear forwards !important;
    animation-delay: 0s;
    animation-fill-mode: forwards;
  }
  
  /* 確保選中項目的遮罩一直顯示 */
  .exchange-inventory-item.selected .mask,
  .exchange-target-item.selected .mask {
    display: block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
  }
  
  /* 清理不再需要的樣式 */
  .plus-h,
  .plus-v {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  
  .rotate-to-x .plus-h,
  .rotate-to-x .plus-v,
  .rotate-to-plus .plus-h,
  .rotate-to-plus .plus-v {
    animation: none !important;
  }
  
  /* 選中的卡片效果 */
  .exchange-inventory-item.selected,
  .exchange-target-item.selected {
    border: 2px solid var(--mystic-accent);
    box-shadow: 0 0 20px rgba(111, 0, 255, 0.4);
  }
  
  /* 懸停時顯示遮罩 */
  .exchange-inventory-item:hover .mask,
  .exchange-target-item:hover .mask {
    display: block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
  }
  
  /* 遮罩的樣式設定 */
  .mask {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    z-index: 3;
    border-radius: 0.75rem;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  
  /* 調整plus-icon的大小，使用較小的尺寸 */
  .inventory-item .plus-icon,
  .target-item .plus-icon {
    width: 24px;
    height: 24px;
  }
  
  /* 選中狀態下的十字線旋轉45度 */
  .inventory-item.selected .plus-h,
  .target-item.selected .plus-h,
  .inventory-item.selected .plus-v,
  .target-item.selected .plus-v {
    transform: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  
  /* 移除舊的旋轉動畫 */
  .rotate-to-x .plus-h,
  .rotate-to-x .plus-v,
  .rotate-to-plus .plus-h,
  .rotate-to-plus .plus-v {
    animation: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  
  /* 為圖標添加明顯的視覺標記，以便觀察旋轉 */
  .inventory-item:hover::before,
  .target-item:hover::before,
  .inventory-item.selected::before,
  .target-item.selected::before {
    content: none;
  }
  
  /* 移除懸停時的上升效果 */
  .inventory-item:hover,
  .target-item:hover {
    z-index: 2;
  }
  
  /* 移除所有按下效果 */
  .inventory-item:active,
  .target-item:active {
    transform: none !important;
    box-shadow: none !important;
  }
  
  .item-image-container {
    width: 100%;
    height: 120px;
    min-height: 120px;
    /* 確保最小高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.25rem;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    /* 防止圖片容器被壓縮 */
  }
  
  .item-image,
  .selected-item-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* 確保圖片比例正確且完整顯示 */
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
    /* 防止圖片被點擊和拖曳 */
  }
  
  /* 物品數量標籤樣式 */
  .item-quantity {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  }
  
  .item-rarity-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--rarity-common);
  }
  
  /* 為不同稀有度的物品設置不同的指示器顏色 */
  .common .item-rarity-indicator {
    background: var(--rarity-common);
  }
  
  .rare .item-rarity-indicator {
    background: var(--rarity-rare);
  }
  
  .legendary .item-rarity-indicator {
    background: var(--rarity-legendary);
  }
  
  .mythical .item-rarity-indicator {
    background: var(--rarity-mythical);
  }
  
  /* 確保物品資訊區域佔用剩餘空間 */
  .item-details,
  .item-info {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-top: auto;
    width: 100%;
    min-height: 70px;
    /* 確保資訊區域有最小高度 */
  }
  
  .item-name,
  .item-name-text {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
    font-size: 0.9rem;
    /* 控制字體大小 */
  }
  
  .item-wear,
  .item-wear-text {
    font-size: 11px;
    color: #888888;
    margin-bottom: 3px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
  }
  
  .item-price,
  .item-price-text {
    position: static;
    top: auto;
    right: auto;
    background: rgba(0, 0, 0, 0.4);
    color: #1e88e5;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 5px;
    display: inline-block;
    width: auto;
    /* 使寬度適應內容 */
    min-width: 50px;
    /* 最小寬度 */
  }
  
  /* 稀有度顏色 */
  .item-common .item-name {
    color: var(--rarity-common);
  }
  
  .item-rare .item-name {
    color: var(--rarity-rare);
  }
  
  .item-legendary .item-name {
    color: var(--rarity-legendary);
  }
  
  .item-mythical .item-name {
    color: var(--rarity-mythical);
  }
  
  /* 加載與空狀態 */
  .loading,
  .empty-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
    grid-column: 1 / -1;
    height: 100%;
    /* 確保填滿整個container */
    min-height: 300px;
    /* 最小高度 */
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(111, 0, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--mystic-accent);
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* 通知容器 */
  .notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
  }
  
  .notification {
    background: rgba(10, 10, 32, 0.9);
    backdrop-filter: blur(5px);
    border-left: 4px solid var(--mystic-accent);
    box-shadow: var(--glow-medium);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    transform: translateX(150%);
    animation: slide-in 0.3s forwards;
  }
  
  @keyframes slide-in {
    to {
      transform: translateX(0);
    }
  }
  
  .selected-item-price {
    position: static;
    background: rgba(0, 0, 0, 0.4);
    color: #1e88e5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 5px;
  }
  
  /* 選中的物品移除按鈕樣式 */
  .selected-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(40, 20, 80, 0.8);
    color: rgba(210, 190, 255, 1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 10;
    clip-path: polygon(
      30% 0%,
      70% 0%,
      100% 30%,
      100% 70%,
      70% 100%,
      30% 100%,
      0% 70%,
      0% 30%
    );
    box-shadow:
      0 0 10px rgba(180, 160, 255, 0.6),
      0 0 20px rgba(120, 100, 220, 0.3);
  }
  
  .selected-item .remove-btn:hover {
    background-color: rgba(60, 30, 120, 0.9);
    color: rgba(230, 210, 255, 1);
    transform: scale(1.1);
    box-shadow:
      0 0 15px rgba(180, 160, 255, 0.8),
      0 0 30px rgba(120, 100, 220, 0.5);
    animation: mystic-glow 1.5s infinite alternate;
  }
  
  .selected-item .remove-btn:hover {
    animation: mystic-glow 1.5s infinite ease-in-out;
  }
  
  .remove-item-btn {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    background: rgba(80, 80, 80, 0.986) !important;
    background-image: none !important;
    background-color: rgb(80, 80, 80) !important;
    color: rgba(255, 255, 255, 0.534) !important;
    border: none !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 3px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center;
  }
  
  /* 確保移除按鈕中的圖標居中 */
  .remove-item-btn i {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    top: 1px !important;
    /* 微調向下移動1像素 */
    left: 0 !important;
    transform: none !important;
    text-align: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
  }
  
  /* 移除懸浮效果 */
  .remove-item-btn:hover,
  .remove-item-btn:focus,
  .remove-item-btn:active {
    background: rgba(80, 80, 80, 0.8) !important;
    background-image: none !important;
    background-color: rgba(80, 80, 80, 0.8) !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
    animation: none !important;
  }
  
  .fa-sort-down:before {
    content: "\f0dd";
    position: relative;
    top: -2px;
    transform: translateY(0);
  }
  
  .fa-sort-up:before {
    content: "\f0de";
    position: relative;
    top: 2px;
    transform: translateY(0);
  }
  
  /* 增強發光脈動動畫 */
  @keyframes mystic-glow {
    0% {
      box-shadow:
        0 0 10px rgba(180, 160, 255, 0.6),
        0 0 20px rgba(120, 100, 220, 0.3);
    }
  
    100% {
      box-shadow:
        0 0 15px rgba(180, 160, 255, 0.8),
        0 0 30px rgba(120, 100, 220, 0.5),
        0 0 45px rgba(100, 80, 200, 0.3);
    }
  }
  
  /* 水平線的樣式 */
  .plus-h {
    width: 24px;
    height: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  /* 垂直線的樣式 */
  .plus-v {
    width: 4px;
    height: 24px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  /* 頁碼指示器 */
  .page-indicator {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0 10px;
  }
  
  /* 徹底移除懸浮效果 */
  .page-nav-btn:hover,
  .page-nav-btn:hover:not(:disabled),
  .page-nav-btn:focus,
  .page-nav-btn:active {
    background: rgba(111, 0, 255, 0.2) !important;
    /* 與正常狀態保持一致 */
    border: 1px solid rgba(111, 0, 255, 0.3) !important;
    color: var(--text-primary) !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    text-decoration: none !important;
    filter: none !important;
  }
  
  /* 調整禁用按鈕樣式 */
  .page-nav-btn:disabled {
    opacity: 0.3;
    /* 降低透明度使其看起來被禁用 */
    cursor: default !important;
    /* 使用默認鼠標而非not-allowed */
    color: rgba(255, 255, 255, 0.5);
    /* 淡化文字色彩 */
    border-color: rgba(111, 0, 255, 0.15);
    /* 淡化邊框 */
    background: rgba(111, 0, 255, 0.1);
    /* 淡化背景 */
  }
  
  /* 移除標記點樣式 */
  .path-start-marker,
  .path-end-marker {
    display: none;
    /* 完全不顯示標記點 */
  }
  
  .price-sort-btn:hover {
    background-color: #2a2e35;
    border-color: #4a90e2;
  }
  
  /* 新的價格排序按鈕樣式 - 使用!important強制覆蓋 */
  .price-sort-btn {
    background-color: #0a0e17 !important;
    /* 深色背景 */
    background-image: linear-gradient(
      to right,
      #0a0e17,
      #1a2035,
      #0a0e17
    ) !important;
    /* 漸變效果 */
    border: 1px solid #2c3e50 !important;
    /* 較深邊框 */
    border-radius: 4px !important;
    /* 減小圓角 */
    box-shadow: 0 0 8px rgba(0, 103, 234, 0.3) !important;
    /* 藍色陰影 */
    color: #e6f1ff !important;
    /* 淺藍色文字 */
    font-weight: 500 !important;
    text-shadow: 0 0 5px rgba(66, 134, 244, 0.5) !important;
    /* 文字陰影 */
    letter-spacing: 0.5px !important;
    padding: 8px 16px !important;
    position: relative !important;
    overflow: hidden !important;
  }
  
  .price-sort-btn:hover {
    background-image: linear-gradient(
      to right,
      #0a1525,
      #1a2a47,
      #0a1525
    ) !important;
    box-shadow: 0 0 12px rgba(0, 103, 234, 0.5) !important;
    border-color: #4286f4 !important;
    transform: translateY(-1px) !important;
  }
  
  .price-sort-btn:active {
    transform: translateY(1px) !important;
    box-shadow: 0 0 5px rgba(0, 103, 234, 0.4) !important;
  }
  
  /* 添加邊緣發光效果 */
  .price-sort-btn::after {
    content: "" !important;
    position: absolute !important;
    top: -2px !important;
    left: -2px !important;
    right: -2px !important;
    bottom: -2px !important;
    border-radius: 6px !important;
    background: linear-gradient(45deg, #007bff, #00c3ff, #007bff) !important;
    z-index: -1 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
  }
  
  .price-sort-btn:hover::after {
    opacity: 0.4 !important;
  }
  
  /* 箭頭圖標樣式 */
  .price-sort-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
  }
  
  .price-sort-btn .fas {
    font-size: 11px !important;
    transition: color 0.2s ease !important;
    display: inline-block !important;
    line-height: 1 !important;
    transform: none !important;
    position: static !important;
    top: auto !important;
  }
  
  .price-sort-btn[data-direction="asc"] .fas {
    color: #66d9ff !important;
    /* 淺藍色 */
    text-shadow: 0 0 5px rgba(102, 217, 255, 0.8) !important;
    /* 霓虹藍光效果 */
  }
  
  .price-sort-btn[data-direction="desc"] .fas {
    color: #66d9ff !important;
    /* 改為與升序相同的淺藍色 */
    text-shadow: 0 0 5px rgba(102, 217, 255, 0.8) !important;
    /* 使用與升序相同的霓虹藍光效果 */
  }
  
  @media (max-width: 1270px) {
    /* 基本容器設置 */
    .exchange {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
  
    .game-container {
      display: flex;
      flex-direction: column;
      padding: 0.75rem;
      min-width: auto;
      /* 在小屏幕上移除最小寬度 */
      width: 100%;
      /* 確保使用全寬 */
      max-width: 100%;
      /* 確保不超過屏幕寬度 */
      overflow-x: hidden;
      /* 防止水平滾動 */
      margin: 50px auto 30px;
      /* 重置固定邊距，使用auto居中 */
      left: auto;
      /* 重置left屬性 */
      transform: none;
      /* 重置transform屬性ooo */
      align-items: center;
      /* 確保內容居中 */
      gap: 2rem;
      background: rgba(10, 10, 32, 0.3);
      border-radius: 1.5rem;
      backdrop-filter: blur(8px);
      box-shadow: 0 0 30px rgba(111, 0, 255, 0.2);
      border: 1px solid var(--border-soft);
      position: relative;
      overflow: visible;
      /* 確保內容不會被裁剪 */
      box-sizing: border-box;
    }
  
    .exchange-game-container {
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;
      background: var(--bg-glass);
      border: 1px solid var(--border-dim);
      border-radius: 0;
      position: relative;
      backdrop-filter: blur(10px);
      clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
      );
      box-sizing: border-box;
    }
  
    /* 主要動作行 - 直接用Grid實現三區塊的排版 */
    .exchange-main-action-row {
      display: grid;
      grid-template-areas:
        "center center"
        "left right"
        "button button";
      grid-template-columns: 1fr 1fr;
      grid-template-rows: auto auto auto;
      gap: 6px;
      width: 100%;
      height: auto;
      min-height: auto;
      margin: 0 auto;
      position: relative;
      z-index: 1;
      justify-content: center;
      box-sizing: border-box;
      display: block;
      margin-bottom: 20px;
    }
  
    /* 設置每個欄位的grid-area */
    .exchange-center-column {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100%;
      gap: 1rem;
      grid-area: center;
      width: 100%;
      align-items: center;
      margin-bottom: 20px;
    }
  
    .exchange-left-column {
      grid-area: left;
      width: 100%;
      max-width: 190px;
      min-width: 150px;
      min-height: 220px;
      justify-self: center;
      box-sizing: border-box;
      display: block;
      visibility: visible;
      overflow: visible;
    }
  
    .exchange-right-column {
      grid-area: right;
      width: 100%;
      max-width: 190px;
      min-width: 150px;
      display: block;
      visibility: visible;
      overflow: visible;
      height: 220px;
      min-height: 220px;
      justify-self: center;
      box-sizing: border-box;
    }
  
    /* 交換按鈕 */
    .exchange-button {
      width: 200px;
      height: 60px;
      background: linear-gradient(
        45deg,
        var(--cyber-primary),
        var(--cyber-accent)
      );
      border: none;
      color: white;
      font-size: 1.2rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 2px;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      transition: all var(--trans-normal);
      clip-path: polygon(
        0 0,
        calc(100% - 20px) 0,
        100% 50%,
        calc(100% - 20px) 100%,
        0 100%
      );
    }
  
    .exchange-button::before {
      content: "";
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
      );
      transition: left 0.5s;
    }
  
    .exchange-button:hover::before {
      left: 100%;
    }
  
    .exchange-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 30px rgba(255, 0, 110, 0.5);
    }
  
    .exchange-button:active:not(:disabled) {
      transform: translateY(0);
    }
  
    /* 移動設備版本按鈕樣式調整 */
    .exchange-button-container {
      margin-top: 10px;
      width: 100%;
      display: flex;
      justify-content: center;
    }
  
    .exchange-button {
      width: 180px;
      height: 50px;
      font-size: 1rem;
    }
  
    /* 調整選中物品圖片容器 */
    .selected-item-image-container {
      width: 180px;
      height: 180px;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 10px;
      pointer-events: auto;
      overflow: hidden;
      background: transparent;
      border-radius: 0.25rem;
    }
  
    /* 調整選中物品信息區域 */
    .selected-item-info {
      text-align: center;
      margin-top: 8px;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
  
    /* 價格顯示區域調整為填滿各自所在的欄位 */
    .price-display {
      width: 100%;
      padding: 0.75rem;
      margin-top: 0.5rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      background: rgba(20, 23, 46, 0.8);
      border-radius: 1rem;
      border: 1px solid var(--border-soft);
      transition: none;
    }
  
    .price-display.left-price {
      grid-area: leftprice;
    }
  
    /* 物品列表區域 */
    .exchange-items-container {
      margin-top: 0;
      display: flex;
      flex-direction: column;
      width: 100%;
      padding: 0rem 1rem;
      gap: 1.5rem;
    }
  
    .exchange-tabs-container {
      display: flex;
      margin-top: 20px;
      margin-bottom: 0;
      border-bottom: none;
      background: rgba(10, 10, 32, 0.3);
      width: 100%;
      max-width: 1920px;
      padding: 0rem 1rem;
      box-sizing: border-box;
      border-radius: 0.75rem 0.75rem 0 0;
      overflow: hidden;
      position: relative;
      z-index: 2;
    }
  
    /* 物品區域樣式 */
    .exchange-items-section {
      background: rgba(10, 10, 32, 0.3);
      width: 100%;
      height: 480px;
      min-height: 480px;
      border-radius: 0 0 1.5rem 1.5rem;
      border-top: none;
      margin-top: 0;
      overflow: hidden;
      border: 1px solid var(--border-soft);
      box-shadow: 0 0 20px rgba(111, 0, 255, 0.1);
      flex-direction: column;
    }
  
    /* 標籤樣式優化 */
    .exchange-tab {
      flex: 1;
      padding: 0.75rem;
      text-align: center;
      background: rgba(20, 23, 46, 0.6);
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.3s ease;
      font-weight: 500;
      border-bottom: 1px solid var(--border-soft);
      /* 添加底邊框 */
    }
  
    .exchange-tab.exchange-active {
      background: rgba(20, 23, 46, 0.9);
      color: var(--text-primary);
      border-bottom: 2px solid var(--mystic-accent);
    }
  
    /* 調整搜索框區域 */
    .exchange-search-filters {
      width: 100%;
      justify-content: flex-end;
      display: flex;
      gap: 1rem;
    }
  
    /* 調整選中物品圖片 */
    .selected-item-image {
      max-width: 85%;
      max-height: 85%;
      width: auto;
      height: auto;
      object-fit: contain;
      filter: drop-shadow(0 0 6px rgba(111, 0, 255, 0.2));
      user-select: none;
      -webkit-user-drag: none;
      pointer-events: none;
    }
  
    /* 調整選中物品名稱 */
    .selected-item-name {
      font-weight: 600;
      margin-bottom: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      font-size: 0.75rem;
      color: #fff;
    }
  
    /* 調整選中物品磨損度 */
    .selected-item-wear {
      font-size: 10px;
      margin-bottom: 2px;
      color: #888888;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: keep-all;
    }
  
    /* 調整選中物品價格 */
    .selected-item-price {
      font-size: 0.7rem;
      /* 縮小字體 */
      padding: 2px 4px;
      /* 縮小內邊距 */
    }
  
    /* 調整刪除按鈕 */
    .selected-item .remove-btn {
      width: 18px;
      /* 縮小寬度 */
      height: 18px;
      /* 縮小高度 */
      font-size: 10px;
      /* 縮小字體 */
      top: 2px;
      /* 調整位置 */
      right: 2px;
      /* 調整位置 */
    }
  
    /* 調整選中物品的分頁容器 */
    .exchange-pagination-container {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: 100%;
      justify-content: center;
      gap: 0;
      /* 移除間距 */
    }
  
    /* 調整分頁控制區域位置，緊貼底部 */
    .pagination-controls {
      width: 100%;
      position: absolute;
      bottom: 0px;
      left: 0;
      right: 0;
      justify-content: center;
      align-items: center;
      padding: 3px 0;
      background: none;
      border-radius: 0 0 0.5rem 0.5rem;
      z-index: 10;
      height: auto;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
      display: flex;
      visibility: visible;
      margin: 0;
    }
  
    /* 優化選中物品樣式 */
    .selected-item {
      padding: 3px;
      height: auto;
      min-height: 0;
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: relative;
      border-radius: 8px;
      background: rgba(20, 23, 46, 0.7);
      box-shadow: 0 0 15px rgba(111, 0, 255, 0.3);
      animation: fadeInItem 0.5s ease-out;
    }
  
    /* 調整頁碼指示器 */
    .page-indicator {
      font-size: 0.75rem;
      padding: 0 5px;
    }
  
    /* 調整分頁按鈕 */
    .page-nav-btn {
      padding: 3px 6px;
      font-size: 0.75rem;
    }
  
    /* 修復側面板內空狀態的尺寸問題 */
    .side-panel .empty-state {
      padding: 0.25rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
      /* 從頂部開始排列，不再居中 */
      align-items: center;
      height: 85%;
      gap: 5px;
      /* 添加一點間距 */
      padding-top: 10px;
      /* 頂部增加一些間距 */
      width: 100%;
      color: var(--text-muted);
      text-align: center;
    }
  
    /* 確保空狀態圖片始終適合容器大小且不變形 */
    .empty-icon-img {
      width: auto;
      height: auto;
      max-width: 65%;
      max-height: 50px;
      margin-bottom: 5px;
      object-fit: contain;
      opacity: 0.7;
      filter: none;
      animation: none;
      user-select: none;
      -webkit-user-drag: none;
      pointer-events: none;
    }
  
    /* 空狀態下的文字樣式 */
    .side-panel .empty-state p {
      font-size: 0.7rem;
      margin: 0;
      text-align: center;
      white-space: normal;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      color: var(--text-secondary);
    }
  
    /* 調整按鈕間距 */
    .page-nav-btn + .page-indicator,
    .page-indicator + .page-nav-btn {
      margin-left: 2px;
    }
  
    /* 確保選中物品容器顯示且不被裁剪 */
    .selected-items-container {
      flex: 1;
      max-height: none;
      margin-bottom: 0;
      overflow: visible;
      position: relative;
    }
  
    /* 調整分頁控制內的元素樣式 */
    .page-indicator {
      font-size: 0.7rem;
      padding: 0 5px;
      line-height: 1;
    }
  
    .page-nav-btn {
      padding: 2px 5px;
      font-size: 0.7rem;
      line-height: 1;
      background: rgba(111, 0, 255, 0.2);
      border: 1px solid rgba(111, 0, 255, 0.3);
      color: var(--text-primary);
      border-radius: 4px;
      cursor: pointer;
      transition: none;
      box-shadow: none;
      transform: none;
    }
  
    .side-panel {
      width: 100%;
      height: 280px;
      /* 從180px增加至220px */
      min-height: 280px;
      /* 從180px增加至220px */
      padding: 0.5rem;
      background: rgba(20, 23, 46, 0.8);
      border-radius: 0.75rem;
      display: flex;
      flex-direction: column;
      border: 1px solid rgba(173, 142, 255, 0.2);
      box-shadow: none;
      transition: none;
      overflow: hidden;
      flex: 1;
      transition:
        background-color 0.3s ease,
        box-shadow 0.3s ease;
    }
  
    /* 調整選中物品包裝器高度 */
    .side-panel .selected-item-wrapper {
      flex: 1;
      min-height: 200px;
      /* 增加高度以適應側面板高度 */
      height: auto;
      background: rgba(10, 10, 32, 0.8);
      border-radius: 0.75rem;
      overflow: visible;
      padding: 0.4rem;
      position: relative;
      /* 確保可以放置絕對定位的子元素 */
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
  
    .multiplier-buttons-row {
      width: 100%;
      max-width: 350px;
      flex-direction: column;
      gap: 0.5rem;
      padding: 0.5rem;
      justify-content: center;
      align-items: center;
      border-radius: 0.75rem;
      background: rgba(20, 23, 46, 0.8);
      border: 1px solid var(--border-soft);
      animation: pulse 2s infinite;
      z-index: 100;
    }
  
    .multiplier-buttons-container {
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
      width: 100%;
    }
  
    .multiplier-button {
      background: rgba(111, 0, 255, 0.2);
      color: white;
      border: none;
      border-radius: 4px;
      padding: 8px 0;
      cursor: pointer;
      font-size: 14px;
      font-family: var(--font-special);
      font-weight: 500;
      transition: all 0.2s ease;
      box-shadow: 0 0 8px rgba(111, 0, 255, 0.1);
      min-width: 60px;
      width: 60px;
      text-align: center;
      flex: 0 0 auto;
    }
  
    @media (max-width: 768px) {
      .multiplier-button {
        min-width: 50px;
        width: 50px;
        padding: 6px 0;
        font-size: 13px;
      }
    }
  
    /* 調整物品網格以顯示更多卡片 */
    .items-grid {
      flex: 1;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
      gap: 0.5rem;
      padding: 0.5rem;
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: thin;
      scrollbar-color: var(--mystic-accent) rgba(10, 10, 32, 0.3);
      align-items: start;
      grid-auto-rows: min-content;
      margin-bottom: 0;
    }
  
    /* 物品卡片尺寸縮小到原來的1/2 */
    .inventory-item,
    .target-item,
    .item-card {
      min-height: 110px;
      min-width: 80px;
      padding: 0.5rem;
      border-radius: 0.5rem;
    }
  
    /* 圖片容器縮小 */
    .item-image-container {
      height: 60px;
      min-height: 60px;
      margin-bottom: 0.5rem;
      border-radius: 0.2rem;
    }
  
    /* 調整數量標籤 */
    .item-quantity {
      bottom: 3px;
      right: 3px;
      padding: 1px 4px;
      font-size: 0.6rem;
      border-radius: 3px;
    }
  
    /* 調整稀有度指示器 */
    .item-rarity-indicator {
      height: 2px;
    }
  
    /* 調整信息區域 */
    .item-details,
    .item-info {
      min-height: 35px;
      margin-top: 0.2rem;
    }
  
    /* 調整物品名稱 */
    .item-name,
    .item-name-text {
      font-size: 0.7rem;
    }
  
    /* 調整plus-icon大小 */
    .inventory-item .plus-icon,
    .target-item .plus-icon {
      width: 18px;
      height: 18px;
    }
  
    /* 默認顯示倉庫清單，隱藏目標清單 */
    #inventory-items-section {
      display: block !important;
    }
  
    #target-items-section {
      display: none !important;
    }
  }
  
  /* 確保寬屏模式下恢復原始佈局 */
  @media (min-width: 1271px) {
    /* 主要動作行三列佈局 */
    .exchange-main-action-row {
      display: grid;
      grid-template-columns: 425px 1fr 425px;
      min-height: 550px;
      width: 100%;
      max-width: 1920px;
      max-height: 600px;
      margin-left: 0;
      margin-right: 0;
      justify-content: space-between;
      padding: 0 1rem;
      position: relative;
      z-index: 1;
      height: auto;
      margin-top: 0;
      margin-bottom: 0;
      box-sizing: border-box;
    }
  
    /* 遊戲容器在大屏幕的設置 */
    .exchange-game-container {
      width: 100%;
      min-width: 1375px;
      max-width: 1600px;
      min-height: 600px;
      /* 設定固定寬度 */
      padding: 20px;
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      /* 確保內容居中 */
      gap: 2rem;
      background: rgba(10, 10, 32, 0.3);
      border-radius: 1.5rem;
      backdrop-filter: blur(8px);
      box-shadow: 0 0 30px rgba(111, 0, 255, 0.2);
      border: 1px solid var(--border-soft);
      position: relative;
      overflow: visible;
      /* 恢復為visible，避免內容被切掉 */
      /* 確保內容不會被裁剪 */
      box-sizing: border-box;
      margin: 0 auto;
      clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
      );
    }
  
    /* 左右欄位對齊 - 靠兩側 */
    .exchange-left-column {
      width: 415px;
      min-width: 415px;
      height: 100%;
      max-height: 600px;
      box-sizing: border-box;
      justify-self: start;
      display: flex;
      flex-direction: column;
    }
  
    .exchange-right-column {
      width: 415px;
      min-width: 415px;
      height: 100%;
      max-height: 600px;
      box-sizing: border-box;
      justify-self: end;
      display: flex;
      flex-direction: column;
    }
  
    /* 中間欄位於正中間 */
    .exchange-center-column {
      display: flex;
      flex-direction: column;
      justify-content: center;
      height: 100%;
      gap: 1rem;
      margin: 0 auto;
      align-items: center;
      order: 0;
    }
  
    /* Safari特定修復 */
    @media not all and (min-resolution: 0.001dpcm) {
      @supports (-webkit-appearance: none) {
        .exchange-main-action-row {
          min-height: auto !important;
          height: auto !important;
          align-items: flex-start !important;
        }
  
        .exchange-left-column,
        .exchange-right-column,
        .exchange-center-column {
          flex-shrink: 0 !important;
          flex-basis: auto !important;
          align-self: flex-start !important;
        }
  
        .exchange-game-container {
          min-height: 1000px !important;
          height: auto !important;
          padding-bottom: 50px !important;
          /* 增加底部間距 */
        }
      }
    }
  
    .exchange-empty-state {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      height: 100%;
      width: 100%;
      color: var(--text-muted);
      text-align: center;
      padding: 1rem;
    }
  
    .exchange-empty-icon-img {
      width: 200px;
      height: auto;
      margin-bottom: 15px;
      opacity: 0.7;
      filter: none;
      animation: none;
      user-select: none;
      -webkit-user-drag: none;
      pointer-events: none;
    }
  
    .exchange-pagination-container {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: 100%;
    }
  
    .page-nav-btn {
      background: rgba(111, 0, 255, 0.2);
      border: 1px solid rgba(111, 0, 255, 0.3);
      color: var(--text-primary);
      padding: 5px 10px;
      border-radius: 4px;
      cursor: pointer;
      transition: none;
      box-shadow: none;
      transform: none;
    }
  
    .selected-items-container {
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      position: relative;
      margin-bottom: 15px;
    }
  
    /* 調整選中物品圖片樣式 */
    .selected-item-image {
      max-width: 85%;
      max-height: 85%;
      width: auto;
      height: auto;
      object-fit: contain;
      filter: drop-shadow(0 0 6px rgba(111, 0, 255, 0.2));
      user-select: none;
      -webkit-user-drag: none;
      pointer-events: none;
    }
  
    .selected-item-wear {
      font-size: 10px;
      color: #888888;
      margin-bottom: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: keep-all;
    }
  
    .selected-item {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 100%;
      height: 100%;
      position: relative;
      padding: 3px;
      border-radius: 8px;
      background: rgba(20, 23, 46, 0.7);
      box-shadow: 0 0 15px rgba(111, 0, 255, 0.3);
      animation: fadeInItem 0.5s ease-out;
    }
  
    .selected-item-wrapper {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      flex: 1;
      min-height: 350px;
      background: rgba(10, 10, 32, 0.8);
      border-radius: 0.75rem;
      padding: 0.5rem;
      position: relative;
      overflow: hidden;
    }
  
    .selected-item-image-container {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 180px;
      height: 180px;
      margin-bottom: 10px;
      pointer-events: auto;
      overflow: hidden;
      background: transparent;
      border-radius: 0.25rem;
    }
  
    .selected-item-info {
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      margin-top: 5px;
    }
  
    .selected-item-name {
      font-weight: 600;
      margin-bottom: 3px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      font-size: 0.75rem;
      color: #fff;
    }
  
    .pagination-controls {
      width: 100%;
      position: absolute;
      bottom: 0px;
      left: 0;
      right: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 3px 0;
      background: none;
      border-radius: 0 0 0.5rem 0.5rem;
      z-index: 10;
      height: auto;
    }
  
    .price-display {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      padding: 1rem;
      background: rgba(20, 23, 46, 0.8);
      border-radius: 1rem;
      border: 1px solid var(--border-soft);
      transition: none;
      margin-top: auto;
    }
  
    .price-display.left-price {
      grid-area: leftprice;
    }
  
    .exchange-button-container {
      grid-area: button;
      justify-self: center;
      width: 100%;
      display: flex;
      justify-content: center;
    }
  
    /* 隱藏標籤容器 */
    .exchange-tabs-container {
      display: none;
    }
  
    /* 恢復物品容器佈局 */
    .exchange-items-container {
      width: 100%;
      max-width: 1920px;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
    }
  
    .exchange-items-section {
      background: rgba(10, 10, 32, 0.3);
      overflow: hidden;
      border: 1px solid var(--border-soft);
      box-shadow: 0 0 20px rgba(111, 0, 255, 0.1);
      flex-direction: column;
      height: 650px;
      /* 從580px增加到680px */
      min-height: 650px;
      /* 從580px增加到680px */
    }
  
    .exchange-search-filters {
      display: flex;
      gap: 1rem;
    }
  
    .items-grid {
      flex: 1;
      /* 讓grid佔據剩餘空間 */
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
      gap: 1rem;
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-width: thin;
      scrollbar-color: var(--mystic-accent) rgba(10, 10, 32, 0.3);
      align-items: start;
      grid-auto-rows: min-content;
      padding: 1rem 1.5rem 0.5rem 1.5rem;
      /* 減小底部padding */
      margin-bottom: 0;
      height: calc(100% - 60px);
      /* 添加固定高度，減去header高度 */
    }
  
    /* 交換頁面的網格容器顯示滾動條 - 強制覆蓋所有瀏覽器 */
    .exchange-items-grid {
      /* 強制顯示滾動條 - 所有瀏覽器 */
      overflow-y: auto !important;
      overflow-x: hidden !important;
  
      /* Edge 瀏覽器專用 */
      -ms-overflow-style: scrollbar !important;
  
      /* Firefox 瀏覽器專用 */
      scrollbar-width: thin !important;
  
      /* 確保滾動條始終可見 */
      scrollbar-color: var(--border-neon) var(--bg-dark) !important;
    }
  
    .upgrade-items-grid {
      -ms-overflow-style: auto !important;
      /* IE and Edge */
      scrollbar-width: thin !important;
      /* Firefox */
    }
  
    .upgrade-items-grid::-webkit-scrollbar {
      display: block !important;
      /* Chrome, Safari, Opera */
      width: 8px !important;
    }
  
    .upgrade-items-grid::-webkit-scrollbar-track {
      background: var(--bg-dark) !important;
      border-radius: 4px !important;
    }
  
    .upgrade-items-grid::-webkit-scrollbar-thumb {
      background: var(--border-neon) !important;
      border-radius: 4px !important;
      border: 1px solid var(--bg-dark) !important;
    }
  
    .upgrade-items-grid::-webkit-scrollbar-thumb:hover {
      background: var(--neon-blue) !important;
    }
  }
  
  @keyframes scaleIn {
    from {
      transform: scale(0.8);
      opacity: 0;
    }
  
    to {
      transform: scale(1);
      opacity: 1;
    }
  }
  
  .modal-button-container {
    display: flex !important;
    justify-content: center !important;
    margin-top: 15px !important;
    gap: 10px !important;
  }
  
  .modal-button {
    padding: 8px 15px !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition:
      background-color 0.3s,
      transform 0.2s !important;
  }
  
  .modal-button:hover {
    transform: translateY(-2px) !important;
  }
  
  .modal-button.primary {
    background-color: #4caf50 !important;
    color: white !important;
  }
  
  .modal-button.primary:hover {
    background-color: #388e3c !important;
  }
  
  .modal-button.secondary {
    background-color: #f00c0c !important;
    color: white !important;
  }
  
  .modal-button.secondary:hover {
    background-color: #6d0909 !important;
  }
  
  /* 移動端按鈕樣式 */
  @media (max-width: 768px) {
    .modal-button-container {
      margin-top: 10px !important;
    }
  
    .modal-button {
      padding: 7px 12px !important;
      font-size: 13px !important;
    }
  }
  
  .sacrifice-pagination {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
  }
  
  .sacrifice-item-display {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
  }
  
  .page-button {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    border-radius: 4px;
    color: #eee;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 11px;
  }
  
  .page-button:disabled {
    opacity: 0.5;
    cursor: default;
  }
  
  .page-indicator {
    color: #aaa;
    font-size: 12px;
    /* 縮小字體大小 */
  }
  
  /* 載入動畫樣式 */
  .modern-loader {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
  }
  
  .loader-shape {
    width: 40px;
    height: 40px;
    position: relative;
    background: transparent;
    transform: rotate(45deg);
  }
  
  .loader-shape::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #6a1b9a;
    border-right-color: #6a1b9a;
    border-radius: 50%;
    animation: loaderSpin 1.5s linear infinite;
  }
  
  .loader-shape::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 3px solid transparent;
    border-bottom-color: #b39ddb;
    border-left-color: #b39ddb;
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite reverse;
  }
  
  @keyframes loaderSpin {
    0% {
      transform: rotate(0deg);
    }
  
    100% {
      transform: rotate(360deg);
    }
  }
  
  /* 載入容器樣式 */
  #inventory-loading,
  #target-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    height: 100%;
  }
  
  #inventory-loading p,
  #target-loading p {
    color: #888;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
  }
  
  .blocking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    cursor: default;
    touch-action: none;
    user-select: none;
  }
  
  /* 六邊形按鈕樣式 */
  .hexagon-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #4caf50;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    animation:
      pulse 2s infinite,
      float 6s ease-in-out infinite;
  }
  
  .hexagon-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
    animation-play-state: paused;
  }
  
  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
  
    70% {
      box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
  
    100% {
      box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
  }
  
  @keyframes float {
    0% {
      transform: translateY(0px);
    }
  
    50% {
      transform: translateY(-10px);
    }
  
    100% {
      transform: translateY(0px);
    }
  }
  
  .hexagon-button svg {
    width: 30px;
    height: 30px;
    fill: white;
  }
  
  /* 事件種子卡片樣式 */
  .event-seed-card {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 300px;
    background-color: #1e2024;
    border: 1px solid #4caf50;
    border-radius: 10px;
    padding: 15px;
    z-index: 998;
    color: #fff;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    display: none;
    animation: fadeIn 0.3s;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 事件種子卡片內部樣式 */
  .event-seed-card h4 {
    text-align: center;
    margin: 0 0 15px 0;
    color: #4caf50;
    font-weight: bold;
  }
  
  .event-seed-card button.close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 0px 5px;
  }
  
  .event-seed-card label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }
  
  .event-seed-card .input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .event-seed-card .seed-input {
    flex: 1;
    padding: 8px;
    background-color: #2a2e35;
    border: 1px solid #3a3f48;
    border-radius: 5px;
    color: #fff;
  }
  
  .event-seed-card button#random-seed {
    padding: 8px 12px;
    background-color: #4caf50;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
  }
  
  .event-seed-card p {
    font-size: 14px;
    color: #aaa;
    margin: 0;
  }
  
  .event-seed-card button.confirm {
    width: 100%;
    padding: 10px;
    background-color: #4caf50;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
  }
  
  /* 種子通知樣式 */
  #seed-notification {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background-color: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-weight: bold;
    transition: opacity 0.3s ease;
    opacity: 0;
  }
  
  /* 物品卡片和詳情樣式 */
  .item-details {
    text-align: center;
    padding: 8px 5px;
  }
  
  .item-wear {
    font-size: 11px;
    color: #888888;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
  }
  
  .item-name {
    font-weight: 500;
    margin-bottom: 2px;
  }
  
  .item-price {
    color: #1e88e5;
  }
  
  .item-image-container {
    text-align: center;
  }
  
  .section-title {
    display: none;
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #ccc;
  }
  
  .sacrifice-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .sacrifice-item-display {
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .selected-item-price {
    color: #1e88e5;
    font-weight: 500;
  }
  
  .page-button {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
  }
  
  .page-button:disabled {
    color: #555;
    cursor: not-allowed;
  }
  
  .page-indicator {
    margin: 0 10px;
    color: #ccc;
  }
  
  .tech-data-container {
    background-color: #2a2e35;
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
  }
  
  .tech-data-label {
    color: #aaa;
  }
  
  .tech-data-value {
    color: #fff;
    font-family: monospace;
  }
  
  .modal-button-container {
    text-align: center;
    margin-top: 20px;
  }
  
  .modal-button {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
  }
  
  .modal-button.primary {
    background-color: #4caf50;
    color: white;
  }
  
  .modal-button.secondary {
    background-color: #607d8b;
    color: white;
  }
  
  .multiplier-button:hover {
    background: rgba(111, 0, 255, 0.3);
    border-color: rgba(111, 0, 255, 0.5);
    box-shadow: 0 0 12px rgba(111, 0, 255, 0.3);
    transform: translateY(-2px);
  }
  
  .multiplier-button:active {
    transform: translateY(0);
    background: rgba(111, 0, 255, 0.4);
    border-color: rgba(111, 0, 255, 0.7);
    box-shadow:
      0 0 15px rgba(111, 0, 255, 0.4),
      inset 0 0 5px rgba(255, 255, 255, 0.2);
    color: white;
  }
  
  /* 加入脈動動畫定義 */
  @keyframes pulse {
    0% {
      box-shadow: 0 0 8px rgba(111, 0, 255, 0.3);
    }
  
    50% {
      box-shadow: 0 0 20px rgba(111, 0, 255, 0.6);
    }
  
    100% {
      box-shadow: 0 0 8px rgba(111, 0, 255, 0.3);
    }
  }
  
  .multiplier-button:hover {
    background-color: var(#5d5563, #8833ff);
    transform: translateY(-2px);
  }
  
  /* 調整選中物品價格樣式 */
  .selected-item-price {
    position: static;
    background: rgba(0, 0, 0, 0.4);
    color: #1e88e5;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 3px;
  }
  
  /* 升級結果頁面的物品容器樣式 */
  .selected-item-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 240px;
    /* 確保有足夠的高度容納分頁控制 */
  }
  
  /* 確保分頁控制正確顯示在底部 */
  .selected-item-wrapper .page-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    z-index: 10;
    background-color: none;
  }
  
  /* 確保物品圖片和信息不被壓縮 */
  .selected-item-image-container {
    flex-shrink: 0;
    height: 120px;
    margin-bottom: 10px;
  }
  
  .selected-item-info {
    flex-shrink: 0;
    margin-bottom: 10px;
  }
  
  /* 調整分頁按鈕樣式 */
  .page-button {
    background-color: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(120, 120, 120, 0.4);
    color: #eee;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
  }
  
  .page-button:hover:not(:disabled) {
    background-color: rgba(40, 40, 40, 0.9);
    border-color: rgba(150, 150, 150, 0.6);
  }
  
  .page-indicator {
    margin: 0 10px;
    color: #aaa;
    font-size: 12px;
  }
  
  /* 為選中物品添加淡入浮現動畫效果 */
  @keyframes fadeInItem {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 為側面板內部元素添加過渡效果 */
  .selected-item-image-container,
  .selected-item-info,
  .selected-item-name,
  .selected-item-wear,
  .pagination-controls {
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }
  
  /* 倍率按鈕相關樣式 */
  .multiplier-buttons-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 80%;
    gap: 0.5rem;
  }
  
  @media (max-width: 768px) {
    .multiplier-buttons-row {
      display: flex !important;
      /* 強制在手機版以flex顯示 */
      flex-direction: row !important;
      /* 強制橫向排列 */
      flex-wrap: wrap;
      justify-content: center;
      width: 100%;
      max-width: 350px;
      margin: 0.5rem auto;
      gap: 0.3rem;
    }
  
    .multiplier-button {
      flex: 0 0 auto;
      font-size: 0.9rem;
      padding: 0.3rem 0.6rem;
    }
  }
  
  /* 新增：修復初始化卷軸問題 */
  /* 確保在加載過程中隱藏卷軸，只在加載完成後顯示 */
  .items-grid {
    overflow: hidden !important;
    /* 初始隱藏卷軸 */
    min-height: 300px;
    position: relative;
  }
  
  .items-grid.loaded {
    overflow: auto !important;
    /* 加載後才顯示卷軸 */
  }
  
  /* 載入指示器樣式調整 */
  .loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--mystic-bg);
    z-index: 10;
    pointer-events: none;
    /* 確保loading不會阻擋點擊 */
  }
  
  /* 調整空狀態提示的顯示 */
  .empty-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 確保垂直置中 */
    color: var(--text-muted);
    text-align: center;
    padding: 3rem;
    z-index: 5;
  }
  
  /* 確保初始化時物品列表的狀態 */
  .items-grid {
    overflow: hidden !important;
    /* 初始隱藏卷軸 */
    min-height: 300px;
    position: relative;
  }
  
  .items-grid.loaded {
    overflow: auto !important;
    /* 加載後才顯示卷軸 */
  }
  
  /* 確保空狀態和加載狀態在虛擬列表初始化時正確顯示 */
  #inventory-empty,
  #target-empty {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
  }
  
  #inventory-loading,
  #target-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background-color: var(--mystic-bg);
  }
  
  /* 價格排序按鈕樣式完善 */
  .price-sort-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: auto !important;
    padding: 8px 16px !important;
    line-height: normal !important;
  }
  
  .price-sort-btn .btn-text,
  .price-sort-btn .fas {
    display: inline-block !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
    vertical-align: middle !important;
  }
  
  .price-sort-btn .fas {
    font-size: 12px !important;
    transition: color 0.2s ease !important;
    height: auto !important;
    width: auto !important;
    color: #66d9ff !important;
    text-shadow: 0 0 5px rgba(102, 217, 255, 0.8) !important;
  }
  
  /* 舊的定義已刪除，使用新的科技風格設計 */
  
  /* 箭頭容器 */
  .exchange-arrow-outer,
  .exchange-arrow-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* SVG樣式 */
  .exchange-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(111, 0, 255, 0.5));
  }
  
  /* 箭頭路徑樣式 */
  .arrow-path {
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  
  .outer-path {
    filter: drop-shadow(0 0 3px rgba(111, 0, 255, 0.7));
  }
  
  .inner-path {
    filter: drop-shadow(0 0 3px rgba(0, 200, 255, 0.7));
  }
  
  /* 箭頭頭部樣式 */
  .arrow-head {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
  }
  
  .exchange-button {
    width: 200px;
    height: 60px;
    background: linear-gradient(45deg, var(--cyber-primary), var(--cyber-accent));
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--trans-normal);
    clip-path: polygon(
      0 0,
      calc(100% - 20px) 0,
      100% 50%,
      calc(100% - 20px) 100%,
      0 100%
    );
  }
  
  .exchange-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent
    );
    transition: left 0.5s;
  }
  
  .exchange-button:hover::before {
    left: 100%;
  }
  
  .exchange-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 0, 110, 0.5);
  }
  
  .exchange-button:disabled {
    background: linear-gradient(45deg, #333, #555);
    cursor: not-allowed;
    opacity: 0.5;
  }
  
  .exchange-button:active:not(:disabled) {
    transform: translateY(0);
  }
  
  /* 箭頭旋轉動畫 */
  @keyframes rotate-clockwise {
    from {
      transform: rotate(0deg);
    }
  
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes rotate-counter-clockwise {
    from {
      transform: rotate(0deg);
    }
  
    to {
      transform: rotate(-360deg);
    }
  }
  
  /* 應用動畫的類 */
  .exchange-arrow-outer.animate {
    animation: rotate-clockwise 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  .exchange-arrow-inner.animate {
    animation: rotate-counter-clockwise 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  /* 舊的賽博朋克定義已刪除，使用新的科技風格設計 */
  
  /* 主要圓圈 - 修改為容器 */
  .exchange-cyber-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    top: 0;
    left: 0;
    z-index: 1;
    /* 移除原有邊框和陰影 */
    border: none;
    box-shadow: none;
    /* 移除原有旋轉動畫 */
    animation: none;
  }
  
  /* 外層圓形箭頭 - 順時針旋轉 */
  .exchange-outer-circle-arrow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top: 5px solid #00bbff;
    border-right: 5px solid #00bbff;
    box-shadow: 0 0 15px rgba(0, 187, 255, 0.4);
    animation: exchange-cyber-rotate 30s linear infinite;
    will-change: transform;
  }
  
  /* 內層圓形箭頭 - 逆時針旋轉 */
  .exchange-inner-circle-arrow {
    position: absolute;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-bottom: 4px solid #ff00ff;
    border-left: 4px solid #ff00ff;
    box-shadow: 0 0 12px rgba(255, 0, 255, 0.4);
    animation: exchange-cyber-rotate-reverse 25s linear infinite;
    will-change: transform;
  }
  
  /* 逆時針旋轉動畫 */
  @keyframes exchange-cyber-rotate-reverse {
    from {
      transform: rotate(0deg);
    }
  
    to {
      transform: rotate(-360deg);
    }
  }
  
  /* 動畫定義 */
  @keyframes exchange-cyber-rotate {
    from {
      transform: rotate(0deg);
    }
  
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes exchange-cyber-pulse {
    0% {
      transform: translate(-50%, -50%) scale(1);
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1.1);
    }
  }
  
  @keyframes exchange-cyber-arrow-pulse {
    0% {
      opacity: 0.7;
    }
  
    50% {
      opacity: 1;
    }
  
    100% {
      opacity: 0.7;
    }
  }
  
  /* 點擊時的動畫效果 */
  .exchange-icon-active .exchange-cyber-circle {
    /* 移除之前的動畫，現在使用新的內外環形動畫 */
  }
  
  .exchange-icon-active .exchange-outer-circle-arrow {
    animation: exchange-cyber-active-outer-ring 0.7s ease-out;
  }
  
  .exchange-icon-active .exchange-inner-circle-arrow {
    animation: exchange-cyber-active-inner-ring 0.7s ease-out;
  }
  
  .exchange-icon-active .exchange-core-element {
    animation: exchange-cyber-active-pulse 0.7s ease-out;
  }
  
  .exchange-icon-active .exchange-left-arrow {
    animation: exchange-cyber-active-arrow-left 0.7s ease-out;
  }
  
  .exchange-icon-active .exchange-right-arrow {
    animation: exchange-cyber-active-arrow-right 0.7s ease-out;
  }
  
  @keyframes exchange-cyber-active-outer-ring {
    0% {
      transform: scale(1);
    }
  
    50% {
      transform: scale(1.05);
    }
  
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes exchange-cyber-active-inner-ring {
    0% {
      transform: scale(1);
    }
  
    50% {
      transform: scale(1.05);
    }
  
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes exchange-cyber-active-pulse {
    0% {
      transform: translate(-50%, -50%) scale(1);
    }
  
    50% {
      transform: translate(-50%, -50%) scale(1.2);
      box-shadow: 0 0 25px rgba(0, 187, 255, 0.8);
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
  }
  
  @keyframes exchange-cyber-active-arrow-left {
    0% {
      transform: translateX(0);
    }
  
    50% {
      transform: translateX(-10px);
    }
  
    100% {
      transform: translateX(0);
    }
  }
  
  @keyframes exchange-cyber-active-arrow-right {
    0% {
      transform: translateX(0);
    }
  
    50% {
      transform: translateX(10px);
    }
  
    100% {
      transform: translateX(0);
    }
  }
  
  /* 差價顯示元素樣式 */
  .exchange-price-difference {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 150px;
  }
  
  .exchange-price-diff-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  
  .exchange-price-diff-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-special);
    color: var(--cyber-neon-blue);
    text-shadow: 0 0 8px rgba(0, 187, 255, 0.5);
    white-space: nowrap;
  }
  
  /* 確保差價顯示在不同屏幕尺寸下都能正確顯示 */
  @media (max-width: 1270px) {
    .exchange-price-difference {
      padding: 0.5rem 1rem;
      min-width: 130px;
    }
  
    .exchange-price-diff-label {
      font-size: 0.75rem;
    }
  
    .exchange-price-diff-value {
      font-size: 1rem;
    }
  }
  
  /* 逆時針旋轉動畫 */
  @keyframes exchange-cyber-rotate-reverse {
    from {
      transform: rotate(0deg);
    }
  
    to {
      transform: rotate(-360deg);
    }
  }
  
  /* 中心元素 - 簡單的眼睛形狀 */
  .exchange-core-element {
    position: absolute;
    width: 140px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #151425, #31275a);
    box-shadow:
      0 0 15px rgba(0, 187, 255, 0.4),
      inset 0 0 10px rgba(0, 187, 255, 0.3);
    animation: exchange-cyber-pulse 4s ease-in-out infinite alternate;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    overflow: hidden;
    will-change: transform;
  }
  
  @keyframes exchange-cyber-pulse {
    0% {
      transform: translate(-50%, -50%) scale(1);
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1.05);
    }
  }
  
  /* 箭頭 */
  .exchange-left-arrow,
  .exchange-right-arrow {
    position: absolute;
    height: 6px;
    width: 150px;
    z-index: 3;
  }
  
  .exchange-left-arrow {
    top: calc(39%);
    left: 10px;
    background: linear-gradient(to right, transparent, #00bbff);
    box-shadow: 0 0 10px #00bbff;
    animation: exchange-cyber-arrow-pulse 4s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    will-change: opacity;
  }
  
  /* 重新設計左箭頭頭部 */
  .exchange-left-arrow::after {
    content: "";
    position: absolute;
    right: -15px;
    width: 20px;
    height: 20px;
    clip-path: polygon(0% 0%, 0% 100%, 100% 50%);
    background: #00bbff;
    filter: drop-shadow(0 0 8px #00bbff);
  }
  
  .exchange-right-arrow {
    top: calc(60%);
    right: 10px;
    background: linear-gradient(to left, transparent, #ff00ff);
    box-shadow: 0 0 10px #ff00ff;
    animation: exchange-cyber-arrow-pulse 4s ease-in-out 1.5s infinite;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    will-change: opacity;
  }
  
  /* 重新設計右箭頭頭部 */
  .exchange-right-arrow::after {
    content: "";
    position: absolute;
    left: -15px;
    width: 20px;
    height: 20px;
    clip-path: polygon(100% 0%, 100% 100%, 0% 50%);
    background: #ff00ff;
    filter: drop-shadow(0 0 8px #ff00ff);
  }
  
  @keyframes exchange-cyber-arrow-pulse {
    0% {
      opacity: 0.6;
    }
  
    50% {
      opacity: 0.9;
    }
  
    100% {
      opacity: 0.6;
    }
  }
  
  /* 神秘背景效果 - 添加硬體加速優化 */
  .exchange-mystical-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
  }
  
  .exchange-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
      radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    animation: exchange-stars-move 150s linear infinite;
    will-change: transform;
    transform: translateZ(0);
  }
  
  .exchange-mist {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      ellipse at center,
      rgba(37, 14, 63, 0.2) 0%,
      rgba(10, 5, 20, 0.1) 70%,
      rgba(5, 2, 10, 0.05) 100%
    );
    opacity: 0.8;
    will-change: transform;
    transform: translateZ(0);
  }
  
  @keyframes exchange-stars-move {
    from {
      background-position: 0 0;
    }
  
    to {
      background-position: 1000px 1000px;
    }
  }
  
  @keyframes scan-line {
    0% {
      transform: translateX(-100%);
    }
  
    100% {
      transform: translateX(100%);
    }
  }
  
  .exchange-hexagon-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    position: relative;
    padding-left: 20px;
  }
  
  .exchange-hexagon-title::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--neon-pink);
    animation: blink 1s infinite;
  }
  
  @keyframes blink {
    0%,
    50% {
      opacity: 1;
    }
  
    51%,
    100% {
      opacity: 0;
    }
  }
  
  .exchange-icon-section {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
  }
  
  /* 舊的發光環設計已刪除，使用新的科技風格設計 */
  
  /* 外圈發光環 */
  .exchange-outer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top: 4px solid var(--neon-blue);
    border-right: 4px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.6);
    animation: exchange-ring-rotate 8s linear infinite;
    z-index: 1;
  }
  
  /* 內圈發光環 */
  .exchange-inner-ring {
    position: absolute;
    width: 85%;
    height: 85%;
    top: 7.5%;
    left: 7.5%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom: 3px solid var(--neon-pink);
    border-left: 3px solid var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.6);
    animation: exchange-ring-rotate-reverse 6s linear infinite;
    z-index: 2;
  }
  
  /* 左箭頭 */
  .exchange-left-arrow {
    position: absolute;
    top: 40%;
    left: 15%;
    width: 120px;
    height: 20px;
    z-index: 3;
  }
  
  .exchange-left-arrow .arrow-body {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--neon-blue));
    box-shadow: 0 0 10px var(--neon-blue);
    animation: exchange-arrow-pulse 3s ease-in-out infinite;
  }
  
  .exchange-left-arrow .arrow-head {
    position: absolute;
    right: -10px;
    top: -8px;
    width: 0;
    height: 0;
    border-left: 15px solid var(--neon-blue);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    filter: drop-shadow(0 0 8px var(--neon-blue));
  }
  
  /* 右箭頭 */
  .exchange-right-arrow {
    position: absolute;
    top: 60%;
    right: 15%;
    width: 120px;
    height: 20px;
    z-index: 3;
  }
  
  .exchange-right-arrow .arrow-body {
    width: 80px;
    height: 4px;
    background: linear-gradient(270deg, transparent, var(--neon-pink));
    box-shadow: 0 0 10px var(--neon-pink);
    animation: exchange-arrow-pulse 3s ease-in-out 1.5s infinite;
    margin-left: auto;
  }
  
  .exchange-right-arrow .arrow-head {
    position: absolute;
    left: -10px;
    top: -8px;
    width: 0;
    height: 0;
    border-right: 15px solid var(--neon-pink);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    filter: drop-shadow(0 0 8px var(--neon-pink));
  }
  
  /* 中心核心 */
  .exchange-core {
    position: absolute;
    width: 140px;
    height: 70px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-card));
    border: 2px solid var(--border-neon);
    box-shadow:
      0 0 20px rgba(0, 245, 255, 0.4),
      inset 0 0 20px rgba(0, 245, 255, 0.1);
    overflow: hidden;
  }
  
  .exchange-core .core-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 30px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--neon-blue);
    animation: exchange-core-pulse 2s ease-in-out infinite;
  }
  
  .exchange-core .core-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--neon-purple);
    border-radius: 50%;
    animation: exchange-core-ripple 3s ease-out infinite;
  }
  
  /* 差價顯示 */
  .exchange-price-difference {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: var(--bg-glass);
    border: 1px solid var(--border-dim);
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    min-width: 150px;
  }
  
  .exchange-price-diff-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
  }
  
  /* ===== 交換圖標動畫 ===== */
  @keyframes exchange-ring-rotate {
    from {
      transform: rotate(0deg);
    }
  
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes exchange-ring-rotate-reverse {
    from {
      transform: rotate(0deg);
    }
  
    to {
      transform: rotate(-360deg);
    }
  }
  
  @keyframes exchange-arrow-pulse {
    0%,
    100% {
      opacity: 0.6;
    }
  
    50% {
      opacity: 1;
    }
  }
  
  @keyframes exchange-core-pulse {
    0%,
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
  
    50% {
      transform: translate(-50%, -50%) scale(1.1);
    }
  }
  
  @keyframes exchange-core-ripple {
    0% {
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1.5);
      opacity: 0;
    }
  }
  
  /* 點擊時的激活動畫 */
  .exchange-icon-active .exchange-outer-ring {
    animation: exchange-active-outer 1.6s ease-out;
  }
  
  .exchange-icon-active .exchange-inner-ring {
    animation: exchange-active-inner 1.6s ease-out;
  }
  
  .exchange-icon-active .exchange-core {
    animation: exchange-active-core 1.6s ease-out;
  }
  
  /* 環形激活動畫 */
  .exchange-ring-active {
    animation: exchange-ring-burst 1.6s ease-out !important;
  }
  
  /* 核心激活動畫 */
  .exchange-core-active {
    animation: exchange-core-burst 1.6s ease-out !important;
  }
  
  /* 箭頭激活動畫 */
  .exchange-arrow-active {
    animation: exchange-arrow-burst 1.6s ease-out !important;
  }
  
  @keyframes exchange-active-outer {
    0% {
      transform: scale(1);
    }
  
    25% {
      transform: scale(1.2);
      box-shadow: 0 0 40px rgba(0, 245, 255, 1);
    }
  
    50% {
      transform: scale(1.1);
      box-shadow: 0 0 50px rgba(0, 245, 255, 0.8);
    }
  
    75% {
      transform: scale(1.15);
      box-shadow: 0 0 35px rgba(0, 245, 255, 0.6);
    }
  
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes exchange-active-inner {
    0% {
      transform: scale(1);
    }
  
    25% {
      transform: scale(0.8);
      box-shadow: 0 0 35px rgba(255, 0, 110, 1);
    }
  
    50% {
      transform: scale(0.9);
      box-shadow: 0 0 45px rgba(255, 0, 110, 0.8);
    }
  
    75% {
      transform: scale(0.85);
      box-shadow: 0 0 30px rgba(255, 0, 110, 0.6);
    }
  
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes exchange-active-core {
    0% {
      transform: translate(-50%, -50%) scale(1);
    }
  
    25% {
      transform: translate(-50%, -50%) scale(1.3);
      box-shadow:
        0 0 40px rgba(0, 245, 255, 1),
        inset 0 0 40px rgba(0, 245, 255, 0.5);
    }
  
    50% {
      transform: translate(-50%, -50%) scale(1.2);
      box-shadow:
        0 0 50px rgba(191, 0, 255, 0.8),
        inset 0 0 30px rgba(191, 0, 255, 0.4);
    }
  
    75% {
      transform: translate(-50%, -50%) scale(1.25);
      box-shadow:
        0 0 35px rgba(0, 245, 255, 0.6),
        inset 0 0 35px rgba(0, 245, 255, 0.3);
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
  }
  
  @keyframes exchange-ring-burst {
    0% {
      transform: scale(1);
      opacity: 1;
    }
  
    25% {
      transform: scale(1.3);
      opacity: 0.8;
      box-shadow: 0 0 50px currentColor;
    }
  
    50% {
      transform: scale(1.15);
      opacity: 0.9;
      box-shadow: 0 0 60px currentColor;
    }
  
    75% {
      transform: scale(1.2);
      opacity: 0.85;
      box-shadow: 0 0 40px currentColor;
    }
  
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }
  
  @keyframes exchange-core-burst {
    0% {
      transform: translate(-50%, -50%) scale(1);
      filter: brightness(1);
    }
  
    25% {
      transform: translate(-50%, -50%) scale(1.4);
      filter: brightness(1.5);
      box-shadow:
        0 0 60px var(--neon-blue),
        inset 0 0 50px rgba(0, 245, 255, 0.6);
    }
  
    50% {
      transform: translate(-50%, -50%) scale(1.3);
      filter: brightness(1.3);
      box-shadow:
        0 0 80px var(--neon-purple),
        inset 0 0 40px rgba(191, 0, 255, 0.5);
    }
  
    75% {
      transform: translate(-50%, -50%) scale(1.35);
      filter: brightness(1.4);
      box-shadow:
        0 0 50px var(--neon-blue),
        inset 0 0 45px rgba(0, 245, 255, 0.4);
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1);
      filter: brightness(1);
    }
  }
  
  @keyframes exchange-arrow-burst {
    0% {
      opacity: 0.6;
      transform: scale(1);
    }
  
    25% {
      opacity: 1;
      transform: scale(1.3);
      filter: drop-shadow(0 0 20px currentColor);
    }
  
    50% {
      opacity: 0.9;
      transform: scale(1.2);
      filter: drop-shadow(0 0 25px currentColor);
    }
  
    75% {
      opacity: 1;
      transform: scale(1.25);
      filter: drop-shadow(0 0 15px currentColor);
    }
  
    100% {
      opacity: 0.6;
      transform: scale(1);
    }
  }
  
  .exchange-tab {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
    font-weight: 600;
  }
  
  .exchange-tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }
  
  .exchange-tab.active {
    color: var(--text-primary);
    background: rgba(0, 245, 255, 0.1);
  }
  
  .exchange-tab.active::after {
    transform: scaleX(1);
  }
  
  .exchange-items-container {
    width: 100%;
    max-width: 1600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .exchange-items-section {
    background: var(--bg-glass);
    border: 1px solid var(--border-dim);
    backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .exchange-items-section:last-child {
    margin-right: 0;
  }
  
  .exchange-section-header {
    background: var(--bg-card);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-dim);
    flex-shrink: 0;
  }
  
  .exchange-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin: 0;
  }
  
  .exchange-search-filters {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  .exchange-search-box {
    position: relative;
  }
  
  .exchange-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
  }
  
  .exchange-search-box input {
    padding: 8px 12px 8px 35px;
    background: var(--bg-dark);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    width: 200px;
    transition: all var(--trans-fast);
  }
  
  .exchange-search-box input:focus {
    outline: none;
    border-color: var(--border-neon);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
    width: 250px;
  }
  
  .exchange-price-sort-btn {
    padding: 8px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-dim);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--trans-fast);
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  .exchange-price-sort-btn:hover {
    border-color: var(--border-neon);
    color: var(--text-primary);
  }
  
  .exchange-price-sort-btn i {
    font-size: 0.8rem;
  }
  
  /* ===== 物品網格 ===== */
  .exchange-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    position: relative;
  }
  
  /* ===== 物品卡片 ===== */
  .exchange-inventory-item,
  .exchange-target-item {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    padding: 10px;
    cursor: pointer;
    transition: all var(--trans-fast);
    position: relative;
    overflow: hidden;
  }
  
  .exchange-inventory-item::before,
  .exchange-target-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      135deg,
      transparent 40%,
      rgba(0, 245, 255, 0.1) 50%,
      transparent 60%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
  }
  
  .exchange-inventory-item:hover::before,
  .exchange-target-item:hover::before {
    transform: translateX(100%);
  }
  
  .exchange-inventory-item:hover,
  .exchange-target-item:hover {
    border-color: var(--border-neon);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.3);
  }
  
  /* 使用data屬性和類名雙重控制選中狀態 */
  .exchange-inventory-item.selected,
  .exchange-target-item.selected,
  .exchange-inventory-item[data-selected="true"],
  .exchange-target-item[data-selected="true"] {
    border: 2px solid var(--cyber-primary) !important;
    background: rgba(255, 0, 110, 0.1) !important;
    box-shadow:
      0 0 10px rgba(255, 0, 110, 0.3),
      inset 0 0 10px rgba(255, 0, 110, 0.1) !important;
  }
  
  /* 減少邊框發光效果 */
  .exchange-inventory-item.selected::before,
  .exchange-target-item.selected::before,
  .exchange-inventory-item[data-selected="true"]::before,
  .exchange-target-item[data-selected="true"]::before {
    opacity: 0.6;
    background: linear-gradient(45deg, var(--cyber-primary), var(--cyber-accent));
    transform: translateX(100%) !important;
  }
  
  .exchange-inventory-item.selected::after,
  .exchange-target-item.selected::after,
  .exchange-inventory-item[data-selected="true"]::after,
  .exchange-target-item[data-selected="true"]::after {
    opacity: 0.3;
  }
  
  /* 物品圖片容器 */
  .exchange-item-image-container {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    background: radial-gradient(
      ellipse at center,
      rgba(0, 245, 255, 0.05),
      transparent
    );
  }
  
  .exchange-item-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0, 245, 255, 0.5));
  }
  
  /* 物品詳情 */
  .exchange-item-details {
    text-align: center;
  }
  
  .exchange-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .exchange-item-wear {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
  }
  
  .exchange-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cyber-success);
  }
  
  /* 稀有度指示器 */
  .exchange-item-rarity-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
  }
  
  .exchange-common .exchange-item-rarity-indicator {
    background: var(--rarity-common);
    box-shadow: 0 0 10px var(--rarity-common);
  }
  
  .exchange-rare .exchange-item-rarity-indicator {
    background: var(--rarity-rare);
    box-shadow: 0 0 10px var(--rarity-rare);
  }
  
  .exchange-legendary .exchange-item-rarity-indicator {
    background: var(--rarity-legendary);
    box-shadow: 0 0 10px var(--rarity-legendary);
  }
  
  .exchange-mythical .exchange-item-rarity-indicator {
    background: var(--rarity-mythical);
    box-shadow: 0 0 10px var(--rarity-mythical);
  }
  
  /* 物品數量 */
  .exchange-item-quantity {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--bg-dark);
    border: 1px solid var(--border-neon);
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
  }
  
  /* ===== 載入和空狀態 ===== */
  .exchange-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-muted);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background-color: var(--mystic-bg);
  }
  
  /* 載入動畫樣式 */
  .exchange-modern-loader {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
  }
  
  .exchange-loader-shape {
    width: 40px;
    height: 40px;
    position: relative;
    background: transparent;
    transform: rotate(45deg);
  }
  
  .exchange-loader-shape::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--cyber-primary);
    border-right-color: var(--cyber-primary);
    border-radius: 50%;
    animation: loaderSpin 1.5s linear infinite;
  }
  
  .exchange-loader-shape::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 3px solid transparent;
    border-bottom-color: var(--cyber-secondary);
    border-left-color: var(--cyber-secondary);
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite reverse;
  }
  
  .exchange-empty-message {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
  }
  
  .exchange-empty-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem auto;
  }
  
  .exchange-empty-icon i {
    font-size: 2rem;
    color: var(--mystic-accent);
    animation: exchange-cyber-pulse 2s infinite ease-in-out;
  }
  
  .exchange-login-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #001a2e, #003d5b, #0066cc);
    border: 1px solid #0080ff;
    border-radius: 0;
    color: var(--text-primary);
    font-family: var(--font-special);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    clip-path: polygon(
      0 0,
      calc(100% - 8px) 0,
      100% 50%,
      calc(100% - 8px) 100%,
      0 100%
    );
    text-shadow: 0 0 10px rgba(0, 128, 255, 0.8);
    box-shadow:
      0 0 20px rgba(0, 102, 204, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .exchange-login-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent
    );
    transition: left 0.6s ease;
  }
  
  .exchange-login-btn:hover::before {
    left: 100%;
  }
  
  .exchange-login-btn:hover {
    background: linear-gradient(135deg, #0066cc, #0080ff, #00aaff);
    transform: translateY(-2px);
    box-shadow:
      0 8px 25px rgba(0, 128, 255, 0.6),
      0 0 30px rgba(0, 170, 255, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: #00aaff;
  }
  
  .exchange-login-btn i {
    margin-right: 0.5rem;
  }
  
  /* 載入容器樣式 */
  #exchange-inventory-loading,
  #exchange-target-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    background-color: var(--mystic-bg);
  }
  
  #exchange-inventory-loading p,
  #exchange-target-loading p {
    color: #888;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
  }
  
  /* 通知容器 */
  .exchange-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
  }
  
  /* 神秘背景效果 */
  .exchange-mystical-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
  }
  
  .exchange-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
      radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
      radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    animation: twinkle 8s ease-in-out infinite;
  }
  
  .exchange-mist {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      ellipse at center,
      rgba(37, 14, 63, 0.2) 0%,
      rgba(10, 5, 20, 0.1) 70%,
      rgba(5, 2, 10, 0.05) 100%
    );
    animation: mist-move 20s ease-in-out infinite;
  }
  
  /* Cyber Glitch 效果 */
  .exchange-cyber-glitch {
    position: relative;
  }
  
  .exchange-cyber-glitch:hover {
    animation:
      glitch 1s,
      blur 1s,
      hue 1s;
  }
  
  .exchange-cyber-glitch::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    animation: glitch 3s infinite linear alternate-reverse;
    color: #ff00c1;
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
  }
  
  .exchange-cyber-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    left: -2px;
    text-shadow:
      -2px 0 #00fff9,
      2px 2px #ff00c1;
    animation: glitch 2s infinite linear alternate-reverse;
    color: #00fff9;
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
  }
  
  /* 按鈕文字樣式 */
  .exchange-btn-text {
    font-weight: 600;
  }
  
  /* 響應式設計 */
  @media (max-width: 1270px) {
    .exchange-main {
      padding: 10px;
    }
  
    .exchange-left-right-columns-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 15px;
      margin-bottom: 20px;
    }
  
    .exchange-left-column,
    .exchange-right-column {
      max-width: none;
    }
  
    .exchange-side-panel {
      min-height: 250px;
      padding: 15px;
    }
  
    .exchange-tabs-container {
      display: flex;
      margin-bottom: 20px;
    }
  
    .exchange-items-section {
      display: none;
    }
  
    .exchange-main.show-inventory #exchange-inventory-items-section {
      display: block !important;
    }
  
    .exchange-main.show-target #exchange-target-items-section {
      display: block !important;
    }
  
    .exchange-items-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 0.8rem;
      max-height: 400px;
    }
  
    .exchange-search-box input {
      width: 150px;
    }
  }
  
  /* ===== 桌面版佈局 (與升級頁面一致) ===== */
  @media (min-width: 1271px) {
    .exchange-left-right-columns-container {
      display: contents;
    }
  
    .exchange-left-column,
    .exchange-right-column {
      justify-content: space-between;
      min-width: 400px;
      width: 400px;
    }
  
    .exchange-left-column {
      justify-content: flex-start;
    }
  
    .exchange-right-column {
      justify-content: flex-end;
    }
  
    .exchange-side-panel {
      min-height: 520px;
      width: 400px;
      max-width: 400px;
      padding: 20px;
    }
  
    .exchange-selected-item-wrapper {
      min-height: 250px;
    }
  
    .exchange-price-display {
      width: 400px;
      max-width: 400px;
    }
  
    .exchange-items-grid {
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 12px;
      max-height: 600px;
      min-height: 450px;
      overflow-y: auto;
      overflow-x: hidden;
    }
  
    .exchange-tabs-container {
      display: none !important;
    }
  
    .exchange-items-container {
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      min-height: 500px;
      margin: 30px auto 0;
    }
  }
  
  /* ===== 分頁容器和選中物品樣式 ===== */
  .exchange-pagination-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .exchange-selected-items-container {
    min-height: 200px;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  
  .exchange-selected-item {
    padding: 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border-neon);
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 90%;
    transition: all 0.3s ease;
  }
  
  .exchange-selected-item:hover {
    border-color: var(--border-neon);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    transform: translateY(-2px);
  }
  
  .exchange-selected-item-image-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  .exchange-selected-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .exchange-selected-item-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 5px;
    width: 100%;
  }
  
  .exchange-selected-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
  }
  
  .exchange-selected-item-wear {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .exchange-selected-item-price {
    font-weight: 700;
    color: var(--cyber-success);
    font-size: 1rem;
    text-shadow: var(--glow-small);
  }
  
  .exchange-remove-item-btn {
    position: absolute;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #424047;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all var(--trans-fast);
    z-index: 10;
  }
  
  .exchange-remove-item-btn:hover {
    background: #48474d;
    color: white;
    transform: translateY(-2px);
  }
  
  /* ===== 分頁控制樣式 ===== */
  .exchange-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
  }
  
  .exchange-page-nav-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
  }
  
  .exchange-page-nav-btn:hover:not(:disabled) {
    border-color: var(--border-neon);
    background: var(--neon-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
  }
  
  .exchange-page-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-darker);
  }
  
  .exchange-page-indicator {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 40px;
    text-align: center;
  }
  
  /* ===== 稀有度顏色 ===== */
  .exchange-selected-item.common {
    border-color: var(--rarity-common);
  }
  
  .exchange-selected-item.rare {
    border-color: var(--rarity-rare);
  }
  
  .exchange-selected-item.legendary {
    border-color: var(--rarity-legendary);
  }
  
  .exchange-selected-item.mythical {
    border-color: var(--rarity-mythical);
  }
  
  /* ===== 響應式設計 ===== */
  @media (max-width: 1270px) {
    .exchange-selected-items-container {
      min-height: 180px;
      padding: 8px;
    }
  
    .exchange-selected-item {
      padding: 8px;
      min-height: 175px;
      gap: 8px;
      width: 100px;
      max-width: 95%;
      flex-direction: column;
      text-align: center;
    }
  
    .exchange-selected-item-image-container {
      width: 80px;
      height: 80px;
      margin-bottom: 0;
    }
  
    .exchange-selected-item-info {
      gap: 4px;
      margin-top: -8px;
      align-items: center;
      text-align: center;
    }
  
    .exchange-selected-item-name {
      font-size: 0.7rem;
      line-height: 1.2;
      font-weight: 600;
      -webkit-line-clamp: 3;
    }
  
    .exchange-selected-item-wear {
      font-size: 0.65rem;
      line-height: 1.2;
    }
  
    .exchange-selected-item-price {
      font-size: 0.8rem;
      margin-top: 2px;
    }
  
    .exchange-remove-item-btn {
      top: 8px;
      right: 8px;
    }
  
    .exchange-pagination-controls {
      gap: 6px;
      margin-top: 5px;
      margin-bottom: 25px;
      background: none;
      border: none;
      box-shadow: none;
    }
  
    .exchange-page-nav-btn {
      width: 28px;
      height: 28px;
      font-size: 0.8rem;
    }
  
    .exchange-page-indicator {
      font-size: 0.75rem;
    }
  }
  
  /* ===== 桌面版專用樣式 ===== */
  @media (min-width: 1271px) {
    #exchange-inventory-showcase .exchange-pagination-container {
      min-height: 300px;
    }
  
    #exchange-inventory-showcase .exchange-selected-items-container {
      min-height: 280px;
    }
  
    #exchange-inventory-showcase .exchange-pagination-controls {
      position: static;
      margin-top: 10px;
    }
  }
  
  /* ===== 空狀態消息居中樣式 ===== */
  .exchange-empty-message {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    color: var(--text-muted) !important;
    z-index: 10 !important;
    width: 100% !important;
    max-width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.9rem !important;
  }
  
  .exchange-empty-message p {
    margin: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    color: var(--text-muted) !important;
  }
  
  #exchange-target-empty {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    color: var(--text-muted) !important;
    z-index: 10 !important;
    width: 100% !important;
    max-width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  #exchange-inventory-empty {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    color: var(--text-muted) !important;
    z-index: 10 !important;
    width: 100% !important;
    max-width: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* 確保空狀態容器位置正確 */
  .exchange-items-section {
    position: relative !important;
    min-height: 300px !important;
  }
  
  .exchange-items-section .exchange-items-grid {
    position: relative !important;
    min-height: 250px !important;
  }
  
  /* ===== 全新科技風格交換圖標設計 ===== */
  .exchange-icon-container {
    width: 240px;
    height: 240px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .exchange-icon-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* 科技圓形容器 */
  .exchange-tech-circle {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
  }
  
  /* 外層旋轉環 */
  .exchange-outer-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: tech-ring-rotate 8s linear infinite;
  }
  
  .ring-segment {
    position: absolute;
    width: 30px;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    box-shadow: 0 0 15px var(--neon-blue);
  }
  
  .segment-1 {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: segment-pulse 3s ease-in-out infinite;
  }
  
  .segment-2 {
    top: 50%;
    right: 10px;
    transform: translateY(-50%) rotate(90deg);
    animation: segment-pulse 3s ease-in-out infinite 0.75s;
  }
  
  .segment-3 {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    animation: segment-pulse 3s ease-in-out infinite 1.5s;
  }
  
  .segment-4 {
    top: 50%;
    left: 10px;
    transform: translateY(-50%) rotate(270deg);
    animation: segment-pulse 3s ease-in-out infinite 2.25s;
  }
  
  /* 內層旋轉環 */
  .exchange-inner-ring {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid transparent;
    background-clip: padding-box;
    animation: tech-ring-rotate-reverse 6s linear infinite;
  }
  
  .inner-glow-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(0, 245, 255, 0.1) 0%,
      transparent 70%
    );
    animation: inner-glow-pulse 4s ease-in-out infinite;
  }
  
  /* 中心核心圓形 */
  .exchange-core-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(15, 15, 26, 0.95) 0%,
      rgba(10, 10, 15, 0.9) 100%
    );
    border: 2px solid var(--neon-blue);
    box-shadow:
      0 0 30px rgba(0, 245, 255, 0.3),
      inset 0 0 30px rgba(0, 245, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  
  .core-glow-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    border-radius: 50%;
    z-index: -1;
  }
  
  /* 交換符號 */
  .exchange-symbol {
    position: relative;
    width: 50px;
    height: 30px;
  }
  
  .exchange-arrows {
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .arrow-left,
  .arrow-right {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 2px;
  }
  
  .arrow-left {
    left: 0;
    transform: translateY(-50%);
    animation: arrow-flow-left 2s ease-in-out infinite;
  }
  
  .arrow-right {
    right: 0;
    transform: translateY(-50%);
    animation: arrow-flow-right 2s ease-in-out infinite 1s;
  }
  
  .arrow-body {
    width: 15px;
    height: 2px;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
  }
  
  .arrow-left .arrow-head {
    position: absolute;
    right: -6px;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 6px solid var(--neon-green);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    filter: drop-shadow(0 0 5px var(--neon-green));
  }
  
  .arrow-right .arrow-head {
    position: absolute;
    left: -6px;
    top: -3px;
    width: 0;
    height: 0;
    border-right: 6px solid var(--neon-pink);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    filter: drop-shadow(0 0 5px var(--neon-pink));
  }
  
  .arrow-right .arrow-body {
    background: var(--neon-pink);
    box-shadow: 0 0 8px var(--neon-pink);
  }
  
  .center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--neon-yellow);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--neon-yellow);
    animation: center-dot-pulse 3s ease-in-out infinite;
  }
  
  /* 返還金額顯示區 */
  .exchange-amount-display {
    text-align: center;
    z-index: 10;
  }
  
  .amount-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
    animation: amount-glow 3s ease-in-out infinite;
  }
  
  /* 能量脈衝效果 */
  .exchange-energy-pulses {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  
  .energy-pulse {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--neon-blue);
    opacity: 0;
    animation: energy-pulse-expand 4s ease-out infinite;
  }
  
  .pulse-1 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    animation-delay: 0s;
  }
  
  .pulse-2 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-color: var(--neon-purple);
    animation-delay: 1.3s;
  }
  
  .pulse-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-color: var(--neon-pink);
    animation-delay: 2.6s;
  }
  
  .amount-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
  }
  
  /* 科技數據流 */
  .exchange-data-streams {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  
  .data-stream {
    position: absolute;
    width: 2px;
    height: 20px;
    background: linear-gradient(
      to bottom,
      transparent,
      var(--neon-blue),
      transparent
    );
    border-radius: 1px;
    opacity: 0;
    animation: data-stream-flow 3s ease-in-out infinite;
  }
  
  .stream-1 {
    top: 20px;
    left: 30%;
    animation-delay: 0s;
  }
  
  .stream-2 {
    top: 40px;
    right: 25%;
    animation-delay: 0.8s;
  }
  
  .stream-3 {
    bottom: 30px;
    left: 70%;
    animation-delay: 1.6s;
  }
  
  .stream-4 {
    bottom: 20px;
    right: 40%;
    animation-delay: 2.4s;
  }
  
  /* ===== 動畫定義 ===== */
  
  /* 環形旋轉動畫 */
  @keyframes tech-ring-rotate {
    0% {
      transform: rotate(0deg);
    }
  
    100% {
      transform: rotate(360deg);
    }
  }
  
  @keyframes tech-ring-rotate-reverse {
    0% {
      transform: rotate(0deg);
    }
  
    100% {
      transform: rotate(-360deg);
    }
  }
  
  /* 分段脈衝動畫 */
  @keyframes segment-pulse {
    0%,
    100% {
      opacity: 0.6;
      box-shadow: 0 0 15px var(--neon-blue);
      transform: scale(1);
    }
  
    50% {
      opacity: 1;
      box-shadow: 0 0 25px var(--neon-blue);
      transform: scale(1.1);
    }
  }
  
  /* 內層發光脈衝 */
  @keyframes inner-glow-pulse {
    0%,
    100% {
      opacity: 0.3;
    }
  
    50% {
      opacity: 0.6;
    }
  }
  
  /* 核心發光旋轉 */
  @keyframes core-glow-rotate {
    0% {
      transform: rotate(0deg);
    }
  
    100% {
      transform: rotate(360deg);
    }
  }
  
  /* 箭頭流動動畫 */
  @keyframes arrow-flow-left {
    0%,
    100% {
      opacity: 0.6;
      transform: translateY(-50%) translateX(0px);
    }
  
    50% {
      opacity: 1;
      transform: translateY(-50%) translateX(5px);
    }
  }
  
  @keyframes arrow-flow-right {
    0%,
    100% {
      opacity: 0.6;
      transform: translateY(-50%) translateX(0px);
    }
  
    50% {
      opacity: 1;
      transform: translateY(-50%) translateX(-5px);
    }
  }
  
  /* 中心點脈衝 */
  @keyframes center-dot-pulse {
    0%,
    100% {
      transform: translate(-50%, -50%) scale(1);
      box-shadow: 0 0 15px var(--neon-yellow);
    }
  
    50% {
      transform: translate(-50%, -50%) scale(1.3);
      box-shadow: 0 0 25px var(--neon-yellow);
    }
  }
  
  /* 金額發光動畫 */
  @keyframes amount-glow {
    0%,
    100% {
      text-shadow: 0 0 10px var(--neon-green);
    }
  
    50% {
      text-shadow:
        0 0 20px var(--neon-green),
        0 0 30px var(--neon-green);
    }
  }
  
  /* 能量脈衝擴散 */
  @keyframes energy-pulse-expand {
    0% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(0.5);
    }
  
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(2);
    }
  }
  
  /* 數據流動畫 */
  @keyframes data-stream-flow {
    0%,
    100% {
      opacity: 0;
      transform: translateY(0px);
    }
  
    50% {
      opacity: 1;
      transform: translateY(-10px);
    }
  }
  
  /* ===== 點擊激活動畫 ===== */
  .exchange-icon-active .exchange-outer-ring {
    animation:
      tech-ring-rotate 0.5s ease-out,
      ring-activate 0.8s ease-out;
  }
  
  .exchange-icon-active .exchange-inner-ring {
    animation:
      tech-ring-rotate-reverse 0.5s ease-out,
      inner-ring-activate 0.8s ease-out;
  }
  
  .exchange-icon-active .exchange-core-center {
    animation: core-activate 0.8s ease-out;
  }
  
  .exchange-icon-active .energy-pulse {
    animation: energy-pulse-activate 0.8s ease-out !important;
  }
  
  .exchange-icon-active .data-stream {
    animation: data-stream-activate 0.8s ease-out !important;
  }
  
  .exchange-icon-active .ring-segment {
    animation: segment-activate 0.8s ease-out !important;
  }
  
  /* 激活動畫定義 */
  @keyframes ring-activate {
    0% {
      transform: scale(1);
    }
  
    50% {
      transform: scale(1.2);
      filter: brightness(1.5) hue-rotate(45deg);
    }
  
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes inner-ring-activate {
    0% {
      transform: scale(1);
    }
  
    50% {
      transform: scale(1.1);
      border-width: 4px;
      box-shadow: 0 0 40px var(--neon-blue);
    }
  
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes core-activate {
    0% {
      transform: translate(-50%, -50%) scale(1);
    }
  
    50% {
      transform: translate(-50%, -50%) scale(1.15);
      box-shadow:
        0 0 60px rgba(0, 245, 255, 0.8),
        inset 0 0 40px rgba(0, 245, 255, 0.3);
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
  }
  
  @keyframes energy-pulse-activate {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.3);
    }
  
    50% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1.5);
    }
  
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(3);
    }
  }
  
  @keyframes data-stream-activate {
    0% {
      opacity: 0;
      height: 10px;
    }
  
    50% {
      opacity: 1;
      height: 40px;
      background: linear-gradient(
        to bottom,
        var(--neon-pink),
        var(--neon-blue),
        var(--neon-purple)
      );
    }
  
    100% {
      opacity: 0;
      height: 10px;
    }
  }
  
  @keyframes segment-activate {
    0% {
      transform: scale(1);
    }
  
    50% {
      transform: scale(1.5);
      box-shadow: 0 0 30px var(--neon-pink);
      background: linear-gradient(90deg, var(--neon-pink), var(--neon-yellow));
    }
  
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes particle-burst {
    0% {
      opacity: 1;
      transform: scale(1);
    }
  
    50% {
      opacity: 1;
      transform: scale(2);
    }
  
    100% {
      opacity: 0;
      transform: scale(0);
    }
  }
  
  @keyframes symbol-activate {
    0% {
      transform: translate(-50%, -50%) scale(1);
    }
  
    50% {
      transform: translate(-50%, -50%) scale(1.3);
      filter: brightness(2);
    }
  
    100% {
      transform: translate(-50%, -50%) scale(1);
    }
  }
  
  @keyframes ripple-activate {
    0% {
      width: 50px;
      height: 50px;
      opacity: 1;
      border-color: rgba(0, 245, 255, 0.8);
    }
  
    100% {
      width: 400px;
      height: 400px;
      opacity: 0;
      border-color: rgba(0, 245, 255, 0);
    }
  }
  
  /* ===== 響應式設計調整 ===== */
  @media (max-width: 1270px) {
    .exchange-main-hexagon {
      width: 150px;
      height: 150px;
    }
  
    .exchange-price-difference {
      bottom: -60px;
      padding: 10px 16px;
      min-width: 130px;
    }
  
    .exchange-price-diff-value {
      font-size: 1rem;
    }
  
    .exchange-input-arrow,
    .exchange-output-arrow {
      width: 50px;
    }
  
    .exchange-input-arrow {
      left: -40px;
    }
  
    .exchange-output-arrow {
      right: -40px;
    }
  }
  
  /* ===== 交換動畫樣式 ===== */
  
  /* 交換按鈕動畫狀態 */
  .exchange-button.exchanging {
    background: linear-gradient(
      135deg,
      var(--neon-yellow) 0%,
      var(--neon-blue) 50%,
      var(--neon-purple) 100%
    );
    animation: exchange-button-pulse 0.8s ease-in-out infinite;
    pointer-events: none;
  }
  
  @keyframes exchange-button-pulse {
    0%,
    100% {
      transform: scale(1);
      box-shadow: 0 0 20px rgba(255, 222, 0, 0.5);
    }
  
    50% {
      transform: scale(1.05);
      box-shadow: 0 0 30px rgba(255, 222, 0, 0.8);
    }
  }
  
  /* 高亮動畫 */
  .exchange-animation-highlight {
    animation: exchange-highlight-pulse 0.4s ease-out;
    border-color: var(--neon-yellow) !important;
    box-shadow:
      inset 0 0 30px rgba(255, 222, 0, 0.3),
      0 0 30px rgba(255, 222, 0, 0.5) !important;
  }
  
  @keyframes exchange-highlight-pulse {
    0% {
      border-color: var(--border-dim);
      box-shadow: none;
    }
  
    50% {
      border-color: var(--neon-yellow);
      box-shadow:
        inset 0 0 30px rgba(255, 222, 0, 0.5),
        0 0 40px rgba(255, 222, 0, 0.8);
      transform: scale(1.02);
    }
  
    100% {
      border-color: var(--neon-yellow);
      box-shadow:
        inset 0 0 30px rgba(255, 222, 0, 0.3),
        0 0 30px rgba(255, 222, 0, 0.5);
      transform: scale(1);
    }
  }
  
  /* 旋轉動畫 */
  .exchange-animation-spin {
    animation: exchange-spin-rotate 0.8s ease-in-out;
  }
  
  @keyframes exchange-spin-rotate {
    0% {
      transform: rotate(0deg) scale(1);
    }
  
    50% {
      transform: rotate(180deg) scale(1.1);
    }
  
    100% {
      transform: rotate(360deg) scale(1);
    }
  }
  
  /* 發光動畫 */
  .exchange-animation-glow {
    animation: exchange-glow-intense 0.8s ease-in-out;
  }
  
  @keyframes exchange-glow-intense {
    0% {
      filter: brightness(1) saturate(1);
    }
  
    50% {
      filter: brightness(1.5) saturate(1.5) hue-rotate(30deg);
    }
  
    100% {
      filter: brightness(1.2) saturate(1.2);
    }
  }
  
  /* 成功動畫 */
  .exchange-animation-success {
    animation: exchange-success-flash 0.4s ease-out;
  }
  
  @keyframes exchange-success-flash {
    0% {
      border-color: var(--neon-yellow);
      box-shadow:
        inset 0 0 30px rgba(255, 222, 0, 0.3),
        0 0 30px rgba(255, 222, 0, 0.5);
    }
  
    50% {
      border-color: var(--neon-green);
      box-shadow:
        inset 0 0 40px rgba(0, 255, 65, 0.5),
        0 0 50px rgba(0, 255, 65, 0.8);
      transform: scale(1.05);
    }
  
    100% {
      border-color: var(--border-dim);
      box-shadow: none;
      transform: scale(1);
    }
  }
  
  /* 交換圖標成功動畫 */
  .exchange-icon-inner.exchange-animation-success {
    animation: exchange-icon-success 0.4s ease-out;
  }
  
  @keyframes exchange-icon-success {
    0% {
      filter: brightness(1);
    }
  
    50% {
      filter: brightness(2) saturate(2) hue-rotate(120deg);
      transform: scale(1.15);
    }
  
    100% {
      filter: brightness(1);
      transform: scale(1);
    }
  }
  