/**
 * 洋屿子主题 - 鼠标特效样式
 */

/* ============================================================
   通用 canvas 层
   ============================================================ */
.xy-mouse-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999;
}

/* ============================================================
   1. 鼠标跟随光圈
   ============================================================ */
.xy-mouse-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 999998;
}

.xy-mouse-cursor .xy-cursor-inner,
.xy-mouse-cursor .xy-cursor-outer {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    border: 1px solid currentColor;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    will-change: transform;
}

.xy-mouse-cursor .xy-cursor-inner {
    width: 8px;
    height: 8px;
    background: currentColor;
    opacity: 0.6;
    margin-left: -4px;
    margin-top: -4px;
}

.xy-mouse-cursor .xy-cursor-outer {
    width: 40px;
    height: 40px;
    opacity: 0.35;
    margin-left: -20px;
    margin-top: -20px;
}

.xy-mouse-cursor .xy-cursor-inner.xy-cursor-hover,
.xy-mouse-cursor .xy-cursor-outer.xy-cursor-hover {
    opacity: 0.8;
}

.xy-mouse-cursor .xy-cursor-outer.xy-cursor-hover {
    width: 52px;
    height: 52px;
    margin-left: -26px;
    margin-top: -26px;
}

/* ============================================================
   2. 鼠标指针美化
   ============================================================ */
.xy-pointer-style5,
.xy-pointer-style5 * { cursor: url('../img/mouse-pointer/arr1.png') 0 0, auto !important; }
.xy-pointer-style6,
.xy-pointer-style6 * { cursor: url('../img/mouse-pointer/arr2.png') 0 0, auto !important; }
.xy-pointer-style7,
.xy-pointer-style7 * { cursor: url('../img/mouse-pointer/arr3.png') 0 0, auto !important; }
.xy-pointer-style8,
.xy-pointer-style8 * { cursor: url('../img/mouse-pointer/arr4.png') 0 0, auto !important; }
.xy-pointer-style9,
.xy-pointer-style9 * { cursor: url('../img/mouse-pointer/arr5.png') 0 0, auto !important; }
.xy-pointer-style10,
.xy-pointer-style10 * { cursor: url('../img/mouse-pointer/arr6.png') 0 0, auto !important; }
.xy-pointer-style11,
.xy-pointer-style11 * { cursor: url('../img/mouse-pointer/arr7.png') 0 0, auto !important; }
.xy-pointer-style12,
.xy-pointer-style12 * { cursor: url('../img/mouse-pointer/arr8.png') 0 0, auto !important; }
.xy-pointer-style13,
.xy-pointer-style13 * { cursor: url('../img/mouse-pointer/arr9.png') 0 0, auto !important; }
.xy-pointer-style14,
.xy-pointer-style14 * { cursor: url('../img/mouse-pointer/arr10.png') 0 0, auto !important; }
.xy-pointer-style15,
.xy-pointer-style15 * { cursor: url('../img/mouse-pointer/arr11.png') 0 0, auto !important; }
.xy-pointer-style16,
.xy-pointer-style16 * { cursor: url('../img/mouse-pointer/arr12.png') 0 0, auto !important; }
.xy-pointer-style17,
.xy-pointer-style17 * { cursor: url('../img/mouse-pointer/shubiao1.png') 0 0, auto !important; }
.xy-pointer-style18,
.xy-pointer-style18 * { cursor: url('../img/mouse-pointer/shubiao2.png') 0 0, auto !important; }

/* ============================================================
   3. 点击漂浮文字
   ============================================================ */
.xy-click-float-tip {
    position: absolute;
    z-index: 9999999;
    pointer-events: none;
    white-space: nowrap;
    font-weight: bold;
    font-size: 14px;
    user-select: none;
    -webkit-user-select: none;
    transform: translateX(-50%);
}

.xy-funny-text {
    color: #e74c3c;
    max-width: 260px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.xy-socialist-text {
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

body.dark-theme .xy-funny-text {
    color: #ff7e6b;
}

/* ============================================================
   4. 右键菜单美化
   ============================================================ */
.xy-right-click-menu {
    position: fixed;
    display: none;
    min-width: 170px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 1000000;
    overflow: hidden;
    font-size: 13px;
    padding: 6px 0;
}

.xy-right-click-menu.xy-rcm-show {
    display: block;
    animation: xy-rcm-fade 0.15s ease;
}

@keyframes xy-rcm-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.xy-right-click-menu .xy-rcm-quick {
    display: flex;
    justify-content: space-around;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 4px;
}

.xy-right-click-menu .xy-rcm-quick a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #555;
    transition: all 0.2s ease;
    text-decoration: none;
}

.xy-right-click-menu .xy-rcm-quick a:hover {
    background: rgba(64, 158, 255, 0.12);
    color: #409eff;
}

.xy-right-click-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xy-right-click-menu ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: #444;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.xy-right-click-menu ul li a:hover {
    background: rgba(64, 158, 255, 0.1);
    color: #409eff;
}

.xy-right-click-menu .xy-rcm-divider {
    height: 1px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    margin: 4px 12px;
}

.xy-rcm-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000001;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

/* 暗夜模式 */
body.dark-theme .xy-right-click-menu {
    background: rgba(35, 38, 47, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

body.dark-theme .xy-right-click-menu .xy-rcm-quick {
    border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-theme .xy-right-click-menu .xy-rcm-quick a,
body.dark-theme .xy-right-click-menu ul li a {
    color: #d1d5db;
}

body.dark-theme .xy-right-click-menu .xy-rcm-quick a:hover,
body.dark-theme .xy-right-click-menu ul li a:hover {
    background: rgba(64, 158, 255, 0.15);
    color: #70b8ff;
}

body.dark-theme .xy-right-click-menu .xy-rcm-divider {
    border-top-color: rgba(255,255,255,0.08);
}

/* ============================================================
   4.2 鼠标右键菜单（样式三·极简昼夜毛玻璃）
   ============================================================ */
.xy-rcm3 {
    position: fixed;
    z-index: 99999;
    min-width: 176px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.5);
    font-size: 14px;
    color: #2b2b2b;
    display: none;
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.xy-rcm3.xy-rcm3-show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}
.xy-rcm3 .xy-rcm3-quick {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 6px 6px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 4px;
}
.xy-rcm3 .xy-rcm3-quick a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #2b2b2b;
    font-size: 15px;
    transition: background 0.2s, color 0.2s;
}
.xy-rcm3 .xy-rcm3-quick a:hover {
    background: rgba(64, 158, 255, 0.16);
    color: #409eff;
}
.xy-rcm3 ul { list-style: none; margin: 0; padding: 0; }
.xy-rcm3 ul li a {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    margin: 2px 4px;
    border-radius: 10px;
    color: #2b2b2b;
    transition: background 0.2s, color 0.2s;
}
.xy-rcm3 ul li a i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 15px;
}
.xy-rcm3 ul li a:hover {
    background: rgba(64, 158, 255, 0.16);
    color: #409eff;
}
.xy-rcm3 .xy-rcm3-divider {
    height: 0;
    margin: 5px 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.xy-rcm3-tooltip {
    position: fixed;
    z-index: 100000;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 13px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s, transform 0.2s;
}
.xy-rcm3-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

/* 样式三暗夜模式 */
body.dark-theme .xy-rcm3 {
    background: rgba(28, 30, 36, 0.66);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
    color: #e6e6e6;
}
body.dark-theme .xy-rcm3 .xy-rcm3-quick {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.dark-theme .xy-rcm3 .xy-rcm3-quick a,
body.dark-theme .xy-rcm3 ul li a {
    color: #e6e6e6;
}
body.dark-theme .xy-rcm3 .xy-rcm3-quick a:hover,
body.dark-theme .xy-rcm3 ul li a:hover {
    background: rgba(64, 158, 255, 0.22);
    color: #7cc0ff;
}
body.dark-theme .xy-rcm3 .xy-rcm3-divider {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* 小屏设备隐藏跟随光圈，避免性能问题 */
@media screen and (max-width: 768px) {
    .xy-mouse-cursor,
    .xy-mouse-canvas {
        display: none !important;
    }
}
