@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --dark: #0D1117;
  --neon: #00E5FF;
  --highlight: #FF4655;
  --tag-gold: #F7C948;
  --panel: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

body.m2-body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, .m2-display {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
}

a { color: inherit; text-decoration: none; }

img.lazy {
  background: #21262d;
  min-height: 1px;
}

/* Hide legacy a1 header */
.m2-body .header,
.m2-body .second-header { display: none !important; }

/* Header / Nav */
.m2-header {
  background: var(--panel);
  border-bottom: 2px solid var(--highlight);
  position: sticky;
  top: 0;
  z-index: 100;
}

.m2-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.m2-logo a {
  color: var(--neon);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
}

.m2-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.m2-nav a {
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.m2-nav a:hover {
  color: var(--neon);
  border-bottom-color: var(--neon);
}

/* LIVE score banner */
.m2-live-banner {
  background: linear-gradient(90deg, #161b22, #21262d);
  border-bottom: 1px solid var(--highlight);
  padding: 10px 0;
  overflow: hidden;
}

.m2-live-track {
  display: flex;
  gap: 24px;
  animation: m2-scroll 30s linear infinite;
  width: max-content;
}

@keyframes m2-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.m2-live-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: color 0.2s;
}

.m2-live-item:hover { color: var(--neon); }
.m2-live-item strong { color: var(--tag-gold); }

.m2-live-badge {
  background: var(--highlight);
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  animation: m2-blink 1.5s ease-in-out infinite;
}

@keyframes m2-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* League tabs */
.m2-league-tabs {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.m2-league-tab {
  padding: 6px 16px;
  border: 1px solid var(--neon);
  color: var(--neon);
  border-radius: 4px;
  font-size: 0.85rem;
  transition: background 0.2s, transform 0.2s;
}

.m2-league-tab:hover,
.m2-league-tab.active {
  background: rgba(0, 229, 255, 0.15);
  transform: translateY(-2px);
}

/* Main wrap */
.m2-main,
.m2-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.m2-section {
  font-size: 1.3rem;
  color: var(--neon);
  margin: 28px 0 14px;
}

/* 2x3 news grid */
.m2-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.m2-news-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.m2-news-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.12);
}

.m2-news-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.m2-news-card-body {
  padding: 12px;
  font-size: 0.85rem;
  color: #fff;
}

.m2-news-date {
  font-size: 0.75rem;
  color: #8b949e;
  margin-top: 6px;
}

/* Schedule table */
.m2-schedule {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.m2-schedule table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.m2-schedule th {
  background: #21262d;
  color: var(--neon);
  padding: 10px 12px;
  text-align: left;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.5px;
}

.m2-schedule td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.m2-schedule tr:hover td { background: rgba(0, 229, 255, 0.05); }
.m2-schedule a { color: var(--neon); }
.m2-schedule a:hover { color: var(--tag-gold); }

/* Video waterfall */
.m2-masonry {
  columns: 3;
  column-gap: 14px;
  margin-bottom: 24px;
}

.m2-masonry-item {
  break-inside: avoid;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.m2-masonry-item:hover {
  transform: translateY(-3px);
  border-color: var(--highlight);
  box-shadow: 0 6px 20px rgba(255, 70, 85, 0.15);
}

.m2-masonry-item strong { color: #fff; }
.m2-masonry-date { color: #8b949e; font-size: 0.75rem; }

/* Player horizontal scroll */
.m2-players-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  scroll-snap-type: x mandatory;
}

.m2-player-rank {
  min-width: 140px;
  background: var(--panel);
  border: 1px solid var(--highlight);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: transform 0.25s, box-shadow 0.25s;
}

.m2-player-rank:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 70, 85, 0.2);
}

.m2-player-rank img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
}

.m2-player-rank div { color: #fff; font-size: 0.85rem; }

/* Team logo grid */
.m2-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.m2-team-cell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s;
}

.m2-team-cell:hover {
  transform: scale(1.05);
  border-color: var(--neon);
}

.m2-team-cell img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

/* Grouped tags */
.m2-tags-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 8px;
}

.m2-tags-group h3 {
  color: var(--tag-gold);
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.m2-tags-group a {
  display: inline-block;
  margin: 4px 6px;
  padding: 5px 14px;
  border: 1px solid rgba(247, 201, 72, 0.35);
  color: var(--tag-gold);
  border-radius: 20px;
  font-size: 0.8rem;
  background: rgba(247, 201, 72, 0.08);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.m2-tags-group a:hover {
  background: var(--tag-gold);
  color: var(--dark);
  transform: translateY(-2px);
}

/* Contest list / a1 overrides */
.m2-body .site-subtitle { color: #8b949e; font-weight: 400; font-size: 16px; margin-left: 8px; }
.m2-body .match_filter_item.on a { background: var(--highlight) !important; color: #fff !important; }
.m2-body .info_right.start a { background: var(--neon) !important; color: var(--dark) !important; }
.m2-body .match,
.m2-body .bgwhite { background: var(--panel) !important; color: var(--text) !important; }
.m2-body .match h1 { color: #fff !important; }

.m2-body .lmtit .lmname,
.m2-body .lmtit .lmname div { color: var(--neon) !important; }

.m2-body .match-item {
  border-bottom-color: var(--border) !important;
  transition: background 0.2s;
}

.m2-body .match-item:hover { background: rgba(0, 229, 255, 0.04); }

.m2-body .match-item .info_left .time,
.m2-body .match-item .info_left .league,
.m2-body .match-item .info_left .league a,
.m2-body .match-item .info_center .text,
.m2-body .match-item .info_center .text a,
.m2-body .match-item .info_center .score,
.m2-body .match-item .info_center .hscore,
.m2-body .match-item .info_center .vscore,
.m2-body .match_time { color: #fff !important; }

.m2-body .match-item .info_right a {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-color: var(--border) !important;
}

.m2-body .load_more {
  background: #21262d !important;
  color: var(--neon) !important;
  border-color: var(--border) !important;
}

.m2-body .update-time { color: rgba(255, 255, 255, 0.55) !important; }

/* Detail pages */
.m2-breadcrumb {
  padding: 14px 0;
  font-size: 0.85rem;
  color: #8b949e;
}

.m2-breadcrumb a { color: var(--neon); }
.m2-breadcrumb a:hover { color: var(--tag-gold); }

.m2-detail-layout,
.m2-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.m2-detail-main,
.m2-aside-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: box-shadow 0.25s;
}

.m2-detail-main { padding: 28px; }
.m2-detail-main:hover { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3); }

.m2-detail h1 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  color: #fff;
  line-height: 1.35;
}

.m2-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.m2-detail-meta a { color: var(--neon); }

.m2-detail-cover img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
  max-height: 400px;
  object-fit: cover;
}

.m2-detail-body {
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.8;
  word-break: break-word;
  color: var(--text);
}

.m2-detail-body a { color: var(--neon); }
.m2-detail-body a:hover { color: var(--tag-gold); }

.m2-detail-video {
  max-width: 1000px;
  margin: 0 auto 20px;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.m2-detail-video-dark { background: #010409; }

.m2-detail-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.m2-video-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  margin: 0;
}

.m2-detail-tags {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m2-detail-tags a {
  padding: 4px 12px;
  background: rgba(247, 201, 72, 0.1);
  color: var(--tag-gold);
  border: 1px solid rgba(247, 201, 72, 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  transition: background 0.2s, transform 0.2s;
}

.m2-detail-tags a:hover {
  background: var(--tag-gold);
  color: var(--dark);
  transform: translateY(-2px);
}

.m2-prenext {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}

.m2-prenext a { color: #8b949e; }
.m2-prenext a:hover { color: var(--neon); }

.m2-record-play {
  display: inline-block;
  padding: 10px 20px;
  background: var(--highlight);
  color: #fff !important;
  border-radius: 6px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.m2-record-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 70, 85, 0.35);
}

.m2-aside-box {
  padding: 16px;
  margin-bottom: 16px;
}

.m2-aside-box h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: var(--neon);
  border-bottom: 2px solid var(--highlight);
  padding-bottom: 8px;
}

.m2-aside-link {
  display: block;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.2s;
}

.m2-aside-link:hover {
  color: var(--neon);
  padding-left: 4px;
}

.m2-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.m2-related-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}

.m2-related-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon);
}

.m2-related-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}

.m2-related-card p {
  padding: 10px;
  font-size: 0.82rem;
  margin: 0;
  color: #fff;
}

.m2-record-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  margin-top: 24px;
  padding-bottom: 8px;
}

.m2-record-card {
  flex-shrink: 0;
  width: 220px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}

.m2-record-card:hover {
  transform: translateY(-3px);
  border-color: var(--highlight);
}

.m2-record-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.m2-record-card p {
  padding: 10px;
  font-size: 0.82rem;
  margin: 0;
  color: #fff;
}

/* List pages */
.m2-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.m2-list-head h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--neon);
}

.m2-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.m2-filters span {
  padding: 6px 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.m2-filters span.on,
.m2-filters span:hover {
  background: var(--highlight);
  color: #fff;
  border-color: var(--highlight);
}

.m2-list-row {
  display: flex;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.m2-list-row:hover {
  transform: translateY(-3px);
  border-color: var(--neon);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.1);
}

.m2-list-row img {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.m2-list-body { flex: 1; min-width: 0; }

.m2-list-body h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #fff;
}

.m2-list-body p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #8b949e;
}

.m2-list-meta {
  font-size: 0.78rem;
  color: #8b949e;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.m2-list-meta .tag { color: var(--tag-gold); }

.m2-body .pagination a,
.m2-body .fenye ul li a {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.m2-body .pagination a:hover,
.m2-body .fenye ul li a:hover,
.m2-body .fenye ul li.active a {
  background: var(--highlight) !important;
  color: #fff !important;
}

/* Column pages */
.m2-body .container { max-width: var(--max); width: 100% !important; }
.m2-body .position { background: var(--dark); }
.m2-body .position,
.m2-body .position a,
.m2-body .position .crumb { color: var(--text) !important; }
.m2-body .position a:hover { color: var(--neon) !important; }

.m2-body .container.flex-between:has(.ny_leftside) {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 32px;
  display: grid !important;
  grid-template-columns: 120px minmax(0, 1fr) 300px;
  gap: 16px;
  float: none !important;
}

.m2-body .container.flex-between:not(:has(.ny_leftside)) {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  float: none !important;
}

.m2-body .container.flex-between:has(.ny_leftside) .ny_leftside {
  position: static !important;
  left: auto !important;
  width: 100% !important;
  float: none !important;
}

.m2-body .container.flex-between:has(.ny_leftside) .ny_leftside .all {
  background: var(--highlight) !important;
  width: 100%;
  color: #fff !important;
}

.m2-body .container_left,
.m2-body .container_right {
  width: 100% !important;
  float: none !important;
  min-width: 0;
  color: var(--text);
}

.m2-body .container_left .match-item {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.m2-body .ny_leftside {
  background: var(--panel) !important;
  border: 1px solid var(--border);
}

.m2-body .ny_leftside .navlist li {
  background: var(--panel) !important;
  border-bottom-color: var(--border) !important;
}

.m2-body .ny_leftside .navlist li a { color: var(--text) !important; }
.m2-body .ny_leftside .navlist li a:hover { color: var(--neon) !important; }

.m2-body .hot_news_list ul li {
  background: rgba(255, 255, 255, 0.06) !important;
}

.m2-body .hot_news_list ul li a { color: #fff !important; }
.m2-body .hot_news_list ul li span { color: var(--highlight) !important; }

.m2-body .hotvideos .hotvideosmain .hot_video_item {
  background: rgba(255, 255, 255, 0.06) !important;
}

.m2-body .hotvideos .hotvideosmain .hot_video_item a,
.m2-body .hotvideos .hotvideosmain .hot_video_item a p,
.m2-body .hotvideos .hotvideosmain .hot_video_item a .nr { color: #fff !important; }

.m2-body .hotvideos .hotvideosmain .hot_video_item:hover {
  background: rgba(0, 229, 255, 0.1) !important;
}

.m2-body .hottag .hottagmain a {
  color: var(--tag-gold) !important;
  background: rgba(247, 201, 72, 0.1) !important;
  border: 1px solid rgba(247, 201, 72, 0.3);
}

.m2-body .hottag .hottagmain a:hover {
  background: var(--tag-gold) !important;
  color: var(--dark) !important;
}

.m2-body .article_content,
.m2-body .article_content.bgwhite {
  background: var(--panel) !important;
  color: var(--text) !important;
}

.m2-body .article_tit { color: #fff !important; }
.m2-body .article_info,
.m2-body .article_info a,
.m2-body .article_info span { color: rgba(255, 255, 255, 0.55) !important; }
.m2-body .article_info a:hover { color: var(--neon) !important; }

.m2-body .article_content .nr,
.m2-body .article_content .nr p { color: var(--text) !important; }
.m2-body .article_content .nr a { color: var(--neon) !important; }

.m2-body .luxianglist ul li { border-bottom-color: var(--border) !important; }
.m2-body .luxianglist ul li a { color: #fff !important; }
.m2-body .luxianglist ul li span.time { color: rgba(255, 255, 255, 0.5) !important; }

/* Footer */
.m2-footer.footer-wrapper {
  background: #010409;
  border-top: 2px solid var(--highlight);
}

.m2-footer p,
.m2-footer .footer-desc {
  text-align: center;
  color: #8b949e;
}

.m2-footer a { color: var(--neon); }
.m2-footer a:hover { color: var(--tag-gold); }

.m2-body .friend-wrapper a { color: #8b949e; }
.m2-body .friend-wrapper a:hover { color: var(--neon); }

@media (max-width: 900px) {
  .m2-nav { display: none; }
  .m2-news-grid { grid-template-columns: 1fr; }
  .m2-masonry { columns: 1; }
  .m2-detail-layout,
  .m2-list-layout { grid-template-columns: 1fr; }
  .m2-related-grid { grid-template-columns: 1fr; }
  .m2-list-row { flex-direction: column; }
  .m2-list-row img { width: 100%; height: 160px; }
  .m2-body .container.flex-between:has(.ny_leftside),
  .m2-body .container.flex-between:not(:has(.ny_leftside)) {
    grid-template-columns: 1fr;
  }
  .m2-schedule { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .m2-live-track,
  .m2-live-badge { animation: none; }
}

/* 赛事详情页 */
.m2-body .match_allinfo .top {
  background: linear-gradient(135deg, #161b22, #0d1117);
  border: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}

.m2-body .match_allinfo .top,
.m2-body .match_allinfo .top p,
.m2-body .match_allinfo .qiudui_name { color: #fff; }

.m2-body .match_info,
.m2-body .match_analysis,
.m2-body .xiangguanzhibo,
.m2-body .hotvideos {
  background: var(--panel) !important;
  border: 1px solid var(--border);
  color: var(--text);
}

.m2-body .match_analysis .senav span.on {
  background: var(--highlight);
  color: #fff;
}

.m2-body .zhibo_btn .redirectLink {
  background: var(--highlight);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 6px;
  margin: 4px;
  display: inline-block;
}

.m2-body .container.mt10.flex-between {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 40px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  float: none !important;
}

.m2-body .column_hd p,
.m2-body .column_hd h2,
.m2-body .match_analysis .tabmain { color: var(--text); }
