/* ===== LGSports 比赛页面样式 ===== */
/* 适用于 matches.html — 筛选栏、日期切换、赛事卡片 */

/* ========================================
   1. 页面容器
   ======================================== */

.mt-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--dashboard-bg, #f5f7fa);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  min-height: 0;
  padding-bottom: 80px;
}

.mt-page::-webkit-scrollbar {
  display: none;
}

/* ========================================
   1.5 Sticky 固定头部容器
   ======================================== */

.mt-sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

/* 暗色模式 */
body.dark-mode .mt-sticky-header {
  background: #1f2937;
}

/* ========================================
   2. 顶部筛选栏
   ======================================== */

.mt-filter-bar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border-color, #e8e8e8);
  gap: 8px;
  flex-shrink: 0;
}

.mt-filter-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.mt-filter-tags::-webkit-scrollbar {
  display: none;
}

.mt-filter-tag,
.mt-nav-entry {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, #888);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 16px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.mt-nav-entry {
  text-decoration: none;
  color: var(--accent-color, #667eea);
  font-weight: 700;
  background: rgba(102, 126, 234, 0.10);
  border: 1px solid rgba(102, 126, 234, 0.30);
}

.mt-nav-entry:hover,
.mt-nav-entry:active {
  background: rgba(102, 126, 234, 0.18);
}

body.dark-mode .mt-nav-entry {
  color: #8fa0ff;
  background: rgba(143, 160, 255, 0.14);
  border-color: rgba(143, 160, 255, 0.35);
}

body.dark-mode .mt-nav-entry:hover,
body.dark-mode .mt-nav-entry:active {
  background: rgba(143, 160, 255, 0.22);
}

.mt-filter-tag svg,
.mt-nav-entry svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.mt-filter-tag.active {
  color: var(--text-primary, #333);
  font-weight: 700;
  background: var(--chip-bg, #f5f5f5);
}

.mt-filter-tag:active,
.mt-nav-entry:active {
  background: var(--chip-bg, #f5f5f5);
}

/* ========================================
   3. 日期切换栏
   ======================================== */

.mt-date-bar {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border-color, #e8e8e8);
  gap: 0;
  flex-shrink: 0;
}

.mt-date-item {
  position: relative;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #333);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.mt-date-item .mt-date-label {
  font-weight: 600;
}

.mt-date-item .mt-date-value {
  font-size: 12px;
  color: var(--text-secondary, #888);
  margin-left: 4px;
}

.mt-date-item.active {
  color: var(--primary-blue, #2563eb);
}

.mt-date-item.active .mt-date-value {
  color: var(--primary-blue, #2563eb);
}

.mt-date-item.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: var(--primary-blue, #2563eb);
}

.mt-date-more {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary, #888);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
  -webkit-tap-highlight-color: transparent;
}

.mt-date-more svg {
  width: 14px;
  height: 14px;
}

/* 更多日期箭头展开旋转 */
.mt-date-more.expanded .mt-date-more-arrow {
  transform: rotate(180deg);
}

.mt-date-more-arrow {
  transition: transform 0.2s ease;
}

/* 日期选择下拉面板 */
.mt-date-picker {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border-color, #e8e8e8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.mt-date-picker-item {
  flex: 0 0 calc(20% - 6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border: 1px solid var(--border-color, #e8e8e8);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary, #333);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.mt-date-picker-item:hover {
  border-color: var(--primary-blue, #2563eb);
}

.mt-date-picker-item.active {
  border-color: var(--primary-blue, #2563eb);
  color: var(--primary-blue, #2563eb);
  background: rgba(37, 99, 235, 0.06);
}

.mt-date-picker-label {
  font-weight: 600;
}

.mt-date-picker-value {
  font-size: 11px;
  color: var(--text-secondary, #888);
  margin-top: 2px;
}

.mt-date-filter {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary, #888);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.mt-date-filter svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   4. 板块容器
   ======================================== */

.mt-section {
  padding: 16px 16px 0;
}

.mt-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mt-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary, #1a1a2e);
  margin: 0;
}

.mt-section-more {
  font-size: 13px;
  color: var(--primary-blue, #2563eb);
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mt-section-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary, #888);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.mt-section-sort svg {
  width: 14px;
  height: 14px;
}

.mt-section-sort:active {
  color: var(--primary-blue, #2563eb);
}

/* 比赛列表筛选 Tab（已完赛/进行中/有情报，靠右成组） */
.mt-section-tabs {
  display: flex;
  gap: 6px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mt-section-tabs::-webkit-scrollbar {
  display: none;
}

.mt-section-tab {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #888);
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e8e8e8);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mt-section-tab:hover {
  border-color: var(--primary-blue, #2563eb);
  color: var(--primary-blue, #2563eb);
}

.mt-section-tab.active {
  background: var(--primary-blue, #2563eb);
  color: #fff;
  border-color: var(--primary-blue, #2563eb);
  font-weight: 600;
}

/* ========================================
   5. 赛事卡片
   ======================================== */

.mt-card {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--card-shadow, 0 2px 12px rgba(0, 0, 0, 0.06));
}

/* 元信息行：matchNum + league  ...  countdown + time */
.mt-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.mt-card-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mt-card-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mt-card-match-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #999);
  white-space: nowrap;
}

.mt-card-league-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

.mt-card-teams {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #1a1a2e);
  white-space: nowrap;
  margin-bottom: 6px;
}

.mt-card-rank {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #999);
  white-space: nowrap;
}

/* 时间 + 倒计时 */
.mt-card-time {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #1a1a2e);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.mt-card-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary, #888);
}

.mt-card-countdown-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #333);
  font-variant-numeric: tabular-nums;
}

/* 比分（进行中卡片） */
.mt-card-score {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary, #1a1a2e);
  padding: 4px 0;
  text-align: center;
}

.mt-card-score-sep {
  margin: 0 6px;
  color: var(--text-secondary, #aaa);
}

/* 完赛比分（meta-right 内）：全场大号 + 半场小号辅助 */
.mt-card-meta-right .mt-card-score {
  padding: 0;
  font-size: 18px;
  line-height: 1.2;
}

.mt-card-halfscore {
  font-size: 11px;
  color: var(--text-secondary, #888);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* 进行中状态标签 */
.mt-card-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}

.mt-card-live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: mt-pulse 1.5s infinite;
}

@keyframes mt-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.mt-card-period {
  font-size: 13px;
  color: var(--text-secondary, #888);
  font-weight: 500;
}

/* 统计信息 */
.mt-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary, #999);
  padding: 4px 0 8px;
}

/* 赔率区（胜平负 / 让球胜平负）— 三格卡片式 */
.mt-card-odds {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 4px;
  border-top: 1px solid var(--border-color, #e8e8e8);
}

.mt-odds-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mt-odds-label {
  flex-shrink: 0;
  width: 72px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #999);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mt-odds-rgoal {
  display: inline-block;
  min-width: 22px;
  padding: 1px 5px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--primary-blue, #2563eb);
  line-height: 1.4;
  text-align: center;
}

.mt-odds-cells {
  flex: 1;
  display: flex;
  gap: 6px;
}

.mt-odds-cell {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 0;
  border-radius: 6px;
  background: #f7f8fa;
  font-size: 12px;
  white-space: nowrap;
}

.mt-odds-opt {
  font-size: 12px;
  color: var(--text-secondary, #999);
  line-height: 1.2;
}

.mt-odds-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-blue, #2563eb);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* 底部操作区 */
.mt-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color, #f0f0f0);
}

/* 分析任务按钮（蓝色描边样式） */
.mt-card-task-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--primary-blue, #2563eb);
  border: 1px solid var(--primary-blue, #2563eb);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.mt-card-task-btn:active {
  transform: scale(0.96);
  background: #eff6ff;
}

.mt-card-task-btn svg {
  width: 16px;
  height: 16px;
}

.mt-card-intel-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(244, 63, 94, 0.04);
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #e11d48;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mt-card-intel-btn:active {
  transform: scale(0.96);
  background: rgba(244, 63, 94, 0.08);
}

.mt-card-intel-btn svg {
  flex-shrink: 0;
}

.mt-card-intel-btn svg circle {
  transform-origin: 12px 12px;
  animation: mt-intel-pulse 2s ease-in-out infinite;
}

@keyframes mt-intel-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.mt-card-intel-btn.disabled {
  color: var(--text-tertiary, #aaa);
  background: rgba(0, 0, 0, 0.03);
  cursor: not-allowed;
  opacity: 0.5;
}

.mt-card-intel-btn.disabled:active {
  transform: none;
  background: rgba(0, 0, 0, 0.03);
}

.mt-card-intel-btn.disabled svg circle {
  animation: none;
}

.mt-card-intel-count {
  font-weight: 700;
  color: #e11d48;
}

/* AI 分析按钮（描边样式） */
.mt-card-ai-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  color: #6B5CE7;
  border: 1px solid #6B5CE7;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.mt-card-ai-btn:active {
  transform: scale(0.96);
  background: #f3f0ff;
}

.mt-card-ai-btn svg {
  width: 16px;
  height: 16px;
}

/* 已有 AI 观点（历史对话）：紫色实心渐变 + 白勾选，完成态高权重 */
.mt-card-ai-btn.has-view {
  background: linear-gradient(135deg, #8b7cf6 0%, #6B5CE7 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(107, 92, 231, 0.35);
}

.mt-card-ai-btn.has-view:active {
  transform: scale(0.96);
  filter: brightness(0.94);
  box-shadow: 0 1px 4px rgba(107, 92, 231, 0.3);
}

/* 已存在分析任务：蓝色实心渐变 + 白勾选，完成态高权重 */
.mt-card-task-btn.has-task {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.mt-card-task-btn.has-task:active {
  transform: scale(0.96);
  filter: brightness(0.94);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

/* ========================================
   6. Dark-mode 适配
   ======================================== */

body.dark-mode .mt-page {
  background: #111827;
}

body.dark-mode .mt-filter-bar {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .mt-filter-tag.active {
  color: #f3f4f6;
  background: #374151;
}

body.dark-mode .mt-date-bar {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .mt-date-item {
  color: #d1d5db;
}

body.dark-mode .mt-date-item .mt-date-value {
  color: #6b7280;
}

body.dark-mode .mt-date-picker {
  background: #1f2937;
  border-color: #374151;
}

body.dark-mode .mt-date-picker-item {
  color: #d1d5db;
  border-color: #374151;
}

body.dark-mode .mt-date-picker-item:hover {
  border-color: #60a5fa;
}

body.dark-mode .mt-date-picker-item.active {
  border-color: #60a5fa;
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

body.dark-mode .mt-date-picker-value {
  color: #6b7280;
}

body.dark-mode .mt-card {
  background: #1f2937;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .mt-card-countdown {
  color: #9ca3af;
}

body.dark-mode .mt-card-time,
body.dark-mode .mt-card-countdown-value {
  color: #f3f4f6;
}

body.dark-mode .mt-card-teams {
  color: #f3f4f6;
}

body.dark-mode .mt-card-rank {
  color: #6b7280;
}

body.dark-mode .mt-card-stats {
  color: #6b7280;
}

body.dark-mode .mt-card-odds {
  border-top-color: #374151;
}

body.dark-mode .mt-odds-label {
  color: #6b7280;
}

body.dark-mode .mt-odds-cell {
  background: #1f2937;
}

body.dark-mode .mt-odds-opt {
  color: #6b7280;
}

body.dark-mode .mt-odds-val {
  color: #60a5fa;
}

body.dark-mode .mt-section-title {
  color: #f3f4f6;
}

body.dark-mode .mt-section-sort {
  color: #9ca3af;
}

body.dark-mode .mt-section-tab {
  background: #374151;
  border-color: #4b5563;
  color: #9ca3af;
}

body.dark-mode .mt-section-tab.active {
  background: var(--primary-blue, #2563eb);
  border-color: var(--primary-blue, #2563eb);
  color: #fff;
}

body.dark-mode .mt-card-league-badge {
  color: #555;
}

body.dark-mode .mt-card-ai-btn {
  background: #1f2937;
  color: #a78bfa;
  border-color: #7c3aed;
}

body.dark-mode .mt-card-ai-btn:active {
  background: #374151;
}

body.dark-mode .mt-card-ai-btn.has-view {
  background: linear-gradient(135deg, #8b7cf6 0%, #6B5CE7 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(107, 92, 231, 0.45);
}

body.dark-mode .mt-card-ai-btn.has-view:active {
  transform: scale(0.96);
  filter: brightness(0.94);
}

body.dark-mode .mt-card-task-btn.has-task {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
}

body.dark-mode .mt-card-task-btn.has-task:active {
  transform: scale(0.96);
  filter: brightness(0.94);
}

body.dark-mode .mt-card-task-btn {
  background: #1f2937;
  color: #93c5fd;
  border-color: #2563eb;
}

body.dark-mode .mt-card-task-btn:active {
  background: #374151;
}

body.dark-mode .mt-card-score {
  color: #f3f4f6;
}

body.dark-mode .mt-card-halfscore {
  color: #9ca3af;
}

body.dark-mode .mt-card-intel-btn {
  background: rgba(244, 63, 94, 0.06);
  color: #fb7185;
}

body.dark-mode .mt-card-intel-btn.disabled {
  color: #4b5563;
  background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .mt-card-actions {
  border-color: #374151;
}

/* ========================================
   7. 移动端响应式
   ======================================== */

@media (max-width: 768px) {
  .mt-card-ai-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .mt-card-ai-btn svg {
    width: 14px;
    height: 14px;
  }

  .mt-card-task-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .mt-card-task-btn svg {
    width: 14px;
    height: 14px;
  }

  .mt-card-intel-btn {
    padding: 4px 10px;
  }

  .mt-filter-bar {
    padding: 10px 8px;
    gap: 4px;
  }

  .mt-filter-tag {
    padding: 5px 8px;
    font-size: 13px;
  }

  .mt-date-bar {
    padding: 8px 8px;
  }

  .mt-date-item {
    padding: 4px 10px;
    font-size: 13px;
  }

  .mt-date-picker {
    padding: 10px 8px;
    gap: 5px;
  }

  .mt-date-picker-item {
    flex: 0 0 calc(20% - 5px);
    padding: 6px 2px;
    font-size: 12px;
  }

  .mt-date-picker-value {
    font-size: 10px;
  }

  .mt-section {
    padding: 12px 8px 0;
  }

  /* 筛选 Tab 与标题同行展示（不换行），窄屏收紧尺寸 */
  .mt-section-title {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .mt-section-tabs {
    gap: 4px;
  }

  .mt-section-tab {
    padding: 4px 10px;
    font-size: 11px;
  }

  .mt-card {
    padding: 12px;
  }

  .mt-card-teams {
    font-size: 14px;
  }

  .mt-card-time {
    font-size: 14px;
  }

  .mt-card-score {
    font-size: 20px;
  }

  .mt-card-main {
    gap: 8px;
  }

  .mt-card-header {
    gap: 6px;
  }

  .mt-card-league-badge {
    font-size: 11px;
    padding: 1px 8px;
  }
}

/* 文字头像（TextArtLogo 生成的 SVG）铺满圆形容器 */
.mt-intel-card-avatar {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mt-intel-card-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}
