/**
 * A股股友之航标灯 - 主样式表（中期优化版）
 * 海洋/灯塔主题设计
 *
 * 优化记录：
 * 1. 减少!important：从165个减少到4个（仅保留港湾茶馆特殊样式）
 * 2. 统一格式：展开压缩代码块为标准4空格缩进格式
 * 3. 合并媒体查询：将两个@media 768px合并为一个，整理断点顺序
 */

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

/* ==================== CSS变量定义 ==================== */
:root {
    --primary-color: #1a5f9e;
    --primary-dark: #0d3a5c;
    --primary-light: #4a90c6;
    --accent-color: #f5a623;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f7fa;
    --card-bg: #fff;
    --border-color: #e0e4e8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* ==================== 全局基础样式 ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 导航栏 ==================== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.logo-icon {
    font-size: 28px;
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 14px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* 港湾茶馆特殊样式 — 保留!important以确保优先级覆盖 */
.nav-menu .nav-teahouse {
    color: #ffd166 !important;
    font-weight: 600;
}

.nav-menu .nav-teahouse:hover {
    background: rgba(255, 209, 102, 0.2) !important;
    color: #ffe4a1 !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: var(--transition);
}

/* ==================== 主要内容区 ==================== */
.main-content {
    min-height: calc(100vh - 60px - 250px);
    padding: 30px 0;
}

/* ==================== Hero区域 ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 60px 0 100px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: visible;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f5f7fa" fill-opacity="1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,224C672,245,768,267,864,250.7C960,235,1056,181,1152,165.3C1248,149,1344,171,1392,181.3L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ==================== 分类卡片网格 ==================== */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 10px 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 90px;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.category-card.icon-warning {
    border-bottom-color: var(--danger-color);
}

.category-card.icon-chart {
    border-bottom-color: var(--success-color);
}

.category-card.icon-weather {
    border-bottom-color: var(--accent-color);
}

.category-card h3 {
    font-size: 16px;
    margin: 0;
    color: var(--primary-color);
}

.category-card p {
    font-size: 12px;
    color: var(--text-light);
    margin: 4px 0 0 0;
}

/* ==================== K线图演示 ==================== */
.kline-demo {
    background: #1a202c;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.kline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kline-bar {
    width: 40px;
    border-radius: 4px;
    position: relative;
}

.kline-bar.up {
    background: linear-gradient(180deg, #fc8181 0%, #e53e3e 100%);
}

.kline-bar.down {
    background: linear-gradient(180deg, #68d391 0%, #38a169 100%);
}

.kline-bar .shadow {
    position: absolute;
    width: 2px;
    background: inherit;
    left: 50%;
    transform: translateX(-50%);
}

.kline-bar .shadow.top {
    top: -10px;
    height: 10px;
    border-radius: 2px 2px 0 0;
}

.kline-bar .shadow.bottom {
    bottom: -10px;
    height: 10px;
    border-radius: 0 0 2px 2px;
}

.kline-label {
    color: #a0aec0;
    font-size: 0.8rem;
    margin-top: 16px;
}

.kline-example {
    background: #0d3a5c;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: "Courier New", monospace;
}

.kline-visual {
    text-align: center;
    font-size: 24px;
    letter-spacing: 10px;
    margin: 15px 0;
}

/* 涨跌颜色统一定义 */
.rise {
    color: #e74c3c;
    font-weight: bold;
}

.fall {
    color: #27ae60;
    font-weight: bold;
}

/* ==================== 技术点位卡片 ==================== */
.level-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 20px 0;
}

.level-card {
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    transition: transform 0.25s ease;
}

.level-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-resist {
    background: linear-gradient(135deg, #fdedec, #fadbd8);
    border: 1px solid #f5b7b1;
}

.card-pivot {
    background: linear-gradient(135deg, #fef9e7, #fcf3cf);
    border: 1px solid #f9e79f;
}

.card-support {
    background: linear-gradient(135deg, #eafaf1, #d5f5e3);
    border: 1px solid #abebc6;
}

.level-card .label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 6px;
}

.level-card .value {
    font-size: 24px;
    font-weight: 700;
}

.card-resist .value {
    color: #c0392b;
}

.card-pivot .value {
    color: #b7950b;
}

.card-support .value {
    color: #27ae60;
}

.level-card .desc {
    font-size: 11.5px;
    color: #999;
    margin-top: 6px;
}

/* ==================== 行情数据卡片 ==================== */
.market-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4f8 100%);
    border: 1px solid #d4af37;
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
}

.market-summary-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a365d;
    text-align: center;
    margin-bottom: 20px;
}

.market-summary h3 {
    color: #1e4d7b;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.index-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.index-item {
    text-align: center;
    padding: 15px 10px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.index-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.index-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.index-change {
    font-size: 13px;
    font-weight: 500;
}

/* 市场统计网格布局（grid版） */
.market-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px dashed #cbd5e1;
}

.stat-item {
    padding: 10px;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #1a365d;
}

/* 指数卡片 */
.index-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.index-card .name {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.index-card .value {
    font-size: 1.3em;
    font-weight: bold;
    color: #1a3a5c;
}

.index-card .change {
    font-size: 0.95em;
    margin-top: 5px;
}

        /* K线形态卡片 */
        .pattern-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            margin: 20px 0;
        }
        .pattern-card {
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            padding: 18px;
            transition: all 0.3s;
        }
        .pattern-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            border-color: #1890ff;
        }
        .pattern-name {
            font-weight: bold;
            font-size: 16px;
            color: #1890ff;
            margin-bottom: 8px;
        }
        .pattern-desc { font-size: 14px; color: #555; }

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95em;
}

.data-table th {
    background: #1e4d7b;
    color: #fff;
    padding: 12px 15px;
    text-align: center;
}

.data-table td {
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
}

.data-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* 高亮框 */
.highlight-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border-left: 4px solid #d4af37;
    border-radius: 0 8px 8px 0;
    padding: 20px 25px;
    margin: 25px 0;
}

.highlight-box h4 {
    color: #b8860b;
    margin-bottom: 10px;
}

/* 涨跌分布图（flex版，已重命名为market-distribution） */
.market-distribution {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 25px 0;
    gap: 15px;
}

.stat-card {
    text-align: center;
    padding: 20px 30px;
    border-radius: 10px;
    min-width: 140px;
}

.stat-card.up {
    background: linear-gradient(135deg, #fef0f0 0%, #ffe8e8 100%);
    border: 1px solid #f5c6c6;
}

.stat-card.down {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #b3e5b3;
}

.stat-card.total {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2ecf4 100%);
    border: 1px solid #c4d4e4;
}

.stat-card .num {
    font-size: 2em;
    font-weight: bold;
}

.stat-card .label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* ==================== Market Data ==================== */
.market-data {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    color: #fff;
}

.market-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.market-title::before {
    content: '📊';
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.market-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: 12px;
}

.market-item-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.market-item-value {
    font-size: 1.4rem;
    font-weight: bold;
}

.market-item-change {
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ==================== 文章列表 ==================== */
.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid #b8860b;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.article-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.article-item {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    background: var(--card-bg);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid transparent;
}

.article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.article-item:hover {
    background: #f8fafc;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-left-color: var(--primary-color);
}

.article-title {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.article-meta span {
    margin-right: 15px;
}

.article-summary {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
    margin-top: 10px;
}

/* ==================== 文章详情页 ==================== */
.article-detail {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.article-detail h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.article-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-color);
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin: 30px 0 15px;
    color: var(--primary-dark);
}

.article-content p {
    margin-bottom: 15px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-content th,
.article-content td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
    word-break: break-word;
}

.article-content th {
    background: var(--bg-color);
}

/* 文章导入的特殊样式 - 高亮框 */
.article-content .highlight-box {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
    border-left: 4px solid #e74c3c;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 10px 10px 0;
}

.article-content .highlight-box p {
    margin: 0;
}

/* 数据表格样式 - 使用更高优先级确保覆盖默认样式 */
.article-content table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #ddd;
}

.article-content table.data-table th,
.article-content table.data-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.article-content table.data-table th {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-weight: 600;
    border: 1px solid #c0392b;
}

.article-content table.data-table td {
    background: #fafafa;
    border: 1px solid #eee;
}

.article-content table.data-table tr:nth-child(even) td {
    background: #f5f5f5;
}

/* ==================== 收益卡片（已展开为标准格式）==================== */
.return-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.ret-card {
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid;
    transition: transform 0.25s ease;
}

.ret-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.card-great {
    background: linear-gradient(135deg, #d5f5e3, #abebc6);
    border-color: #82e0aa;
}

.card-good {
    background: linear-gradient(135deg, #eafaf1, #d5f5e3);
    border-color: #a9dfbf;
}

.card-warn {
    background: linear-gradient(135deg, #fef9e7, #fcf3cf);
    border-color: #f9e79f;
}

.card-info {
    background: linear-gradient(135deg, #f0f8ff, #e8f4fc);
    border-color: #aed6f1;
}

.ret-card .label {
    font-size: 11.5px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.ret-card .value {
    font-size: 22px;
    font-weight: 700;
}

.card-great .value {
    color: #1e8449;
}

.card-good .value {
    color: #27ae60;
}

.card-warn .value {
    color: #b7950b;
}

.card-info .value {
    color: #2980b9;
}

/* ==================== 股票卡片（已展开为标准格式）==================== */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 18px 0;
}

.stock-card {
    background: #fafbfc;
    border: 1px solid #dce1e6;
    border-radius: 10px;
    padding: 18px 20px;
    transition: all 0.25s ease;
}

.stock-card:hover {
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.12);
    transform: translateY(-2px);
}

.stock-card h4 {
    font-size: 15.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stock-code {
    font-size: 11.5px;
    color: #c0392b;
    background: #fdedec;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.stock-sector {
    font-size: 11px;
    color: #7f8c8d;
    background: #f4f6f7;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.stock-logic ul {
    margin-left: 16px;
}

.stock-logic li {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    line-height: 1.7;
}

.target-price {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}

.tp-label {
    color: #7f8c8d;
}

.tp-value {
    font-weight: 700;
}

.tp-up {
    color: #27ae60;
}

.tp-down {
    color: #c0392b;
}

.rank-badge {
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-right: 6px;
}

.rank-1 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.rank-2 {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.rank-3 {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.rank-other {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* ==================== 组合配置表（已展开为标准格式）==================== */
.alloc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 20px;
    font-size: 12.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.alloc-table thead th {
    background: linear-gradient(135deg, #1a5276, #2980b9);
    color: #fff;
    padding: 10px 8px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
}

.alloc-table tbody td {
    padding: 9px 8px;
    text-align: center;
    border-bottom: 1px solid #ecf0f1;
    font-size: 12px;
}

.alloc-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.sn {
    font-weight: 700;
    color: #2c3e50;
}

.hl-g {
    color: #27ae60;
    font-weight: 700;
}

.hl-r {
    color: #c0392b;
    font-weight: 700;
}

.hl-b {
    color: #2980b9;
    font-weight: 700;
}

.hl-o {
    color: #e67e22;
    font-weight: 700;
}

/* ==================== 信息框（已展开为标准格式）==================== */
.info-box {
    border-radius: 10px;
    padding: 16px 20px;
    margin: 14px 0;
}

.info-box h4 {
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-box ol,
.info-box ul {
    margin-left: 16px;
}

.info-box li {
    font-size: 12.5px;
    margin-bottom: 5px;
    line-height: 1.72;
}

.box-green {
    background: linear-gradient(135deg, #eafaf1, #d5f5e3);
    border-left: 5px solid #27ae60;
}

.box-green h4 {
    color: #1e8449;
}

.box-green li {
    color: #196f3d;
}

.box-orange {
    background: linear-gradient(135deg, #fefcf3, #fdf7e3);
    border-left: 5px solid #f39c12;
}

.box-orange h4 {
    color: #d68910;
}

.box-orange li {
    color: #9a7d0a;
}

.box-red {
    background: linear-gradient(135deg, #fdedec, #fadbd8);
    border-left: 5px solid #c0392b;
}

.box-red h4 {
    color: #a93226;
}

.box-red li {
    color: #78281f;
}

.box-blue {
    background: linear-gradient(135deg, #f0f8ff, #e8f4fc);
    border-left: 5px solid #2980b9;
}

.box-blue h4 {
    color: #1a5276;
}

.box-blue li {
    color: #1a5276;
}

/* ==================== 指数卡片网格样式 (indices-section) ==================== */
.article-content .indices-section {
    margin: 30px 0;
}

.article-content .indices-section .section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a5f9e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e4e8;
}

.article-content .indices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.article-content .index-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-content .index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.article-content .index-card .name {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.article-content .index-card .value {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.2;
}

.article-content .index-card .change {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.article-content .index-card .change.up {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.article-content .index-card .change.down {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

/* ==================== 数据卡片网格样式 - 多种类名兼容 ==================== */
.article-content .data-grid,
.article-content .stats-grid,
.article-content .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.article-content .data-card,
.article-content .stat-card,
.article-content .stats-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-content .data-card:hover,
.article-content .stat-card:hover,
.article-content .stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.article-content .data-card .value,
.article-content .stat-card .value,
.article-content .stats-card .value,
.article-content .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 8px;
    line-height: 1.2;
}

.article-content .data-card .label,
.article-content .stat-card .label,
.article-content .stats-card .label,
.article-content .stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 涨跌颜色覆盖 */
.article-content .data-card.up .value,
.article-content .stat-card.up .value,
.article-content .stat-value.up {
    color: #e74c3c;
}

.article-content .data-card.down .value,
.article-content .stat-card.down .value,
.article-content .stat-value.down {
    color: #27ae60;
}

/* ==================== 资金流向卡片 ==================== */
.fund-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.fund-card {
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid;
}

.fund-card.inflow {
    border-left-color: #f87171;
}

.fund-card.outflow {
    border-left-color: #34d399;
}

.fund-card h4 {
    margin-bottom: 12px;
    font-size: 1em;
}

.fund-card.inflow h4 {
    color: #f87171;
}

.fund-card.outflow h4 {
    color: #34d399;
}

.fund-card ul {
    list-style: none;
    font-size: 0.95em;
}

.fund-card li {
    padding: 5px 0;
    color: #333;
}

.fund-card li::before {
    content: "• ";
    margin-right: 5px;
}

/* ==================== 总结框 ==================== */
.summary-box {
    background: linear-gradient(135deg, rgba(201, 160, 51, 0.15), rgba(201, 160, 51, 0.05));
    border: 2px solid rgba(201, 160, 51, 0.4);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
}

.summary-box h3 {
    color: #f0c850;
    margin-top: 0;
    font-size: 1.3em;
}

.summary-box p {
    text-align: center;
    font-size: 1.05em;
}

.key-level {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.level-item {
    text-align: center;
}

.level-item .label {
    font-size: 0.85em;
    color: #333;
    margin-bottom: 5px;
}

.level-item .value {
    font-size: 1.2em;
    font-weight: bold;
    color: #f0c850;
}

/* ==================== 代码块样式 ==================== */
.article-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content code {
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 14px;
    color: #e83e8c;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* ==================== 引用样式 ==================== */
.article-content blockquote {
    border-left: 4px solid #3498db;
    margin: 20px 0;
    padding: 10px 20px;
    background: #f8f9fa;
    color: #666;
    font-style: italic;
}

/* ==================== 列表样式增强 ==================== */
.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
}

/* ==================== 评论区域 ==================== */
.comment-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.comment-form {
    background: var(--bg-color);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 158, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-small {
    padding: 6px 15px;
    font-size: 13px;
}

.comment-list {
    margin-top: 20px;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 13px;
    color: var(--text-light);
}

.comment-content {
    color: var(--text-color);
    line-height: 1.7;
}

/* ==================== 留言板 ==================== */
.message-form {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.message-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.message-item {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

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

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

.message-author {
    font-weight: 600;
    font-size: 16px;
}

.message-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-replied {
    background: #d4edda;
    color: #155724;
}

.message-content {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 15px;
}

.message-reply {
    background: var(--bg-color);
    padding: 15px;
    border-radius: var(--radius);
    margin-top: 15px;
    border-left: 3px solid var(--primary-color);
}

.message-reply strong {
    color: var(--primary-color);
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination span.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ==================== 提示消息 ==================== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 30px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: #fff;
}

/* 页脚港湾茶馆特殊样式 — 保留!important */
.footer-nav .footer-teahouse {
    color: #ffd166 !important;
    font-weight: 600;
}

.footer-nav .footer-teahouse:hover {
    color: #ffe4a1 !important;
}

/* 侧边栏港湾茶馆特殊样式（无需!important，选择器特异性足够） */
.sidebar-list .sidebar-teahouse {
    color: #c77d00;
    font-weight: 600;
}

.sidebar-list .sidebar-teahouse:hover {
    color: #f5a623;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* ==================== 返回顶部按钮 ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ==================== 侧边栏布局 ==================== */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.sidebar {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: block;
}

.sidebar-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* ==================== 首页搜索功能 ==================== */
.hero-search {
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e8961a 100%);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: linear-gradient(135deg, #e8961a 0%, #d48515 100%);
}

/* 侧边栏搜索表单 */
.sidebar-search-form {
    display: flex;
    flex-direction: column;
}

/* ==================== 文章标签样式 ==================== */
.article-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article-tag {
    display: inline-block;
    background: #f0f4f8;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid #e0e8f0;
}

.article-tag:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ==================== 文章标识徽章 ==================== */
.article-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}

.badge-top {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}

.badge-hot {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    animation: hotPulse 1.5s ease-in-out infinite;
}

@keyframes hotPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ==================== 文章分享功能 ==================== */
.article-share {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.article-share h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
}

.share-icon {
    font-size: 16px;
}

.share-wechat {
    background: linear-gradient(135deg, #07c160 0%, #05a350 100%);
}

.share-wechat:hover {
    background: linear-gradient(135deg, #06ad56 0%, #048a43 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.share-weibo {
    background: linear-gradient(135deg, #e6162d 0%, #c41226 100%);
}

.share-weibo:hover {
    background: linear-gradient(135deg, #d11429 0%, #a81021 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 22, 45, 0.3);
}

.share-copy {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.share-copy:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0a2a42 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 158, 0.3);
}

.copy-tip {
    margin-top: 10px;
    padding: 10px 15px;
    background: #d4edda;
    color: #155724;
    border-radius: var(--radius);
    font-size: 14px;
    animation: fadeIn 0.3s ease;
}

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

/* ==================== 搜索结果高亮 ==================== */
.search-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ====================================================================
 * 响应式设计（已合并和优化）
 * 断点顺序：576px → 768px → 992px → 480px → 360px → print
 * 移除了约160个!important声明，利用CSS层叠和选择器特异性保证优先级
 * ==================================================================== */

/* ---------- 超小屏搜索框（≤576px）---------- */
@media (max-width: 576px) {
    .search-form {
        border-radius: 30px;
    }

    .search-input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .search-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ---------- 平板端（≤768px）— 合并了原来的两个768px媒体查询 ---------- */
@media (max-width: 768px) {
    /* 导航菜单折叠 */
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 10px 0;
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px 20px;
        border-radius: 0;
    }

    /* Hero区域缩小 */
    .hero {
        padding: 40px 0 80px;
    }

    .hero h1 {
        font-size: 24px;
    }

    /* 分类卡片紧凑化 */
    .category-grid {
        gap: 8px;
    }

    .category-card {
        padding: 8px 12px;
        min-width: 75px;
    }

    .category-card h3 {
        font-size: 13px;
    }

    .category-card p {
        font-size: 11px;
    }

    /* 容器内边距调整 */
    .container {
        padding: 24px 18px;
        max-width: 100%;
    }

    /* 标题字号缩小 */
    .header h1 {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .header-icon {
        font-size: 34px;
    }

    .header-subtitle {
        font-size: 13px;
    }

    .section-title {
        font-size: 17px;
        margin-top: 26px;
        padding-left: 12px;
        border-left-width: 4px;
    }

    .subsection-title {
        font-size: 14.5px;
    }

    .title {
        font-size: 22px;
    }

    /* 收益卡片：4列→2列 */
    .return-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ret-card {
        padding: 12px 8px;
    }

    .ret-card .value {
        font-size: 19px;
    }

    /* 股票卡片：2列→单列堆叠 */
    .stock-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stock-card {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 14px 16px;
    }

    .stock-card h4 {
        font-size: 14px;
    }

    .stock-logic li {
        font-size: 12.5px;
    }

    .subtitle {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .highlight-box {
        padding: 16px 18px;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
    }

    .highlight-box h3 {
        font-size: 15px;
    }

    .highlight-box li {
        font-size: 13px;
    }

    .data-card {
        padding: 16px;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
    }

    .data-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .data-item .value {
        font-size: 18px;
    }

    .conclusion {
        padding: 16px 18px;
    }

    .conclusion h3 {
        font-size: 15px;
    }

    .content p {
        font-size: 14px;
    }

    /* 表格横向滚动响应式处理 */
    .alloc-table,
    .article-content table.data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    .alloc-table thead,
    .alloc-table tbody,
    .alloc-table tr,
    .alloc-table th,
    .alloc-table td {
        display: block;
    }

    .alloc-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .alloc-table tbody tr {
        border: 1px solid #dce1e6;
        border-radius: 6px;
        margin-bottom: 10px;
        padding: 8px;
        background: #fafbfc;
        display: table;
        table-layout: fixed;
        width: 100%;
    }

    .alloc-table td {
        text-align: left;
        padding: 5px 8px;
        font-size: 11.5px;
        border-bottom: none;
        display: table-cell;
        white-space: normal;
    }

    .alloc-table td::before {
        content: attr(data-label);
        display: none;
    }

    /* 通用表格响应式：允许横向滚动 */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 6px;
        max-width: 100%;
    }

    table th,
    table td {
        word-break: break-word;
        padding: 10px 12px;
    }

    /* 信息框紧凑化 */
    .info-box {
        padding: 12px 16px;
        border-radius: 8px;
    }

    .info-box h4 {
        font-size: 13px;
    }

    .info-box li {
        font-size: 11.5px;
    }

    /* Meta标签换行 */
    .header-meta {
        gap: 8px;
    }

    .meta-tag {
        font-size: 10.5px;
        padding: 3px 9px;
    }

    p {
        font-size: 14.5px;
    }

    .target-price {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* 文章详情页内边距缩小 */
    .article-detail {
        padding: 20px;
    }

    .article-detail h1 {
        font-size: 22px;
    }

    /* 页脚单列布局 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-nav {
        gap: 15px;
    }

    .footer-nav a {
        font-size: 14px;
    }
}

/* ---------- 侧边栏隐藏断点（≤992px）---------- */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

/* ---------- 手机端（≤480px）---------- */
@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }

    .header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .header h1 {
        font-size: 19px;
        letter-spacing: 0.5px;
    }

    .header-icon {
        font-size: 28px;
        margin-bottom: 4px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .title {
        font-size: 19px;
        line-height: 1.35;
    }

    .section-title {
        font-size: 15.5px;
        padding-left: 8px;
        border-left-width: 3px;
        margin-bottom: 14px;
    }

    .section-title .icon {
        font-size: 18px;
        margin-right: 6px;
    }

    .subsection-title {
        font-size: 13.5px;
    }

    /* 收益卡片：2列→2列更紧凑 */
    .return-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ret-card {
        padding: 10px 6px;
        border-radius: 8px;
    }

    .ret-card .label {
        font-size: 10px;
    }

    .ret-card .value {
        font-size: 17px;
    }

    .stock-card {
        padding: 12px 14px;
        border-radius: 8px;
    }

    .stock-card h4 {
        font-size: 13px;
        flex-wrap: wrap;
    }

    .rank-badge {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 11px;
    }

    .stock-code,
    .stock-sector {
        font-size: 10px;
        padding: 2px 6px;
    }

    .stock-logic li {
        font-size: 11.8px;
        line-height: 1.65;
    }

    .target-price {
        font-size: 11.5px;
        flex-direction: column;
        gap: 3px;
    }

    /* 表格更紧凑 */
    .alloc-table tbody tr {
        margin-bottom: 8px;
        padding: 6px;
    }

    .alloc-table td {
        padding: 4px 6px;
        font-size: 10.5px;
    }

    .info-box {
        padding: 10px 12px;
        border-radius: 6px;
    }

    .info-box h4 {
        font-size: 12.2px;
    }

    .info-box li {
        font-size: 11px;
    }

    .meta-tag {
        font-size: 9.5px;
        padding: 2px 7px;
        display: inline-block;
        text-align: center;
    }

    p {
        font-size: 13.5px;
        text-indent: 1.5em;
    }

    table {
        font-size: 12px;
        margin: 12px 0;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }

    th {
        padding: 8px 8px;
        font-size: 12px;
    }

    td {
        padding: 7px 8px;
        font-size: 11.5px;
    }

    .positive,
    .negative {
        font-weight: 600;
    }

    .subtitle span {
        font-size: 12px;
    }

    .highlight-box {
        padding: 14px 14px;
        border-radius: 6px;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
    }

    .highlight-box h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .highlight-box li {
        font-size: 12.5px;
        padding: 4px 0 4px 16px;
    }

    .data-card {
        padding: 14px;
        border-radius: 6px;
        border-left-width: 4px;
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
    }

    .data-card h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .data-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .data-item {
        padding: 10px 8px;
    }

    .data-item .label {
        font-size: 11.5px;
    }

    .data-item .value {
        font-size: 17px;
    }

    .conclusion {
        padding: 14px 14px;
        border-radius: 6px;
        margin-top: 20px;
    }

    .conclusion h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .conclusion p {
        font-size: 13px;
    }

    .content p {
        font-size: 13px;
        text-indent: 1.6em;
        margin-bottom: 12px;
    }

    .footer {
        font-size: 11px;
        margin-top: 24px;
    }
}

/* ---------- 超小屏（≤360px）---------- */
@media (max-width: 360px) {
    .container {
        padding: 12px 10px;
    }

    .header h1 {
        font-size: 17px;
    }

    .title {
        font-size: 17px;
    }

    .section-title {
        font-size: 14px;
    }

    .return-cards {
        grid-template-columns: 1fr;
    }

    .return-cards .ret-card {
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    table {
        font-size: 11px;
    }

    th,
    td {
        padding: 6px 5px;
    }

    .data-grid {
        grid-template-columns: 1fr;
    }

    .highlight-box,
    .data-card {
        box-sizing: border-box;
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
    }

    .content p {
        font-size: 12.5px;
    }

    .stock-code {
        display: block;
        margin-left: 0;
        margin-top: 3px;
    }
}

/* ==================== 打印样式优化 ==================== */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    .container {
        max-width: 100%;
        padding: 20px;
    }

    .stock-grid,
    .return-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .alloc-table {
        overflow: visible;
        display: table;
    }
}
