/* 卡片發光特效與平滑移動 */
.card-glow {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glow:hover {
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.3),
                0 8px 10px -6px rgba(59, 130, 246, 0.3);
    transform: translateY(-4px);
}

/* 倉庫與背包格子樣式 - 強制比例與尺寸優化，確保足夠寬敞不擁擠 */
.chest-slot {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box;
    background-color: #8b8b8b;
    border: 3px solid;
    border-color: #373737 #ffffff #ffffff #373737; /* 復刻經典 3D 凹陷質感 */
    image-rendering: pixelated;
    transition: background-color 0.15s ease-in-out;
}

.chest-slot:hover {
    background-color: #c6c6c6;
    border-color: #555555 #ffffff #ffffff #555555;
}

/* 麥塊經典無背景數字標籤 - 高對比深色文字投影，完美防止阻擋物資 Icon */
.mc-count {
    font-family: 'Courier New', Courier, monospace, sans-serif;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 1.5px 1.5px 0px #3f3f3f; /* 經典麥塊 3D 立體陰影 */
    font-size: 11px;
    letter-spacing: -0.5px;
}

/* 標籤按鈕活躍狀態樣式 */
.tab-btn {
    color: #9ca3af;
    background-color: transparent;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #f3f4f6;
}

.tab-btn.active {
    color: #60a5fa;
    border-bottom: 2px solid #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* 雲端大箱子自定義滾動條美化 */
.chest-container #chestGrid {
    scroll-behavior: smooth;
}

.chest-container #chestGrid::-webkit-scrollbar {
    width: 8px;
}

.chest-container #chestGrid::-webkit-scrollbar-track {
    background: #1c0d02; /* 深木質感底 */
    border-radius: 4px;
}

.chest-container #chestGrid::-webkit-scrollbar-thumb {
    background: #5a2e05; /* Minecraft 木皮深褐 */
    border: 1px solid #783e08;
    border-radius: 4px;
}

.chest-container #chestGrid::-webkit-scrollbar-thumb:hover {
    background: #783e08;
}

/* 交易鎖定中覆蓋層，防點擊 */
.btn-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* 麥塊經典全域懸浮提示視窗 (防止被 overflow-y-auto 裁切) */
#mc-global-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    background: rgba(16, 8, 24, 0.98); /* 深紫黑底色 */
    border: 2px solid;
    border-image: linear-gradient(to bottom, #2e1462, #11052c) 1; /* 附魔漸層紫邊框 */
    padding: 10px 14px;
    font-family: 'Courier New', Courier, monospace, sans-serif;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
    max-width: 300px;
    border-radius: 4px;
    backdrop-filter: blur(6px);
}

/* 附魔粉色流光漸層動畫 */
@keyframes pinkFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.enchant-glow {
    background: linear-gradient(135deg, #8b8b8b 20%, #f472b6 50%, #8b8b8b 80%) !important;
    background-size: 200% 200% !important;
    animation: pinkFlow 2.5s ease-in-out infinite !important;
    border-color: #f472b6 #ffffff #ffffff #f472b6 !important; /* 精美粉白立體邊框 */
    image-rendering: pixelated;
}

.enchant-glow:hover {
    background: linear-gradient(135deg, #c6c6c6 20%, #f472b6 50%, #c6c6c6 80%) !important;
    background-size: 200% 200% !important;
}
