/* ============================================================
   trend.css - 彩缘汇 Trend chart page styles
   Design system: warm brown/orange palette from public.css
   ============================================================ */

/* ----------------------------------------------------------
   1. Breadcrumb Bar
   ---------------------------------------------------------- */
.breadcrumb-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 13px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb-bar a {
  color: var(--primary-bright);
  transition: color 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.breadcrumb-bar a:hover {
  color: var(--orange-warm);
}

.breadcrumb-bar span {
  color: var(--gray-300);
}

/* ----------------------------------------------------------
   2. Page Title Bar & Period Selector
   ---------------------------------------------------------- */
.page-title-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-deep);
  position: relative;
  padding-left: 14px;
  border-left: 4px solid var(--orange-warm);
}

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

.qishu-but {
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.25s;
  user-select: none;
  white-space: nowrap;
  line-height: 1.5;
}

.qishu-but:hover {
  color: var(--primary-bright);
  border-color: var(--primary-bright);
  background: var(--primary-light);
}

.qishu-but.active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich));
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(244, 122, 85, 0.35);
}

/* ----------------------------------------------------------
   3. Table Wrapper & Horizontal Scroll
   ---------------------------------------------------------- */
.table-wrapper {
  max-width: 1200px;
  margin: 12px auto 40px;
  padding: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
  transition: background 0.2s;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ----------------------------------------------------------
   4. Trend Table - Base
   ---------------------------------------------------------- */
.trend-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  font-size: 12px;
  table-layout: auto;
}

.trend-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.trend-table thead tr:first-child td {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright));
  color: #fff;
  font-weight: 600;
  padding: 10px 6px;
  text-align: center;
  border-color: rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  font-size: 13px;
}

.trend-table thead tr:nth-child(2) td {
  background: var(--primary-light);
  color: var(--primary-deep);
  font-weight: 600;
  padding: 8px 4px;
  text-align: center;
  border-color: rgba(180, 83, 75, 0.08);
  white-space: nowrap;
  font-size: 12px;
}

.trend-table td {
  padding: 5px 5px;
  text-align: center;
  border: 1px solid var(--gray-200);
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.4;
}

.trend-table tbody tr {
  transition: background 0.15s;
}

.trend-table tbody tr:hover {
  background: rgba(244, 122, 85, 0.03);
}

.trend-table tbody tr:nth-child(even) {
  background: rgba(244, 238, 235, 0.45);
}

.trend-table tbody tr:nth-child(even):hover {
  background: rgba(244, 122, 85, 0.05);
}

/* ----------------------------------------------------------
   5. Issue & Code Columns (sticky left)
   ---------------------------------------------------------- */
.col-issue {
  font-weight: 600;
  color: var(--primary-deep);
  min-width: 72px;
  background: var(--primary-light);
  position: sticky;
  left: 0;
  z-index: 5;
}

.trend-table thead .col-issue {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright));
  color: #fff;
  z-index: 15;
}

.col-code {
  font-weight: 600;
  color: var(--gray-700);
  min-width: 120px;
  background: var(--primary-light);
  position: sticky;
  left: 72px;
  z-index: 5;
}

.trend-table thead .col-code {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright));
  color: #fff;
  z-index: 15;
}

.col-issue::after,
.col-code::after {
  content: "";
  position: absolute;
  top: 0;
  right: -6px;
  width: 6px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.06), transparent);
  pointer-events: none;
}

.trend-table thead .col-issue::after,
.trend-table thead .col-code::after {
  background: none;
}

/* ----------------------------------------------------------
   6. Zone Header Colors
   ---------------------------------------------------------- */
.zone-red-header {
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich)) !important;
  color: #fff !important;
  font-size: 14px !important;
  letter-spacing: 1px;
}

.zone-blue-header {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright)) !important;
  color: #fff !important;
  font-size: 14px !important;
  letter-spacing: 1px;
}

.zone-front-header {
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich)) !important;
  color: #fff !important;
  font-size: 14px !important;
  letter-spacing: 1px;
}

.zone-back-header {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright)) !important;
  color: #fff !important;
  font-size: 14px !important;
  letter-spacing: 1px;
}

.zone-type {
  background: linear-gradient(135deg, #8e44ad, #9b59b6) !important;
  color: #fff !important;
  font-size: 14px !important;
}

.zone-hundred {
  background: linear-gradient(135deg, var(--orange-warm), #e67e22) !important;
  color: #fff !important;
  font-size: 14px !important;
}

.zone-ten {
  background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
  color: #fff !important;
  font-size: 14px !important;
}

.zone-unit {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright)) !important;
  color: #fff !important;
  font-size: 14px !important;
}

.zone-p1 { background: var(--orange-warm) !important; color: #fff !important; font-size: 14px !important; }
.zone-p2 { background: #f39c12 !important; color: #fff !important; font-size: 14px !important; }
.zone-p3 { background: #27ae60 !important; color: #fff !important; font-size: 14px !important; }
.zone-p4 { background: #2980b9 !important; color: #fff !important; font-size: 14px !important; }
.zone-p5 { background: #8e44ad !important; color: #fff !important; font-size: 14px !important; }

.zone-g1 {
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich)) !important;
  color: #fff !important;
  font-size: 14px !important;
  letter-spacing: 1px;
}

.zone-g2 {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright)) !important;
  color: #fff !important;
  font-size: 14px !important;
  letter-spacing: 1px;
}

.zone-z1 { background: var(--orange-warm) !important; color: #fff !important; font-size: 14px !important; }
.zone-z2 { background: #27ae60 !important; color: #fff !important; font-size: 14px !important; }
.zone-z3 { background: var(--primary-bright) !important; color: #fff !important; font-size: 14px !important; }
.zone-sp {
  background: linear-gradient(135deg, #f5a623, #fdb933) !important;
  color: #fff !important;
  font-size: 14px !important;
}

.zone-0to9 {
  background: var(--primary-light) !important;
  color: var(--primary-deep) !important;
  font-size: 14px !important;
}

.zone-last {
  background: linear-gradient(135deg, var(--orange-warm), #e67e22) !important;
  color: #fff !important;
  font-size: 14px !important;
}

/* ----------------------------------------------------------
   7. Hit & Miss Ball Styles
   ---------------------------------------------------------- */
.hit-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(244, 122, 85, 0.35);
}

.hit-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(84, 33, 29, 0.35);
}

.miss-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--gray-300);
  font-size: 11px;
  font-weight: 400;
}

.hit-hundred {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(244, 122, 85, 0.35);
}

.hit-ten {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(39, 174, 96, 0.35);
}

.hit-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(84, 33, 29, 0.35);
}

.type-baozi {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--orange-warm), #c0392b);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.type-zu3 {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.type-zu6 {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary-bright), #2980b9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.type-empty {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gray-300);
  font-size: 11px;
  font-weight: 400;
}

/* ----------------------------------------------------------
   8. Position Hit Balls (for PL5, QXC)
   ---------------------------------------------------------- */
.hit-pos1, .hit-p1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-warm), #c0392b);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(244, 122, 85, 0.35);
}

.hit-pos2, .hit-p2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(243, 156, 18, 0.35);
}

.hit-pos3, .hit-p3 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(39, 174, 96, 0.35);
}

.hit-pos4, .hit-p4 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2980b9, var(--primary-bright));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(41, 128, 185, 0.35);
}

.hit-pos5, .hit-p5 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(142, 68, 173, 0.35);
}

.hit-p6 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a085, #1abc9c);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(22, 160, 133, 0.35);
}

.hit-p7 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-warm), #e67e22);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(244, 122, 85, 0.35);
}

/* ----------------------------------------------------------
   9. KL8 Hit Balls
   ---------------------------------------------------------- */
.hit-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(244, 122, 85, 0.35);
}

.hit-num.g2 {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright));
  box-shadow: 0 2px 6px rgba(84, 33, 29, 0.35);
}

/* ----------------------------------------------------------
   10. QLC Hit Balls
   ---------------------------------------------------------- */
.hit-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(244, 122, 85, 0.35);
}

.hit-special {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5a623, #fdb933);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 6px rgba(253, 185, 51, 0.4);
}

/* ----------------------------------------------------------
   11. Statistics Rows
   ---------------------------------------------------------- */
.stat-row td {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  padding: 5px 5px;
  border-top: 1px solid var(--gray-200);
  background: var(--primary-light);
}

.stat-row:first-child td {
  border-top: 3px solid var(--primary-bright);
}

.stat-row.alt td {
  background: var(--gray-100);
}

.stat-label {
  text-align: left !important;
  font-weight: 700 !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary-bright)) !important;
  padding-left: 10px !important;
}

/* ----------------------------------------------------------
   12. Responsive - Tablet (max-width: 1024px)
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .breadcrumb-bar {
    padding: 10px 16px 0;
    font-size: 12px;
  }

  .page-title-bar {
    padding: 8px 16px 12px;
  }

  .page-title {
    font-size: 19px;
  }

  .qishu-but {
    padding: 5px 14px;
    font-size: 12px;
  }

  .table-wrapper {
    padding: 0 12px;
    margin-bottom: 30px;
  }

  .trend-table {
    font-size: 11px;
  }

  .trend-table thead tr:first-child td {
    padding: 8px 4px;
    font-size: 12px;
  }

  .trend-table thead tr:nth-child(2) td {
    padding: 6px 3px;
    font-size: 11px;
  }

  .trend-table td {
    padding: 4px 3px;
  }

  .col-issue {
    min-width: 62px;
  }

  .col-code {
    min-width: 100px;
    left: 62px;
  }

  .hit-red, .hit-blue, .hit-hundred, .hit-ten, .hit-unit,
  .hit-pos1, .hit-pos2, .hit-pos3, .hit-pos4, .hit-pos5,
  .hit-p1, .hit-p2, .hit-p3, .hit-p4, .hit-p5, .hit-p6, .hit-p7,
  .hit-num, .hit-main, .hit-special, .miss-num {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
}

/* ----------------------------------------------------------
   13. Responsive - Mobile (max-width: 768px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .breadcrumb-bar {
    padding: 8px 12px 0;
    font-size: 12px;
  }

  .page-title-bar {
    padding: 6px 12px 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .page-title {
    font-size: 17px;
  }

  .qishu-but {
    padding: 4px 12px;
    font-size: 12px;
  }

  .table-wrapper {
    padding: 0 8px;
    margin-bottom: 24px;
  }

  .trend-table {
    font-size: 10px;
  }

  .trend-table thead tr:first-child td {
    padding: 7px 3px;
    font-size: 11px;
  }

  .trend-table thead tr:nth-child(2) td {
    padding: 5px 2px;
    font-size: 10px;
  }

  .trend-table td {
    padding: 3px 2px;
  }

  .col-issue {
    min-width: 54px;
    font-size: 10px;
    left: 0;
  }

  .col-code {
    min-width: 80px;
    font-size: 10px;
    left: 54px;
  }

  .hit-red, .hit-blue, .hit-hundred, .hit-ten, .hit-unit,
  .hit-pos1, .hit-pos2, .hit-pos3, .hit-pos4, .hit-pos5,
  .hit-p1, .hit-p2, .hit-p3, .hit-p4, .hit-p5, .hit-p6, .hit-p7,
  .hit-num, .hit-main, .hit-special, .miss-num {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .type-baozi, .type-zu3, .type-zu6, .type-empty {
    font-size: 9px;
    padding: 1px 4px;
  }

  .stat-row td {
    font-size: 10px;
    padding: 3px 2px;
  }

  .stat-label {
    font-size: 10px !important;
    padding-left: 6px !important;
  }
}

/* ----------------------------------------------------------
   14. Responsive - Small Mobile (max-width: 480px)
   ---------------------------------------------------------- */
@media (max-width: 480px) {
  .page-title {
    font-size: 15px;
  }

  .qishu-but {
    padding: 3px 10px;
    font-size: 11px;
  }

  .trend-table {
    font-size: 9px;
  }

  .trend-table thead tr:first-child td {
    padding: 6px 2px;
    font-size: 10px;
  }

  .trend-table thead tr:nth-child(2) td {
    padding: 4px 1px;
    font-size: 9px;
  }

  .trend-table td {
    padding: 2px 1px;
  }

  .col-issue {
    min-width: 46px;
    left: 0;
  }

  .col-code {
    min-width: 68px;
    left: 46px;
  }

  .hit-red, .hit-blue, .hit-hundred, .hit-ten, .hit-unit,
  .hit-pos1, .hit-pos2, .hit-pos3, .hit-pos4, .hit-pos5,
  .hit-p1, .hit-p2, .hit-p3, .hit-p4, .hit-p5, .hit-p6, .hit-p7,
  .hit-num, .hit-main, .hit-special, .miss-num {
    width: 16px;
    height: 16px;
    font-size: 8px;
  }

  .type-baozi, .type-zu3, .type-zu6, .type-empty {
    font-size: 8px;
    padding: 1px 3px;
  }

  .stat-row td {
    font-size: 9px;
    padding: 2px 1px;
  }

  .stat-label {
    font-size: 9px !important;
    padding-left: 4px !important;
  }
}

/* ----------------------------------------------------------
   15. Go Top Button
   ---------------------------------------------------------- */
.gotop {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-warm), var(--orange-rich));
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(244, 122, 85, 0.35);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gotop.is-visible {
  opacity: 1;
  visibility: visible;
}

.gotop:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(244, 122, 85, 0.45);
}


/* 走势图顶部：返回区和标题期数区左右分布 */
.trend-top-row {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.trend-top-row .breadcrumb-bar,
.trend-top-row .page-title-bar {
  max-width: none;
  margin: 0;
  padding: 0;
}

.trend-top-row .page-title-bar {
  width: auto;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .trend-top-row {
    padding: 10px 12px;
    flex-wrap: wrap;
  }
}
