/* user_shares 样式片段 4/4 — 按规则边界切分 */
.ranking-item.rank-3:hover {
    background: linear-gradient(135deg, #ffe5d4 0%, #fff0e6 100%);
}

/* 综合偏弱：得分靠后的行高亮 + 标签 */
.ranking-item-suggest-remove {
    background: rgba(255, 0, 0, 0.1) !important;
    border-left-color: #dc3545 !important;
}
.ranking-item-suggest-remove:hover {
    background: rgba(255, 0, 0, 0.15) !important;
}

/* 回撤红绿灯：安全区 / 警戒区 / 危险区 / 处决区 */
.drawdown-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}
.drawdown-dot-safe { background: #22c55e; }
.drawdown-dot-warn { background: #eab308; }
.drawdown-dot-danger { background: #f97316; }
.drawdown-dot-exec { background: #dc3545; box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3); }
.ranking-item.drawdown-zone-exec-alert {
    border-left-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.06) !important;
}
.ranking-item.drawdown-zone-exec-alert:hover {
    background: rgba(220, 53, 69, 0.1) !important;
}
.ranking-high-water-tooltip .tooltip-exec {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(220, 53, 69, 0.5);
}
.ranking-high-water-tooltip .tooltip-exec .tooltip-value {
    color: #dc3545;
    font-weight: 700;
}

.ranking-remove-suggestion-label {
    font-size: 11px;
    color: #dc3545;
    font-weight: 600;
    margin-left: 6px;
    white-space: nowrap;
}
.ranking-strategy-hint {
    margin-top: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    border-top: 1px solid #eee;
}
.ranking-strategy-hint .ranking-formula-wrap {
    margin-bottom: 4px;
}
.ranking-strategy-hint .ranking-formula-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: #6c757d;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}
.ranking-strategy-hint .ranking-formula-toggle:hover {
    color: #495057;
    background: rgba(0,0,0,.06);
}
.ranking-strategy-hint .ranking-formula {
    font-family: var(--font-mono), monospace;
    color: #495057;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
}
.ranking-strategy-hint .ranking-formula.ranking-formula-collapsed {
    display: none;
}
.ranking-strategy-hint .ranking-preference {
    color: #6c757d;
}
.ranking-strategy-hint .ranking-preference-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.ranking-regret-tip {
    color: #1a56a7;
    cursor: help;
    font-size: 14px;
}
.ranking-regret-tip:hover {
    color: #154a8f;
}
.ranking-item-score {
    margin-left: 6px;
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.ranking-item-suggest-remove .ranking-item-score {
    color: #dc3545;
}

.ranking-number {
    font-size: 15px;
    font-weight: bold;
    color: #1a56a7;
    margin-right: 10px;
    min-width: 26px;
}

.ranking-number.rank-1 {
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
}

.ranking-number.rank-2 {
    color: #c0c0c0;
    text-shadow: 0 1px 2px rgba(192, 192, 192, 0.3);
}

.ranking-number.rank-3 {
    color: #cd7f32;
    text-shadow: 0 1px 2px rgba(205, 127, 50, 0.3);
}


.ranking-info {
    flex: 1;
}

.ranking-stock-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 1px;
}

.ranking-stock-name {
    font-weight: bold;
    font-size: 13px;
    line-height: 1.25;
    color: #333;
}

/* 排行榜中的名称虽为链接，但保持原有视觉样式不变 */
.ranking-stock-name.stock-quote-link {
    color: #333;
    font-weight: bold;
    font-size: 13px;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
}

.ranking-stock-name.stock-quote-link:hover,
.ranking-stock-name.stock-quote-link:focus {
    color: #333;
    text-decoration: none;
}

.ranking-stock-code {
    color: #666;
    font-size: 12px;
    line-height: 1.2;
}

/* 身份徽标（🚀火箭、NEW、💔破碎） */
.ranking-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-new {
    background: #E6F7FF;
    color: #1890FF;
}

.badge-rocket {
    background: transparent;
    color: #52c41a;
    padding: 0;
    font-size: 11px;
}

.badge-rocket i {
    color: #52c41a;
}

.badge-broken {
    background: transparent;
    color: #F5222D;
    padding: 0;
    font-size: 11px;
}

.badge-broken i {
    color: #F5222D;
}

.badge-zombie {
    background: #F5F5F5;
    color: #8C8C8C;
}

.badge-zombie i {
    font-size: 9px;
    opacity: 0.7;
}

/* 收益组（双行结构） */
.ranking-return-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 10px;
    min-width: 76px;
}
.ranking-return-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.ranking-health-title {
    margin-bottom: 1px;
    font-size: 10px;
    font-weight: 500;
    color: #b0b6bf;
    letter-spacing: 0.2px;
}

.ranking-vital-bar {
    position: relative;
    width: 6px;
    height: 26px;
    flex: 0 0 6px;
    display: inline-flex;
    align-items: flex-end;
}

.ranking-vital-track {
    position: absolute;
    inset: 0;
    background: #eceff3;
    border-radius: 2px;
}

.ranking-vital-fill {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: var(--vital-height, 0%);
    background: var(--vital-color, #52c41a);
    border-radius: 2px;
    transition: height 0.35s ease, background-color 0.25s ease;
}

.ranking-return {
    font-size: 14px;
    font-weight: bold;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.ranking-return.positive {
    color: var(--color-up);
}

.ranking-return.negative {
    color: var(--color-down);
}

.ranking-return.breakdown {
    color: #F5222D;
}

.ranking-return.unavailable {
    color: #999;
    font-weight: normal;
    font-size: 12px;
}

.ranking-item-unavailable .ranking-return-group {
    align-items: flex-end;
}

.ranking-breakdown-icon {
    color: #F5222D;
    font-size: 12px;
    margin-left: 4px;
    animation: pulse-breakdown 2s ease-in-out infinite;
}

@keyframes pulse-breakdown {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.ranking-efficiency {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
}

.ranking-efficiency.efficiency-high {
    color: #ff6b35;
}

.ranking-efficiency.efficiency-normal {
    color: #999;
}

/* 回撤显示（破位时） */
.ranking-drawdown {
    font-size: 11px;
    color: #F5222D;
    margin-top: 2px;
    font-family: var(--font-mono);
    font-weight: 500;
}

/* 生命条（底部进度条） */
/* 耐心条（三态切换） */
.ranking-patience-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 0;
    z-index: 1;
}

/* 红条态：呼吸闪烁效果 */
.ranking-patience-bar.red-alert {
    animation: breathing-red 2s ease-in-out infinite;
}

@keyframes breathing-red {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(245, 34, 45, 0.7);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 8px 2px rgba(245, 34, 45, 0.5);
    }
}

/* Hover 交互：排名数字切换为持有天数 */
.ranking-number {
    position: relative;
    transition: opacity 0.2s ease;
    min-width: 26px;
}

.ranking-number::before {
    content: attr(data-hover);
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 11px;
    color: #868e96;
    font-weight: normal;
    white-space: nowrap;
}

.ranking-item:hover .ranking-number {
    opacity: 0;
}

.ranking-item:hover .ranking-number::before {
    opacity: 1;
}

/* Hover 时日均效能淡出，显示Tooltip（包含最高浮盈、回撤、破位图标） */
.ranking-efficiency {
    transition: opacity 0.2s ease;
}

.ranking-item:hover .ranking-efficiency {
    opacity: 0;
}

/* 买入日期提示（显示在收益组下方） */
.ranking-return-group {
    position: relative;
}

.ranking-return-group::after {
    content: attr(data-hover-date);
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 2px;
    font-size: 10px;
    color: #999;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    pointer-events: none;
    background: rgba(255,255,255,0.95);
    padding: 2px 6px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

/* 当有高水位线Tooltip时，隐藏买入日期提示 */
.ranking-return-group.has-high-water-tooltip::after {
    display: none;
}

.ranking-item:hover .ranking-return-group::after {
    opacity: 1;
}

/* 高水位线Tooltip（显示详细回撤数据） */
.ranking-return-group::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 6px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 20;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
}

.ranking-item:hover .ranking-return-group::before {
    opacity: 1;
}

/* Tooltip内容通过JavaScript动态创建 */
.ranking-high-water-tooltip {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 20;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 10px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
    min-width: 158px;
}

.ranking-item:hover .ranking-high-water-tooltip {
    opacity: 1;
}

.ranking-high-water-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    line-height: 1.35;
}

.tooltip-row:last-child {
    margin-bottom: 0;
}

.tooltip-label {
    color: #ccc;
    margin-right: 12px;
}

.tooltip-value {
    color: #fff;
    font-weight: 600;
}

.tooltip-value.positive {
    color: #52c41a;
}

.tooltip-value.negative {
    color: #ff4d4f;
}

.tooltip-value.breakdown {
    color: #ff4d4f;
    font-weight: 700;
}

.tooltip-value.drawdown-warning {
    color: #dc3545 !important;
    font-weight: 700 !important;
    font-size: 12px;
}

/* 决策区侧栏：在全局瘦身基础上再压一档信息密度 */
.decision-zone-rankings .ranking-number {
    font-size: 14px;
    margin-right: 8px;
    min-width: 24px;
}
.decision-zone-rankings .ranking-stock-name {
    font-size: 12px;
}
.decision-zone-rankings .ranking-stock-code {
    font-size: 11px;
}
.decision-zone-rankings .ranking-return {
    font-size: 13px;
}
.decision-zone-rankings .ranking-vital-bar {
    width: 5px;
    height: 22px;
    flex: 0 0 5px;
}
.decision-zone-rankings .ranking-health-title {
    font-size: 9px;
}
.decision-zone-rankings .ranking-efficiency {
    font-size: 10px;
}
.decision-zone-rankings .ranking-return-group {
    margin-left: 8px;
    min-width: 70px;
}

/* 刷新按钮：与收益排行榜 .btn-rankings-refresh 一致，小圆形图标无文字 */
.btn-calculate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    color: #666;
    border: 1px solid #e1e5eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-calculate:hover:not(:disabled) {
    background: rgba(26, 86, 167, 0.1);
    border-color: #1a56a7;
    color: #1a56a7;
}

.btn-calculate:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-calculate i {
    font-size: 14px;
}

.btn-calculate.is-loading i {
    animation: spin 0.8s linear infinite;
}

/* 非交易日时禁用「刷新」按钮 */
.btn-calculate.btn-non-trading,
.btn-calculate.btn-non-trading:hover,
.btn-calculate:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background: transparent;
    color: #6c757d;
    border-color: #dee2e6;
    transform: none;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.fade-in {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 笔记弹窗：通过 class 控制显示，保证可点击 */
.note-modal {
    display: none;
}
.note-modal.note-modal-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 1050 !important;
}
.note-modal.note-modal-open .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.fade-in .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

/* 笔记弹窗 */
.note-modal .modal-content {
    transform: none;
}
.note-modal .modal-body {
    padding: 20px 24px;
}
.note-modal-textarea {
    font-family: inherit;
    line-height: 1.5;
}
.note-modal-textarea:focus {
    outline: none;
    border-color: #1a56a7;
    box-shadow: 0 0 0 2px rgba(26, 86, 167, 0.2);
}
.note-modal-footer .btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}
.note-modal-footer .btn-primary {
    background: #1a56a7;
    color: #fff;
}
.note-modal-footer .btn-primary:hover:not(:disabled) {
    background: #154a8f;
}
.note-modal-footer .btn-secondary {
    background: #e9ecef;
    color: #495057;
}
.note-modal-footer .btn-secondary:hover {
    background: #dee2e6;
}

/* 有笔记时笔记按钮高亮 */
.card-action-btn.btn-note.card-action-btn-has-note {
    color: #f0ad4e;
    opacity: 1;
}
.card-action-btn.btn-note.card-action-btn-has-note:hover {
    color: #ec971f;
}

/* 卡片上的笔记预览：有笔记时显示完整内容（允许换行），点击打开弹窗查看/编辑 */
.share-note-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    margin: 0 0 4px 0;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.35;
    cursor: pointer;
    border-radius: 6px;
    max-width: 100%;
}
.share-note-preview i {
    flex-shrink: 0;
    color: #f0ad4e;
}
.share-note-preview span {
    white-space: normal;
}
.share-note-preview:hover {
    color: #1a56a7;
    background: rgba(26, 86, 167, 0.06);
}
.share-note-preview:hover i {
    color: #ec971f;
}

/* 非管理模式下笔记仅展示，不可点击 */
.share-note-preview-readonly {
    cursor: default;
    pointer-events: auto;
}
.share-note-preview-readonly:hover {
    background: transparent;
    color: #6c757d;
}
.share-note-preview-readonly:hover i {
    color: #f0ad4e;
}
.shares-list .list-row-actions .card-action-btn.btn-note.card-action-btn-has-note {
    color: #f0ad4e;
}

        .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-weight: bold;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #495057;
    transform: scale(1.1);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1a56a7;
    box-shadow: 0 0 0 3px rgba(26, 86, 167, 0.1);
}

.form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* 模态框按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: transparent;
    color: #1a56a7;
    border-color: #1a56a7;
}

.btn-primary:hover {
    background: #1a56a7;
    color: white;
    border-color: #1a56a7;
}

.btn-secondary {
    background: transparent;
    color: #666;
    border-color: #e1e5eb;
}

.btn-secondary:hover {
    border-color: #999;
    color: #333;
    background: rgba(0, 0, 0, 0.02);
}

.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 按钮加载状态 */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* 搜索按钮样式 */
.btn-search-share {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-search-share i {
    font-size: 0.9rem;
}

/* 按钮容器样式 */
.shares-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 我的自选股导航栏 - 移动端兼容 */
@media (max-width: 767px) {
    .shares-module .shares-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 12px;
    }
    .shares-module .shares-header-actions {
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
        justify-content: flex-start;
    }
    .shares-module .shares-header-actions .view-switcher {
        margin-right: auto;
        flex: 0 0 auto;
    }
    .shares-module .shares-header-actions > .btn-ddzz-query {
        margin-left: auto;
    }
    .shares-module .shares-header-actions .search-hint {
        width: 100%;
        margin-right: 0;
        margin-bottom: 4px;
        font-size: 11px;
    }
    .shares-module .shares-header-actions .search-hint span {
        display: inline;
    }
    .shares-module .shares-header-actions .search-container {
        flex: 1;
        min-width: 0;
        max-width: 100%;
    }
    .shares-module .shares-header-actions .search-container input#search-input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    .shares-module .shares-title {
        font-size: 1.2rem;
    }
    .shares-module .btn-ddzz-query span,
    .shares-module .btn-delete-history span,
    .shares-module .btn-add-share .btn-text {
        display: none;
    }
    .shares-module .btn-ddzz-query,
    .shares-module .btn-delete-history,
    .shares-module .btn-add-share {
        padding: 8px 12px;
        flex: 0 0 auto;
    }
    .shares-module .sort-tabs {
        padding: 0 12px 12px;
        margin-top: 12px;
        margin-bottom: 12px;
        gap: 6px;
    }
    .shares-module .sort-tabs span {
        width: 100%;
        margin-bottom: 4px;
        margin-right: 0;
    }
    .shares-module .sort-tab {
        padding: 5px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .shares-module .shares-header-actions .search-hint span {
        display: none;
    }
    .shares-module .shares-header-actions .search-hint::after {
        content: '输入代码回车查大单';
        font-size: 11px;
        color: #666;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* ========== 异动标记样式 ========== */

/* 卡片视图中的异动标记徽章 */
.anomaly-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
                box-shadow 0.25s ease, transform 0.2s ease;
}

.anomaly-badge i {
    font-size: 0.75rem;
}

.anomaly-label {
    font-size: 0.65rem;
    white-space: nowrap;
}

/* 涨停标记 - 红色火焰 */
.anomaly-badge.anomaly-limit-up {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 跌停标记 - 蓝色雪花 */
.anomaly-badge.anomaly-limit-down {
    background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 大幅拉升标记 - 未选中时半透明且不挡下方日期（不参与点击），悬停时恢复 */
.anomaly-badge.anomaly-surge {
    background: rgba(255, 165, 2, 0.03);
    color: rgba(200, 95, 0, 0.88);
    border: 1px solid rgba(255, 165, 2, 0.18);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    box-shadow: none;
    opacity: 0.45;
    pointer-events: none;
}
.share-card:hover .anomaly-badge.anomaly-surge,
.anomaly-badge.anomaly-surge:hover {
    opacity: 1;
    pointer-events: auto;
    background: linear-gradient(135deg, #ffa502 0%, #ff6348 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 28px rgba(255, 165, 2, 0.42), 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: scale(1.02);
}

/* 大幅跳水标记 - 深绿下降箭头 */
.anomaly-badge.anomaly-plunge {
    background: linear-gradient(135deg, #2ed573 0%, #1e8449 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 爆量标记 - 未选中时半透明且不挡下方日期，悬停时恢复 */
.anomaly-badge.anomaly-volume-spike {
    background: rgba(165, 94, 234, 0.03);
    color: rgba(120, 65, 180, 0.9);
    border: 1px solid rgba(165, 94, 234, 0.18);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    box-shadow: none;
    opacity: 0.45;
    pointer-events: none;
}
.share-card:hover .anomaly-badge.anomaly-volume-spike,
.anomaly-badge.anomaly-volume-spike:hover {
    opacity: 1;
    pointer-events: auto;
    background: linear-gradient(135deg, #a55eea 0%, #8854d0 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 28px rgba(165, 94, 234, 0.42), 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: scale(1.02);
}

/* 列表视图中的异动标记 */
.anomaly-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.anomaly-mark.anomaly-limit-up {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
}

.anomaly-mark.anomaly-limit-down {
    background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%);
    color: white;
}

.anomaly-mark.anomaly-surge {
    background: rgba(255, 165, 2, 0.2);
    color: rgba(200, 95, 0, 0.95);
    border: 1px solid rgba(255, 165, 2, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.anomaly-mark.anomaly-plunge {
    background: linear-gradient(135deg, #2ed573 0%, #1e8449 100%);
    color: white;
}

.anomaly-mark.anomaly-volume-spike {
    background: rgba(165, 94, 234, 0.2);
    color: rgba(120, 65, 180, 0.95);
    border: 1px solid rgba(165, 94, 234, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 脉冲动画 - 让异动标记更醒目 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
}

/* 悬停时增强异动标记（涨停/跌停/跳水保持原有效果；大幅拉升/爆量使用上方玻璃聚焦） */
.share-card:hover .anomaly-badge.anomaly-limit-up,
.share-card:hover .anomaly-badge.anomaly-limit-down,
.share-card:hover .anomaly-badge.anomaly-plunge {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .anomaly-badge {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .anomaly-label {
        display: none; /* 移动端隐藏文字，只显示图标 */
    }
    
    .anomaly-mark {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        margin-left: 4px;
    }
}

/* 分享链接进入（仅读）：隐藏所有编辑、添加、删除相关按钮与文案 */
body.is-shared-view .admin-only,
body.is-shared-view .btn-add-share,
body.is-shared-view .btn-add-first,
body.is-shared-view .empty-state-cta,
body.is-shared-view .empty-state-hint,
body.is-shared-view .btn-remove,
body.is-shared-view .btn-note,
body.is-shared-view .btn-trend,
body.is-shared-view .btn-calculate,
body.is-shared-view .btn-ai-diagnosis,
body.is-shared-view .recovery-module,
body.is-shared-view .recovery-alerts-teaser,
body.is-shared-view .recovery-module.admin-only.admin-mode,
body.is-shared-view .recovery-alerts-teaser.admin-only.admin-mode,
body.is-shared-view .admin-mode-info,
body.is-shared-view .index-empty-cta,
body.is-shared-view #add-share-modal,
body.is-shared-view #delete-reason-modal {
    display: none !important;
}
/* 观赏模式下允许查看删除历史（仅读），故不隐藏 .btn-delete-history 与 #delete-history-modal */
/* 卡片底部操作栏：分享视图只保留刷新，不显示删除 */
body.is-shared-view .share-actions .btn-remove {
    display: none !important;
}
