/* ================= Gakuen Loader Styles ================= */
.gk-loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999; /* 确保在最顶层 */
    display: flex;
    justify-content: center;
    align-items: center; /* 让词条卡片在全屏绝对垂直/水平居中 */
    pointer-events: all; /* 阻挡下方页面的所有点击 */
    cursor: pointer; /* 提示玩家可以点击屏幕任意位置刷新词条 */
    background-color: #f8fafc; /* 亮色模式默认底色，防止首帧闪烁 */
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

/* 暗色模式默认底色 */
[data-bs-theme="dark"] .gk-loader-wrapper {
    background-color: #050505; 
}

/* 渐隐离开页面 */
.gk-loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#gk-loader-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 顶部中央提示面板 - 恒定大小与自适应 */
.gk-tooltip-box {
    position: relative; /* 脱离绝对 top 约束，由父 Flexbox 完美居中 */
    width: 480px;       /* 恒定宽度 */
    height: 170px;      /* 恒定高度 */
    max-width: 90vw;    /* 响应式移动端收缩 */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 2;
    padding: 1.6rem 2.2rem;
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    transition: background 0.3s;
    pointer-events: none; /* 穿透点击，防止点击框内时无法触发刷新 */
    
    /* 1:1 高精度复刻原片右下角的同心圆加交叉网格水印 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Ccircle cx='160' cy='160' r='140' fill='none' stroke='rgba(128,128,128,0.06)' stroke-width='1.5'/%3E%3Ccircle cx='160' cy='160' r='100' fill='none' stroke='rgba(128,128,128,0.05)' stroke-width='1.5'/%3E%3Ccircle cx='160' cy='160' r='60' fill='none' stroke='rgba(128,128,128,0.04)' stroke-width='1.5'/%3E%3Cpath d='M0 160 L160 0 M20 160 L160 20 M0 140 L140 0' stroke='rgba(128,128,128,0.03)' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right bottom;
}

[data-bs-theme="dark"] .gk-tooltip-box {
    background-color: rgba(25, 25, 30, 0.88);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    /* 暗色下水印使用浅白半透 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Ccircle cx='160' cy='160' r='140' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1.5'/%3E%3Ccircle cx='160' cy='160' r='100' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1.5'/%3E%3Ccircle cx='160' cy='160' r='60' fill='none' stroke='rgba(255,255,255,0.02)' stroke-width='1.5'/%3E%3Cpath d='M0 160 L160 0 M20 160 L160 20 M0 140 L140 0' stroke='rgba(255,255,255,0.015)' stroke-width='1'/%3E%3C/svg%3E");
}

.gk-tooltip-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #888;
    letter-spacing: 1px;
}
.gk-tooltip-divider {
    height: 1px;
    background: rgba(128, 128, 128, 0.2);
    margin: 8px 0 12px 0;
}
.gk-tooltip-text {
    font-size: 1.02rem;
    font-weight: 600;
    color: #222;
    line-height: 1.6;
    transition: opacity 0.3s ease, transform 0.3s ease; 
    overflow: hidden;
}
[data-bs-theme="dark"] .gk-tooltip-text {
    color: #ddd;
}

/* 刷新时的下沉淡出效果 */
.gk-tooltip-text.hide {
    opacity: 0;
    transform: translateY(8px);
}

/* 左下角 Now Loading */
.gk-loading-status {
    position: absolute;
    bottom: 5%;
    left: 4%;
    z-index: 2;
    pointer-events: none; /* 穿透点击 */
}
#gk-status-text {
    font-size: 1.2rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 1px;
    color: #333;
    transition: color 0.3s;
}
[data-bs-theme="dark"] #gk-status-text {
    color: #fff;
}
.gk-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(128, 128, 128, 0.3);
    border-top-color: #ec4899;
    border-radius: 50%;
    animation: gkSpin 1s linear infinite;
}
@keyframes gkSpin { 100% { transform: rotate(360deg); } }