:root {
  --mx-brand-blue: #122f49;
  --mx-brand-blue-bright: #3c7dff;
  --mx-brand-red: #f65945;
  --mx-brand-red-deep: #d34b3f;
  --mx-bg-0: #0b1524;
  --mx-bg-1: #112033;
  --mx-panel: rgba(17, 28, 44, 0.78);
  --mx-panel-soft: rgba(24, 38, 59, 0.68);
  --mx-border: rgba(164, 204, 255, 0.22);
  --mx-text: #f6f9ff;
  --mx-text-dim: rgba(229, 238, 252, 0.82);
  --mx-glow-blue: rgba(60, 125, 255, 0.22);
  --mx-glow-red: rgba(246, 89, 69, 0.18);
  --mx-gradient: linear-gradient(135deg, #183b63 0%, #3c7dff 30%, #9f5771 66%, #f65945 100%);
  --mx-gradient-soft: linear-gradient(135deg, rgba(24, 59, 99, 0.9) 0%, rgba(60, 125, 255, 0.74) 34%, rgba(159, 87, 113, 0.68) 70%, rgba(246, 89, 69, 0.74) 100%);
  --mx-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  background:
    radial-gradient(circle at top left, rgba(92, 149, 255, 0.18), transparent 36%),
    radial-gradient(circle at top right, rgba(246, 89, 69, 0.14), transparent 32%),
    radial-gradient(circle at bottom center, rgba(92, 149, 255, 0.14), transparent 38%),
    linear-gradient(180deg, #132338 0%, #1a304b 50%, #122334 100%);
}

body {
  color: var(--mx-text);
  background: transparent;
  font-family: var(--mx-font-sans) !important;
  font-size: 17px;
  line-height: 1.58;
}

button,
input,
select,
textarea {
  font-family: var(--mx-font-sans) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.01) 1px, transparent 1px);
  background-size: 112px 112px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 94%);
  opacity: 0.2;
}

.mx-racer-page {
  background: transparent !important;
  color: var(--mx-text);
}

.mx-racer-root {
  position: relative;
  max-width: 1680px !important;
  gap: 1.75rem !important;
  padding-top: 1.9rem !important;
  padding-bottom: 2.4rem !important;
}

.mx-racer-hero,
.mx-racer-sidebar-shell,
.mx-racer-play-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(194, 221, 255, 0.24) !important;
  background: linear-gradient(180deg, rgba(30, 46, 68, 0.9), rgba(24, 38, 58, 0.84)) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(92, 149, 255, 0.05);
}

.mx-racer-hero::before,
.mx-racer-sidebar-shell::before,
.mx-racer-play-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(92,149,255,0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(246,89,69,0.14), transparent 24%);
}

.mx-racer-hero::before {
  background:
    radial-gradient(circle at 12% 0%, rgba(120, 171, 255, 0.22), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(246, 89, 69, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.05), transparent 42%);
}

.mx-racer-hero::after,
.mx-racer-play-shell::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--mx-gradient);
  opacity: 0.92;
}

.mx-racer-hero {
  padding: 2.15rem 2.2rem !important;
}

.mx-racer-hero-row {
  position: relative;
  z-index: 1;
  gap: 1.5rem !important;
}

.mx-racer-home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.58rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 203, 255, 0.28);
  background: rgba(255,255,255,0.08);
  color: rgba(248, 251, 255, 0.94);
  font: 700 0.84rem/1 var(--mx-font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: 180ms ease;
}

.mx-racer-home-link:hover {
  color: #fff;
  border-color: rgba(246, 89, 69, 0.35);
  background: rgba(255,255,255,0.11);
}

.mx-racer-hero-intro > :first-child:not(.mx-racer-home-link) {
  display: inline-flex;
  padding: 0.46rem 0.82rem;
  border-radius: 999px;
  background: rgba(92,149,255,0.1);
  border: 1px solid rgba(188,220,255,0.1);
  color: rgba(234, 242, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.mx-racer-hero h1 {
  margin-top: 1.1rem !important;
  font-family: var(--mx-font-sans) !important;
  font-size: clamp(3rem, 5.4vw, 5.25rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  line-height: 0.96 !important;
  color: #f8fbff !important;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.mx-racer-hero p {
  max-width: 64ch;
  color: rgba(239, 245, 255, 0.9) !important;
  font-size: 1.12rem;
  line-height: 1.78;
}

.mx-racer-hero-meta {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  align-items: flex-start;
  gap: 0.8rem;
  max-width: 26rem;
  margin-left: auto;
}

.mx-racer-meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.72rem 1.12rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(44,84,132,0.44), rgba(255,255,255,0.08));
  color: rgba(248, 250, 255, 0.96) !important;
  font-size: 0.82rem !important;
  font-weight: 700;
  letter-spacing: 0.06em !important;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.mx-racer-meta-chip:hover {
  transform: translateY(-1px);
}

.mx-racer-meta-chip-primary {
  border-color: rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(68, 126, 214, 0.68), rgba(246,89,69,0.2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px rgba(18, 42, 74, 0.18);
}

.mx-racer-meta-chip-primary:hover {
  border-color: rgba(255,255,255,0.28);
  background: linear-gradient(135deg, rgba(80, 142, 237, 0.74), rgba(246,89,69,0.24));
}

.mx-racer-meta-chip-secondary {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
}

.mx-racer-meta-chip-secondary:hover {
  border-color: rgba(171, 206, 255, 0.24);
  background: linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06));
}

.mx-racer-layout {
  align-items: start !important;
  gap: 1.75rem !important;
}

@media (min-width: 1280px) {
  .mx-racer-layout {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr) !important;
  }
}

.mx-racer-sidebar-shell,
.mx-racer-play-shell {
  z-index: 1;
}

.mx-racer-sidebar-shell {
  position: sticky;
  top: 1rem;
}

.mx-racer-sidebar-shell > div:first-child,
.mx-racer-play-shell > div:first-child {
  position: relative;
  z-index: 1;
  border-bottom-color: rgba(171, 206, 255, 0.12) !important;
  padding: 1.35rem 1.5rem !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
}

.mx-racer-sidebar-shell > div:first-child {
  padding: 1.05rem 1.1rem !important;
}

.mx-racer-sidebar-shell > div:first-child h3,
.mx-racer-play-shell > div:first-child h3 {
  color: #f8fbff !important;
  font-family: var(--mx-font-sans) !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
}

.mx-racer-sidebar-shell > div:first-child h3 {
  font-size: 1rem !important;
}

.mx-racer-sidebar-shell > div:first-child p,
.mx-racer-play-shell > div:first-child p {
  color: rgba(235, 243, 255, 0.88) !important;
  font-size: 1rem;
  line-height: 1.72;
}

.mx-racer-sidebar-shell > div:first-child p {
  font-size: 0.94rem;
  line-height: 1.58;
}

.mx-racer-sidebar-body {
  position: relative;
  z-index: 1;
  padding: 1.2rem !important;
  gap: 0.9rem !important;
}

.mx-racer-section {
  border-radius: 22px;
}

.mx-racer-overview-grid,
.mx-racer-telemetry-card,
.mx-racer-controls-card,
.mx-racer-actions-card,
.mx-racer-quality-card,
.mx-racer-leaderboard-card {
  padding: 0.9rem !important;
  border: 1px solid rgba(171, 206, 255, 0.07) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.012)) !important;
  box-shadow: none;
}

.mx-racer-overview-grid {
  gap: 0.65rem !important;
}

.mx-racer-overview-grid > div,
.mx-racer-telemetry-card > div,
.mx-racer-leaderboard-card {
  border-radius: 18px !important;
  border-color: rgba(171, 206, 255, 0.07) !important;
  background: linear-gradient(180deg, rgba(28, 43, 65, 0.72), rgba(27, 42, 63, 0.58)) !important;
  box-shadow: 0 8px 18px rgba(8, 12, 20, 0.08);
}

.mx-racer-overview-grid > div {
  padding: 0.82rem 0.88rem 0.8rem !important;
}

.mx-racer-overview-grid > div:first-child {
  background: linear-gradient(180deg, rgba(92,149,255,0.16), rgba(27,43,66,0.68)) !important;
}

.mx-racer-overview-grid > div:nth-child(2) {
  background: linear-gradient(180deg, rgba(246,89,69,0.14), rgba(27,43,66,0.68)) !important;
}

.mx-racer-telemetry-card {
  gap: 0.65rem !important;
}

.mx-racer-telemetry-card > div {
  padding: 0.82rem 0.88rem !important;
}

.mx-racer-telemetry-card .h-3.border,
.mx-racer-overview-grid .h-3.border {
  border-radius: 999px;
  overflow: hidden;
  border-color: rgba(255,255,255,0.06) !important;
  background: rgba(255,255,255,0.045) !important;
}

.mx-racer-controls-card ul {
  display: grid;
  gap: 0.82rem 1.1rem;
}

@media (min-width: 1280px) {
  .mx-racer-controls-card ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mx-racer-controls-card li {
  line-height: 1.56;
  color: rgba(241, 246, 255, 0.88);
  font-size: 0.95rem;
}

.mx-racer-controls-card > div:last-child {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 1280px) {
  .mx-racer-controls-card > div:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.65rem;
  }
}

.mx-racer-controls-card > div:last-child > div {
  padding: 0.5rem 0.72rem;
  border-radius: 14px;
  border: 1px solid rgba(171, 206, 255, 0.08);
  background: rgba(255,255,255,0.032);
  color: rgba(230, 239, 253, 0.74);
}

.mx-racer-actions-card,
.mx-racer-quality-card {
  gap: 0.65rem !important;
}

.mx-racer-quality-card > div:last-child,
.mx-racer-actions-card {
  display: grid;
  gap: 0.55rem;
}

.mx-racer-quality-card > div:last-child {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mx-racer-utility-card {
  border-color: rgba(171, 206, 255, 0.05) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.008)) !important;
}

.mx-racer-collapsible-card {
  padding: 0 !important;
  overflow: hidden;
}

.mx-racer-accordion {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.01));
}

.mx-racer-accordion[open] {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012));
}

.mx-racer-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  cursor: pointer;
  color: rgba(244, 248, 255, 0.94);
  font: 700 0.84rem/1 var(--mx-font-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mx-racer-accordion-summary::-webkit-details-marker {
  display: none;
}

.mx-racer-accordion-summary::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(171, 206, 255, 0.14);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.72);
  font-size: 0.95rem;
  line-height: 1;
}

.mx-racer-accordion[open] .mx-racer-accordion-summary {
  border-bottom: 1px solid rgba(171, 206, 255, 0.08);
}

.mx-racer-accordion[open] .mx-racer-accordion-summary::after {
  content: '−';
}

.mx-racer-accordion-body {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem 1rem 1rem;
}

.mx-racer-leaderboard-card {
  position: relative;
}

.mx-racer-leaderboard-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--mx-gradient);
  opacity: 0.85;
}

.mx-racer-play-shell {
  box-shadow:
    0 22px 52px rgba(5, 9, 16, 0.16),
    0 0 0 1px rgba(255,255,255,0.03),
    0 0 32px rgba(92,149,255,0.08);
}

.mx-racer-play-shell > div:first-child {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)),
    radial-gradient(circle at top right, rgba(246,89,69,0.14), transparent 38%);
}

@media (max-width: 1279px) {
  .mx-racer-sidebar-shell {
    position: relative;
    top: auto;
  }
}

@media (max-width: 900px) {
  .mx-racer-root {
    gap: 1.1rem !important;
    padding-inline: 0.9rem !important;
  }

  .mx-racer-hero,
  .mx-racer-sidebar-shell,
  .mx-racer-play-shell {
    border-radius: 22px;
  }

  .mx-racer-hero {
    padding: 1.35rem 1.2rem !important;
  }

  .mx-racer-hero h1 {
    font-size: clamp(2.3rem, 12vw, 3.35rem) !important;
  }

  .mx-racer-hero-meta {
    justify-content: flex-start;
    margin-left: 0;
    max-width: none;
  }

  .mx-racer-sidebar-body {
    padding: 1rem !important;
    gap: 0.75rem !important;
  }
}
