/* ===== 加拿大28官网 - 统一设计系统 ===== */

:root {
  /* 品牌色 */
  --brand-orange: #ff7a18;
  --brand-red: #ff4757;
  --brand-gradient: linear-gradient(90deg, #ff7a18 0%, #ff4757 100%);
  
  /* 中性色板 */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-300: #e0e0e0;
  --gray-400: #bdbdbd;
  --gray-500: #9e9e9e;
  --gray-600: #757575;
  --gray-700: #616161;
  --gray-800: #424242;
  --gray-900: #212121;
  
  /* 语义色 */
  --color-success: #52c41a;
  --color-warning: #faad14;
  --color-error: #f5222d;
  --color-info: #1890ff;
  
  /* 徽章色 */
  --badge-big-even: #1890ff;
  --badge-big-odd: #f5222d;
  --badge-small-even: #52c41a;
  --badge-small-odd: #faad14;
  
  /* 布局 */
  --page-bg: #f0f2f5;
  --card-bg: #ffffff;
  --border-color: #e8e8e8;
  --line: var(--gray-200);
  --muted: var(--gray-600);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-700);
  --text-muted: var(--gray-500);
  
  /* 间距 */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  
  /* 圆角 */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.03);
  --shadow-sm: 0 2px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 8px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 40px rgba(0,0,0,.15);
  
  /* 过渡 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ===== Header ===== */
.site-header {
  background: var(--brand-gradient);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: var(--spacing-xl);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  user-select: none;
}

.top-tabs {
  display: flex;
  gap: var(--spacing-xs);
  margin-left: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.top-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  height: 38px;
  padding: 0 var(--spacing-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition-fast);
  user-select: none;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
  min-width: 64px;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.25);
}

.tab.active {
  background: #fff;
  color: var(--brand-orange);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ===== Hero Cards ===== */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-md);
  margin: var(--spacing-xl) 0;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

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

.card:hover::before {
  opacity: 1;
}

@media (hover: none) {
  .card:active {
    transform: scale(0.98);
  }
}

.card-title {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
  font-weight: 400;
  text-align: center;
}

.card-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Chip list for compact multi-tags */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}

.card-value .chips {
  white-space: normal;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 52px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chip.info {
  background: var(--badge-big-even);
}

.chip.danger {
  background: var(--badge-big-odd);
}

.chip.success {
  background: var(--badge-small-even);
}

.chip.warning {
  background: var(--badge-small-odd);
}

/* 特殊形态样式 */
.chip.special {
  background: #8b5cf6;
}

.chip.extreme {
  background: #ec4899;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(255, 94, 58, 0.35);
  transition: all var(--transition-base);
  user-select: none;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255, 94, 58, 0.45);
}

.cta:active {
  transform: translateY(-1px);
}

/* ===== Sub Navigation ===== */
.sub-tabs {
  display: flex;
  gap: var(--spacing-sm);
  margin: var(--spacing-xl) 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.sub-tabs::-webkit-scrollbar {
  display: none;
}

.sub-tab {
  height: 42px;
  padding: 0 var(--spacing-xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  user-select: none;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
  min-width: 64px;
}

.sub-tab:hover {
  color: var(--brand-orange);
  box-shadow: var(--shadow-sm);
}

.sub-tab.active {
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 94, 58, 0.35);
}

/* ===== Table Container ===== */
.table-wrap {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
  overflow-x: auto;
}

.table-header {
  padding: var(--spacing-lg) var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.table-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.table-actions {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

/* ===== Table ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}

.table thead {
  background: var(--gray-50);
}

.table thead th {
  padding: var(--spacing-md) var(--spacing-xl);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.table thead th:first-child {
  text-align: left;
}

.table thead th:last-child {
  text-align: right;
}

.table tbody td {
  padding: var(--spacing-lg) var(--spacing-xl);
  color: var(--text-primary);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  line-height: 1.6;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.table tbody td:first-child {
  font-weight: 600;
  text-align: left;
}

.table tbody td:last-child {
  text-align: right;
  color: var(--text-secondary);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--gray-50);
}

.table tbody tr:nth-child(1) {
  background: rgba(255, 122, 24, 0.04);
}

.table tbody tr:nth-child(1):hover {
  background: rgba(255, 122, 24, 0.08);
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 52px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-left: var(--spacing-sm);
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge.info {
  background: var(--badge-big-even);
}

.badge.danger {
  background: var(--badge-big-odd);
}

.badge.success {
  background: var(--badge-small-even);
}

.badge.warning {
  background: var(--badge-small-odd);
}

/* ===== Buttons ===== */
.btn-secondary {
  height: 34px;
  padding: 0 var(--spacing-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--gray-300);
  transition: all var(--transition-fast);
  user-select: none;
}

.btn-secondary:hover {
  color: var(--brand-orange);
  border-color: var(--brand-orange);
  background: rgba(255, 122, 24, 0.04);
  transform: translateY(-1px);
}

.btn-secondary:active,
.btn-secondary.active {
  transform: translateY(0);
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 200ms ease;
}

.modal.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.modal-body {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
}

.modal-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.modal-body p {
  margin: var(--spacing-sm) 0;
}

.modal-body ul {
  padding-left: var(--spacing-xl);
  margin: var(--spacing-sm) 0;
}

.modal-body li {
  margin: var(--spacing-xs) 0;
}

.modal-body pre {
  background: var(--gray-50);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  overflow: auto;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid var(--line);
  margin: var(--spacing-md) 0;
}

.modal-body code {
  background: rgba(255, 122, 24, 0.08);
  color: var(--brand-orange);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  right: var(--spacing-xl);
  background: var(--card-bg);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  max-width: 420px;
  z-index: 9998;
  display: none;
  border-left: 4px solid var(--color-success);
  animation: slideInRight 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
  display: block;
}

.toast.success {
  border-left-color: var(--color-success);
}

.toast.error {
  border-left-color: var(--color-error);
}

.toast.warning {
  border-left-color: var(--color-warning);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(120%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--line);
  padding: var(--spacing-2xl) 0;
  margin-top: var(--spacing-2xl);
}

.site-footer p {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 2;
  margin: 4px 0;
}

.site-footer a {
  color: var(--brand-orange);
  font-weight: 500;
  text-decoration: underline;
}

/* ===== Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 400% 100%;
  animation: loading 1.8s ease-in-out infinite;
  border-radius: var(--radius-xs);
}

@keyframes loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===== Utilities ===== */
.gtext {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

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

.k-right {
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.digit {
  font-variant-numeric: tabular-nums;
}

.ghost {
  opacity: 0;
  display: inline-block;
}

/* Accessible focus states */
.tab:focus-visible,
.sub-tab:focus-visible,
.btn-secondary:focus-visible,
.modal-close:focus-visible,
a:focus-visible {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .hero-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 14px;
  }
  
  .site-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  
  .header-inner {
    height: 56px;
    gap: 12px;
    padding: 0;
  }
  
  .brand {
    font-size: 15px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    padding-left: 14px;
  }
  
  .top-tabs {
    gap: 6px;
    padding-right: 14px;
    margin-left: auto;
    flex: 1;
    justify-content: flex-end;
    max-width: calc(100% - 130px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .top-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .tab {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
    min-width: 52px;
    font-weight: 500;
    border-radius: 17px;
  }
  
  .tab.active {
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }
  
  /* 概览卡片 - 优化布局 */
  .hero-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
  }
  
  .card {
    padding: 16px;
    min-height: 96px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  
  .card:active {
    transform: scale(0.97);
  }
  
  .card-title {
    font-size: 12px;
    margin-bottom: 8px;
    opacity: 0.8;
    font-weight: 500;
  }
  
  .card-value {
    font-size: 22px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
    font-weight: 700;
  }
  
  .hero-cards .cta {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 50px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(255, 94, 58, 0.3);
    border-radius: 14px;
  }
  
  .hero-cards .cta:active {
    transform: scale(0.97);
  }
  
  /* 标签组 */
  .chips {
    gap: 6px;
    margin-top: 8px;
  }
  
  .chip {
    height: 24px;
    min-width: 48px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 12px;
  }
  
  /* 二级导航 */
  .sub-tabs {
    gap: 8px;
    margin: 16px 0;
    padding-bottom: 4px;
  }
  
  .sub-tab {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    min-width: 60px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .sub-tab:active {
    transform: scale(0.96);
  }
  
  .sub-tab.active {
    box-shadow: 0 4px 12px rgba(255, 94, 58, 0.35);
  }
  
  /* 表格容器 */
  .table-wrap {
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  
  .table-header {
    padding: 16px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--gray-50);
    border-radius: 14px 14px 0 0;
  }
  
  .table-title {
    font-size: 16px;
    flex: 1;
    font-weight: 700;
    min-width: 120px;
  }
  
  .table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  /* 表格 */
  .table {
    font-size: 13px;
    min-width: 100%;
  }
  
  .table thead th {
    padding: 12px 10px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gray-50);
  }
  
  .table tbody td {
    padding: 14px 10px;
    font-size: 13px;
    line-height: 1.5;
  }
  
  .table tbody td:first-child {
    font-weight: 600;
    color: var(--text-primary);
  }
  
  .table tbody td:nth-child(2) {
    font-weight: 500;
  }
  
  /* 表格行高亮 */
  .table tbody tr:nth-child(1) {
    background: rgba(255, 122, 24, 0.05);
  }
  
  .table tbody tr:nth-child(1) td:first-child {
    color: var(--brand-orange);
  }
  
  /* 徽章 */
  .badge {
    height: 24px;
    min-width: 46px;
    padding: 0 11px;
    font-size: 12px;
    margin-left: 6px;
    border-radius: 12px;
  }
  
  .chip {
    height: 24px;
    min-width: 46px;
    padding: 0 11px;
    font-size: 12px;
  }
  
  /* 按钮 */
  .btn-secondary {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }
  
  .btn-secondary:active {
    transform: scale(0.95);
  }
  
  /* 模态框 */
  .modal-content {
    width: 92%;
    padding: 20px;
    max-height: 85vh;
    border-radius: 16px;
  }
  
  .modal-title {
    font-size: 18px;
  }
  
  .modal-body {
    font-size: 14px;
    line-height: 1.7;
  }
  
  .modal-body h3 {
    font-size: 16px;
    margin: 16px 0 10px;
  }
  
  /* 页脚 */
  .site-footer {
    padding: 20px 0;
    margin-top: 24px;
  }
  
  .site-footer p {
    font-size: 12px;
    line-height: 1.8;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  /* 顶部导航 - 更紧凑 */
  .header-inner {
    height: 54px;
    gap: 12px;
    padding: 0;
  }
  
  .brand {
    font-size: 15px;
    padding-left: 10px;
  }
  
  .top-tabs {
    gap: 5px;
    padding-right: 10px;
  }
  
  .tab {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
    min-width: 50px;
  }
  
  .tab.active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* 概览卡片 */
  .hero-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
  }
  
  .card {
    padding: 14px 12px;
    min-height: 90px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }
  
  .card-title {
    font-size: 11px;
    margin-bottom: 8px;
    font-weight: 500;
  }
  
  .card-value {
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
  }
  
  .hero-cards .cta {
    grid-column: 1 / -1;
    min-height: 44px;
    font-size: 14px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(255, 94, 58, 0.35);
  }
  
  /* 标签 */
  .chips {
    gap: 5px;
    margin-top: 6px;
  }
  
  .chip {
    height: 22px;
    min-width: 42px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 11px;
  }
  
  /* 二级导航 */
  .sub-tabs {
    gap: 6px;
    margin: 14px 0;
    padding-bottom: 3px;
  }
  
  .sub-tab {
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
    min-width: 56px;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
  
  .sub-tab:active {
    transform: scale(0.96);
  }
  
  .sub-tab.active {
    box-shadow: 0 3px 10px rgba(255, 94, 58, 0.35);
  }
  
  /* 表格容器 */
  .table-wrap {
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }
  
  .table-header {
    padding: 14px;
    gap: 10px;
    background: var(--gray-50);
    border-radius: 10px 10px 0 0;
  }
  
  .table-title {
    font-size: 15px;
    font-weight: 700;
  }
  
  /* 表格 */
  .table {
    font-size: 12px;
  }
  
  .table thead th {
    padding: 10px 6px;
    font-size: 11px;
    background: var(--gray-50);
    position: sticky;
    top: 52px;
    z-index: 10;
  }
  
  .table tbody td {
    padding: 12px 6px;
    font-size: 12px;
  }
  
  .table tbody td:first-child {
    font-weight: 700;
  }
  
  /* 改善数字显示 */
  .digit {
    letter-spacing: 0.02em;
  }
  
  /* 徽章 */
  .badge {
    height: 22px;
    min-width: 42px;
    padding: 0 10px;
    font-size: 11px;
    margin-left: 5px;
    border-radius: 11px;
  }
  
  /* 按钮 */
  .btn-secondary {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  }
  
  .btn-secondary:active {
    transform: scale(0.96);
  }
  
  /* 模态框 */
  .modal-content {
    width: 94%;
    padding: 18px;
    border-radius: 14px;
  }
  
  .modal-title {
    font-size: 17px;
  }
  
  .modal-body {
    font-size: 13px;
  }
  
  .modal-body h3 {
    font-size: 15px;
  }
  
  /* Toast */
  .toast {
    min-width: 260px;
    max-width: 90%;
    right: 5%;
  }
  
  /* 页脚 */
  .site-footer {
    padding: 16px 0;
  }
  
  .site-footer p {
    font-size: 11px;
  }
}

/* ===== 历史数据页面移动端优化 ===== */
@media (max-width: 768px) {
  /* 历史页面筛选区域 */
  #historyTable + div {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .table-wrap > div:first-child {
    flex-wrap: wrap !important;
  }
  
  .table-wrap > div:first-child label,
  .table-wrap > div:first-child input,
  .table-wrap > div:first-child button {
    flex-shrink: 0;
  }
  
  .table-wrap > div:first-child input[type="date"],
  .table-wrap > div:first-child input[type="search"] {
    min-width: 120px;
  }
  
  #historyTable {
    font-size: 11px;
  }
  
  #historyTable thead th {
    padding: 8px 5px;
    font-size: 10px;
  }
  
  #historyTable tbody td {
    padding: 10px 5px;
    font-size: 11px;
  }
  
  #pager {
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 10px !important;
  }
  
  #pageInfo {
    order: -1;
    width: 100%;
    text-align: center;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .table-wrap > div:first-child {
    gap: 6px !important;
  }
  
  .table-wrap > div:first-child input[type="date"],
  .table-wrap > div:first-child input[type="search"] {
    flex: 1;
    min-width: 100px;
  }
  
  #historyTable {
    font-size: 10px;
  }
  
  #historyTable thead th {
    padding: 6px 3px;
    font-size: 9px;
  }
  
  #historyTable tbody td {
    padding: 8px 3px;
    font-size: 10px;
  }
  
  #historyTable tbody td.gtext {
    font-size: 11px;
  }
}

/* ===== 和值统计页面移动端优化 ===== */
@media (max-width: 768px) {
  #sumGrid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  
  #sumGrid > div {
    padding: 14px 8px !important;
    border-radius: 8px !important;
  }
  
  #sumGrid > div > div:first-child {
    font-size: 16px !important;
  }
  
  #sumGrid > div > div:last-child {
    font-size: 18px !important;
    margin-top: 6px !important;
  }
  
  #legend {
    font-size: 11px !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  #sumGrid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  
  #sumGrid > div {
    padding: 12px 6px !important;
  }
  
  #sumGrid > div > div:first-child {
    font-size: 14px !important;
  }
  
  #sumGrid > div > div:last-child {
    font-size: 16px !important;
  }
}

/* ===== 走势页面移动端优化 ===== */
@media (max-width: 768px) {
  #trendTable {
    font-size: 11px;
  }
  
  #trendTable thead th {
    padding: 8px 4px;
    font-size: 10px;
  }
  
  #trendTable tbody td {
    padding: 10px 4px;
    font-size: 11px;
  }
  
  /* 走势未出统计卡片 - 紧凑布局 */
  .table-wrap > div[style*="grid-template-columns"] {
    padding: 10px !important;
    margin-bottom: 6px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"]:first-child {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"]:nth-child(2) {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"]:nth-child(3) {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"] > div {
    padding: 8px 6px !important;
    border-radius: 6px !important;
    min-height: 54px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"] > div > div:first-child {
    font-size: 11px !important;
    margin-bottom: 3px !important;
    font-weight: 500 !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"] > div > div:last-child {
    font-size: 16px !important;
    font-weight: 700 !important;
  }
}

@media (max-width: 480px) {
  #trendTable {
    font-size: 10px;
  }
  
  #trendTable thead th {
    padding: 6px 2px;
    font-size: 9px;
  }
  
  #trendTable tbody td {
    padding: 8px 2px;
    font-size: 10px;
  }
  
  #trendTable .badge {
    height: 18px;
    min-width: 32px;
    padding: 0 6px;
    font-size: 9px;
    margin-left: 2px;
  }
  
  /* 走势统计卡片 - ≤480px 进一步压缩 */
  .table-wrap > div[style*="grid-template-columns"] {
    padding: 8px !important;
    margin-bottom: 4px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"]:first-child {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"]:nth-child(2) {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"]:nth-child(3) {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 5px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"] > div {
    padding: 6px 4px !important;
    border-radius: 5px !important;
    min-height: 48px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"] > div > div:first-child {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }
  
  .table-wrap > div[style*="grid-template-columns"] > div > div:last-child {
    font-size: 14px !important;
  }
}

/* ===== 预测页面移动端优化 ===== */
@media (max-width: 768px) {
  /* 预测页面顶部控制区 */
  .table-wrap > div[style*="border-bottom"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding: 14px !important;
  }
  
  /* 算法选项卡 */
  #algoTabs {
    order: 1;
    justify-content: center !important;
    width: 100%;
    gap: 10px !important;
  }
  
  #algoTabs .btn-secondary {
    flex: 1;
    height: 38px !important;
    font-size: 13px !important;
  }
  
  /* 统计信息区域 - 卡片化 */
  .table-wrap > div[style*="border-bottom"] > div:last-child {
    order: 2;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  
  /* 统计信息容器改为网格布局 */
  #statsContainer {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  
  /* stat-item 卡片化（包含 label + rate） */
  .stat-item {
    background: var(--gray-50) !important;
    padding: 12px !important;
    border-radius: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 75px !important;
  }
  
  .stat-item > div {
    width: 100%;
    text-align: center;
  }
  
  /* 期数切换按钮独占一行 */
  #btnToggleLen {
    width: 100% !important;
    height: 38px !important;
    order: -1;
  }
  
  /* 分隔线在移动端隐藏 */
  #statsContainer > div[style*="width:1px"] {
    display: none !important;
  }
  
  /* 下一期预测文字标签隐藏，让徽章独占 */
  #statsContainer > div:nth-last-child(2) {
    display: none !important;
  }
  
  /* 下一期预测徽章卡片化 */
  #nextBadge {
    background: linear-gradient(135deg, rgba(255, 122, 24, 0.08), rgba(255, 71, 87, 0.08)) !important;
    border: 2px solid rgba(255, 122, 24, 0.2) !important;
    padding: 14px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 70px !important;
  }
  
  /* 下期预测卡片重新定义 */
  #nextBadge {
    grid-column: 1 / -1 !important;
    background: linear-gradient(135deg, rgba(255, 122, 24, 0.08), rgba(255, 71, 87, 0.08)) !important;
    border: 2px solid rgba(255, 122, 24, 0.2) !important;
    padding: 14px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: auto !important;
  }
  
  /* stat-item 内的标签和数值样式 */
  .stat-item #labelHit,
  .stat-item #labelKill {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    text-align: center !important;
    margin: 0 !important;
    line-height: 1.4 !important;
  }
  
  .stat-item #rateOne,
  .stat-item #rateKill {
    font-size: 20px !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 0 !important;
  }
  
  /* 下期预测卡片 */
  #nextBadge {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(255, 122, 24, 0.08), rgba(255, 71, 87, 0.08));
    border-radius: 10px;
    border: 2px solid rgba(255, 122, 24, 0.2);
  }
  
  #nextBadge span[style*="color"] {
    font-size: 13px !important;
    font-weight: 600 !important;
  }
  
  /* 预测表格优化 */
  #predictTable {
    font-size: 11px;
  }
  
  #predictTable thead th {
    padding: 8px 4px;
    font-size: 10px;
  }
  
  #predictTable tbody td {
    padding: 10px 4px;
    font-size: 11px;
  }
  
  /* 预测表格特殊列 */
  #predictTable td:nth-child(2) {
    font-size: 10px;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  /* 更小屏幕的预测页面 */
  .table-wrap > div[style*="border-bottom"] {
    padding: 12px !important;
    gap: 12px !important;
  }
  
  #algoTabs {
    gap: 8px !important;
  }
  
  #algoTabs .btn-secondary {
    height: 36px !important;
    font-size: 12px !important;
  }
  
  /* 统计容器调整 */
  #statsContainer {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  
  .stat-item {
    padding: 10px !important;
    min-height: 65px !important;
  }
  
  .stat-item #labelHit,
  .stat-item #labelKill {
    font-size: 10px !important;
  }
  
  .stat-item #rateOne,
  .stat-item #rateKill {
    font-size: 18px !important;
  }
  
  #statsContainer #btnToggleLen {
    height: 34px !important;
  }
  
  #nextBadge {
    padding: 10px !important;
  }
  
  #nextBadge span[style*="color"] {
    font-size: 12px !important;
  }
  
  #predictTable {
    font-size: 10px;
  }
  
  #predictTable thead th {
    padding: 6px 3px;
    font-size: 9px;
  }
  
  #predictTable tbody td {
    padding: 8px 3px;
    font-size: 10px;
  }
  
  #predictTable td:nth-child(2) {
    font-size: 9px;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
