:root {
  --rm-bg: #05060a;
  --rm-panel: rgba(255, 255, 255, 0.06);
  --rm-panel-2: rgba(255, 255, 255, 0.04);
  --rm-border: rgba(255, 255, 255, 0.14);
  --rm-text: rgba(255, 255, 255, 0.94);
  --rm-muted: rgba(255, 255, 255, 0.70);

  /* COD street vibe */
  --rm-accent: #00e5ff; /* cyan */
  --rm-accent-2: #ff2d55; /* hot red */
  --rm-green: #32ff7e;
  --rm-red: #ff2d55;
  --rm-yellow: #ffd60a;
  --rm-purple: #7c3aed;

  --rm-glow: 0 12px 44px rgba(0, 0, 0, 0.62);
  --rm-glow-accent: 0 0 0 1px rgba(0, 229, 255, 0.22), 0 18px 55px rgba(0, 229, 255, 0.12);

  --rm-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

.rm-body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--rm-text);
  background:
    radial-gradient(1100px 700px at 15% -10%, rgba(0, 229, 255, 0.22), transparent 60%),
    radial-gradient(900px 520px at 85% 0%, rgba(255, 45, 85, 0.20), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(124, 58, 237, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0,0,0,0.0) 40%),
    var(--rm-bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.rm-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--rm-noise);
  mix-blend-mode: overlay;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.rm-body > * {
  position: relative;
  z-index: 1;
}

.rm-header {
  /* con navbar ya incluido arriba, el header es “hero” */
  border-bottom: 0;
  background: transparent;
}

.rm-header-inner {
  max-width: 1200px;
  padding: 22px 18px 12px;
  margin: 0 auto;
}

.rm-kicker {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--rm-muted);
}

.rm-title {
  margin: 10px 0 8px;
  font-size: 58px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-shadow:
    0 22px 65px rgba(0, 0, 0, 0.75),
    0 0 0.6px rgba(255,255,255,0.7);
  position: relative;
}

.rm-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 180px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--rm-accent), var(--rm-accent-2));
  box-shadow: 0 12px 40px rgba(0, 229, 255, 0.18);
}

.rm-subtitle {
  margin: 0;
  color: var(--rm-muted);
  font-size: 14px;
}

.rm-compare {
  margin-top: 18px;
}

.rm-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.rm-compare-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rm-compare-label {
  font-size: 12px;
  color: rgba(255,255,255,.75);
}

.rm-select {
  width: 100%;
  background: rgba(0,0,0,.35);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

.rm-select:focus {
  border-color: rgba(131, 205, 255, .6);
  box-shadow: 0 0 0 3px rgba(131, 205, 255, .18);
}

.rm-compare-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.rm-btn {
  background: linear-gradient(135deg, rgba(0, 229, 255, .95), rgba(255, 45, 85, .92));
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.18), 0 18px 55px rgba(0, 0, 0, 0.55);
}

.rm-btn:hover {
  filter: brightness(1.06);
}

.rm-link {
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: 13px;
}

.rm-link:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .rm-compare-grid {
    grid-template-columns: 1fr;
  }
  .rm-compare-actions {
    justify-content: flex-start;
  }
}

.rm-meta {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--rm-border);
  background: rgba(0,0,0,0.28);
  color: var(--rm-text);
  text-decoration: none;
  font-size: 13px;
}

.rm-pill:hover {
  border-color: rgba(82, 213, 255, 0.45);
}

.rm-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.rm-card {
  /* menos borde, más glass */
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  padding: 14px 14px;
  margin-bottom: 14px;
  box-shadow: var(--rm-glow);

  overflow-x: hidden;
}

.rm-card-error {
  border-color: rgba(251, 113, 133, 0.4);
}

.rm-muted {
  color: var(--rm-muted);
}

.rm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rm-col {
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.03));
  padding: 14px;
  min-height: 220px;
  box-shadow: var(--rm-glow);

  overflow-x: hidden;
}

.rm-section-title {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

.rm-empty {
  padding: 14px;
  border-radius: 12px;
  background: var(--rm-panel-2);
  border: 1px dashed rgba(255,255,255,0.14);
  color: var(--rm-muted);
}

.rm-row {
  display: grid;
  grid-template-columns: 1fr 260px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.22));
  margin-bottom: 12px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.10),
    0 20px 60px rgba(0,0,0,0.70);
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
}

.rm-row::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, rgba(0,229,255,0.22), rgba(255,45,85,0.20), rgba(124,58,237,0.14));
  opacity: 0.0;
  filter: blur(10px);
  transition: opacity 140ms ease;
  pointer-events: none;
}

.rm-row:hover::before {
  opacity: 1;
}

/* clave en CSS grid: permitir que las columnas se encojan y no desborden */
.rm-row > * {
  min-width: 0;
}

.rm-team {
  display: flex;
  align-items: center;
  min-width: 0;
}

.rm-team-pill {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--rm-text);
  text-decoration: none;

  /* evitar que el logo/nombre “rompan” el pill */
  overflow: hidden;
  min-width: 0;
}

.rm-team-pill:hover {
  border-color: rgba(82, 213, 255, 0.35);
}

.rm-team-free {
  justify-content: center;
  background: rgba(255,255,255,0.02);
  border-style: dashed;
  color: var(--rm-muted);
}

.rm-team-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.rm-team-name {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.02em;

  /* truncar nombres largos */
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-player {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
}

.rm-player-name {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-shadow: 0 14px 40px rgba(0,0,0,0.7);
}

.rm-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  padding: 0 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.rm-mini-from,
.rm-mini-to {
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-mini-arrow {
  color: var(--rm-accent);
  text-shadow: 0 0 16px rgba(0,229,255,0.22);
}

.rm-badge {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 18px 50px rgba(0,0,0,0.6);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-kind-transfer .rm-badge {
  box-shadow: 0 0 0 1px rgba(0,229,255,0.22), 0 22px 70px rgba(0,229,255,0.10);
  color: var(--rm-accent);
  background: linear-gradient(180deg, rgba(0,229,255,0.10), rgba(0,0,0,0.35));
}

.rm-kind-arrival .rm-badge {
  color: var(--rm-green);
  background: linear-gradient(180deg, rgba(50,255,126,0.10), rgba(0,0,0,0.35));
  box-shadow: 0 0 0 1px rgba(50,255,126,0.18), 0 22px 70px rgba(50,255,126,0.08);
}

.rm-kind-departure .rm-badge {
  color: var(--rm-red);
  background: linear-gradient(180deg, rgba(255,45,85,0.12), rgba(0,0,0,0.35));
  box-shadow: 0 0 0 1px rgba(255,45,85,0.22), 0 22px 70px rgba(255,45,85,0.10);
}

/* ─────────────────────────────────────────────
   CDL-like match strip (carousel)
   ───────────────────────────────────────────── */
.rm-cdl-strip {
  position: relative;
  padding: 0 18px 6px;
}

.rm-cdl-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.rm-cdl-strip-title {
  margin: 2px 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.rm-cdl-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* firefox */
}

.rm-cdl-carousel::-webkit-scrollbar {
  display: none;
}

.rm-cdl-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: 18px;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 18px 45px rgba(0,0,0,0.55);
  position: relative;
  overflow: hidden;
}

.rm-cdl-card::before {
  content: "";
  position: absolute;
  inset: -80px -60px auto -60px;
  height: 160px;
  background: radial-gradient(closest-side, rgba(82, 213, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.rm-cdl-card-live::before {
  background: radial-gradient(closest-side, rgba(255, 45, 85, 0.22), transparent 70%);
}

.rm-cdl-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rm-cdl-badge {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(251, 113, 133, 0.14);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.25);
}

.rm-cdl-badge-muted {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
}

.rm-cdl-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.rm-cdl-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.rm-cdl-team {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rm-cdl-team:first-child {
  text-align: right;
}

.rm-cdl-vs-sep {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.60);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rm-cdl-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
}

.rm-cdl-fade {
  position: absolute;
  top: 28px;
  bottom: 10px;
  width: 46px;
  pointer-events: none;
}

.rm-cdl-fade-left {
  left: -2px;
  background: linear-gradient(90deg, var(--rm-bg), rgba(7, 10, 18, 0));
}

.rm-cdl-fade-right {
  right: -2px;
  background: linear-gradient(270deg, var(--rm-bg), rgba(7, 10, 18, 0));
}

@media (max-width: 980px) {
  .rm-grid {
    grid-template-columns: 1fr;
  }
  .rm-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .rm-player {
    order: -1;
  }
  .rm-title {
    font-size: 42px;
  }

  .rm-cdl-card {
    flex-basis: 260px;
  }

  /* en móvil mejor permitir 2 líneas que cortar demasiado */
  .rm-team-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
