
/* ========================================== */
/* 1. 隱藏系統預設滑鼠指針 */
/* ========================================== */
body, 
a, 
button, 
.interactive, 
.magnetic-btn-wrap,
.back-to-top {
    cursor: none !important; 
}

/* ========================================== */
/* 2. 自訂滑鼠游標本體 */
/* ========================================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background-color: #fff; /* 預設白色，搭配 difference 混色模式 */
    border-radius: 50%;
    pointer-events: none;   /* 關鍵：避免滑鼠卡死在自訂游標上，穿透點擊 */
    z-index: 2147483647;   /* 高於頁面遮罩與 SweetAlert */
    transform: translate3d(-50%, -50%, 0); /* 確保圓心對準滑鼠真正的尖端位置 */
    mix-blend-mode: difference; /* 經典文字反色/反相特效 */
    
    /* 內置文字置中排版 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 遮罩／彈窗開啟時停用 difference，避免游標在合成圖層中消失 */
.custom-cursor.is-overlay-visible {
    z-index: 2147483647 !important;
    background-color: #fff !important;
    border: 1px solid #333 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) !important;
    mix-blend-mode: normal !important;
}

/* 即使遮罩由第三方元件非同步建立，也要立即維持游標可見 */
body:has(.swal-overlay.swal-overlay--show-modal) .custom-cursor,
body:has(.black[style*="display: block"]) .custom-cursor {
    z-index: 2147483647 !important;
    background-color: #fff !important;
    border: 1px solid #333 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) !important;
    mix-blend-mode: normal !important;
}

/* ========================================== */
/* 3. 滑鼠游標內的微互動文字 (例如: View) */
/* ========================================== */
.cursor-text {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #000; 
    opacity: 0;
    transform: scale(0); /* 將原本不標準的 scale 改為標準的 transform: scale() */
    text-transform: uppercase;
    white-space: nowrap; /* 避免圓點放大時文字突然折行 */
}


