/* ═══════════════════════════════════════════════════════════════════════════
   MATCHES PAGE — REVAMP 2026
   Premium, clean, modern dark-UI for the Match Center
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────────────────────── */
.mx-hero {
  position: relative;
  padding: 28px 24px 20px;
  margin: -20px -24px 24px -24px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(145deg, rgba(22, 22, 30, 0.96) 0%, rgba(14, 14, 18, 0.99) 100%);
  border-top: 2px solid rgba(34, 197, 94, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 4px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* Subtle green radial glow */
.mx-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -30px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.mx-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mx-hero__title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px 0;
  letter-spacing: -0.3px;
}

.mx-hero__sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  font-weight: 400;
}

.mx-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  color: #4ade80;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.mx-hero__cta:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.28), rgba(16, 185, 129, 0.2));
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
  transform: translateY(-1px);
}

.mx-hero__cta .elite-icon {
  width: 15px;
  height: 15px;
}

/* ── Form Streak ───────────────────────────────────────────────────────── */
.mx-form-streak {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mx-form-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  flex-shrink: 0;
}

.mx-form-dots {
  display: flex;
  gap: 5px;
}

.mx-form-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  transition: transform 0.15s ease;
}

.mx-form-dot:hover {
  transform: scale(1.12);
}

.mx-form-dot--W {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.mx-form-dot--D {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.mx-form-dot--L {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.mx-form-dot--empty {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Stats Bar ─────────────────────────────────────────────────────────── */
.mx-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.mx-stat-card {
  position: relative;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
  overflow: hidden;
}

.mx-stat-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.mx-stat__num {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.mx-stat__lbl {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.mx-stat__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Accent lines per stat */
.mx-stat--primary { border-top: 2px solid rgba(99, 102, 241, 0.4); }
.mx-stat--win     { border-top: 2px solid rgba(34, 197, 94, 0.4); }
.mx-stat--draw    { border-top: 2px solid rgba(245, 158, 11, 0.4); }
.mx-stat--loss    { border-top: 2px solid rgba(239, 68, 68, 0.4); }
.mx-stat--goals   { border-top: 2px solid rgba(6, 182, 212, 0.4); }
.mx-stat--assists  { border-top: 2px solid rgba(168, 85, 247, 0.4); }

.mx-stat--win:hover  { border-color: rgba(34, 197, 94, 0.5); box-shadow: 0 4px 16px rgba(34, 197, 94, 0.08); }
.mx-stat--loss:hover { border-color: rgba(239, 68, 68, 0.5); box-shadow: 0 4px 16px rgba(239, 68, 68, 0.08); }

/* ── W-D-L Progress Bar ───────────────────────────────────────────────── */
.mx-wdl-bar {
  margin-bottom: 20px;
}

.mx-wdl__track {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.mx-wdl__seg {
  height: 100%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.mx-wdl__seg--w { background: #22c55e; }
.mx-wdl__seg--d { background: #f59e0b; }
.mx-wdl__seg--l { background: #ef4444; }

.mx-wdl__labels {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.mx-wdl__tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.mx-wdl__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.mx-wdl__tag--w .mx-wdl__dot { background: #22c55e; }
.mx-wdl__tag--d .mx-wdl__dot { background: #f59e0b; }
.mx-wdl__tag--l .mx-wdl__dot { background: #ef4444; }

/* ── Toolbar: Tabs + Search ────────────────────────────────────────────── */
.mx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mx-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
}

.mx-tab {
  padding: 7px 16px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mx-tab:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
}

.mx-tab.active {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  box-shadow: 0 1px 4px rgba(34, 197, 94, 0.1);
}

.mx-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mx-search {
  position: relative;
}

.mx-search__icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.mx-search__input {
  width: 170px;
  padding: 8px 12px 8px 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.mx-search__input:focus {
  width: 220px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(34, 197, 94, 0.3);
}

.mx-search__input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.mx-select {
  padding: 8px 28px 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.mx-select:hover,
.mx-select:focus {
  border-color: rgba(255, 255, 255, 0.15);
}

.mx-select option {
  background: #1a1a24;
  color: #fff;
}

.mx-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 10px;
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mx-add-btn:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.12);
}

.mx-add-btn .elite-icon {
  width: 13px;
  height: 13px;
}

/* ── Match List Container ──────────────────────────────────────────────── */
.mx-list-wrap {
  min-height: 120px;
}

.mx-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Month Group Header ────────────────────────────────────────────────── */
.mx-month-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 6px;
  margin-top: 8px;
}

.mx-month-header:first-child {
  margin-top: 0;
  padding-top: 4px;
}

.mx-month-header__text {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

.mx-month-header__line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}

.mx-month-header__count {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MATCH CARD v2 — Score-centric, richer, scannable
   ═══════════════════════════════════════════════════════════════════════════ */
.mx-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.mx-card:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Result badge */
.mx-card__result {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.mx-card__result--W {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.mx-card__result--D {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.mx-card__result--L {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Card body */
.mx-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mx-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mx-card__opponent {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mx-card__score {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.mx-card__score--W { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.mx-card__score--D { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.mx-card__score--L { background: rgba(239, 68, 68, 0.1); color: #f87171; }

.mx-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
}

.mx-card__meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.mx-card__pos {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  letter-spacing: 0.3px;
}

/* Card right-side stats */
.mx-card__stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.mx-card__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
}

.mx-card__stat-num {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.mx-card__stat-lbl {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 3px;
  font-weight: 600;
}

/* Rating mini-bar */
.mx-card__rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 38px;
  gap: 4px;
}

.mx-card__rating-num {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.mx-card__rating-num--high  { color: #4ade80; }
.mx-card__rating-num--mid   { color: #fbbf24; }
.mx-card__rating-num--low   { color: #f87171; }
.mx-card__rating-num--none  { color: rgba(255, 255, 255, 0.25); }

.mx-card__rating-bar {
  width: 100%;
  height: 3px;
  border-radius: 1.5px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.mx-card__rating-fill {
  height: 100%;
  border-radius: 1.5px;
  transition: width 0.3s ease;
}

.mx-card__rating-fill--high  { background: #22c55e; }
.mx-card__rating-fill--mid   { background: #f59e0b; }
.mx-card__rating-fill--low   { background: #ef4444; }

.mx-card__rating-lbl {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

/* ── Empty State ───────────────────────────────────────────────────────── */
.mx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
  text-align: center;
}

.mx-empty__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.12);
  margin-bottom: 18px;
}

.mx-empty__icon .elite-icon {
  width: 28px;
  height: 28px;
  color: rgba(34, 197, 94, 0.5);
}

.mx-empty__title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 6px;
}

.mx-empty__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0 0 24px;
  max-width: 280px;
  line-height: 1.5;
}

.mx-empty__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  color: #4ade80;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mx-empty__cta:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.12);
}

.mx-empty__cta .elite-icon {
  width: 14px;
  height: 14px;
}

/* ── No Results (filtered) ─────────────────────────────────────────────── */
.mx-no-results {
  text-align: center;
  padding: 48px 20px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
}

.mx-no-results__icon {
  font-size: 32px;
  margin-bottom: 10px;
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .mx-hero {
    padding: 22px 18px 16px;
    margin: -16px -16px 18px -16px;
    border-radius: 0 0 16px 16px;
  }

  .mx-hero__title { font-size: 19px; }

  .mx-hero__cta span { display: none; }
  .mx-hero__cta { padding: 10px 12px; }

  .mx-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .mx-stat__num { font-size: 20px; }
  .mx-stat-card { padding: 12px 8px; }

  .mx-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mx-tabs { justify-content: center; }

  .mx-toolbar__right {
    flex-wrap: wrap;
    gap: 6px;
  }

  .mx-search__input {
    width: 100%;
    flex: 1;
  }

  .mx-search {
    flex: 1;
    min-width: 0;
  }

  .mx-search__input:focus {
    width: 100%;
  }

  .mx-add-btn {
    flex: 0 0 auto;
  }

  /* Card responsive: stack stats below */
  .mx-card {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .mx-card__result {
    width: 38px;
    height: 38px;
    font-size: 12px;
    border-radius: 10px;
  }

  .mx-card__stats {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 2px;
  }
}

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

  .mx-toolbar__right {
    flex-direction: column;
  }

  .mx-select { width: 100%; }
  .mx-add-btn { width: 100%; justify-content: center; }

  .mx-form-streak { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes mxFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mx-card {
  animation: mxFadeUp 0.3s ease both;
}

.mx-card:nth-child(2)  { animation-delay: 0.03s; }
.mx-card:nth-child(3)  { animation-delay: 0.06s; }
.mx-card:nth-child(4)  { animation-delay: 0.09s; }
.mx-card:nth-child(5)  { animation-delay: 0.12s; }
.mx-card:nth-child(6)  { animation-delay: 0.15s; }
.mx-card:nth-child(7)  { animation-delay: 0.18s; }
.mx-card:nth-child(8)  { animation-delay: 0.21s; }
.mx-card:nth-child(9)  { animation-delay: 0.24s; }
.mx-card:nth-child(10) { animation-delay: 0.27s; }

.mx-month-header {
  animation: mxFadeUp 0.25s ease both;
}

/* ═══════════════════════════════════════════════════════════════════════════
   OVERRIDE: Suppress old revamp styles on matches page
   ═══════════════════════════════════════════════════════════════════════════ */
[data-page="matches"] .revamp-hero,
[data-page="matches"] .mega-stats-grid,
[data-page="matches"] .revamp-toolbar,
[data-page="matches"] .revamp-list-container {
  /* These old containers no longer exist in our HTML,
     but just in case any JS tries to inject them */
  display: none !important;
}
