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

:root {
  --n3-black: #1C1C1E;
  --n3-green: #34C759;
  --n3-orange: #FF9500;
  --n3-blue: #5AC8FA;
  --n3-panel-w: 280px;
  --n3-bg: #F2F2F7;
  --n3-card: #FFFFFF;
  --n3-muted: #8E8E93;
  --n3-border: #E5E5EA;
  --n3-max: 1200px;
}

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

body.n3-body {
  margin: 0;
  font-family: 'SF Mono', 'Roboto Mono', 'Menlo', monospace;
  background: var(--n3-bg);
  color: var(--n3-black);
  line-height: 1.55;
  font-size: 13px;
}

h1, h2, h3, .n3-display {
  font-family: 'DIN Alternate', 'DIN Condensed', 'Arial Narrow', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
}

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

/* Shell: padding-left, NOT grid 100vh */
.n3-shell {
  padding-left: var(--n3-panel-w);
  min-height: 100vh;
}

/* Fixed dashboard panel */
.n3-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--n3-panel-w);
  height: 100vh;
  overflow-y: auto;
  background: var(--n3-black);
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
}

.n3-panel-logo {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.n3-panel-logo a {
  color: #fff;
  font-family: 'DIN Alternate', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.n3-panel-logo img {
  max-height: 36px;
  display: block;
}

/* Live stats — big numbers */
.n3-live-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.n3-stat {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.n3-stat-num {
  font-family: 'DIN Alternate', system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--n3-green);
  line-height: 1.1;
}

.n3-stat-num.n3-stat-live {
  font-size: 1.1rem;
  color: var(--n3-orange);
  animation: n3-pulse 2s ease infinite;
}

@keyframes n3-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.n3-stat-lbl {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Vertical nav with badges */
.n3-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  flex: 1;
}

.n3-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.n3-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-left-color: var(--n3-green);
}

.n3-badge {
  background: var(--n3-orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}

/* Filter shortcuts */
.n3-filters {
  padding: 14px 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.n3-filters-title {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.n3-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.n3-filter {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.n3-filter.on,
.n3-filter:hover {
  background: var(--n3-green);
  color: #fff;
  border-color: var(--n3-green);
}

/* Main scroll area */
.n3-main {
  min-width: 0;
  max-width: var(--n3-max);
  padding: 0 28px 40px;
}

.n3-shell > #adSwitch {
  max-width: 100%;
}

/* Section headers */
.n3-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}

.n3-section h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--n3-black);
}

.n3-section-meta {
  font-size: 0.75rem;
  color: var(--n3-muted);
}

/* Leagues scroll with stats */
.n3-leagues-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 18px 0;
  border-bottom: 1px solid var(--n3-border);
  margin-bottom: 22px;
}

.n3-league-item {
  flex-shrink: 0;
  min-width: 88px;
  text-align: center;
  background: var(--n3-card);
  border-radius: 10px;
  padding: 12px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.n3-league-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(52, 199, 89, 0.15);
}

.n3-league-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

.n3-league-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--n3-black);
}

.n3-league-stat {
  font-size: 0.65rem;
  color: var(--n3-green);
  margin-top: 4px;
  font-weight: 600;
}

/* News split with data cards */
.n3-news-split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.n3-news-hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.n3-news-hero img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.n3-news-hero-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px;
  background: linear-gradient(transparent, rgba(28, 28, 30, 0.92));
  color: #fff;
  font-family: 'DIN Alternate', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.n3-data-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.n3-data-card {
  background: var(--n3-card);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 3px solid var(--n3-blue);
  transition: transform 0.2s;
}

.n3-data-card:hover {
  transform: translateX(4px);
}

.n3-data-card strong {
  display: block;
  font-family: 'DIN Alternate', system-ui, sans-serif;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--n3-black);
}

.n3-data-metrics {
  display: flex;
  gap: 14px;
  font-size: 0.72rem;
  color: var(--n3-muted);
}

.n3-data-metrics span em {
  font-style: normal;
  color: var(--n3-green);
  font-weight: 600;
}

/* Match cards with stats */
.n3-body .match.bgwhite {
  background: var(--n3-card);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.n3-body .site-subtitle {
  color: var(--n3-blue);
  font-size: 0.85rem;
  margin-left: 8px;
}

.n3-body .match_filter_item.on,
.n3-body .match_filter_item.on a {
  background: var(--n3-green) !important;
  color: #fff !important;
}

.n3-body .info_right.start a {
  background: var(--n3-orange) !important;
  color: #fff !important;
}

.n3-body .match-item {
  border-bottom: 1px solid var(--n3-border);
  transition: background 0.15s;
}

.n3-body .match-item:hover {
  background: rgba(52, 199, 89, 0.04);
}

/* Video cards with play counts */
.n3-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.n3-video-card {
  background: var(--n3-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.n3-video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 149, 0, 0.15);
}

.n3-video-thumb {
  position: relative;
  height: 100px;
  background: var(--n3-black);
}

.n3-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.n3-play-count {
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(28, 28, 30, 0.85);
  color: var(--n3-green);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.n3-video-body {
  padding: 10px 12px;
}

.n3-video-body div {
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.n3-video-body span {
  font-size: 0.7rem;
  color: var(--n3-muted);
}

/* Player comparison table */
.n3-player-table-wrap {
  background: var(--n3-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 24px;
}

.n3-player-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.n3-player-table thead {
  background: var(--n3-black);
  color: #fff;
}

.n3-player-table th {
  padding: 12px 14px;
  text-align: left;
  font-family: 'DIN Alternate', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  user-select: none;
}

.n3-player-table th:hover {
  color: var(--n3-green);
}

.n3-player-table th::after {
  content: ' ↕';
  opacity: 0.4;
  font-size: 0.65rem;
}

.n3-player-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--n3-border);
}

.n3-player-table tbody tr:hover {
  background: rgba(90, 200, 250, 0.06);
}

.n3-player-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.n3-player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.n3-player-cell img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--n3-green);
}

.n3-rank {
  color: var(--n3-orange);
  font-weight: 700;
  font-family: 'DIN Alternate', system-ui, sans-serif;
}

.n3-val-green { color: var(--n3-green); font-weight: 600; }
.n3-val-blue { color: var(--n3-blue); font-weight: 600; }

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

.n3-team-cell {
  background: var(--n3-card);
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--n3-border);
}

.n3-team-cell:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(52, 199, 89, 0.18);
  border-color: var(--n3-green);
}

.n3-team-cell img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.n3-team-cell span {
  display: block;
  font-size: 0.75rem;
  margin-top: 6px;
}

.n3-team-data {
  font-size: 0.65rem;
  color: var(--n3-green);
  margin-top: 4px;
  font-weight: 600;
}

/* Tags by heat */
.n3-tags-heat {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px;
  background: var(--n3-card);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.n3-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(90, 200, 250, 0.12);
  color: var(--n3-blue);
  transition: background 0.2s;
}

.n3-tag:hover {
  background: rgba(90, 200, 250, 0.25);
}

.n3-tag-heat {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--n3-orange);
  color: #fff;
}

.n3-tag-heat.high { background: var(--n3-green); }
.n3-tag-heat.mid { background: var(--n3-orange); }
.n3-tag-heat.low { background: var(--n3-muted); }

/* Pagination — green/orange theme */
.n3-body .fenye {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--n3-border);
}

.n3-body .fenye ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.n3-body .fenye li,
.n3-body .fenye a,
.n3-body .fenye span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid var(--n3-border);
  background: var(--n3-card);
  color: var(--n3-black);
}

.n3-body .fenye .current,
.n3-body .fenye .on,
.n3-body .fenye a:hover {
  background: var(--n3-green);
  color: #fff;
  border-color: var(--n3-green);
}

.n3-body .fenye .disabled,
.n3-body .fenye .prev,
.n3-body .fenye .next {
  border-color: var(--n3-orange);
  color: var(--n3-orange);
}

/* Page layouts */
.n3-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--n3-border);
  margin-bottom: 20px;
}

.n3-breadcrumb {
  font-size: 0.82rem;
  color: var(--n3-muted);
  padding: 14px 0;
}

.n3-breadcrumb a {
  color: var(--n3-green);
}

.n3-list-main {
  background: var(--n3-card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  min-width: 0;
}

.n3-list-row {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--n3-border);
  transition: background 0.15s;
}

.n3-list-row:hover {
  background: rgba(52, 199, 89, 0.03);
}

.n3-list-row img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.n3-list-body h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.n3-list-body p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--n3-muted);
}

.n3-list-meta {
  display: flex;
  gap: 16px;
  font-size: 0.72rem;
  color: var(--n3-muted);
}

.n3-list-meta em {
  font-style: normal;
  color: var(--n3-green);
  font-weight: 600;
}

.n3-summary-bar {
  display: flex;
  gap: 20px;
  padding: 14px 18px;
  background: var(--n3-black);
  border-radius: 10px;
  margin-bottom: 20px;
}

.n3-summary-item {
  text-align: center;
}

.n3-summary-item .n3-stat-num {
  font-size: 1.3rem;
}

.n3-summary-item .n3-stat-lbl {
  color: rgba(255, 255, 255, 0.5);
}

/* Detail pages */
.n3-detail h1 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  line-height: 1.4;
}

.n3-detail-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--n3-muted);
  margin-bottom: 18px;
}

.n3-detail-meta a {
  color: var(--n3-green);
}

.n3-data-panel {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.n3-data-panel-item {
  flex: 1;
  background: var(--n3-black);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.n3-data-panel-item .n3-stat-num {
  font-size: 1.5rem;
}

.n3-data-panel-item .n3-stat-lbl {
  color: rgba(255, 255, 255, 0.5);
}

.n3-data-panel-item:nth-child(2) .n3-stat-num { color: var(--n3-blue); }
.n3-data-panel-item:nth-child(3) .n3-stat-num { color: var(--n3-orange); }

.n3-detail-body {
  line-height: 1.85;
  word-break: break-word;
}

.n3-detail-body a {
  color: var(--n3-green);
}

.n3-detail-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin-bottom: 20px;
}

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

.n3-prenext {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--n3-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.n3-prenext a {
  font-size: 0.85rem;
  color: #555;
}

.n3-record-play {
  color: var(--n3-orange) !important;
  font-weight: 600;
}

/* Footer */
.n3-friends {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
  font-size: 0.78rem;
}

.n3-friends a {
  color: var(--n3-muted);
}

.n3-friends a:hover {
  color: var(--n3-green);
}

.n3-footer {
  background: var(--n3-black);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  padding: 24px;
  margin-top: 20px;
}

.n3-footer-inner {
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.7;
}

.n3-footer a {
  color: var(--n3-green);
}

/* Match live detail overrides */
.n3-body .header,
.n3-body .second-header {
  display: none !important;
}

.n3-body .container {
  max-width: var(--n3-max);
}

.n3-body .position {
  background: transparent;
  padding: 12px 0;
}

.n3-body .position .crumb {
  color: var(--n3-green);
}

.n3-body .container.mt10.flex-between {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  float: none !important;
  padding-bottom: 40px;
}

.n3-body .container_left,
.n3-body .container_right {
  width: 100% !important;
  float: none !important;
  min-width: 0;
}

.n3-body .match_allinfo .top {
  background: linear-gradient(135deg, var(--n3-black), #2C2C2E);
  border-radius: 12px 12px 0 0;
}

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

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

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

.n3-body .container.flex-between:has(.ny_leftside) {
  display: grid !important;
  grid-template-columns: 120px minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
  float: none !important;
}

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

.n3-body .container.flex-between:has(.ny_leftside) .ny_leftside .all {
  background: var(--n3-black);
  width: 100%;
}

@media (max-width: 900px) {
  .n3-shell {
    padding-left: 0;
  }

  .n3-panel {
    position: static;
    width: 100%;
    height: auto;
  }

  .n3-main {
    padding: 0 16px 28px;
  }

  .n3-news-split {
    grid-template-columns: 1fr;
  }

  .n3-body .container.mt10.flex-between,
  .n3-body .container.flex-between:has(.ny_leftside) {
    grid-template-columns: 1fr;
  }

  .n3-data-panel {
    flex-direction: column;
  }
}
