/* 推荐系统样式 - 重新设计 */

/* ===== 顶部信息栏 ===== */
.recommend-top-bar {
    margin-top: 56px;
    padding: 12px 0;
    position: sticky;
    top: 56px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.recommend-top-bar.buy-mode {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.recommend-top-bar.sell-mode {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.recommend-top-bar.favorites-mode {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.top-bar-container {
    max-width: 2470px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.type-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.type-info i {
    font-size: 1.5rem;
}

.type-info .type-label,
.type-info .favorite-label {
    font-size: 1.1rem;
    font-weight: 500;
}

.favorite-count-link {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
}

.favorite-count-link:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* 切换按钮 */
.switch-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
    text-decoration: none;
}

.tab-btn.active {
    background: #fff;
    color: #333;
}

.tab-btn .count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.tab-btn.active .count {
    background: rgba(0,0,0,0.1);
}

.tab-btn.favorites-btn {
    border: 1px solid rgba(255,255,255,0.3);
}

/* 日期/统计信息 */
.trade-date-info,
.stats-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.stats-info .stat-item {
    padding: 4px 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
}

.stats-info .stat-item.profit.positive {
    background: rgba(40, 167, 69, 0.3);
}

.stats-info .stat-item.profit.negative {
    background: rgba(220, 53, 69, 0.3);
}

/* ===== 主内容区域 ===== */
.recommend-main {
    min-height: calc(100vh - 150px);
}

/* ===== 股票卡片 ===== */
.stock-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.stock-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.stock-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.stock-name-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stock-code {
    font-size: 0.8rem;
    color: #999;
}

.stock-score {
    text-align: right;
}

.score-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.score-value.high { color: #dc3545; }
.score-value.medium { color: #fd7e14; }
.score-value.low { color: #6c757d; }

.score-label {
    font-size: 0.75rem;
    color: #999;
}

/* 评分分解 */
.score-breakdown {
    margin-bottom: 12px;
    flex: 1;
}

.score-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.score-item .label {
    width: 50px;
    color: #666;
    flex-shrink: 0;
}

.score-item .progress {
    flex: 1;
    height: 5px;
    margin: 0 8px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.score-item .progress-bar {
    height: 100%;
    border-radius: 3px;
}

.score-item .value {
    width: 30px;
    text-align: right;
    font-weight: 500;
    color: #333;
    flex-shrink: 0;
}

/* 股票元数据 */
.stock-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.risk-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.risk-level.conservative {
    background: #e8f5e9;
    color: #2e7d32;
}

.risk-level.balanced {
    background: #fff3e0;
    color: #ef6c00;
}

.risk-level.aggressive {
    background: #ffebee;
    color: #c62828;
}

.analyst-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* 股票底部 */
.stock-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.stock-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stock-price .price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.stock-price .change {
    font-size: 0.85rem;
    font-weight: 500;
}

.stock-price .change.up { color: #dc3545; }
.stock-price .change.down { color: #28a745; }

.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-detail:hover {
    background: #667eea;
    color: #fff;
    text-decoration: none;
}

/* Mark 按钮 */
.btn-mark {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border: none;
    border-radius: 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 收藏按钮（小巧样式，与角标保持一致） */
.btn-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.btn-fav:hover {
    background: #dc3545;
    color: #fff;
    transform: scale(1.1);
}

.btn-fav.marked {
    background: #667eea;
    color: #fff;
}

.btn-fav.marked:hover {
    background: #5a67d8;
}

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

.btn-fav.sell:hover {
    background: #28a745;
    color: #fff;
}

.btn-mark.mark-buy {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.btn-mark.mark-buy:hover {
    background: #dc3545;
    color: #fff;
}

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

.btn-mark.mark-sell:hover {
    background: #28a745;
    color: #fff;
}

.btn-mark.disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-mark.disabled:hover {
    background: #e0e0e0;
    color: #999;
    transform: none;
}

.btn-mark.marked {
    background: #667eea;
    color: #fff;
}

.btn-mark.marked:hover {
    background: #5a67d8;
}

/* ===== 分页（与分析师页面保持一致的Bootstrap样式） ===== */
/* 翻页按钮统一放置在页面底部，使用Bootstrap的btn btn-sm btn-outline-primary样式 */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #666;
}

.empty-state small {
    color: #999;
}

/* ===== 响应式设计 ===== */

/* 大屏幕 (>= 1400px) */
@media (min-width: 1400px) {
    .stock-card {
        padding: 20px;
    }
}

/* 平板横屏 (992px - 1199px) */
@media (max-width: 1199px) {
    .top-bar-container {
        padding: 0 30px;
    }
    
    .recommend-main {
        padding: 20px 30px 40px !important;
    }
}

/* 平板竖屏 (768px - 991px) */
@media (max-width: 991px) {
    .top-bar-container {
        padding: 0 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .type-info {
        justify-content: center;
    }
    
    .switch-tabs {
        justify-content: center;
    }
    
    .trade-date-info {
        justify-content: center;
    }
    
    .recommend-main {
        padding: 15px 20px 30px !important;
    }
}

/* 手机 (< 768px) */
@media (max-width: 767px) {
    .recommend-top-bar {
        margin-top: 56px;
        padding: 10px 0;
    }
    
    .top-bar-container {
        padding: 0 15px;
    }
    
    .type-info {
        width: 100%;
    }
    
    .type-info .type-label {
        font-size: 1.1rem;
    }
    
    .switch-tabs {
        width: 100%;
    }
    
    .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
    }
    
    .recommend-main {
        padding: 15px 15px 30px !important;
    }
    
    .stock-card {
        padding: 15px;
    }
    
    .stock-name {
        font-size: 0.95rem;
    }
    
    .score-value {
        font-size: 1.4rem;
    }
}

/* 小手机 (< 576px) */
@media (max-width: 575px) {
    .stock-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .stock-score {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }
    
    .score-value {
        font-size: 1.3rem;
    }
    
    .stock-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .stock-price {
        width: 100%;
    }
    
    .btn-detail {
        width: 100%;
        justify-content: center;
    }
}

/* ===== 股票详情页样式（保留） ===== */

.stock-detail-container {
    padding-top: 80px;
}

/* 图表切换按钮 */
.chart-toggles {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.chart-toggles .toggle-btn {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    opacity: 0.55;
}

.chart-toggles .toggle-btn.active {
    opacity: 1;
    font-weight: 500;
}

.chart-toggles .toggle-btn:hover {
    opacity: 0.85;
}

/* 时间范围选择器 */
.range-selector .btn {
    font-size: 0.8rem;
}
.range-selector .btn.active {
    font-weight: 600;
}

/* 全屏模式 */
.chart-fullscreen {
    border-radius: 0 !important;
    overflow: auto;
}
.chart-fullscreen .card-header {
    border-radius: 0 !important;
}
.chart-fullscreen .chart-container {
    height: calc(100vh - 80px) !important;
}
.chart-fullscreen .card-body {
    padding: 10px 20px 20px;
}

@media (max-width: 767px) {
    .chart-toggles {
        width: 100%;
        margin-top: 8px;
        justify-content: flex-start;
    }
    .chart-toggles .toggle-btn {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
}

.stock-header-detail {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stock-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.stock-code-badge {
    font-size: 0.85rem;
    font-weight: 400;
    color: #666;
    margin-left: 8px;
}

.stock-meta-detail {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stock-meta-detail .sector {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 0.75rem;
}

.stock-meta-detail .sector-link {
    text-decoration: none;
    color: inherit;
}

.stock-meta-detail .sector-link:hover .sector {
    background: #e0e7ff;
    color: #4f46e5;
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.risk-badge.conservative {
    background: #e8f5e9;
    color: #2e7d32;
}

.risk-badge.balanced {
    background: #fff3e0;
    color: #ef6c00;
}

.risk-badge.aggressive {
    background: #ffebee;
    color: #c62828;
}

.rec-type {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.rec-type.rating {
    background: #e3f2fd;
    color: #1565c0;
}

.rec-type.buy {
    background: #ffebee;
    color: #c62828;
}

.rec-type.sell {
    background: #e8f5e9;
    color: #2e7d32;
}

/* 综合评分显示（一行：标签与数值同字号 27px，数值放入实心主题色按钮框，醒目突出） */
.total-score-display {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.total-score-display .score-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #343a40;
    line-height: 1;
}

.total-score-display .score-value {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 10px;
    line-height: 1;
    color: #fff;
}

.total-score-display .score-value.high { background: #dc3545; }
.total-score-display .score-value.medium { background: #fd7e14; }
.total-score-display .score-value.low { background: #6c757d; }

/* 价格信息卡片 — 紧凑单行 */
.price-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.price-item {
    text-align: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 0 4px;
}

.price-item .label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
    white-space: nowrap;
}

.price-item .value {
    font-size: 1.15rem;
    font-weight: 600;
    white-space: nowrap;
}

.price-item .value.price {
    color: #333;
}

.stock-rating-search-form .label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.stock-rating-search-form .input-group {
    min-width: 220px;
}

.stock-rating-search-form .form-control,
.stock-rating-search-form .input-group-text,
.stock-rating-search-form .btn {
    min-height: 38px;
}

/* 评分详情 */
.score-detail-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.score-detail-item {
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.score-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.score-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dimension-name {
    font-weight: 500;
}

.dimension-score {
    color: #666;
}

.factor-details {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* ===== 收藏夹页面样式 ===== */

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    text-decoration: none;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

/* 收藏卡片 */
.favorite-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 4px solid #667eea;
}

.favorite-card.sold {
    border-left-color: #6c757d;
    opacity: 0.85;
}

.favorite-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.favorite-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.favorite-status {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.status-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.holding {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.sold {
    background: #f5f5f5;
    color: #666;
}

.mark-type {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
}

.mark-type.buy {
    background: #ffebee;
    color: #c62828;
}

.mark-type.sell {
    background: #e8f5e9;
    color: #2e7d32;
}

.favorite-info {
    flex: 1;
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.info-row .label {
    color: #666;
}

.info-row .value {
    font-weight: 500;
    color: #333;
}

.info-row.profit-row .value.positive {
    color: #dc3545;
}

.info-row.profit-row .value.negative {
    color: #28a745;
}

.favorite-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.btn-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-action.btn-detail {
    background: #f8f9fa;
    color: #666;
}

.btn-action.btn-detail:hover {
    background: #667eea;
    color: #fff;
}

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

.btn-action.btn-sell:hover {
    background: #28a745;
    color: #fff;
}

.btn-action.btn-remove {
    flex: 0;
    padding: 8px 12px;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.btn-action.btn-remove:hover {
    background: #dc3545;
    color: #fff;
}

/* Toast 提示 */
.toast-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #fff;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: #28a745;
}

.toast-error {
    background: #dc3545;
}

.toast-warning {
    background: #ffc107;
    color: #333;
}

.toast-info {
    background: #17a2b8;
}

.page-info {
    color: #666;
    font-size: 0.9rem;
}

/* ===== 因子详情样式 ===== */

.factor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .factor-grid {
        grid-template-columns: 1fr;
    }
}

.factor-section {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.factor-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: #fff;
    font-weight: 500;
}

.factor-section-header i {
    font-size: 1.1rem;
}

.factor-section-header .factor-score {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.factor-section-header.analyst {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.factor-section-header.fundamental {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.factor-section-header.technical {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.factor-section-header.capital {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

.factor-section-header.capital .factor-score {
    background: rgba(0,0,0,0.1);
}

.factor-section-header.price-percentile {
    background: linear-gradient(135deg, #2b6da8 0%, #1d5280 100%);
    color: #fff;
    padding: 10px 16px;
}

.factor-section-header.drawdown {
    background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
    color: #fff;
    padding: 10px 16px;
}

.factor-items {
    padding: 15px 18px;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.factor-item:last-child {
    border-bottom: none;
}

.factor-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    flex-shrink: 0;
}

.factor-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.factor-label {
    font-size: 0.9rem;
    color: #666;
}

.factor-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.factor-value.positive {
    color: #dc3545;
}

.factor-value.negative {
    color: #28a745;
}

/* ===== 苹果风格切换按钮 ===== */

.switch-tabs.apple-style {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 4px;
    gap: 0;
    backdrop-filter: blur(10px);
}

.switch-tabs.apple-style .tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
}

.switch-tabs.apple-style .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.switch-tabs.apple-style .tab-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.switch-tabs.apple-style .tab-btn .count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.switch-tabs.apple-style .tab-btn.active .count {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

/* 筛选按钮栏 */
.filter-bar-container {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 15px 40px;
}

.filter-bar-inner {
    max-width: 2470px;
    margin: 0 auto;
}

.filter-bar-inner.filter-centered {
    display: flex;
    justify-content: center;
}

.filter-tabs.apple-style {
    display: inline-flex;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
    gap: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.filter-tabs.apple-style .filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background: transparent;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.filter-tabs.apple-style .filter-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.filter-tabs.apple-style .filter-btn.active {
    background: #667eea;
    color: #fff;
}

.filter-tabs.apple-style .filter-btn .count {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-tabs.apple-style .filter-btn.active .count {
    background: rgba(255, 255, 255, 0.2);
}

/* 右侧占位符 */
.placeholder-right {
    width: 120px;
}

/* ===== 收藏夹表格样式 ===== */

.favorites-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.favorites-table {
    width: 100%;
    border-collapse: collapse;
}

.favorites-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #eee;
}

.favorites-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.favorites-table th .sort-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.favorites-table th .sort-header:hover {
    color: #667eea;
}

.favorites-table th .sort-header.active {
    color: #667eea;
}

.favorites-table th .sort-header i {
    font-size: 0.75rem;
    opacity: 0.5;
}

.favorites-table th .sort-header.active i {
    opacity: 1;
}

.favorites-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.favorites-table tbody tr:hover {
    background: #f8f9fa;
}

.favorites-table tbody tr.sold-row {
    opacity: 0.7;
    background: #fafafa;
}

.favorites-table td {
    padding: 14px 16px;
    font-size: 0.9rem;
    vertical-align: middle;
}

.favorites-table .col-stock {
    min-width: 140px;
}

.favorites-table .stock-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
}

.favorites-table .stock-link:hover .stock-name {
    color: #667eea;
}

.favorites-table .stock-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.favorites-table .stock-code {
    color: #999;
    font-size: 0.8rem;
}

.favorites-table .type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.favorites-table .type-badge.buy {
    background: #ffebee;
    color: #c62828;
}

.favorites-table .type-badge.sell {
    background: #e8f5e9;
    color: #2e7d32;
}

.favorites-table .profit-value {
    font-weight: 600;
}

.favorites-table .profit-value.positive {
    color: #dc3545;
}

.favorites-table .profit-value.negative {
    color: #28a745;
}

.favorites-table .status-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.favorites-table .status-tag.holding {
    background: #e3f2fd;
    color: #1565c0;
}

.favorites-table .status-tag.sold {
    background: #f5f5f5;
    color: #666;
}

.favorites-table .action-btns {
    display: flex;
    gap: 8px;
}

.favorites-table .action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.favorites-table .action-btn.detail {
    background: #f0f0f0;
    color: #666;
}

.favorites-table .action-btn.detail:hover {
    background: #667eea;
    color: #fff;
}

.favorites-table .action-btn.sell {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.favorites-table .action-btn.sell:hover {
    background: #28a745;
    color: #fff;
}

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

.favorites-table .action-btn.remove:hover {
    background: #dc3545;
    color: #fff;
}

/* 表格响应式 */
@media (max-width: 991px) {
    .favorites-table-wrapper {
        overflow-x: auto;
    }
    
    .favorites-table {
        min-width: 800px;
    }
}

@media (max-width: 767px) {
    .filter-bar-container {
        padding: 12px 15px;
    }
    
    .switch-tabs.apple-style {
        width: 100%;
    }
    
    .switch-tabs.apple-style .tab-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .switch-tabs.apple-style .tab-btn span:not(.count) {
        display: none;
    }
    
    .switch-tabs.apple-style .tab-btn i {
        margin-right: 0;
    }
    
    .placeholder-right {
        display: none;
    }
}

/* ===== 整行可点击样式 ===== */

.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover {
    background: #f0f7ff !important;
}

.stock-info-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stock-info-cell .stock-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.stock-info-cell .stock-code {
    color: #999;
    font-size: 0.8rem;
}

/* ===== 操作按钮新样式 ===== */

.action-btns-new {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.action-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.action-btn-text.detail {
    background: #e3f2fd;
    color: #1565c0;
}

.action-btn-text.detail:hover {
    background: #1565c0;
    color: #fff;
}

.action-btn-text.sell {
    background: #e8f5e9;
    color: #2e7d32;
}

.action-btn-text.sell:hover {
    background: #2e7d32;
    color: #fff;
}

.action-btn-text.remove {
    background: #ffebee;
    color: #c62828;
}

.action-btn-text.remove:hover {
    background: #c62828;
    color: #fff;
}

.action-btn-text i {
    font-size: 0.85rem;
}

.action-btn-text span {
    display: inline;
}

/* 小屏操作按钮隐藏文字 */
@media (max-width: 1199px) {
    .action-btn-text span {
        display: none;
    }
    
    .action-btn-text {
        padding: 8px 10px;
    }
}

/* ===== 新版页面布局样式 v2 ===== */

/* 页面容器 */
.recommend-page-container {
    padding-top: 70px;
    min-height: 100vh;
    background: #f5f7fa;
}

/* 页面标题横幅 */
.page-title-banner {
    padding: 25px 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.page-title-banner.buy-banner {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.page-title-banner.sell-banner {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.page-title-banner.rating-banner {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.page-title-banner.favorites-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.page-title-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.page-title-info .title-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.page-title-info .date-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
}

.page-title-info .count-badge {
    background: rgba(255,255,255,0.25);
    padding: 5px 14px;
    border-radius: 15px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 快捷导航下拉菜单 */
.quick-nav-dropdown {
    position: relative;
}

.quick-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.quick-nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.quick-nav-dropdown:hover .quick-nav-menu,
.quick-nav-dropdown.active .quick-nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.quick-nav-menu a:hover {
    background: #f5f7fa;
}

.quick-nav-menu a.active {
    background: #667eea;
    color: #fff;
}

.quick-nav-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.quick-nav-menu .nav-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

/* 紧凑筛选栏 */
.compact-filter-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.compact-filter-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.compact-filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.compact-filter-tabs .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #f5f7fa;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.compact-filter-tabs .filter-chip:hover {
    background: #e8ecef;
    color: #333;
}

.compact-filter-tabs .filter-chip.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.compact-filter-tabs .filter-chip .chip-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.compact-filter-tabs .filter-chip.active .chip-count {
    background: rgba(255,255,255,0.25);
}

.sort-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-select-wrapper label {
    color: #666;
    font-size: 0.85rem;
}

.sort-select-wrapper select {
    padding: 6px 30px 6px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 8px center/16px 16px no-repeat;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    appearance: none;
}

.sort-select-wrapper select:focus {
    outline: none;
    border-color: #667eea;
}

/* 内容区域 */
.recommend-content {
    padding: 25px 0 50px;
}

.recommend-content .container {
    max-width: 1400px;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .page-title-banner .container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .page-title-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .quick-nav-dropdown {
        width: 100%;
    }
    
    .quick-nav-btn {
        justify-content: center;
        width: 100%;
    }
    
    .quick-nav-menu {
        left: 0;
        right: 0;
    }
}

@media (max-width: 767px) {
    .recommend-page-container {
        padding-top: 56px;
    }
    
    .page-title-banner {
        padding: 20px 0;
    }
    
    .page-title-info h1 {
        font-size: 1.2rem;
    }
    
    .page-title-info .title-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .compact-filter-bar {
        padding: 10px 0;
    }
    
    .compact-filter-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .compact-filter-tabs .filter-chip {
        flex-shrink: 0;
    }
    
    .sort-select-wrapper {
        width: 100%;
        margin-top: 10px;
    }
    
    .sort-select-wrapper select {
        flex: 1;
    }
    
    .recommend-content {
        padding: 15px 0 30px;
    }
}

/* ===== 买入动作标签样式增强 ===== */

.action-tag-wrapper {
    margin-bottom: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.action-tag.buy-action {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1), rgba(220, 53, 69, 0.05));
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.action-tag.sell-action {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.user-marked-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(102, 126, 234, 0.05));
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.action-reason {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: #666;
    border-left: 3px solid #667eea;
}

.action-reason.sell-reason {
    border-left-color: #28a745;
}

.analyst-sell-info {
    margin-bottom: 10px;
}

.analyst-sell-info .sell-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #fff3e0;
    color: #ef6c00;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.not-in-favorites {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #f5f5f5;
    color: #999;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* 推荐类型标签（几何与板块标签 sector-tag 一致：2px 8px 圆角10 无边框） */
.rec-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.rec-type-tag.buy {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.12), rgba(220, 53, 69, 0.06));
    color: #dc3545;
}

.rec-type-tag.sell {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.12), rgba(40, 167, 69, 0.06));
    color: #28a745;
}

.rec-type-tag.rating {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.12), rgba(23, 162, 184, 0.06));
    color: #17a2b8;
}

.sector-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f0f0f0;
    color: #666;
    border-radius: 10px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sector-tag:hover {
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
}

/* 卖出卡片特殊样式 */
.stock-card.sell-card {
    border-left: 4px solid #28a745;
}

/* 评分模式顶部栏 */
.recommend-top-bar.rating-mode {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

/* ===== 操作按钮文字样式 ===== */
.action-btns-new {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-btn-text .action-text {
    font-size: 0.75rem;
}

.action-btn-text.detail {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.action-btn-text.detail:hover {
    background: #667eea;
    color: #fff;
}

.action-btn-text.sell {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.action-btn-text.sell:hover {
    background: #28a745;
    color: #fff;
}

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

.action-btn-text.remove:hover {
    background: #dc3545;
    color: #fff;
}

/* 因子图标 emoji 样式优化 */
.factor-icon {
    font-size: 1.3rem;
    background: transparent;
}


