Files
2026-07-08 11:46:20 +08:00

746 lines
15 KiB
CSS

/* ============================================================
cai.css - 预测推荐页 (cai.html)
Uses CSS variables from public.css:
--primary, --gold, --orange, --red, --bg-light, --text-dark,
--text-muted, --border-light, --radius-md, --radius-lg,
--shadow-sm, --shadow-md
============================================================ */
/* ----------------------------------------------------------
1. Filter Section
---------------------------------------------------------- */
.cxz-filter-box {
background: var(--white, #ffffff);
border-radius: var(--radius-lg, 12px);
padding: 24px;
margin-bottom: 20px;
box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.06));
}
.cxz-filter-row {
display: flex;
align-items: flex-start;
margin-bottom: 16px;
gap: 12px;
}
.cxz-filter-row:last-child {
margin-bottom: 0;
}
.cxz-filter-label {
font-size: 14px;
font-weight: 600;
color: var(--primary, #102b6a);
flex-shrink: 0;
min-width: 56px;
line-height: 32px;
text-align: right;
}
.cxz-filter-options {
display: flex;
flex-wrap: wrap;
gap: 8px;
flex: 1;
min-width: 0;
}
/* Filter option tags (rendered as <button> in JS) */
.cxz-filter-options .cxz-filter-btn,
.cxz-filter-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 5px 16px;
border-radius: 16px;
font-size: 13px;
font-weight: 500;
color: var(--text-dark, #1a1a2e);
background: var(--white, #ffffff);
border: 1px solid var(--border-light, #e5e7eb);
cursor: pointer;
transition: all 0.25s ease;
white-space: nowrap;
line-height: 1.5;
outline: none;
-webkit-tap-highlight-color: transparent;
}
.cxz-filter-options .cxz-filter-btn:hover,
.cxz-filter-btn:hover {
color: var(--primary, #102b6a);
border-color: var(--primary, #102b6a);
background: var(--bg-light, #f4f6fb);
}
.cxz-filter-options .cxz-filter-btn.active,
.cxz-filter-btn.active {
color: #ffffff;
background: var(--primary, #102b6a);
border-color: var(--primary, #102b6a);
box-shadow: 0 2px 8px rgba(16, 43, 106, 0.25);
}
/* Filter option links (fallback <a> style) */
.cxz-filter-options a {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 5px 16px;
border-radius: 16px;
font-size: 13px;
font-weight: 500;
color: var(--text-dark, #1a1a2e);
text-decoration: none;
background: var(--white, #ffffff);
border: 1px solid var(--border-light, #e5e7eb);
transition: all 0.25s ease;
white-space: nowrap;
}
.cxz-filter-options a:hover,
.cxz-filter-options a.active {
color: #ffffff;
background: var(--primary, #102b6a);
border-color: var(--primary, #102b6a);
}
/* ----------------------------------------------------------
2. Period Select Bar
---------------------------------------------------------- */
.cxz-period-bar {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 16px;
flex-wrap: wrap;
}
.cxz-period-title {
font-size: 18px;
font-weight: 700;
color: var(--primary, #102b6a);
padding-left: 14px;
border-left: 4px solid var(--gold, #fdb933);
line-height: 1.4;
}
.cxz-period-select {
display: flex;
align-items: center;
gap: 8px;
margin-left: auto;
}
.cxz-period-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 6px 18px;
border-radius: 16px;
font-size: 13px;
font-weight: 500;
border: 1px solid var(--primary, #102b6a);
color: var(--primary, #102b6a);
background: var(--white, #ffffff);
cursor: pointer;
transition: all 0.25s ease;
white-space: nowrap;
outline: none;
-webkit-tap-highlight-color: transparent;
}
.cxz-period-btn:hover {
background: var(--bg-light, #f4f6fb);
box-shadow: 0 2px 6px rgba(16, 43, 106, 0.12);
}
.cxz-period-btn.active {
color: #ffffff;
background: var(--primary, #102b6a);
border-color: var(--primary, #102b6a);
box-shadow: 0 2px 8px rgba(16, 43, 106, 0.25);
}
/* ----------------------------------------------------------
3. Table Section (overrides / extensions to public.css)
---------------------------------------------------------- */
.cxz-table-box {
background: var(--white, #ffffff);
border-radius: var(--radius-lg, 12px);
box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.06));
overflow: hidden;
margin-bottom: 20px;
}
.cxz-table-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--border-light, #e5e7eb);
}
.cxz-table-title {
font-size: 16px;
font-weight: 700;
color: var(--text-dark, #1a1a2e);
}
.cxz-data-table {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
}
.cxz-data-table .cxz-col-expert {
width: 30%;
}
.cxz-data-table .cxz-col-issue {
width: 22%;
}
.cxz-data-table .cxz-col-recommend {
width: 22%;
}
.cxz-data-table .cxz-col-rate {
width: 13%;
}
.cxz-data-table .cxz-col-action {
width: 13%;
}
.cxz-data-table thead {
background: var(--bg-light, #f4f6fb);
}
.cxz-data-table th {
padding: 12px 16px;
font-size: 13px;
font-weight: 600;
color: var(--text-muted, #6b7280);
text-align: center;
white-space: nowrap;
border-bottom: 1px solid var(--border-light, #e5e7eb);
}
.cxz-data-table td {
padding: 14px 16px;
font-size: 14px;
color: var(--text-dark, #1a1a2e);
text-align: center;
border-bottom: 1px solid var(--border-light, #e5e7eb);
vertical-align: middle;
}
.cxz-data-table th:nth-child(1),
.cxz-data-table td:nth-child(1) {
text-align: left;
}
.cxz-data-table td:nth-child(2),
.cxz-data-table td:nth-child(3) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cxz-data-table tbody tr {
transition: background 0.2s ease;
}
.cxz-table-box .cxz-data-table tbody tr:nth-child(even) {
background: #eef4fc;
}
.cxz-data-table tbody tr:hover {
background: #e4edf9;
}
.cxz-data-table tbody tr:last-child td {
border-bottom: none;
}
/* Table ball container - prevent overflow */
.cxz-data-table td .red-q,
.cxz-data-table td .bule-q {
margin: 2px 1px;
}
/* Status tags in table */
.cxz-data-table td .status-hit {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 10px;
border-radius: 10px;
font-size: 12px;
font-weight: 600;
}
/* ----------------------------------------------------------
4. Pagination (extension to public.css)
---------------------------------------------------------- */
.cxz-pagination {
padding: 20px;
text-align: center;
}
.cxz-pagination .layui-laypage {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 4px;
}
.cxz-pagination .layui-laypage a,
.cxz-pagination .layui-laypage span {
border-radius: var(--radius-md, 8px) !important;
font-size: 13px !important;
min-width: 32px;
height: 32px;
line-height: 32px !important;
margin: 0 !important;
border-color: var(--border-light, #e5e7eb) !important;
transition: all 0.2s ease;
}
.cxz-pagination .layui-laypage a:hover {
color: var(--primary, #102b6a) !important;
border-color: var(--primary, #102b6a) !important;
}
.cxz-pagination .layui-laypage .layui-laypage-curr .layui-laypage-em {
background: var(--primary, #102b6a) !important;
border-radius: var(--radius-md, 8px) !important;
}
.cxz-expert-cell {
display: inline-flex;
align-items: center;
gap: 10px;
max-width: 100%;
color: var(--text);
font-weight: 600;
overflow: hidden;
vertical-align: middle;
white-space: nowrap;
}
.cxz-expert-rank {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 28px;
color: var(--text-muted, #6b7280);
font-weight: 700;
flex-shrink: 0;
}
.cxz-expert-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.table-img,
.cxz-table-avatar-placeholder {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 50%;
vertical-align: middle;
object-fit: cover;
}
.cxz-table-avatar-placeholder {
background: linear-gradient(135deg, var(--navy, #08183c), var(--primary, #102b6a));
color: #ffffff;
font-size: 13px;
font-weight: 700;
}
.cxz-expert-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 50%;
background: linear-gradient(135deg, var(--navy), var(--primary-light));
color: var(--white);
font-size: 13px;
font-weight: 700;
flex-shrink: 0;
}
.cxz-rate {
display: inline-flex;
align-items: center;
padding: 3px 10px;
border-radius: 999px;
font-weight: 700;
font-size: 13px;
}
/* ----------------------------------------------------------
8. Buy / Action Button
---------------------------------------------------------- */
.cxz-btn-buy {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 5px 18px;
border-radius: 14px;
font-size: 12px;
font-weight: 600;
cursor: pointer;
border: none;
background: linear-gradient(135deg, var(--orange, #f15a22), #e04e1a);
color: #ffffff;
text-decoration: none;
transition: all 0.3s ease;
white-space: nowrap;
line-height: 1.5;
outline: none;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: 0 2px 6px rgba(241, 90, 34, 0.3);
}
.cxz-btn-buy:hover {
transform: translateY(-1px);
box-shadow: 0 4px 14px rgba(241, 90, 34, 0.45);
background: linear-gradient(135deg, #ff6b2b, #f15a22);
color: #ffffff;
text-decoration: none;
}
.cxz-btn-buy:active {
transform: translateY(0);
box-shadow: 0 2px 6px rgba(241, 90, 34, 0.3);
}
/* ----------------------------------------------------------
9. Empty State
---------------------------------------------------------- */
.cxz-empty-row td {
padding: 48px 20px !important;
text-align: center !important;
color: var(--text-muted, #6b7280);
font-size: 14px;
}
.cxz-empty-row td::before {
content: "";
display: block;
width: 48px;
height: 48px;
margin: 0 auto 12px;
background: var(--bg-light, #f4f6fb);
border-radius: 50%;
border: 2px dashed var(--border-light, #e5e7eb);
}
/* ----------------------------------------------------------
10. Page Layout (two-column on desktop)
---------------------------------------------------------- */
.cxz-cai-layout {
display: flex;
flex-wrap: wrap;
display: grid;
grid-template-columns: 1fr 340px;
gap: 20px;
align-items: start;
}
.cxz-cai-main {
min-width: 0;
}
.cxz-cai-sidebar {
min-width: 0;
}
/* ----------------------------------------------------------
11. Responsive - Tablet (1024px and below)
---------------------------------------------------------- */
@media (max-width: 1024px) {
.cxz-filter-box {
padding: 20px;
}
.cxz-filter-label {
min-width: 50px;
font-size: 13px;
}
.cxz-filter-btn {
padding: 4px 14px;
font-size: 12px;
}
.cxz-period-title {
font-size: 16px;
}
.cxz-period-btn {
padding: 5px 14px;
font-size: 12px;
}
.cxz-cai-layout {
grid-template-columns: 1fr;
}
.cxz-cai-sidebar {
order: -1;
}
}
/* ----------------------------------------------------------
12. Responsive - Mobile (768px and below)
---------------------------------------------------------- */
@media (max-width: 768px) {
/* Filter */
.cxz-filter-box {
padding: 16px;
border-radius: var(--radius-md, 8px);
margin-bottom: 16px;
}
.cxz-filter-row {
flex-direction: column;
gap: 8px;
margin-bottom: 12px;
}
.cxz-filter-label {
min-width: auto;
text-align: left;
line-height: 1.4;
font-size: 13px;
padding-bottom: 2px;
border-bottom: 1px solid var(--border-light, #e5e7eb);
}
.cxz-filter-options {
gap: 6px;
}
.cxz-filter-btn {
padding: 4px 12px;
font-size: 12px;
}
/* Period bar */
.cxz-period-bar {
gap: 10px;
margin-bottom: 12px;
}
.cxz-period-title {
font-size: 15px;
padding-left: 10px;
border-left-width: 3px;
}
.cxz-period-select {
margin-left: 0;
width: 100%;
justify-content: flex-start;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
padding-bottom: 4px;
}
.cxz-period-btn {
padding: 5px 12px;
font-size: 12px;
}
/* Table */
.cxz-table-box {
border-radius: var(--radius-md, 8px);
margin-bottom: 16px;
}
.cxz-table-header {
padding: 12px 14px;
}
.cxz-table-title {
font-size: 14px;
}
.cxz-data-table th {
padding: 10px 6px;
font-size: 12px;
}
.cxz-data-table td {
padding: 10px 6px;
font-size: 12px;
}
/* Make table horizontally scrollable on mobile */
.cxz-table-box {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.cxz-data-table {
min-width: 560px;
}
/* Buy button */
.cxz-btn-buy {
padding: 4px 14px;
font-size: 11px;
border-radius: 12px;
}
/* Pagination */
.cxz-pagination {
padding: 16px 10px;
}
/* Balls in table - smaller */
.cxz-data-table td .red-q,
.cxz-data-table td .bule-q {
width: 22px;
height: 22px;
font-size: 11px;
margin: 1px;
}
}
/* ----------------------------------------------------------
13. Responsive - Small Mobile (480px and below)
---------------------------------------------------------- */
@media (max-width: 480px) {
.cxz-filter-box {
padding: 12px;
margin-bottom: 12px;
}
.cxz-filter-row {
margin-bottom: 10px;
}
.cxz-filter-label {
font-size: 12px;
}
.cxz-filter-btn {
padding: 3px 10px;
font-size: 11px;
border-radius: 12px;
}
.cxz-period-bar {
gap: 8px;
}
.cxz-period-title {
font-size: 14px;
}
.cxz-period-btn {
padding: 4px 10px;
font-size: 11px;
}
.cxz-data-table {
min-width: 480px;
}
.cxz-data-table th {
padding: 8px 4px;
font-size: 11px;
}
.cxz-data-table td {
padding: 8px 4px;
font-size: 11px;
}
.cxz-data-table td .red-q,
.cxz-data-table td .bule-q {
width: 20px;
height: 20px;
font-size: 10px;
margin: 1px 0;
}
.cxz-btn-buy {
padding: 3px 10px;
font-size: 10px;
border-radius: 10px;
}
.cxz-pagination {
padding: 12px 6px;
}
.cxz-pagination .layui-laypage a,
.cxz-pagination .layui-laypage span {
min-width: 28px !important;
height: 28px !important;
line-height: 28px !important;
font-size: 12px !important;
}
}
/* ----------------------------------------------------------
14. Animations
---------------------------------------------------------- */
@keyframes cxz-fade-in {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.cxz-filter-box {
animation: cxz-fade-in 0.3s ease-out;
}
.cxz-table-box {
animation: cxz-fade-in 0.4s ease-out;
}
/* ----------------------------------------------------------
15. Print Styles
---------------------------------------------------------- */
@media print {
.cxz-filter-box,
.cxz-period-bar,
.cxz-btn-buy,
.cxz-pagination {
display: none !important;
}
.cxz-table-box {
box-shadow: none;
border: 1px solid #ccc;
}
.cxz-data-table th,
.cxz-data-table td {
padding: 6px 8px;
font-size: 11px;
}
}