/* 基础重置 - 避免外部样式影响，提高优先级 */
* {
    box-sizing: border-box !important;
}

:root {
    --font-sans: 'Inter', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Roboto Mono', 'DIN Alternate', 'Consolas', monospace;
    --color-up: #0d9488;
    --color-down: #b91c1c;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.03);
    --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(26,86,167,0.08);
    --transition-ui: 0.2s ease;
    --transition-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* 卡片涨跌配色：偏克制的红/绿，更易读不刺眼 */
    --card-bg-up: #fef7f5;
    --card-border-up: #c2410c;
    --card-bg-down: #f0fdf9;
    --card-border-down: #0d9488;
}

body {
    font-family: var(--font-sans) !important;
    background: #F5F7FA !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
}

/* 页面布局 - 提高优先级避免被 Bootstrap 覆盖 */
body > .container,
.container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 20px 24px !important;
}

/* 全局搜索框 - 置顶 */
.global-search-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 12px 24px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    width: 100%;
    box-sizing: border-box;
}

.global-search-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.global-search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.global-search-input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 2px solid #e1e5eb;
    border-radius: 24px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
}

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

.global-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.global-search-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
}

.global-search-hint {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .global-search-container {
        padding: 10px 16px;
    }
    
    .global-search-wrapper {
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .back-link {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .back-link .back-link-text {
        display: none;
    }
    
    .global-search-title {
        font-size: 0.95rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 120px;
    }
    
    .global-search-input-wrapper {
        flex: 1;
        min-width: 0;
    }
    
    .global-search-input {
        font-size: 13px;
        padding: 8px 35px 8px 12px;
    }
    
    .global-search-hint {
        display: none;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .global-search-container {
        padding: 8px 12px;
    }
    
    .global-search-wrapper {
        gap: 6px;
    }
    
    .back-link {
        padding: 6px 10px;
        min-width: 36px;
    }
    
    .global-search-title {
        font-size: 0.9rem;
        max-width: 90px;
    }
    
    .global-search-input {
        font-size: 12px;
        padding: 7px 32px 7px 10px;
    }
}

/* 排序快捷切换标签 */
.sort-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0 24px;
    flex-wrap: wrap;
}

.sort-tab {
    padding: 6px 14px;
    border: 1px solid #e1e5eb;
    background: white;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-tab:hover {
    border-color: #1a56a7;
    color: #1a56a7;
    background: #f0f7ff;
}

.sort-tab.active {
    background: #1a56a7;
    color: white;
    border-color: #1a56a7;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: #666;
    text-decoration: none;
    border: 1px solid #e1e5eb;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-link:hover {
    border-color: #1a56a7;
    color: #1a56a7;
    background: rgba(26, 86, 167, 0.05);
    text-decoration: none;
}

/* 自选股模块 - 完全独立的样式，提高优先级 */
.shares-module {
    background: white !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: var(--shadow-card) !important;
    overflow: hidden !important;
    margin-bottom: 24px !important;
}

.shares-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 25px 24px !important;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%) !important;
    border-bottom: 1px solid #e9ecef !important;
}

.shares-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
}

.shares-title i {
    color: #ffc107;
    font-size: 1.3rem;
}

.btn-add-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #1a56a7;
    border: 1px solid #1a56a7;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* 视图切换器（网格/列表） */
.view-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #f1f3f4;
    border-radius: 20px;
    padding: 2px;
    margin-right: 12px;
}
.view-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition-speed), color var(--transition-speed), box-shadow 0.2s ease;
}
.view-switcher-btn:hover {
    color: #1a56a7;
}
.view-switcher-btn.active {
    background: white;
    color: #1a56a7;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.view-switcher-label {
    white-space: nowrap;
}
@media (max-width: 768px) {
    .view-switcher-label { display: none; }
    .view-switcher-btn { padding: 6px 12px; }
}

/* 管理者模式样式 */
.admin-only {
    transition: all 0.3s ease;
}

.admin-only.admin-mode {
    border-color: #dc3545;
    color: #dc3545;
}

.admin-only.admin-mode:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #dc3545;
}

.admin-indicator {
    margin-left: auto;
    flex-shrink: 0;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    animation: adminPulse 2s infinite;
}

.admin-badge i {
    font-size: 1rem;
}

@keyframes adminPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.5);
    }
}

/* 隐私模式按钮 */
.privacy-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #e1e5eb;
    border-radius: 20px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.privacy-mode-btn:hover {
    border-color: #1a56a7;
    color: #1a56a7;
    background: rgba(26, 86, 167, 0.06);
}
.privacy-mode-btn.active {
    border-color: #1a56a7;
    color: #1a56a7;
    background: rgba(26, 86, 167, 0.1);
}
.privacy-mode-btn .privacy-mode-label {
    white-space: nowrap;
}
@media (max-width: 768px) {
    .privacy-mode-btn .privacy-mode-label { display: none; }
    .privacy-mode-btn { padding: 8px 12px; }
}

/* 隐私模式：隐藏/模糊金额与涨跌幅，保留趋势与红绿 */
body.privacy-mode .share-price,
body.privacy-mode .share-change,
body.privacy-mode .change-value,
body.privacy-mode .change-info-value,
body.privacy-mode .ranking-return,
body.privacy-mode .privacy-sensitive {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}
/* 列表模式下的金额与涨跌幅也模糊 */
body.privacy-mode .shares-list .col-price,
body.privacy-mode .shares-list .col-change,
body.privacy-mode .shares-list .col-ohlc {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}
body.privacy-mode .shares-list .col-sparkline {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}
body.privacy-mode .monthly-change-display {
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
}
body.privacy-mode .index-chart-container {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}

/* 管理者模式切换通知 */
.admin-toggle-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    z-index: 10003;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 管理者模式下的按钮特殊样式 */
.btn-calculate.admin-mode {
    background: transparent;
    border: 1px solid #28a745;
    color: #28a745;
}

.btn-calculate.admin-mode:hover {
    background: #28a745;
    color: white;
}

.btn-add-share.admin-mode {
    background: transparent;
    border: 1px solid #ffc107;
    color: #ffc107;
}

.btn-add-share.admin-mode:hover {
    background: #ffc107;
    color: #212529;
}

/* 自选股网格布局 - 参考test_user_shares.html优化，提高优先级 */
/* 列表模式时强制隐藏网格，避免被 .shares-grid 的 display:grid !important 覆盖 */
#shares-container.view-mode-list .shares-grid {
    display: none !important;
}
#shares-container.view-mode-list .shares-list-wrap {
    display: block !important;
}

.shares-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 0.6rem !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 20px 24px !important;
}

@media (max-width: 575px) {
    .shares-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .shares-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .shares-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .shares-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .shares-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1400px) {
    .shares-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 股票卡片 - 参考test_user_shares.html优化，提高优先级 */
.share-card {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 0.75rem !important;
    transition: transform var(--transition-ui), box-shadow var(--transition-ui), border-color var(--transition-ui) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 140px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: var(--shadow-card) !important;
}

/* 根据涨跌幅添加极淡底色（减法卡片主题） */
.share-card.positive-bg {
    background: var(--card-bg-up) !important;
    border-left: 4px solid var(--card-border-up) !important;
}

.share-card.negative-bg {
    background: var(--card-bg-down) !important;
    border-left: 4px solid var(--card-border-down) !important;
}

.share-card.neutral-bg {
    background: white !important;
    border-left: 4px solid transparent !important;
}

.share-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1), 0 2px 8px rgba(26,86,167,0.08);
    border-color: #1a56a7;
    border-left-width: 4px;
}

.share-card:hover .share-name {
    color: #1a56a7;
}

/* 网格模式：隐藏统计与趋势文字，仅保留核心+曲线 */
.shares-grid .share-card .share-stats {
    display: none !important;
}
.shares-grid .share-card .update-time {
    display: none;
}
/* 涨跌幅胶囊样式 */
.shares-grid .share-card .share-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}
.shares-grid .share-card .share-change.positive {
    background: rgba(194, 65, 12, 0.12);
    color: var(--card-border-up);
}
.shares-grid .share-card .share-change.negative {
    background: rgba(13, 148, 136, 0.12);
    color: var(--card-border-down);
}
/* 现价超大字号 + 等宽 */
.shares-grid .share-card .share-price {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-mono);
}
/* 卡片底部：迷你趋势图容器 */
.card-sparkline-wrap {
    height: 32px;
    margin-top: 10px;
    position: relative;
    opacity: 0.85;
    transition: opacity var(--transition-speed);
}
.share-card:hover .card-sparkline-wrap {
    opacity: 0.25;
}
.card-sparkline-wrap svg {
    width: 100%;
    height: 100%;
    display: block;
}
/* 悬停时浮现的操作栏（覆盖在曲线上方） */
.card-actions-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
    border-radius: 0 0 10px 10px;
    padding: 0 8px;
}
.share-card:hover .card-actions-overlay {
    opacity: 1;
    pointer-events: auto;
}
.card-actions-overlay .card-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.card-actions-overlay .card-action-btn:hover {
    background: #f0f0f0;
    color: #1a56a7;
}
.card-actions-overlay .card-action-btn.btn-remove:hover {
    color: #dc3545;
}
.card-actions-overlay .card-action-btn i {
    font-size: 14px;
}

/* 状态指示器 - 参考test_user_shares.html优化 */
.status-indicator {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    z-index: 1;
    transition: all 0.3s ease;
}

.status-indicator.error {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.status-indicator.warning {
    background: rgba(255, 193, 7, 0.9);
    color: #212529;
}

.status-indicator.success {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

/* 股票信息布局 - 参考test_user_shares.html优化 */
.share-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 0.4rem;
    margin-right: 80px;
}

.share-info {
    flex: 1;
    min-width: 0;
}

.share-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a56a7;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.share-code {
    font-size: 0.75rem;
    font-weight: 500;
    color: #7f8c8d;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-price {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.1rem;
    font-family: 'Roboto Mono', 'Courier New', monospace;
}

.share-change {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Roboto Mono', 'Courier New', monospace;
}

.share-change.positive {
    color: var(--color-up);
}

.share-change.negative {
    color: var(--color-down);
}

.share-price, .share-change {
    font-variant-numeric: tabular-nums;
}

.monthly-change-container {
    padding: 25px 24px !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%) !important;
    border-bottom: 1px solid #e3f2fd !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.monthly-change-content {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.monthly-change-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a56a7 0%, #667eea 50%, #1a56a7 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.monthly-change-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.monthly-change-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #495057;
    font-weight: 600;
    margin-bottom: 4px;
}

.monthly-change-title i {
    color: #1a56a7;
    font-size: 16px;
}

.change-value {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.change-value.positive {
    color: #28a745;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.change-value.negative {
    color: #dc3545;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.change-value.zero {
    color: #6c757d;
}

.change-info {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.change-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(26, 86, 167, 0.1);
    min-width: 120px;
    transition: all 0.3s ease;
}

.change-info-item:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(26, 86, 167, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 86, 167, 0.1);
}

.change-info-label {
    font-size: 11px;
    color: #868e96;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.change-info-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a56a7;
}

.change-info-value.change-info-drawdown.negative {
    color: var(--color-down);
}

.change-info-value.change-info-drawdown.zero {
    color: #6c757d;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .monthly-change-container {
        padding: 20px 15px;
    }
    
    .monthly-change-title {
        font-size: 14px;
    }
    
    .monthly-change-title i {
        font-size: 14px;
    }
    
    .change-value {
        font-size: 32px;
    }
    
    .change-info {
        gap: 10px;
        width: 100%;
        justify-content: space-between;
    }
    
    .change-info-item {
        flex: 1;
        min-width: 0;
        padding: 10px 8px;
        border-radius: 8px;
    }
    
    .change-info-label {
        font-size: 10px;
        line-height: 1.3;
        word-break: break-word;
        text-align: center;
    }
    
    .change-info-value {
        font-size: 14px;
        text-align: center;
        white-space: nowrap; /* 数字不换行 */
        font-variant-numeric: tabular-nums;
    }
}

@media (max-width: 480px) {
    .monthly-change-container {
        padding: 16px 12px;
    }
    
    .monthly-change-display {
        gap: 10px;
    }
    
    .monthly-change-title {
        font-size: 13px;
    }
    
    .change-value {
        font-size: 28px;
        margin: 4px 0;
    }
    
    .change-info {
        display: flex;
        flex-direction: row;
        gap: 6px;
        width: 100%;
        justify-content: space-between;
    }
    
    .change-info-item {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .change-info-item:hover {
        transform: none; /* 移动端禁用hover效果 */
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    .change-info-label {
        font-size: 9px;
        text-align: center;
        color: #6c757d;
        font-weight: 500;
        line-height: 1.2;
        word-break: break-word;
        white-space: normal;
    }
    
    .change-info-value {
        font-size: 13px;
        font-weight: 700;
        text-align: center;
        color: #1a56a7;
        line-height: 1.2;
        white-space: nowrap; /* 数字不换行 */
    }
    
    /* 针对"最大回撤"一项：保证数字单行、不被挤压 */
    .change-info-item:nth-child(3) {
        min-width: 0; /* 允许 flex 收缩，但配合下面 value 不换行 */
    }
    
    .change-info-item:nth-child(3) .change-info-value {
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
        min-width: 3em; /* 如 -12.34% 约 3em */
    }
    
    /* 针对"最大回撤"标签的特殊处理 */
    .change-info-item:nth-child(3) .change-info-label {
        font-size: 8px;
    }
}

/* 超小屏幕优化（360px以下） */
@media (max-width: 360px) {
    .monthly-change-container {
        padding: 14px 10px;
    }
    
    .monthly-change-title {
        font-size: 12px;
    }
    
    .change-value {
        font-size: 24px;
    }
    
    .change-info {
        gap: 4px;
    }
    
    .change-info-item {
        padding: 6px 4px;
    }
    
    .change-info-label {
        font-size: 8px;
    }
    
    .change-info-value {
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* 最大回撤数字单行，必要时缩小字号 */
    .change-info-item:nth-child(3) .change-info-value {
        white-space: nowrap;
        font-size: 11px;
        font-variant-numeric: tabular-nums;
    }
    
    /* 针对"最大回撤"标签的特殊处理 */
    .change-info-item:nth-child(3) .change-info-label {
        font-size: 7px;
    }
}

.share-change.zero {
    color: #6c757d;
}

/* 股票统计信息 - 参考test_user_shares.html优化 */
.share-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.65rem;
    color: #6c757d;
}

.share-stats .stat-value {
    font-weight: 500;
}

.share-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    gap: 0.3rem;
    padding-top: 0.3rem;
}
/* 网格模式下使用底部浮现操作栏，隐藏原操作区 */
.shares-grid .share-card .share-actions {
    display: none !important;
}

/* 加入日期样式 - 参考test_user_shares.html */
.added-date {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.05rem 0.15rem;
    background: rgba(23, 162, 184, 0.08);
    border-radius: 3px;
    font-size: 0.55rem;
    color: #17a2b8;
    border-left: 1px solid #17a2b8;
    z-index: 2;
    max-width: 75px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.added-date i {
    color: #17a2b8;
    font-size: 0.55rem;
}

/* 卡片内小按钮 - 轻量化设计 */
.btn-refresh, .btn-remove, .btn-chart, .btn-analysis, .btn-trend {
    background: transparent;
    color: #666;
    border: 1px solid #e1e5eb;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh {
    color: #17a2b8;
    border-color: rgba(23, 162, 184, 0.3);
}

.btn-refresh:hover {
    background: rgba(23, 162, 184, 0.1);
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-remove {
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.btn-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #dc3545;
}

.btn-chart {
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.btn-chart:hover {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #28a745;
}

.btn-analysis {
    color: #1a56a7;
    border-color: rgba(26, 86, 167, 0.3);
}

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

.btn-trend {
    color: #6f42c1;
    border-color: rgba(111, 66, 193, 0.3);
}

.btn-trend:hover {
    background: rgba(111, 66, 193, 0.1);
    border-color: #6f42c1;
    color: #6f42c1;
}

/* 趋势评分弹窗样式 */
#trend-score-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#trend-score-modal.fade-in {
    opacity: 1;
    visibility: visible;
}

#trend-score-modal .modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 500px;
    width: 95%;
    max-height: 95vh;
    overflow: hidden;
    transform: scale(0.7) translateY(-50px) rotateX(15deg);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

#trend-score-modal.fade-in .modal-content {
    transform: scale(1) translateY(0) rotateX(0deg);
    opacity: 1;
}

#trend-score-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6f42c1 0%, #5a32a3 50%, #6f42c1 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

#trend-score-modal .modal-header {
    padding: 32px 36px 28px;
    border-bottom: 1px solid rgba(111, 66, 193, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    position: relative;
    overflow: hidden;
}

#trend-score-modal .modal-header h3 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

#trend-score-modal .modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: bold;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
}

#trend-score-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#trend-score-modal .modal-body {
    padding: 36px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.trend-score-display {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
    border-radius: 16px;
    background: linear-gradient(145deg, #f7fafc 0%, #ffffff 100%);
    border: 1px solid rgba(111, 66, 193, 0.1);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.08);
}

.trend-score-value {
    font-size: 48px;
    font-weight: 800;
    margin: 20px 0;
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trend-level {
    font-size: 24px;
    font-weight: 700;
    margin: 15px 0;
    padding: 10px 20px;
    border-radius: 12px;
    display: inline-block;
}

/* 股票卡片中的趋势评分样式 */
.share-stats .trend-level {
    font-size: 0.65rem;
    color: #6c757d;
    font-weight: normal;
    margin: 0;
    padding: 0;
}

/* 股票卡片中的趋势评分颜色样式 */
.share-stats .trend-level.strong-up {
    color: #28a745;
    background: transparent;
}

.share-stats .trend-level.steady-up {
    color: #17a2b8;
    background: transparent;
}

.share-stats .trend-level.moderate-up {
    color: #ffc107;
    background: transparent;
}

.share-stats .trend-level.weak-up {
    color: #fd7e14;
    background: transparent;
}

.share-stats .trend-level.no-trend {
    color: #6c757d;
    background: transparent;
}

.trend-level.strong-up {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.trend-level.steady-up {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
}

.trend-level.moderate-up {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.trend-level.weak-up {
    background: linear-gradient(135deg, #fd7e14 0%, #dc3545 100%);
    color: white;
}

.trend-level.no-trend {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.trend-description {
    font-size: 16px;
    color: #495057;
    margin: 20px 0;
    line-height: 1.6;
}

/* 大单统计关闭按钮样式 - 现代化重新设计 */
.ddzz-close-btn {
    padding: 16px 40px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    display: block;
    margin: 32px auto 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

/* 大单统计关闭按钮移动端优化 */
@media (max-width: 767px) {
    .ddzz-close-btn {
        padding: 12px 30px;
        font-size: 14px;
        min-width: 140px;
        border-radius: 12px;
        margin: 24px auto 0;
    }
}

@media (max-width: 480px) {
    .ddzz-close-btn {
        padding: 10px 24px;
        font-size: 13px;
        min-width: 120px;
        border-radius: 10px;
        margin: 20px auto 0;
    }
}

.ddzz-close-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.ddzz-close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.ddzz-close-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.ddzz-close-btn:hover::before {
    left: 100%;
}

.ddzz-close-btn:hover::after {
    width: 120px;
    height: 120px;
}

.ddzz-close-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.ddzz-close-btn i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.ddzz-close-btn:hover i {
    transform: scale(1.1);
}

/* 大单统计按钮样式 - 现代化重新设计 */
.btn-ddzz {
    background: transparent;
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 36px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 大单统计按钮移动端优化 */
@media (max-width: 767px) {
    .btn-ddzz {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
        height: 28px;
        min-width: 32px;
    }
}

@media (max-width: 480px) {
    .btn-ddzz {
        padding: 0.25rem 0.4rem;
        font-size: 0.65rem;
        height: 26px;
        min-width: 30px;
    }
}

.btn-ddzz:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    color: #667eea;
}

.btn-ddzz i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.btn-ddzz:hover i {
    transform: rotate(90deg);
}

/* 大单按钮加载状态 */
.btn-ddzz.loading {
    background: transparent;
    border-color: rgba(108, 117, 125, 0.3);
    color: #6c757d;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-ddzz.loading i {
    animation: spin 1.2s linear infinite;
}

/* 大单按钮成功状态 */
.btn-ddzz.success {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #28a745;
}

/* 按钮脉冲效果 */
.btn-ddzz.pulse {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0%, 100% { border-color: rgba(102, 126, 234, 0.3); }
    50% { border-color: rgba(102, 126, 234, 0.6); }
}

/* 大单统计弹窗样式 - 现代化重新设计 */
#ddzz-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#ddzz-modal.fade-in {
    opacity: 1;
    visibility: visible;
}

#ddzz-modal .modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    max-width: 900px;
    width: 95%;
    max-height: 95vh;
    overflow: hidden;
    transform: scale(0.7) translateY(-50px) rotateX(15deg);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

#ddzz-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#ddzz-modal .modal-header {
    padding: 32px 36px 28px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

#ddzz-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: floatingLights 6s ease-in-out infinite;
}

@keyframes floatingLights {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

#ddzz-modal .modal-header h3 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

#ddzz-modal .modal-header h3 i {
    font-size: 20px;
    opacity: 0.9;
}

#ddzz-modal .modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: bold;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
}

#ddzz-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#ddzz-modal .modal-close:active {
    transform: scale(0.95) rotate(90deg);
}

#ddzz-modal .modal-body {
    padding: 36px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 大单统计内容样式 - 现代化重新设计 */
.ddzz-stats h3 {
    text-align: center;
    margin-bottom: 40px;
    color: #1a202c;
    font-size: 22px;
    font-weight: 700;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* 血条样式 - 大单统计可视化 */
.health-bar-container {
    background: linear-gradient(145deg, #f7fafc 0%, #ffffff 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.08);
    position: relative;
    overflow: hidden;
}

.health-bar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

.health-bar-title {
    text-align: center;
    margin-bottom: 20px;
    color: #667eea;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.health-bar-title i {
    font-size: 14px;
    opacity: 0.8;
}

.health-bar-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    height: 24px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.health-bar {
    height: 100%;
    border-radius: 12px;
    position: relative;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.health-bar.buy-dominant {
    background: linear-gradient(135deg, #38a169 0%, #48bb78 100%);
    box-shadow: 0 0 20px rgba(56, 161, 105, 0.4);
}

.health-bar.sell-dominant {
    background: linear-gradient(135deg, #e53e3e 0%, #fc8181 100%);
    box-shadow: 0 0 20px rgba(229, 62, 62, 0.4);
}

.health-bar.balanced {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.health-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: healthBarShine 2s ease-in-out infinite;
}

@keyframes healthBarShine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.health-bar-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.health-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
}

.health-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.health-bar-label.buy {
    color: #38a169;
}

.health-bar-label.sell {
    color: #e53e3e;
}

.health-bar-label i {
    font-size: 10px;
}

.health-bar-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.health-stat-item {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.health-stat-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.health-stat-value {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.health-stat-value.buy {
    color: #38a169;
}

.health-stat-value.sell {
    color: #e53e3e;
}

.health-stat-value.net {
    color: #667eea;
}

.health-stat-label {
    font-size: 11px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 血条动画效果 */
.health-bar-animate {
    animation: healthBarFill 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes healthBarFill {
    0% {
        width: 0%;
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.ddzz-stats h3::before {
    content: '';
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.ddzz-stats h3::after {
    content: '';
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
    border-radius: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

.stat-item {
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 
        0 10px 30px rgba(102, 126, 234, 0.08),
        0 1px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: gradientShift 4s ease-in-out infinite;
}

.stat-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.stat-item:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 
        0 20px 50px rgba(102, 126, 234, 0.15),
        0 5px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.2);
}

.stat-item:hover::after {
    width: 200px;
    height: 200px;
}

.stat-item h4 {
    margin: 0 0 20px 0;
    color: #667eea;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.stat-item p {
    margin: 8px 0;
    color: #4a5568;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 4px 0;
}

.stat-item p strong {
    color: #1a202c;
    font-weight: 800;
    font-size: 16px;
}

.stat-item p .buy-amount {
    color: #38a169;
    font-weight: 800;
}

.stat-item p .sell-amount {
    color: #e53e3e;
    font-weight: 800;
}

/* 加载和错误状态优化 - 现代化设计 */
.ddzz-loading {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(145deg, #f7fafc 0%, #ffffff 100%);
    border-radius: 24px;
    margin: 20px 0;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.08);
    position: relative;
    overflow: hidden;
}

.ddzz-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: gradientShift 2s ease-in-out infinite;
}

.ddzz-loading .loading-spinner {
    border: 5px solid rgba(102, 126, 234, 0.1);
    border-top: 5px solid #667eea;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    animation: spin 1.5s linear infinite;
    margin: 0 auto 32px;
    position: relative;
}

.ddzz-loading .loading-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.ddzz-loading p {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.ddzz-loading small {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.ddzz-error {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
    border-radius: 24px;
    margin: 20px 0;
    border: 1px solid rgba(229, 62, 62, 0.1);
    box-shadow: 0 10px 30px rgba(229, 62, 62, 0.08);
    position: relative;
    overflow: hidden;
}

.ddzz-error::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e53e3e 0%, #fc8181 50%, #e53e3e 100%);
    background-size: 200% 100%;
    animation: gradientShift 2s ease-in-out infinite;
}

.ddzz-error i {
    font-size: 72px;
    color: #e53e3e;
    margin-bottom: 32px;
    opacity: 0.9;
    animation: errorShake 2s ease-in-out infinite;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.ddzz-error p {
    color: #e53e3e;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 32px;
}

/* 管理者模式下的删除按钮样式 */
.btn-remove.admin-mode {
    border-color: rgba(220, 53, 69, 0.5);
    color: #dc3545;
}

.btn-remove.admin-mode:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
}


/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a56a7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
}

.error-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.btn-retry {
    padding: 8px 16px;
    background: transparent;
    color: #1a56a7;
    border: 1px solid #1a56a7;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

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

/* 删除历史按钮 */
.btn-delete-history {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #666;
    border: 1px solid #e1e5eb;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-history:hover {
    border-color: #6c757d;
    color: #6c757d;
    background: rgba(108, 117, 125, 0.05);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-out forwards;
}

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

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 响应式优化 */
@media (max-width: 767px) {
    .shares-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .shares-title {
        font-size: 1.3rem;
    }

    .share-card {
        padding: 1rem;
    }

    .share-name {
        font-size: 0.85rem;
    }

    .share-price {
        font-size: 1rem;
    }

    .index-chart-container {
        padding: 15px;
        min-height: 300px;
    }
    
    #index-chart {
        min-height: 300px !important;
    }
    
    .monthly-change-container {
        padding: 20px 15px;
    }
    
    .index-section {
        margin-bottom: 20px;
    }

    .tab-buttons {
        flex-wrap: wrap;
    }
    
    /* 大单统计弹窗移动端优化 */
    #ddzz-modal .modal-content {
        width: 98%;
        max-height: 98vh;
        border-radius: 16px;
        margin: 10px;
    }

    #ddzz-modal .modal-header {
        padding: 20px 16px;
    }

    #ddzz-modal .modal-header h3 {
        font-size: 18px;
    }

    #ddzz-modal .modal-close {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    #ddzz-modal .modal-body {
        padding: 20px 16px;
    }

    .ddzz-stats h3 {
        font-size: 18px;
        margin-bottom: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-item {
        padding: 20px 16px;
    }

    .stat-item h4 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .stat-item p {
        font-size: 14px;
    }

    .stat-item p strong {
        font-size: 15px;
    }

    .ddzz-loading {
        padding: 40px 20px;
    }

    .ddzz-loading .loading-spinner {
        width: 50px;
        height: 50px;
    }

    .ddzz-loading p {
        font-size: 16px;
    }

    .ddzz-error {
        padding: 40px 20px;
    }

    .ddzz-error i {
        font-size: 48px;
        margin-bottom: 20px;
    }

    .ddzz-error p {
        font-size: 16px;
        margin-bottom: 20px;
    }
}

/* 针对小屏幕的进一步优化 */
@media (max-width: 480px) {
    .stats-grid {
        gap: 16px;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .stat-item h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .stat-item p {
        font-size: 13px;
    }

    .stat-item p strong {
        font-size: 14px;
    }
    
    /* 小屏幕弹窗优化 */
    #ddzz-modal .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
        transform: scale(0.8) translateY(-30px) rotateX(10deg);
        display: flex;
        flex-direction: column;
    }
    
    #ddzz-modal .modal-header {
        padding: 16px 20px 12px;
        border-radius: 0;
    }
    
    #ddzz-modal .modal-header h3 {
        font-size: 16px;
    }
    
    #ddzz-modal .modal-close {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    #ddzz-modal .modal-body {
        padding: 16px 20px;
        flex: 1;
        overflow-y: auto;
    }
    
    .ddzz-stats h3 {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    /* 血条移动端优化 */
    .health-bar-container {
        padding: 20px 16px;
        margin: 20px 0;
    }

    .health-bar-title {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .health-bar-wrapper {
        height: 20px;
        margin-bottom: 12px;
    }

    .health-bar-value {
        font-size: 10px;
    }

    .health-bar-labels {
        flex-direction: column;
        gap: 8px;
        margin-top: 8px;
    }

    .health-bar-label {
        padding: 4px 8px;
        font-size: 11px;
    }

    .health-bar-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 12px;
    }

    .health-stat-item {
        padding: 8px 6px;
    }

    .health-stat-value {
        font-size: 16px;
    }

    .health-stat-label {
        font-size: 10px;
    }
}

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 4px solid #28a745;
}

.toast.show {
    transform: translateX(0);
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-error i {
    color: #dc3545;
}

.toast-success i {
    color: #28a745;
}

/* 用户专属指数样式 - 提高优先级 */
.index-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%) !important;
    border: 2px solid #e3f2fd !important;
    box-shadow: 0 6px 20px rgba(26, 86, 167, 0.1) !important;
    margin-bottom: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
}

.index-section .shares-header {
    flex-shrink: 0 !important;
    z-index: 2 !important;
}

/* 指数控制区域样式 */
.index-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-all-data {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    color: #666;
    border: 1px solid #e1e5eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 500;
}

.btn-all-data:hover {
    border-color: #1a56a7;
    color: #1a56a7;
    background: rgba(26, 86, 167, 0.05);
}

.btn-all-data.active {
    background: #1a56a7;
    color: white;
    border-color: #1a56a7;
}

.btn-all-data.active i {
    transform: rotate(360deg);
}

/* 响应式优化 */
@media (max-width: 767px) {
    .index-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .index-section .shares-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
}

.index-chart-container {
        padding: 15px;
        min-height: 300px;
    }
    
    #index-chart {
        min-height: 300px;
    }
}

.index-chart-container {
    position: relative !important;
    min-height: 400px !important;
    padding: 20px 24px !important;
    background: #ffffff !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

#index-chart {
    flex: 1 !important;
    min-height: 400px !important;
    width: 100% !important;
}

.skeleton-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    min-height: 400px;
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-rankings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 300px;
}

.skeleton-shares {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.skeleton-share-card {
    height: 140px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 10px;
}

/* 列表模式（清单视图） */
.shares-list-wrap {
    padding: 0 24px 24px;
    overflow-x: auto;
}
.shares-list {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}
.shares-list thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}
.shares-list th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}
.shares-list th.col-name { width: 140px; min-width: 120px; padding-right: 8px; }
.shares-list th.col-sparkline { width: 72px; min-width: 72px; text-align: center; padding-left: 4px; padding-right: 4px; }
.shares-list th.col-change { width: 88px; text-align: right; }
.shares-list th.col-price { width: 80px; text-align: right; }
.shares-list th.col-ohlc { text-align: right; color: #868e96; font-weight: 500; }
.shares-list th.col-actions { width: 100px; text-align: center; }
.shares-list tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.15s ease;
}
.shares-list tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}
.shares-list tbody tr:hover {
    background: #f0f7ff;
}
.shares-list td {
    padding: 10px 12px;
    vertical-align: middle;
}
.shares-list .col-name { width: 140px; padding-right: 8px; }
.shares-list .col-name .list-name { font-weight: 600; color: #1a56a7; display: block; }
.shares-list .col-name .list-code { font-size: 12px; color: #868e96; }
.shares-list .col-sparkline { width: 72px; padding-left: 4px; padding-right: 4px; text-align: center; }
.shares-list .list-sparkline { width: 60px; height: 24px; margin: 0 auto; display: block; }
.shares-list .col-change { width: 88px; text-align: right; font-family: var(--font-mono); font-weight: 700; }
.shares-list .col-change.positive { color: var(--color-up); }
.shares-list .col-change.negative { color: var(--color-down); }
.shares-list .col-price { width: 80px; text-align: right; font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.shares-list .col-ohlc { text-align: right; font-size: 12px; color: #868e96; }
.shares-list .col-actions { text-align: center; }
.shares-list .list-row-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.shares-list tbody tr:hover .list-row-actions {
    opacity: 1;
}
.shares-list .list-row-actions .card-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.shares-list .list-row-actions .card-action-btn:hover {
    background: #e9ecef;
    color: #1a56a7;
}
.shares-list .list-row-actions .card-action-btn.btn-remove:hover {
    color: #dc3545;
}

/* 收益排行榜样式 */
.rankings-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.rankings-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tab-buttons {
    display: flex;
    gap: 8px;
}

/* 收益排行榜刷新按钮 - 小圆形图标 */
.btn-rankings-refresh {
    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-rankings-refresh:hover:not(:disabled) {
    background: rgba(26, 86, 167, 0.1);
    border-color: #1a56a7;
    color: #1a56a7;
}

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

.btn-rankings-refresh:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

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

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

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

.tab-btn {
    padding: 6px 14px;
    border: 1px solid #e1e5eb;
    background: transparent;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: #1a56a7;
    color: white;
    border-color: #1a56a7;
}

.tab-btn:hover:not(.active) {
    border-color: #1a56a7;
    color: #1a56a7;
    background: rgba(26, 86, 167, 0.05);
}

.rankings-content {
    padding: 20px 24px !important;
}

/* 确保 Bootstrap 不会覆盖我们的布局样式 */
.shares-module .shares-header,
.index-section .shares-header {
    display: flex !important;
    flex-wrap: nowrap !important;
}

/* 防止 Bootstrap 的 container 类影响我们的布局 */
body > .container {
    width: 100% !important;
    max-width: 1400px !important;
}

/* 确保 flexbox 布局不被 Bootstrap 覆盖 */
.index-section {
    display: flex !important;
    flex-direction: column !important;
}

.index-chart-container {
    display: flex !important;
    flex-direction: column !important;
}



.skeleton-ranking-item {
    height: 60px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

.rankings-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    padding-bottom: 14px; /* 为生命条留出空间 */
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: visible; /* 允许生命条和hover提示显示 */
}

/* 前三名高亮 */
.ranking-item.rank-1 {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    border-left-color: #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.ranking-item.rank-2 {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-left-color: #c0c0c0;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.2);
}

.ranking-item.rank-3 {
    background: linear-gradient(135deg, #ffe5d4 0%, #ffffff 100%);
    border-left-color: #cd7f32;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.2);
}

.ranking-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ranking-item.rank-1:hover {
    background: linear-gradient(135deg, #fff9e6 0%, #fffef0 100%);
}

.ranking-item.rank-2:hover {
    background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
}

.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;
}
.ranking-remove-suggestion-label {
    font-size: 12px;
    color: #dc3545;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
}
.ranking-strategy-hint {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    border-top: 1px solid #eee;
}
.ranking-strategy-hint .ranking-formula {
    font-family: var(--font-mono), monospace;
    color: #495057;
    margin-bottom: 4px;
}
.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: 10px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.ranking-item-suggest-remove .ranking-item-score {
    color: #dc3545;
}

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

.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: 8px;
    margin-bottom: 4px;
}

.ranking-stock-name {
    font-weight: bold;
    color: #333;
}

.ranking-stock-code {
    color: #666;
    font-size: 14px;
}

/* 身份徽标（🚀火箭、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: 12px;
}

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

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

.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: 15px;
    min-width: 90px;
}

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

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

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

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

.ranking-breakdown-icon {
    color: #F5222D;
    font-size: 14px;
    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);
    }
}

/* 高水位线背景条（High-Water Mark Bar） */
.ranking-high-water-mark-bar {
    position: relative;
    width: 100%;
    height: 2px;
    margin-top: 4px;
    margin-bottom: 2px;
    background: transparent;
    overflow: hidden;
}

.high-water-mark-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F5F5F5;
    border-radius: 0;
    opacity: 0; /* 默认隐藏 */
    transition: opacity 0.3s ease;
}

.ranking-item:hover .high-water-mark-bg {
    opacity: 0.6; /* Hover时显示 */
}

.high-water-mark-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease, opacity 0.3s ease;
    border-radius: 0;
    z-index: 1;
    opacity: 0; /* 默认隐藏 */
}

.ranking-item:hover .high-water-mark-fill {
    opacity: 0.8; /* Hover时显示 */
}

/* 破位状态下，填充条和背景都更明显 */
.ranking-item:hover .ranking-return-group[data-is-breakdown="true"] .high-water-mark-bg {
    opacity: 0.8;
    background: #FFF0F0;
}

.ranking-item:hover .ranking-return-group[data-is-breakdown="true"] .high-water-mark-fill {
    opacity: 1;
}

/* 高水位线条容器默认隐藏，Hover时显示 */
.ranking-high-water-mark-bar {
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.high-water-mark-drawdown {
    position: absolute;
    top: 0;
    height: 100%;
    background: #F5222D;
    opacity: 0; /* 默认隐藏 */
    transition: width 0.3s ease, left 0.3s ease, opacity 0.3s ease;
    border-radius: 0;
    z-index: 2;
}

.ranking-item:hover .high-water-mark-drawdown {
    opacity: 0.9; /* Hover时显示 */
    animation: pulse-drawdown 2s ease-in-out infinite;
}

@keyframes pulse-drawdown {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

.ranking-efficiency {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    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: 12px;
    color: #F5222D;
    margin-top: 4px;
    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: 30px;
}

.ranking-number::before {
    content: attr(data-hover);
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 12px;
    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: 4px;
    font-size: 11px;
    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: 8px;
    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: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 20;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 180px;
}

.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: 4px;
    line-height: 1.4;
}

.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;
}

.btn-calculate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #1a56a7;
    border: 1px solid #1a56a7;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* 模态框样式 */
.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%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.share-note-preview i {
    flex-shrink: 0;
    color: #f0ad4e;
}
.share-note-preview span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.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: wrap;
        gap: 8px;
        width: 100%;
    }
    .shares-module .shares-header-actions .view-switcher {
        margin-right: 0;
    }
    .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-delete-history span,
    .shares-module .btn-add-share .btn-text {
        display: none;
    }
    .shares-module .btn-delete-history,
    .shares-module .btn-add-share {
        padding: 8px 12px;
    }
    .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);
    }
}
