/* ============================================
   首页专用样式
   ============================================ */

/* --- 顶部导航 --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-lg);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 导航 Tab */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--navy-dark);
  border-radius: var(--radius-full);
  padding: 3px;
}

.nav-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--navy-lighter);
}

.nav-tab.active {
  color: #fff;
  background: var(--navy-lighter);
}

/* 走地Tab特殊样式 */
.nav-tab-live {
  color: var(--orange-primary);
}

.nav-tab-live.active {
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
  color: #fff;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-primary);
  animation: pulse-live 1.5s ease-in-out infinite;
}

.live-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--orange-primary);
  color: #fff;
  letter-spacing: 0.5px;
}

/* 右侧操作 */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.vip-crown {
  font-size: 0.9rem;
}

/* 用户头像 */
.user-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--navy-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--card-border);
  margin-bottom: var(--space-xs);
}

.user-menu-header span:first-child {
  font-weight: 600;
  font-size: 0.95rem;
}

.user-menu-item {
  display: block;
  padding: 8px var(--space-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.user-menu-item:hover {
  background: var(--navy-lighter);
  color: var(--text-primary);
}

/* --- 团队背书横幅 --- */
.team-banner {
  background: linear-gradient(90deg, var(--navy-light), var(--navy-lighter));
  border-bottom: 1px solid var(--card-border);
  padding: 14px 0;
}

.team-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.team-banner-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.team-banner-icon {
  font-size: 1rem;
}

.team-banner-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

.team-banner-divider {
  width: 1px;
  height: 16px;
  background: var(--card-border);
}

/* --- 走地实时横幅 --- */
.live-banner {
  background: linear-gradient(90deg, rgba(255, 122, 26, 0.15), rgba(255, 122, 26, 0.05));
  border-bottom: 1px solid rgba(255, 122, 26, 0.2);
  padding: 10px 0;
  overflow: hidden;
}

.live-banner-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.88rem;
}

.live-pulse {
  animation: pulse-live 1.5s ease-in-out infinite;
}

.live-banner-text {
  color: var(--orange-primary);
  font-weight: 600;
}

.live-count {
  color: var(--text-secondary);
}

.live-banner-link {
  margin-left: auto;
  color: var(--orange-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.live-banner-link:hover {
  color: var(--orange-light);
}

/* --- 主内容 --- */
.main {
  padding-top: var(--space-lg);
  min-height: calc(100vh - 64px - 200px);
}

/* --- Tab 内容切换 --- */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* --- 区块通用 --- */
.section {
  margin-bottom: var(--space-2xl);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-icon {
  font-size: 1.3rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 联赛筛选 --- */
.league-filter {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--navy-lighter);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--card-border);
}

.filter-btn.active {
  background: rgba(255, 122, 26, 0.15);
  color: var(--orange-primary);
  border-color: rgba(255, 122, 26, 0.3);
}

/* --- 高胜率推荐卡片 --- */
.hot-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-md);
}

.hot-event-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.hot-event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange-primary), var(--orange-light));
}

.hot-event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 26, 0.4);
  box-shadow: var(--shadow-md), 0 0 30px rgba(255, 122, 26, 0.1);
}

.hot-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.hot-event-league {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hot-event-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hot-event-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.hot-team {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
}

.hot-team-logo {
  font-size: 1.5rem;
}

.hot-team-vs {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hot-event-prediction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--card-border);
}

/* --- 预测档位展示 --- */
.prediction-section {
  margin-bottom: var(--space-sm);
}

.prediction-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.prediction-section-icon {
  font-size: 0.9rem;
}

.prediction-section-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.prediction-lines {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.line-item {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.line-over {
  background: rgba(255, 122, 26, 0.12);
  color: var(--orange-primary);
  border-color: rgba(255, 122, 26, 0.25);
}

.line-under {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green-win);
  border-color: rgba(34, 197, 94, 0.25);
}

.line-value {
  font-weight: 700;
}

.line-pred {
  font-size: 0.75rem;
}

.line-conf {
  font-size: 0.7rem;
  opacity: 0.8;
}

.hot-event-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--card-border);
  margin-top: var(--space-sm);
}

.hot-win-rate {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hot-view-detail {
  font-size: 0.82rem;
  color: var(--orange-primary);
  font-weight: 600;
}

/* --- 赛事列表迷你预测 --- */
.event-prediction-mini {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 140px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.mini-pred-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.82rem;
}

.mini-pred-label {
  font-size: 0.85rem;
}

.mini-pred-value {
  font-weight: 600;
  color: var(--text-primary);
}

.mini-pred-conf {
  font-size: 0.75rem;
  color: var(--green-win);
  font-weight: 600;
}

/* --- 走地预测档位 --- */
.live-pred-lines {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: 4px;
}

.live-pred-line {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
}

/* --- 赛事列表 --- */
.events-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.event-row {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  gap: var(--space-md);
}

.event-row:hover {
  background: var(--card-bg-hover);
  border-color: rgba(255, 122, 26, 0.3);
}

.event-league {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 80px;
  flex-shrink: 0;
}

.event-teams {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}

.event-team {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

.event-team-logo {
  font-size: 1.2rem;
}

.event-vs {
  color: var(--text-muted);
  font-size: 0.82rem;
  flex-shrink: 0;
}

.event-time {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 100px;
  text-align: center;
  flex-shrink: 0;
}

.event-prediction-mini {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 120px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.event-prediction-result {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--orange-primary);
}

.event-prediction-rate {
  font-size: 0.78rem;
  color: var(--green-win);
  font-weight: 600;
}

.event-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* --- 走地预测 --- */
.live-header {
  margin-bottom: var(--space-xl);
}

.live-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.live-dot-lg {
  font-size: 1.2rem;
  animation: pulse-live 1.5s ease-in-out infinite;
}

.live-title {
  font-size: 1.5rem;
  font-weight: 800;
}

.live-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* 走地赛事卡片 */
.live-event-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.live-event-card:hover {
  border-color: rgba(255, 122, 26, 0.3);
}

.live-event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.live-match-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.live-match-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--orange-primary);
}

.live-match-teams {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.live-match-team {
  font-weight: 600;
  font-size: 1rem;
}

.live-match-team-logo {
  font-size: 1.3rem;
}

.live-match-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.live-minute {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--orange-primary);
}

/* 走地预测项 */
.live-predictions {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.live-prediction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: var(--navy-dark);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.live-prediction-item:hover {
  border-color: var(--card-border);
}

.live-prediction-item:last-child {
  margin-bottom: 0;
}

.live-pred-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.live-pred-type {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 90px;
}

.live-pred-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.live-pred-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.live-pred-confidence {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-win);
}

.live-pred-detail-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.live-pred-detail-btn:hover {
  color: var(--orange-primary);
}

/* --- 空状态 --- */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.empty-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.empty-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --- 信任背书区 --- */
.trust-section {
  padding: var(--space-2xl) 0;
  background: linear-gradient(180deg, transparent, rgba(255, 122, 26, 0.03), transparent);
  border-top: 1px solid var(--card-border);
}

.trust-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.trust-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.trust-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.trust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.trust-stat {
  text-align: center;
  padding: var(--space-lg);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.trust-stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.trust-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.trust-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.trust-feature {
  text-align: center;
  padding: var(--space-lg);
}

.trust-feature-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.trust-feature h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.trust-feature p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- 底部 --- */
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--card-border);
  background: var(--navy-dark);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--orange-primary);
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- 登录弹窗补充 --- */
.login-agreement {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: var(--space-lg);
}

.login-agreement a {
  color: var(--text-accent);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .header-inner {
    height: 56px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .nav-tab {
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  .hot-events-grid {
    grid-template-columns: 1fr;
  }

  .event-row {
    flex-wrap: wrap;
    padding: var(--space-md);
  }

  .event-league {
    min-width: auto;
  }

  .event-time {
    min-width: auto;
  }

  .event-prediction-mini {
    min-width: auto;
    width: 100%;
    justify-content: flex-start;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--card-border);
  }

  .trust-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .live-event-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .live-prediction-item {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .trust-stats,
  .trust-features {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: var(--space-md);
  }
}
