/* ========================================================
   0. 移动端比例防火墙及视觉样式自定义
   ======================================================== */
html, body {
    margin: 0;
    padding: 0 !important;
    overflow-x: hidden;
    -webkit-text-size-adjust: none; /* 仪表盘需要固定信息密度，禁止 iOS 自动放大文字 */
    -ms-text-size-adjust: 100%;      /* 针对老版 Windows 移动端 */
    text-size-adjust: none;  /* 标准属性 */
}

#main-content,
#main-content * {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}
/* 1. 统一字体防护 */
#input-search, .timer-custom-input, 
#login-form input, #reg-form input,
#btn-login, #btn-register {
font-size: 16px !important;
}

.rank-symbol-col {
flex: 1 1 auto !important;
min-width: 44px !important;
}

.rank-meta-col {
flex: 0 999 42px !important;
min-width: 0 !important;
overflow: hidden !important;
}

.rank-value-col {
flex: 0 99 96px !important;
min-width: 0 !important;
overflow: hidden !important;
}

.rank-ratio-col {
flex: 0 1 44px !important;
min-width: 34px !important;
}

.index-name-col {
flex: 0 1 132px !important;
min-width: 88px !important;
overflow: hidden !important;
white-space: nowrap !important;
}

.index-title-col {
flex: 1 999 0 !important;
min-width: 0 !important;
overflow: hidden !important;
}

.index-value-col {
flex: 0 0 96px !important;
min-width: 76px !important;
overflow: hidden !important;
white-space: nowrap !important;
}

.feed-text-content,
.feed-detail-content {
white-space: break-spaces;
}

/* ========================================================
   1. 变量与全局重置 (Variables & Reset)
   ======================================================== */
:root {
--gap: 8px;
--radius: 5px;
--bg: #0a0b0d;
--card-bg: #16171a;
--border: #2d2e32;
--blue: #60a5fa;
--blue-muted: rgba(96, 165, 250, 0.4);
--text-main: #d1d5db;
--text-muted: #4b5563;

/* 严密的层级防火墙 */
--z-base: 1;
--z-hover: 9999;     /* 悬停卡片不得超过 10000 */
--z-mask: 10000;    /* 遮罩层 */
--z-nav: 10001;     /* 导航栏最高，确保点击 */
--z-resizer: 10005;
--z-modal: 20000;
}

/*
 * Visibility contract
 * style.css loads after Tailwind and redefines display on many
 * components (flex/grid/block). Tailwind's .hidden then loses the
 * cascade and "hidden" elements stay visible. Re-assert it here so
 * display:none always wins unless a later show-state rule also uses
 * !important (e.g. .modal-show).
 */
.hidden {
    display: none !important;
}

body {
scrollbar-width: none !important; 
-ms-overflow-style: none !important; 
background-color: var(--bg);
color: var(--text-main);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
margin: 0; 
padding: var(--gap); /* 只保留 body 的 8px 间距 */
overflow-y: auto; 
min-height: 100vh;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none !important; }
* { font-style: normal !important; box-sizing: border-box; }

/* ========================================================
   2. 核心布局网格修正版
   ======================================================== */

/* A 区域整体封装：焊死背景，充当消失线 */
#Header-A-Zone {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: var(--z-nav);
background-color: var(--bg); /* 必须是 var(--bg) 实色，实现物理遮挡 */
padding: var(--gap) 0;       /* 修改点：左右间距设为 0，让容器宽度贴边 */
display: flex;
flex-direction: column;
gap: var(--gap);     /* Scrolling 和 Navigation 之间的 8px Gap */
pointer-events: none;/* 防止容器本身拦截下方点击，但内部元素需恢复 */
}
#Header-A-Zone > * { pointer-events: auto; }

.dashboard-grid {
display: grid;
position: relative;
/* 移除原有的 Scrolling 和 Navigation 区域定义 */
grid-template-areas:
"MainCard MainCard"
"LeftColumn RightColumn";
grid-template-columns: var(--left-ratio, 35fr) var(--right-ratio, 65fr);
/* 修改点：从 108px 改为 116px，防止 MainCard 的顶部被 Header 遮挡 */
padding-top: 116px;
column-gap: var(--gap); 
row-gap: var(--gap);
width: 100%;
align-items: start; 
}

/* 跑马灯样式简化：不再需要 position: fixed */
#Scrolling { 
position: relative; /* [核心修正]：为绝对定位的前缀标题提供定位围墙 */
height: 46px;
background: var(--card-bg); 
display: flex;
align-items: center;
overflow: hidden;
font-family:  "Microsoft YaHei", sans-serif;
white-space: nowrap;
}

/* 导航栏样式简化：不再需要 position: fixed */
#Navigation { 
background: var(--card-bg); /* 改回卡片色 */
height: 46px; 
padding-left: 12px;   /* 修改点：增加到 12px，防止图标死贴屏幕边缘 */
padding-right: 8px;   /* 保持右侧呼吸感 */
overflow: visible !important;
}

       /* 左右大柱子容器 */
#LeftColumn, #RightColumn { 
grid-area: LeftColumn; /* 初始占位 */
display: flex; 
flex-direction: column; 
gap: var(--gap); 
min-height: 0; 
touch-action: manipulation;
}
#LeftColumn { grid-area: LeftColumn; }
#RightColumn { grid-area: RightColumn; }

/* [物理坍缩] 修正版：通过 collapsed 类名彻底隐藏 */
.collapsed {
display: none !important;
}

#PatchLeft, #PatchRight { 
display: flex; 
flex-direction: column; 
gap: var(--gap); 
min-height: 0;
/* --- 必须改为 visible，否则菜单必断 --- */
overflow: visible !important; 
background: var(--card-bg); 
border: 1px solid var(--border); 
border-radius: var(--radius); 
box-sizing: border-box; 
flex-shrink: 0; 
}

#MainCard { grid-area: MainCard; position: relative; }
#ReportCard, #FeedCard, #Overview { 
display: grid; 
grid-template-columns: repeat(2, minmax(0, 1fr)); 
gap: var(--gap); 
}

/* 保安逻辑：没卡片时隐藏容器 */
#MainCard:not(:has([data-task-key])),
#LeftColumn:not(:has([data-task-key])),
#RightColumn:not(:has([data-task-key])) { 
display: none !important; 
}

.col-span-2 { grid-column: span 2 / span 2 !important; }

/* ========================================================
   3. 导航与通用 UI (Nav & Common UI)
   ======================================================== */
.glass { 
background: var(--card-bg); 
border: 1px solid var(--border); 
border-radius: var(--radius); 
overflow: hidden; 
}

/* 搜索框 */
#search-wrapper {
width: 34px; background: #1a1b1e !important; border: 1px solid var(--border);
transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 6px;
overflow: hidden; white-space: nowrap;
}
#search-wrapper.expanded { width: 180px; border-color: #3f3f46; overflow: visible; }

.nav-square-btn {
width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
border-radius: 4px; border: 1px solid var(--border); background: #1a1b1e;
font-size: 14px; cursor: pointer; flex-shrink: 0; transition: all 0.2s;
}
.nav-square-btn:hover { background: #27282b; border-color: #4b5563; }

.engine-current-btn { 
font-size: 9px; padding: 0 5px; height: 22px; border-radius: 3px; 
color: var(--blue); border: 1px solid var(--blue-muted); 
background: #1e293b; font-weight: bold; 
}

/* 菜单动画 */
.menu-anim { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); transform-origin: top left; }
.menu-hidden { opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none; }
.menu-show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.menu-item { width: 100%; text-align: left; padding: 8px 12px; font-size: 12px; color: #9ca3af; display: flex; align-items: center; gap: 8px; }
.menu-item:hover { background: #3b82f6; color: white; }

/* ========================================================
   4. 卡片组件与操作组 (Card & Actions)
   ======================================================== */
[data-task-key] {
position: relative;
z-index: var(--z-base);
/* 核心修改：确保这里是 hidden，这样内部的 Canvas 或图片才不会刺破父级的圆角 */
overflow: hidden !important; 
border-radius: var(--radius);
transition: transform 0.2s;
}

/* 核心修复：强制卡片内的第一个元素（通常是图片或 Canvas）也具备圆角 */
/* 这样即使父容器 overflow: visible，子元素边缘也是圆的 */
[data-task-key] > *:first-child {
border-top-left-radius: var(--radius);
border-top-right-radius: var(--radius);
}

/* 如果你的图片或 Canvas 是铺满全屏的，建议全圆角 */
[data-task-key] img, 
[data-task-key] canvas {
border-radius: var(--radius);
display: block;
}

[data-task-key]:hover,
[data-task-key]:focus-within,
[data-task-key]:has(.dropdown:hover) {
z-index: var(--z-hover) !important;
/* 允许下拉菜单弹出 */
overflow: visible; 
}

/* 操作按钮组容器 - 极限收缩版 */
.action-trigger-box {
position: absolute; 
top: 4px; 
right: 4px; 
width: 32px;  /* 初始只占用一个图标的宽度 */
height: 32px; 
z-index: 100; 
display: flex; 
justify-content: flex-end; 
padding: 5px;
/* 必须去掉之前的 120px/300px 霸地行为 */
}

/* 鼠标精准移入右上角 32px 范围内才展开 */
.action-trigger-box:hover { 
width: 280px; 
height: 40px; /* 高度也收缩，防止向下遮挡 */
}

.card-actions {
display: flex; 
gap: 4px; 
opacity: 0; 
transition: opacity 0.2s; 
pointer-events: none; 
}

.action-trigger-box:hover .card-actions { 
opacity: 1; 
pointer-events: auto; 
}

/* 按钮基础样式 */
.card-action-btn {
width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px;
color: rgba(255, 255, 255, 0.5); font-size: 14px; cursor: pointer;
}
.card-action-btn:hover { background: rgba(59, 130, 246, 0.5); color: #fff; }
.card-action-btn.active { color: var(--blue) !important; border-color: var(--blue-muted); background: rgba(96, 165, 250, 0.1); }

/* 下拉菜单 */
.dropdown { position: relative; }
.dropdown:hover .dropdown-content { display: block !important; }
.dropdown-content {
display: none; position: absolute; right: 0; top: 24px; 
background: var(--card-bg); border: 1px solid var(--border); border-radius: 4px; 
min-width: 100px; z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.9); padding: 4px 0;
}
.dropdown-item { padding: 6px 12px; font-size: 10px; color: var(--text-muted); cursor: pointer; }
.dropdown-item:hover { background: #1e293b; color: var(--text-main); }
.dropdown-item.active { color: var(--blue) !important; background: rgba(96, 165, 250, 0.1); font-weight: bold; }

/* 刷新间隔专用项 */
.timer-item {
padding: 6px 12px; font-size: 10px; font-family: monospace; 
color: var(--text-muted); cursor: pointer; display: flex; justify-content: space-between;
}
.timer-item:hover { background: #1e293b; color: var(--text-main); }
.timer-item.active { color: var(--blue); background: rgba(96, 165, 250, 0.1); font-weight: bold; }

.timer-input-wrapper { padding: 4px 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.timer-custom-input {
width: 100%; height: 24px; background: #0f1012 !important; 
border: 1px solid var(--border) !important; border-radius: 4px;
padding: 0 6px; font-size: 10px; color: var(--text-muted); outline: none;
}
.timer-custom-input:focus { border-color: #3b82f6 !important; color: var(--blue); }
.timer-custom-input.active-val { color: var(--blue); border-color: var(--blue-muted) !important; background: rgba(96, 165, 250, 0.05) !important; }

/* ========================================================
5. 特定任务与工具 (Task Specifics & Utils)
======================================================== */
.feed-tab { padding: 0 10px; height: 100%; display: flex; align-items: center; flex-shrink: 0; white-space: nowrap; font-size: 11px; font-weight: 900; cursor: pointer; color: var(--text-muted); }
.feed-tab.active { color: #e5e7eb !important; }

/* 核心修正：仅保留头像按钮的基础属性，彻底清除蓝色背景与旧动画 */
#btn-user-avatar {
position: relative;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
background-color: transparent !important; /* 杀掉残余蓝色 */
}
.status-online { animation: avatar-breathe 3s infinite; }
@keyframes avatar-breathe {
0%, 100% { box-shadow: 0 0 0 1.5px #0a0b0d, 0 0 0 3px rgba(16, 185, 129, 0.2); }
50% { box-shadow: 0 0 0 1.5px #0a0b0d, 0 0 0 3px rgba(16, 185, 129, 1); }
}

#resizer-container { 
position: absolute; 
width: 10px; 
/* 确保调节杆在左右两栏之间 */
height: 100%; 
top: 0;
cursor: col-resize; 
z-index: var(--z-resizer); /* 使用变量 150 */
display: flex; 
justify-content: center; 
align-items: center; 
}
#resizer-bar { width: 2px; height: 35%; background-color: var(--text-muted); opacity: 0; transition: opacity 0.3s; }
#resizer-container:hover #resizer-bar { opacity: 1; }

.line-clamp-20 { display: -webkit-box; -webkit-line-clamp: 20; -webkit-box-orient: vertical; overflow: hidden; }
.custom-scroll { scrollbar-width: none !important; -ms-overflow-style: none !important; }
.custom-scroll::-webkit-scrollbar { display: none !important; }

#search-result-modal { 
position: fixed; inset: 0; z-index: var(--z-modal); 
display: none; align-items: center; justify-content: center; 
background: rgba(0,0,0,0.95); opacity: 0; transition: opacity 0.3s; 
}
.modal-show { display: flex !important; opacity: 1 !important; }

/* ========================================================
补丁模块 (Patch Module) 样式修正
======================================================== */
/* 1. 外层容器：允许菜单溢出，悬停时提升层级 */
.patch-container {
position: relative;
display: flex;
flex-direction: column;
justify-content: flex-start;
overflow: visible !important; /* 强制覆盖所有潜在冲突 */
transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 悬停时确保 z-index 高于下方卡片，防止菜单被遮挡 */
.patch-container:hover {
    z-index: var(--z-hover) !important;
}

/* 2. 内层裁剪层：专门负责裁剪滚动的经文 */
.patch-inner-clip {
width: 100%;
height: 100%;
overflow: hidden !important; /* 只有它需要裁剪文字 */
position: relative;
border-radius: var(--radius);
}

/* 3. 滚动引擎：保持原有的动画逻辑 */
.patch-scroller {
    font-family: "YouYuan", "Yuanti SC", "Microsoft YaHei", sans-serif;
    animation: patch-scroll linear infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    pointer-events: none;
}

/* 鼠标悬停在补丁块时暂停滚动 */
.patch-container:hover .patch-scroller {
    animation-play-state: paused;
}

/* 4. 动画定义 */
@keyframes patch-scroll {
    0% {
transform: translateY(0);
    }
    100% {
transform: translateY(-50%);
    }
}

/* 5. 核心修正：确保按钮在裁剪层之上，否则会被挡住点不到 */
.patch-menu-trigger {
    z-index: 20 !important;
}

/* 确保下拉菜单弹出时层级最高 */
.patch-menu-trigger {
z-index: 50 !important;
pointer-events: auto !important;
}
/* ========================================================
   Scrolling 跑马灯专用样式
   ======================================================== */
/* 跑马灯内部逻辑样式 */
.scrolling-prefix {
position: absolute;
left: 0;
top: 0;
height: 100%;
display: flex;
align-items: center;
padding-left: 12px;
padding-right: 20px;
background: linear-gradient(to right, var(--bg) 85%, transparent);
z-index: 20;
font-weight: 900;
font-size: 13px;
pointer-events: none; /* 防止点击标题时拦截了跑马灯的跳转逻辑 */
}
/* 常态无前缀：不占位、不铺渐变底，避免左侧残影黑块 */
.scrolling-prefix:empty {
    display: none;
    padding: 0;
    background: none;
}

#scrolling-content {
display: inline-block;
padding-left: 12px;
font-size: 13px;
transition: transform linear;
will-change: transform;
cursor: pointer;
}

#Scrolling:hover #scrolling-content {
animation-play-state: paused !important;
}

@keyframes marquee-scroll {
0% { transform: translateX(0); }
100% { transform: translateX(var(--scroll-distance)); }
}

/* ========================================================
   18. 交互矩阵极致优化版 - 严谨单列 + 尺寸倍增
   ======================================================== */
.mobile-context-mask {
position: fixed; inset: 0; z-index: 100000;
background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(25px);
display: none; align-items: center; justify-content: center;
}

/* 1. 容器：间隙与内边距随屏幕宽度联动 */
.menu-list-container {
display: flex; flex-direction: column; 
gap: clamp(8px, 1.2vw, 16px);       /* 间隙：最小8px，最大16px，中间按1.2%宽度缩放 */
width: 85vw; 
max-width: 550px; 
min-width: 280px;
padding: clamp(15px, 2vw, 30px);   /* 内边距同步缩放 */
max-height: 85vh; overflow-y: auto;
}

/* 2. 按钮：高度与圆角等比联动 */
.menu-row-btn {
display: flex; align-items: center; 
gap: clamp(10px, 1.5vw, 20px);
width: 100%; 
/* 高度随宽度比例变大，确保按钮比例协调 */
padding: clamp(12px, 1.6vw, 24px) clamp(10px, 1.2vw, 20px); 
background: rgba(255, 255, 255, 0.03);
border: 0.5px solid rgba(255, 255, 255, 0.08);
/* 圆角：不再是死数字，而是随宽度比例变大 */
border-radius: clamp(12px, 3vw, 100px); 
cursor: pointer; transition: all 0.2s;
}

.menu-row-btn:active { transform: scale(0.97); background: rgba(59, 130, 246, 0.15); }
.menu-row-btn.active { border-width: 0.5px; border-color: rgba(96, 165, 250, 0.3); }

/* 强制 input 表现得像普通文字 */
.menu-row-btn input {
    height: 44px; /* 与左侧圆形图标高度对齐 */
    line-height: 44px;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    /* 继承父级的字体设置 */
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

/* 3. 图标：圆形大小与字号联动 */
.menu-row-btn i {
/* 图标圆圈大小也按比例放大 */
width: clamp(36px, 5vw, 52px); 
height: clamp(36px, 5vw, 52px);
background: #1a1b1e; 
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
/* 字号联动 */
font-size: clamp(14px, 1.8vw, 22px); 
color: #9ca3af; flex-shrink: 0;
border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-row-btn.active i { border-width: 0.5px; border-color: rgba(96, 165, 250, 0.3); }

/* 4. 文字：字号同步变大 */
.menu-row-btn span {
font-size: clamp(12px, 1.5vw, 18px); 
font-weight: 800; letter-spacing: 1px;
color: #d1d5db; text-transform: uppercase;
}

/* 子菜单顶部的标题样式 */
.submenu-title {
text-align: center; color: #60a5fa; font-size: 11px;
font-weight: 900; letter-spacing: 0.3em; margin-bottom: 8px;
opacity: 0.6;
}

/* 当主体处于移动模式时，物理屏蔽卡片右上角的操作按钮组 */
.mobile-mode .action-trigger-box {
display: none !important;
}

.mobile-mode .h-resizer-handle,
.mobile-mode #resizer-container {
pointer-events: none !important;
}

.feed-list-container,
[id^="content-MarketOverview_"] {
container-type: inline-size;
}

@container (max-width: 260px) {
.feed-meta-line,
.feed-text-content,
.market-summary-line {
display: block !important;
min-width: 0 !important;
max-width: 100% !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
word-break: normal !important;
overflow-wrap: normal !important;
}

.feed-meta-line {
display: flex !important;
}

.feed-text-content {
-webkit-line-clamp: unset !important;
-webkit-box-orient: initial !important;
line-height: 1.25 !important;
}
}

.mobile-mode,
.mobile-mode *,
.mobile-mode #main-content,
.mobile-mode .dashboard-grid {
scrollbar-width: none !important;
-ms-overflow-style: none !important;
}

.mobile-mode::-webkit-scrollbar,
.mobile-mode *::-webkit-scrollbar,
.mobile-mode #main-content::-webkit-scrollbar,
.mobile-mode .dashboard-grid::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
background: transparent !important;
}

/* ========================================================
   状态机 CSS (Tailwind 扩展或纯 CSS)
   ======================================================== */
/* --- A. 动画定义 --- */
@keyframes ws-pulse-finance {
0%, 100% { 
/* 静息态：调至几乎透明，隐藏轮廓 */
border-color: rgba(60, 179, 113, 0.1);  
box-shadow: 0 0 0 0px rgba(60, 179, 113, 0.1); 
}
50% { 
/* 爆发态：使用高亮荧光，配合大范围发光 */
border-color: rgba(60, 179, 113, 0.5); 
box-shadow: 0 0 15px 3px rgba(60, 179, 113, 0.6); 
}
}

@keyframes api-breathe-blue {
0%, 100% { 
/* 静息态：几乎全黑 */
background-color: rgba(100, 149, 237, 0.1); 
}
50% { 
/* 爆发态：清爽的淡蓝色 */
background-color: rgba(100, 149, 237, 0.7); 
}
}

/* --- B. 状态类驱动 --- */

/* [1] 外环 WebSocket 正常 (Online) - 保持金融绿 */
.ws-online {
animation: ws-pulse-finance 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
border-width: 2px !important;
}

/* [1] 外环 失联状态 (Offline) - 保持清晰灰 */
.status-offline-ring {
border-color: #6b7280 !important;
border-width: 2px !important;
box-shadow: none !important;
}

/* [2] 内圆 API 链路正常 (Online) - 切换为淡蓝呼吸 */
.api-online {
animation: api-breathe-blue 1.5s ease-in-out infinite;
}

/* 核心优化：头像文字颜色由 JS 动态控制，取消物理锁死 */
#user-initial {
/* 保持 0.3s 切换动画，移除颜色物理锁 */
transition: all 0.3s ease;
/* 这里的 text-shadow 可以保留，增强对比度 */
text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

/* [2] 内圆 失联状态 (Offline) - 保持钢灰饼 */
.status-offline-circle {
background-color: #374151 !important;
}

.ws-ring {
/* 必须有这一行，环才会显影 */
border: 2px solid transparent; 
transition: border-color 0.3s ease;
}

/* [修正] 左上角窗口范围层 */
#chart-status-layer {
position: absolute;
top: 6px;
left: 8px; /* 焊死 8px */
z-index: 10;
pointer-events: none;
font-size: 10px;
font-family: 'Inter', system-ui, sans-serif;
color: #9ca3af; /* text-gray-400 */
font-weight: 500;
letter-spacing: -0.025em;
text-transform: uppercase;
opacity: 0.35;
}

/* [修正] 左下角详情层容器 */
#liq-info-layer {
position: absolute;
bottom: 4px;
left: 8px; /* 焊死 8px，确保上下绝对对齐 */
z-index: 10;
pointer-events: none;
display: flex;
align-items: center;
gap: 6px; /* 保持时间与数值之间的呼吸感 */
font-size: 10px;
font-family: 'Inter', system-ui, sans-serif;
font-weight: 500;
letter-spacing: -0.025em;
opacity: 0.75;
}

/* 列表WebSocket 跳动 */
@keyframes blink-opacity {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.ws-active-blink {
    animation: blink-opacity 1s infinite;
}

/* 后台标签页只保留数据接收，暂停不可见动画和绘图相关视觉工作。 */
html.page-hidden .patch-scroller,
html.page-hidden #scrolling-content,
html.page-hidden .ws-online,
html.page-hidden .api-online,
html.page-hidden .ws-active-blink,
html.page-hidden .zen-circle,
html.page-hidden .center-char {
    animation-play-state: paused !important;
}

/* 市值成交热力图 */
.heatmap-canvas {
    width: 100%;
    height: auto;
    display: block;
    background: #0F1115;
}

/* 启动/刷新页基础样式 */
#auth-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    background-color: #050607;
    opacity: 1;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.auth-fade-out {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 旋转门户容器 */
.zen-portal {
    position: relative;
    width: 650px;
    height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 圆环通用：使用 SVG 确保文字不扭曲 */
.zen-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
}

/* 【外轨1】：最外层 - 顺时针 */
.extreme-outer-ring {
    color: rgba(255, 255, 255, 0.25); 
    font-size: 13px;
    animation: rotate-cw 58s linear infinite;
}

/* 【外轨2】：外二层 - 顺时针 */
.outer-ring {
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
    animation: rotate-cw 38s linear infinite;
}

/* 【内轨1】：内一层 - 逆时针 */
.inner-ring {
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
    font-weight: 300;
    animation: rotate-ccw 18s linear infinite;
}

/* 【内轨2】：最内层 - 逆时针（新增） */
.extreme-inner-ring {
    color: rgba(255, 255, 255, 0.25); /* 颜色最亮 */
    font-size: 13px; 
    font-weight: 400;
    animation: rotate-ccw 8s linear infinite; /* 速度最快 */
}

/* 中心绝对圆心：空 */
.center-char {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); 
    font-size: 88px; /* 略微缩小以适配更近的内圈 */
    font-weight: 100;
    color: rgba(255, 255, 255, 0.15);
    line-height: 1;
    font-family: "Kaiti", "STKaiti", "BiauKai", "楷体", serif;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0);
    animation: air-pulse 10s ease-in-out infinite;
}

.auth-status {
    position: absolute;
    left: 50%;
    bottom: 180px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.58);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-align: center;
    z-index: 2;
}

#auth-login-action {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

@keyframes rotate-cw {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-ccw {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes air-pulse {
    0%, 100% { opacity: 0.4; filter: blur(2px); transform: translate(-50%, -50%) scale(0.95); }
    50% { opacity: 0.9; filter: blur(0px); transform: translate(-50%, -50%) scale(1.02); }
}

.ring-text {
    fill: currentColor;
    letter-spacing: 0.25em;
}

/* 🧘 禅定互动：解决层叠遮挡，实现精准单环停止 */
.zen-circle {
    /* 1. 物理穿透：让鼠标穿过 SVG 的空白透明区域，不遮挡下层 */
    pointer-events: none;
    transition: transform 0.5s ease;
}

.zen-circle text {
    /* 2. 局部激活：仅让文字路径部分响应鼠标 */
    pointer-events: auto;
    cursor: none; /* 彻底隐藏鼠标，靠视觉高亮反馈 */
}
 
.zen-circle:hover {
    /* 3. 核心逻辑：悬停时停止当前圆环的旋转 */
    animation-play-state: paused !important;
}

.zen-circle:hover .ring-text {
    /* 4. 视觉反馈：悬停环文字变亮 */
    fill: #ffffff !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

/* 横向高度调节杆 - 复刻竖向调节杆视觉 */
.h-resizer-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px; /* 触控区域 */
    cursor: row-resize;
    z-index: 50;
    transition: background 0.2s;
}

.h-resizer-handle:hover, .h-resizer-handle.active {
    background: rgba(59, 130, 246, 0.5); /* 激活时亮起蓝色，与中缝对齐 */
    box-shadow: 0 -1px 4px rgba(59, 130, 246, 0.3);
}

#main-content {
/* 建议数值与你顶部的间距变量 --gap 保持一致，通常是 8px 或 12px */
    padding-bottom: var(--gap, 8px); 
}
/* ---- 简单登录（yubal 风格） ---- */
.simple-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: #0a0b0d;
}
.simple-login-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #16181d;
    color: #e8eaed;
    box-sizing: border-box;
}
.simple-login-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f3f4f6;
}
.simple-login-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(243, 244, 246, 0.55);
}
.simple-login-note {
    border-radius: 0.5rem;
    border: 1px solid rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.15);
    color: #fde68a;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: pre-line;
}
.simple-login-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #0f1115;
    color: #f3f4f6;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    outline: none;
}
.simple-login-input:focus {
    border-color: #3b82f6;
}
.simple-login-input:disabled {
    opacity: 0.55;
}
.simple-login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(243, 244, 246, 0.7);
    user-select: none;
    cursor: pointer;
}
.simple-login-error {
    margin: 0;
    font-size: 0.875rem;
    color: #f87171;
}
.simple-login-submit {
    width: 100%;
    border: none;
    border-radius: 0.5rem;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    cursor: pointer;
}
.simple-login-submit:hover:not(:disabled) {
    background: #1d4ed8;
}
.simple-login-submit:disabled,
.simple-login-submit.is-loading {
    opacity: 0.65;
    cursor: wait;
}
