/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
    padding-bottom: 70px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #fff;
}

/* 顶部状态栏 */
.top-bar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.system-name {
    font-size: 18px;
    font-weight: 700;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-status {
    font-size: 12px;
    opacity: 0.9;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.refresh-btn:active {
    transform: rotate(90deg) scale(0.95);
}

/* 主导航 */
.main-nav {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: #f5f5f5;
}

.nav-item.active {
    color: #1e3c72;
    background-color: #e8f0fe;
}

.nav-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.nav-text {
    font-size: 11px;
}

/* 主内容区 */
.main-content {
    padding: 12px;
}

/* 指标卡片网格 */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.metric-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.metric-card.primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.metric-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}

.metric-card.primary .metric-label {
    color: rgba(255, 255, 255, 0.9);
}

.metric-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.metric-change {
    font-size: 12px;
    font-weight: 600;
}

.metric-sub {
    font-size: 10px;
    color: #999;
}

.positive {
    color: #e53935;
}

.negative {
    color: #43a047;
}

/* 功能网格 */
.section {
    margin-bottom: 16px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.function-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.function-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    background: white;
    padding: 12px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.function-card:hover {
    transform: translateY(-2px);
}

.function-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.function-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.function-desc {
    font-size: 9px;
    color: #999;
    text-align: center;
}

/* Cron 列表 */
.cron-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cron-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.cron-time {
    font-size: 13px;
    font-weight: 600;
    color: #1e3c72;
    width: 50px;
}

.cron-name {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.cron-status {
    font-size: 16px;
}

.status-ok {
    color: #43a047;
}

.status-failed {
    color: #e53935;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background: white;
    border-top: 1px solid #eee;
    padding: 6px 4px;
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.bottom-nav-item.active {
    color: #1e3c72;
}

.bottom-nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.bottom-nav-text {
    font-size: 10px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}

/* 更新 footer */
.update-footer {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 11px;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 16px;
    margin: -12px -12px 12px -12px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

/* 卡片列表 */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-item {
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 响应式调整 */
@media (max-width: 375px) {
    .metric-value {
        font-size: 18px;
    }
    
    .function-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .function-icon {
        font-size: 24px;
    }
}

/* 新闻卡片 */
.news-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    text-align: right;
}

.news-card {
    display: flex;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.news-rank {
    font-size: 18px;
    font-weight: 700;
    color: #1e3c72;
    min-width: 30px;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.news-summary {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #999;
}

/* 股票卡片 */
.watchlist-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.watchlist-stats strong {
    color: #333;
}

.stock-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.stock-rank {
    font-size: 16px;
    font-weight: 700;
    color: #1e3c72;
    min-width: 35px;
}

.stock-info {
    flex: 1;
}

.stock-name {
    font-size: 14px;
    font-weight: 600;
}

.stock-symbol {
    font-size: 11px;
    color: #999;
}

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

.price-value {
    font-size: 14px;
    font-weight: 600;
}

.price-change {
    font-size: 12px;
    font-weight: 600;
}

/* 风险页面 */
.risk-overview {
    background: white;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.risk-level-display {
    text-align: center;
}

.risk-level-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.risk-level-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 4px;
}

.risk-level-score {
    font-size: 12px;
    color: #999;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-card {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.alert-icon {
    font-size: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-desc {
    font-size: 12px;
    color: #666;
}

/* 组合页面 */
.portfolio-summary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.portfolio-total {
    text-align: center;
    margin-bottom: 12px;
}

.portfolio-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.portfolio-value {
    font-size: 32px;
    font-weight: 700;
}

.portfolio-pnl {
    display: flex;
    gap: 16px;
}

.pnl-item {
    flex: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
}

.pnl-label {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.pnl-value {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pnl-pct {
    font-size: 12px;
    font-weight: 600;
}

.position-card {
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.position-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.position-name {
    font-size: 14px;
    font-weight: 600;
}

.position-symbol {
    font-size: 12px;
    color: #999;
}

.position-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.position-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

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

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

.position-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 13px;
    font-weight: 600;
}

/* 策略卡片 */
.strategy-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.strategy-rank {
    font-size: 16px;
    font-weight: 700;
    color: #1e3c72;
    min-width: 35px;
}

.strategy-info {
    flex: 1;
}

.strategy-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.strategy-stats {
    font-size: 11px;
    color: #999;
    display: flex;
    gap: 12px;
}

.strategy-pnl {
    text-align: right;
}

.strategy-pnl .pnl-value {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pnl-detail {
    font-size: 11px;
    color: #999;
}

/* 状态页面 */
.status-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.status-item {
    background: white;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.status-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}

.status-value {
    font-size: 20px;
    font-weight: 700;
}

.status-value.success {
    color: #43a047;
}

.status-value.error {
    color: #e53935;
}

/* 空状态和错误状态 */
.empty-state, .error-state {
    text-align: center;
    padding: 40px 20px;
    font-size: 13px;
}

.empty-state {
    color: #999;
}

.error-state {
    color: #e53935;
}

/* 章节标题 */
.section-count {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* ===== Markdown 渲染样式 ===== */
.markdown-container {
    background: white;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    line-height: 1.6;
}

.markdown-container.full-width {
    grid-column: 1 / -1;
}

.markdown-container h1 {
    font-size: 20px;
    color: #1e3c72;
    margin: 16px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #1e3c72;
}

.markdown-container h2 {
    font-size: 16px;
    color: #2a5298;
    margin: 14px 0 10px 0;
}

.markdown-container h3 {
    font-size: 14px;
    color: #333;
    margin: 12px 0 8px 0;
}

.markdown-container p {
    margin: 8px 0;
    color: #333;
}

.markdown-container ul, .markdown-container ol {
    margin: 8px 0;
    padding-left: 20px;
}

.markdown-container li {
    margin: 4px 0;
}

.markdown-container blockquote {
    background: #f8f9fa;
    border-left: 4px solid #1e3c72;
    padding: 8px 12px;
    margin: 12px 0;
    color: #666;
}

.markdown-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.markdown-container th, .markdown-container td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.markdown-container th {
    background: #f0f4f8;
    font-weight: 600;
}

/* ===== 个股分析输入框 ===== */
.analysis-input-section {
    background: white;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #1e3c72;
}

.analyze-btn {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.analyze-btn:hover {
    transform: scale(1.05);
}

.analyze-btn:active {
    transform: scale(0.95);
}

.input-hint {
    font-size: 12px;
    color: #999;
}

/* ===== Cron 任务编辑样式 ===== */
.cron-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.cron-stat-item {
    background: white;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e3c72;
}

.stat-value.success {
    color: #43a047;
}

.stat-value.error {
    color: #e53935;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.save-btn {
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.save-btn:hover {
    transform: scale(1.05);
}

.cron-list-editable {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cron-item-editable {
    display: grid;
    grid-template-columns: 80px 1fr 120px 60px 40px;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.cron-item-editable.disabled {
    opacity: 0.6;
    background: #f5f5f5;
}

.cron-time-edit input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.cron-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cron-script {
    font-size: 11px;
    color: #999;
    font-family: monospace;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #43a047;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.cron-status {
    font-size: 18px;
    text-align: center;
}

.cron-status.status-ok {
    color: #43a047;
}

.cron-status.status-off {
    color: #ccc;
}

/* 信息框 */
.info-box {
    display: flex;
    gap: 12px;
    background: #e3f2fd;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
}

.info-icon {
    font-size: 20px;
}

.info-content {
    flex: 1;
}

.info-title {
    font-size: 13px;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 6px;
}

.info-list {
    font-size: 12px;
    color: #333;
    padding-left: 16px;
}

.info-list li {
    margin: 4px 0;
}

/* ===== 小刷新按钮 ===== */
.refresh-btn-small {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.refresh-btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
}

.news-meta, .brief-meta, .review-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.news-meta strong, .brief-meta strong, .review-meta strong {
    color: white;
}

/* 加载提示 */
.loading-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 空状态提示 */
.empty-hint, .error-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* ===== 龙虎榜样式 ===== */
.dragon-tiger-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.dragon-tiger-meta strong {
    color: white;
}

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

.dragon-tiger-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.dt-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e3c72;
    margin-right: 8px;
}

.dt-symbol {
    font-size: 12px;
    color: #999;
}

.dt-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.dt-price span:first-child {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.dt-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dt-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
}

.dt-stats strong {
    color: #1e3c72;
}

.dt-seats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dt-seat-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.dt-seat-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 4px;
}

.dt-seat-name {
    color: #333;
}

.dt-seat-amount {
    font-weight: 600;
    color: #1e3c72;
}

/* ===== 板块轮动样式 ===== */
.sector-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

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

.sector-overview {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pattern-label, .hot-label, .cold-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.pattern-value, .hot-value, .cold-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.sector-ranking {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sector-ranking h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 12px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 40px 1fr 120px 100px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ranking-rank {
    font-size: 16px;
    font-weight: 700;
    color: #1e3c72;
    text-align: center;
}

.ranking-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ranking-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.ranking-change {
    font-size: 13px;
    font-weight: 600;
}

.ranking-heat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.heat-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    overflow: hidden;
}

.heat-bar.heat-high {
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
}

.heat-bar.heat-medium {
    background: linear-gradient(90deg, #ffd93d, #ffcd3d);
}

.heat-bar.heat-low {
    background: linear-gradient(90deg, #6bcf7f, #4fd97f);
}

.heat-score {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    width: 50px;
    text-align: right;
}

.ranking-inflow {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.inflow-label {
    font-size: 11px;
    color: #999;
}

.inflow-value {
    font-size: 13px;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .sector-overview {
        grid-template-columns: 1fr;
    }
    
    .ranking-item {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
    }
    
    .ranking-heat, .ranking-inflow {
        grid-column: 1 / -1;
    }
}

/* ===== 早报情绪样式 ===== */
.sentiment-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

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

.sentiment-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e3c72;
    margin: 0;
}

.sentiment-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
}

.sentiment-main {
    text-align: center;
}

.sentiment-score {
    font-size: 36px;
    font-weight: 700;
}

.sentiment-score.positive {
    color: #e53935;
}

.sentiment-score.neutral {
    color: #ff9800;
}

.sentiment-score.negative {
    color: #43a047;
}

.sentiment-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.sentiment-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-top: 4px;
}

.sentiment-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

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

.stat-value.positive {
    color: #e53935;
}

.stat-value.negative {
    color: #43a047;
}

/* ===== 风险监控样式 ===== */
.position-risk-section {
    background: white;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.position-risk-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.pr-main {
    text-align: center;
}

.pr-ratio {
    font-size: 32px;
    font-weight: 700;
    color: #1e3c72;
}

.pr-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.pr-risk {
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.pr-risk.high {
    color: #e53935;
    background: #ffebee;
}

.pr-risk.medium {
    color: #ff9800;
    background: #fff3e0;
}

.pr-risk.low {
    color: #43a047;
    background: #e8f5e9;
}

.pr-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pr-stat-item {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.pr-stat-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
}

.pr-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pr-warnings {
    grid-column: 1 / -1;
    background: #fff3e0;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #ff9800;
}

.warning-title {
    font-size: 13px;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 8px;
}

.warning-item {
    font-size: 12px;
    color: #333;
    padding: 4px 0;
}

.sector-concentration {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
}

.sector-concentration h4 {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.sector-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sector-bar-item {
    display: grid;
    grid-template-columns: 60px 1fr 50px;
    gap: 12px;
    align-items: center;
}

.sector-name {
    font-size: 12px;
    color: #333;
}

.sector-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.sector-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    border-radius: 4px;
}

.sector-value {
    font-size: 12px;
    font-weight: 600;
    color: #1e3c72;
    text-align: right;
}

.risk-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.risk-card {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.risk-card-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.risk-card-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 4px;
}

.risk-card-score {
    font-size: 11px;
    color: #666;
}

/* ===== 个股诊断样式 ===== */
.diagnosis-result {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overall-score-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 16px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
}

.os-main {
    text-align: center;
}

.os-score {
    font-size: 42px;
    font-weight: 700;
}

.os-label {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

.os-rating {
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: inline-block;
}

.os-risk {
    text-align: center;
}

.risk-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.risk-value {
    font-size: 20px;
    font-weight: 700;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: inline-block;
}

.dimensions-section, .technical-section, .risks-section, .suggestions-section {
    background: white;
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dimensions-section h3, .technical-section h3, .risks-section h3, .suggestions-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 12px;
}

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

.dimension-card {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.dim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dim-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.dim-rating {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.dim-rating.优秀 {
    color: #43a047;
    background: #e8f5e9;
}

.dim-rating.良好 {
    color: #2196f3;
    background: #e3f2fd;
}

.dim-rating.一般 {
    color: #ff9800;
    background: #fff3e0;
}

.dim-score {
    font-size: 24px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 8px;
}

.dim-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dim-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.item-label {
    color: #666;
}

.item-value {
    color: #333;
    font-weight: 600;
}

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

.tech-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.tech-item.full-width {
    grid-column: 1 / -1;
}

.tech-label {
    font-size: 12px;
    color: #666;
}

.tech-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.tech-value.positive {
    color: #43a047;
}

.risks-list, .suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-item, .suggestion-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
}

.risk-item {
    border-left: 4px solid #ff9800;
}

.suggestion-item {
    border-left: 4px solid #43a047;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .sentiment-grid, .position-risk-grid {
        grid-template-columns: 1fr;
    }
    
    .dimensions-grid {
        grid-template-columns: 1fr;
    }
    
    .overall-score-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .risk-cards {
        grid-template-columns: 1fr;
    }
    
    .technical-grid {
        grid-template-columns: 1fr;
    }
}
