/* =========================================================================
   星同道 · 蓝星空共享外壳 (blue-shell)
   统一视觉：蓝色星空背景 + 闪烁星点 + 金色 logo 顶栏 + 会员升级通道
   引入方式（放在 <head> 与 </body> 之间任意位置）：
     <link rel="stylesheet" href="/shared/blue-shell.css">
     <div id="xtd-shell"></div>           可选，顶栏挂载点；缺省自动注入 body 顶部
     <div class="xtd-upsell" data-module="西方占卜"></div>  会员升级通道挂载点
     <script>window.XTD_SHELL={moduleName:'西方占卜',register:'/register.html?from=xifang'}</script>
     <script src="/shared/blue-shell.js"></script>
   风格参照「民俗灵签」：蓝色星空 + 星同道 logo + 游客/会员权益对比表 + 注册 CTA。
   ========================================================================= */

/* —— 蓝星空背景（覆盖页面原背景） —— */
body {
    background: radial-gradient(ellipse at 50% -10%, #1a2e57 0%, #0c1733 45%, #050814 100%) !important;
    color: #e8e6e3;
}
.xtd-bg-pattern {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 18% 22%, rgba(70,130,255,0.12) 0%, transparent 46%),
        radial-gradient(ellipse at 82% 68%, rgba(130,95,210,0.12) 0%, rgba(0,0,0,0) 48%),
        radial-gradient(ellipse at 50% 105%, rgba(40,120,220,0.10) 0%, transparent 52%);
    z-index: -2; pointer-events: none;
}
.xtd-starfield {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; z-index: -1; pointer-events: none;
}
.xtd-star {
    position: absolute; background: #ffffff; border-radius: 50%;
    box-shadow: 0 0 5px rgba(165, 205, 255, 0.9);
    animation: xtd-twinkle var(--dur, 3s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
.xtd-star.big { background: #cfe3ff; box-shadow: 0 0 8px rgba(150, 195, 255, 1); }
@keyframes xtd-twinkle {
    0%, 100% { opacity: 0.18; transform: scale(0.55); }
    50%      { opacity: 1;    transform: scale(1.25); }
}

/* —— 顶栏（logo + 导航 + 登录态）—— 透明玻璃 + 小字号，与全站头部条统一 —— */
.xtd-topbar {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: 12px;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.08);
    font-family: 'Noto Serif SC', serif;
}
.xtd-topbar .xtd-logo { display: flex; align-items: center; gap: 7px; text-decoration: none; color: #ffd700; flex: 0 0 auto; }
.xtd-topbar .xtd-logo img {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2); background: #050813;
}
.xtd-topbar .xtd-logo .xtd-word { font-weight: 700; letter-spacing: 2px; font-size: 12px; }
.xtd-nav { display: flex; gap: 4px; flex: 1 1 auto; flex-wrap: wrap; justify-content: center; }
.xtd-nav a {
    color: #cfd6e6; text-decoration: none; font-size: 12px;
    padding: 4px 10px; border-radius: 8px; transition: .2s; white-space: nowrap;
}
.xtd-nav a:hover { color: #ffd700; background: rgba(255, 215, 0, 0.08); }
.xtd-nav a.active { color: #ffd700; background: rgba(255, 215, 0, 0.12); }
.xtd-user { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.xtd-user .xtd-avatar {
    width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff8c00); color: #0a0a0f;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px;
}
.xtd-user .xtd-nick { color: #e8e6e3; font-size: 12px; }
.xtd-user .xtd-badge { font-size: 11px; color: #0a0a0f; background: #ffd700; padding: 1px 7px; border-radius: 999px; font-weight: 700; }
.xtd-user .xtd-wallet { font-size: 11px; color: #9fb3d9; }
.xtd-user a.xtd-link { color: #cfd6e6; text-decoration: none; font-size: 12px; }
.xtd-user a.xtd-link:hover { color: #ffd700; }
.xtd-user a.xtd-register {
    background: linear-gradient(135deg, #ffd700, #ff8c00); color: #0a0a0f;
    padding: 4px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 12px;
}
.xtd-user a.xtd-register:hover { box-shadow: 0 0 16px rgba(255,215,0,0.4); }

/* —— 会员升级通道：游客 vs 会员 权益对比表 + 注册 CTA —— */
.xtd-upsell { margin: 30px auto; max-width: 860px; padding: 0 16px; font-family: 'Noto Serif SC', serif; }
.xtd-upsell .xtd-upsell-head {
    display: flex; align-items: center; justify-content: center; gap: 16px; margin: 8px 0 18px;
}
.xtd-upsell .xtd-upsell-head .xtd-sh-line { flex: 0 1 120px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,215,0,0.35)); }
.xtd-upsell .xtd-upsell-head .xtd-upsell-head .xtd-sh-line:last-child { background: linear-gradient(90deg, rgba(255,215,0,0.35), transparent); }
.xtd-upsell .xtd-upsell-head h2 { font-size: 1.2rem; font-weight: 700; color: #ffd700; letter-spacing: 4px; margin: 0; }
.xtd-upsell .xtd-cmp-wrap {
    border: 1px solid rgba(255, 215, 0, 0.12); border-radius: 14px;
    background: rgba(255, 255, 255, 0.02); padding: 10px; overflow-x: auto;
}
.xtd-upsell table.xtd-cmp { width: 100%; border-collapse: collapse; font-size: 0.84rem; min-width: 460px; }
.xtd-upsell .xtd-cmp th, .xtd-upsell .xtd-cmp td { padding: 13px 14px; text-align: center; border-bottom: 1px solid rgba(255, 215, 0, 0.07); }
.xtd-upsell .xtd-cmp thead th { font-weight: 700; letter-spacing: 1px; color: #ffd700; font-size: 0.92rem; border-bottom: 1px solid rgba(255, 215, 0, 0.28); }
.xtd-upsell .xtd-cmp .xtd-feat { text-align: left !important; color: #d8cba0; min-width: 150px; font-weight: 600; }
.xtd-upsell .xtd-cmp .xtd-guest { color: #9a9a9a; }
.xtd-upsell .xtd-cmp .xtd-member { color: #ffd700; background: linear-gradient(180deg, rgba(255,215,0,0.10), rgba(255,215,0,0.03)); }
.xtd-upsell .xtd-cmp tbody tr:hover td { background: rgba(255, 215, 0, 0.045); }
.xtd-upsell .xtd-yes { color: #ffd700; font-size: 1.05rem; font-weight: 700; }
.xtd-upsell .xtd-no { color: #5a5a5a; font-size: 1.0rem; font-weight: 700; }
.xtd-upsell .xtd-note {
    margin: 14px 14px 4px; font-size: 0.78rem; color: #8a7a4a; line-height: 1.75;
    border-left: 2px solid rgba(255, 215, 0, 0.3); padding-left: 12px;
}
.xtd-upsell .xtd-note b { color: #ffd700; font-weight: 600; }
.xtd-upsell .xtd-cta {
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,140,0,0.05));
    border: 1px solid rgba(255, 215, 0, 0.2); border-radius: 16px;
    padding: 28px 32px; margin: 22px 0 8px; text-align: center;
}
.xtd-upsell .xtd-cta h3 { font-size: 1.35rem; color: #ffd700; letter-spacing: 3px; margin-bottom: 8px; }
.xtd-upsell .xtd-cta p { font-size: 0.9rem; color: #888; margin-bottom: 18px; }
.xtd-upsell .xtd-cta-btn {
    display: inline-block; padding: 13px 46px; font-size: 1.1rem; font-weight: 700;
    font-family: 'Noto Serif SC', serif; background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none; border-radius: 10px; color: #0a0a0f; cursor: pointer; text-decoration: none;
    letter-spacing: 4px; transition: transform .2s, box-shadow .2s;
}
.xtd-upsell .xtd-cta-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(255,215,0,0.35); }

@media (max-width: 768px) {
    .xtd-topbar { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
    .xtd-nav { order: 3; flex-basis: 100%; justify-content: flex-start; }
    .xtd-upsell .xtd-cmp { font-size: 0.78rem; }
}
@media (prefers-reduced-motion: reduce) {
    .xtd-star { animation: none !important; opacity: 0.7; }
}
