/* ============================================
   assets/css/block_styles.css
   首页编排块样式
   ============================================ */

/* ===== 块外框 ===== */
.agg-block {
    border: 1px solid var(--nav-bg, #1B3A4B);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* ===== 块标题 ===== */
.agg-block-title {
    background: var(--nav-bg, #1B3A4B);
    color: var(--nav-text, #C9A227);
    text-align: center;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 块内容区 ===== */
.agg-block-body {
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #1F2937;
    word-break: break-word;
}

/* ===== 块底部 ===== */
.agg-block-footer {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #EEF0F3;
    background: #FAFBFC;
    font-size: 13px;
    color: #374151;
    line-height: 1.8;
}
.agg-block-footer .author { font-weight: 600; }
.agg-block-footer .history-link {
    color: #2563EB;
    margin-left: 6px;
    text-decoration: underline;
}
.agg-block-footer .remember { color: #DC2626; }
.agg-block-footer .collect { color: #2563EB; }
.agg-block-footer .site-url { color: #DC2626; font-weight: 700; }

/* ============================================
   ★ 命中标红 / 状态（通用，全样式都能用）
   ============================================ */
.hit,
.hit-char {
    color: #DC2626 !important;
    font-weight: 700;
}
.status-hit  { color: #16A34A !important; font-weight: 700; margin-left: 4px; }
.status-miss { color: #6B7280 !important; font-weight: 700; margin-left: 4px; }
.status-wait { color: #9CA3AF !important; margin-left: 4px; }

/* ===== default 样式 ===== */
.agg-row {
    padding: 7px 0;
    border-bottom: 1px dashed #EEF0F3;
}
.agg-row:last-child { border-bottom: none; }

/* ===== table 样式 ===== */
.agg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.agg-table tr { border-bottom: 1px solid #EEF0F3; }
.agg-table tr:last-child { border-bottom: none; }
.agg-table td {
    padding: 8px 10px;
    vertical-align: middle;
}
.agg-table td.label {
    width: 30%;
    text-align: center;
    font-weight: 700;
    color: #111827;
    background: #FFFBE6;
}
.agg-table td.nums { text-align: center; color: #111827; }
.agg-table td.hit { width: 30%; text-align: center; font-weight: 700; }

/* ===== custom 样式 ===== */
.agg-custom img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.agg-custom p { margin: 8px 0; }
.agg-custom a { color: #2563EB; }
.agg-custom table { max-width: 100%; overflow-x: auto; display: block; }

/* ============================================
   ★ 帖子列表 / 置顶：卡片式（post_list）
   ============================================ */
.agg-post-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.agg-post-card {
    display: block;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 10px;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.18s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    word-break: break-word;
}
.agg-post-card:hover {
    border-color: var(--nav-bg, #1B3A4B);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--nav-bg, #1B3A4B);
    transform: translateY(-1px);
}
.agg-post-card .agg-post-title {
    display: block;
    line-height: 1.5;
}

/* ============================================
   ★ 帖子列表 / 置顶：简洁式（post_simple）
   ============================================ */
.agg-post-simple {
    display: flex;
    flex-direction: column;
}
.agg-post-simple .agg-post-item {
    display: block;
    padding: 10px 12px;
    border-bottom: 1px dashed #EEF0F3;
    color: #1F2937;
    text-decoration: none;
    transition: all 0.15s;
    word-break: break-word;
}
.agg-post-simple .agg-post-item:hover {
    background: #F8FAFC;
    color: #DC2626;
    padding-left: 18px;
}
.agg-post-simple .agg-post-item:last-child { border-bottom: none; }

/* ===== 广告位内容 ===== */
.agg-block-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}
.agg-block-body video,
.agg-block-body iframe { max-width: 100%; }

/* ============================================
   ★ 历史展示区样式（history）
   ============================================ */
.master-box {
    border-radius: 8px;
    background: var(--hb-border, linear-gradient(135deg,#1B3A4B,#24485C));
    padding: 2px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.master-box .box-inner {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}
.master-box .box-head {
    background: var(--hb-head, linear-gradient(135deg,#1B3A4B,#24485C));
    text-align: center;
    padding: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--hb-head-text, #C9A227);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.master-box .box-row {
    text-align: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hb-row-line, #D6E0E8);
    font-size: 13.5px;
    line-height: 1.7;
    word-break: break-word;
    color: var(--hb-row-text, #1F2937);
}
.master-box .box-row:last-child { border-bottom: none; }
.master-box .box-row .qs { font-weight: 700; }
.master-box .box-row .type { font-weight: 700; }
.master-box .box-row .open { font-weight: 600; }

.master-box .box-foot {
    text-align: center;
    padding: 10px;
    background: var(--hb-foot-bg, #FAFBFC);
    border-top: 1px solid var(--hb-row-line, #D6E0E8);
    font-size: 13px;
    line-height: 1.8;
    color: var(--hb-row-text, #1F2937);
}
.master-box .box-foot .author { font-weight: 600; }
.master-box .box-foot .history-link { color: #2563EB; margin-left: 6px; text-decoration: underline; }
.master-box .box-foot .remember { color: #DC2626; }
.master-box .box-foot .collect { color: #2563EB; }
.master-box .box-foot .site-url { color: #DC2626; font-weight: 700; }

/* ============================================
   五行属性表
   ============================================ */
.wuxing-table {
    margin: 10px 0;
    line-height: 2;
}
.wuxing-row {
    text-align: center;
    font-size: 13px;
}
.wx-name {
    font-weight: 700;
    color: #DC2626;
    margin-right: 6px;
}
.wx-nums {
    color: #1F2937;
    letter-spacing: 0.3px;
}

/* ============================================
   ★ 倒金字塔拆分样式（通用版）
   ============================================ */
.pyramid-box {
    width: 100%;
    border-top: 1px solid #eee;
}
.pyramid-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    width: 100%;
}
/* 左侧 */
.py-left-inv {
    width: 50%;
    text-align: right;
    padding: 10px 15px 10px 0;
    color: #111827;
    border-right: 1px solid #e5e5e5;
    box-sizing: border-box;
}
.py-left-inv .py-qishu { font-weight: 700; }
.py-left-inv .py-z-count { color: #DC2626; font-weight: 700; margin-left: 2px; }
/* 右侧 */
.py-right-inv {
    width: 50%;
    text-align: left;
    padding: 10px 0 10px 15px;
    color: #111827;
    box-sizing: border-box;
}
.py-right-inv .py-n-count { font-weight: 700; margin-right: 2px; }
/* 底部 */
.pyramid-footer {
    text-align: center;
    padding: 10px 0;
    background: #f9f9f9;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.pyramid-footer .py-f-qishu { font-weight: 700; color: #111827; }
.pyramid-footer .py-f-url { color: #6B7280; font-size: 12px; margin-left: 6px; }

/* ============================================
   ★ 四肖八码专属（sixiao）左右排版
   ============================================ */
.sx-box {
    width: 100%;
    border-top: 1px solid #cce5ff; /* 顶部边框 */
}
.sx-row {
    display: flex;
    border-bottom: 1px dashed #cce5ff; /* 隔行虚线 */
    background: #fff;
}
/* 左侧 */
.sx-left {
    width: 50%;
    text-align: left;
    padding: 10px 10px 10px 20px;
    color: #111827;
    border-right: 1px solid #cce5ff; /* 中间竖线 */
    box-sizing: border-box;
}
.sx-left .sx-qishu { font-weight: 700; }
.sx-left .sx-zcount { color: #DC2626; font-weight: 700; margin: 0 4px; }
/* 右侧 */
.sx-right {
    width: 50%;
    text-align: left;
    padding: 10px 10px 10px 15px;
    color: #111827;
    box-sizing: border-box;
}
.sx-right .sx-ncount { color: #DC2626; font-weight: 700; margin-right: 4px; }
/* 底部开奖栏（淡蓝底） */
.sx-footer {
    text-align: center;
    padding: 12px 0;
    background: #F0F7FF;
    border-bottom: 1px solid #cce5ff;
    font-size: 15px;
    font-weight: 700;
}
.sx-footer .sx-f-qishu { color: #111827; margin-right: 4px; }
.sx-footer .sx-status-hit { color: #16A34A; margin-left: 4px; }
.sx-footer .sx-status-wait { color: #9CA3AF; margin-left: 4px; }
.sx-footer .sx-f-url { color: #6B7280; font-size: 12px; font-weight: normal; margin-left: 8px; }

/* ============================================
   ★ 网格样式（六肖12码）
   ============================================ */
.grid-box {
    width: 100%;
    background: #E6F7FF; /* 浅蓝背景 */
    padding: 2px;
}
.grid-period {
    background: #fff;
    margin-bottom: 2px;
    border: 1px solid #D1E9FF;
}
.grid-period:last-child {
    margin-bottom: 0;
}
/* 头部：期数 + 开奖 */
.grid-period-head {
    background: #E6F7FF;
    text-align: center;
    padding: 8px 0;
    font-size: 15px;
    border-bottom: 1px solid #D1E9FF;
}
/* 网格区域 */
.grid-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 默认 3 列 */
}
.grid-item {
    padding: 10px 5px;
    text-align: center;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.grid-item:nth-child(3n) {
    border-right: none; /* 每行最后一个去掉右边框 */
}
.grid-attr {
    color: #0000FF;
    font-weight: 700;
    font-size: 16px;
}
.grid-nums {
    color: #0000FF;
    font-weight: 700;
    font-size: 16px;
    margin-left: 2px;
}

/* ============================================
   ★ 智能通用表格（自适应排版）
   ============================================ */
.smart-head {
    display: flex;
    background: var(--nav-bg, #69a8e0);
    color: var(--nav-text, #fff);
    font-weight: 700;
    text-align: center;
    font-size: 15px;
}
.smart-th {
    padding: 10px 0;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
}
.smart-th:last-child { border-right: none; }

.smart-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #cce5ff;
    font-size: 15px;
}
.smart-row:last-child { border-bottom: none; }

.smart-col-1 {
    width: 15%;
    flex-shrink: 0;
    text-align: center;
    font-weight: 700;
    color: #111827;
    border-right: 1px solid #cce5ff;
    padding: 8px 0;
    box-sizing: border-box;
}
.smart-col-2 {
    flex: 1;
    text-align: center;
    border-right: 1px solid #cce5ff;
    padding: 8px 10px;
    box-sizing: border-box;
    word-break: break-all;
}
.smart-col-3 {
    width: 20%;
    flex-shrink: 0;
    text-align: center;
    font-weight: 700;
    color: #DC2626;
    padding: 8px 0;
    box-sizing: border-box;
}

/* 内容行 */
.smart-attr-line {
    color: #0000FF;
    font-weight: 700;
    font-size: 16px;
    word-break: break-all;
    letter-spacing: 1px;
}
.smart-num-line {
    color: #0000FF;
    font-weight: 700;
    font-size: 15px;
    word-break: break-all;
    line-height: 1.6;
    margin-top: 2px;
}

/* 命中高亮 */
.smart-hit-char {
    background: #FEF08A;
    color: #DC2626;
    padding: 0 2px;
    border-radius: 2px;
}
.smart-hit-num {
    background: #FEF08A;
    color: #DC2626;
    padding: 0 2px;
    border-radius: 2px;
}
.smart-status-hit { color: #16A34A; }
.smart-status-wait { color: #9CA3AF; }

/* ============================================
   手机端统一适配
   ============================================ */
@media (max-width: 768px) {
    .agg-block { border-radius: 8px; margin-bottom: 10px; }
    .agg-block-title { font-size: 13.5px; padding: 9px 10px; }
    .agg-block-body { padding: 10px 12px; font-size: 12.5px; }
    .agg-block-footer { font-size: 12px; padding: 8px; }
    .agg-table td { padding: 6px 6px; font-size: 12.5px; }

    .agg-post-list { gap: 6px; }
    .agg-post-card { padding: 10px 12px; border-radius: 8px; font-size: 13px; }
    .agg-post-simple .agg-post-item { padding: 9px 10px; font-size: 13px; }

    .master-box .box-row { font-size: 12.5px; padding: 7px 8px; }
    .master-box .box-head { font-size: 13.5px; padding: 9px 6px; letter-spacing: 0.3px; }

    .pyramid-row { font-size: 13px; }
    .py-left-inv { padding: 8px 10px 8px 0; }
    .py-right-inv { padding: 8px 0 8px 10px; }
    .pyramid-footer { font-size: 13px; }

    .sx-row { font-size: 13px; }
    .sx-left { padding: 8px 8px 8px 12px; }
    .sx-right { padding: 8px 8px 8px 10px; }
    .sx-footer { font-size: 13px; padding: 10px 0; }

    .grid-items { grid-template-columns: repeat(2, 1fr); }
    .grid-item:nth-child(3n) { border-right: 1px solid #f0f0f0; }
    .grid-item:nth-child(2n) { border-right: none; }
    .grid-period-head { font-size: 14px; }
    .grid-attr, .grid-nums { font-size: 14px; }

    .smart-head { font-size: 13px; }
    .smart-th { padding: 8px 0; }
    .smart-row { font-size: 13px; }
    .smart-col-1 { width: 20%; }
    .smart-col-3 { width: 25%; font-size: 13px; }
    .smart-attr-line { font-size: 14px; }
    .smart-num-line { font-size: 13px; }
}