/* ==========================================================================
   Nitro Simracing - Rankings
   ========================================================================== */

.sn-iracing-ranking {
  position: relative;
  padding: clamp(18px, 2vw, 24px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.12), transparent 28%),
    linear-gradient(155deg, rgba(7, 12, 22, 0.95), rgba(10, 16, 28, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 56px rgba(0, 0, 0, 0.42);
  color: #f4f8ff;
}

.sn-f1-ranking {
  position: relative;
  padding: clamp(18px, 2vw, 24px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.12), transparent 28%),
    linear-gradient(155deg, rgba(7, 12, 22, 0.95), rgba(10, 16, 28, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 56px rgba(0, 0, 0, 0.42);
  color: #f4f8ff;
}

.sn-iracing-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.sn-ranking-header {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.sn-iracing-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 89, 77, 0.25);
  background: rgba(201, 13, 5, 0.12);
  color: #ffb2ad;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sn-ranking-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 89, 77, 0.25);
  background: rgba(201, 13, 5, 0.12);
  color: #ffb2ad;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sn-iracing-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.5vw, 2.35rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}

.sn-ranking-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.5vw, 2.35rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}

.sn-iracing-subtitle {
  margin: 0;
  max-width: 72ch;
  color: rgba(225, 233, 247, 0.72);
  font-size: 0.98rem;
  line-height: 1.55;
}

.sn-ranking-subtitle {
  margin: 0;
  max-width: 72ch;
  color: rgba(225, 233, 247, 0.72);
  font-size: 0.98rem;
  line-height: 1.55;
}

.sn-iracing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.sn-ranking-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.sn-ranking-tabs--secondary {
  margin-bottom: 16px;
}

/* Global tabs skin fallback for standalone rankings and rankings embedded
   inside simulator/torneo hosts. This mirrors the system tab language and
   wins over theme button resets. */
.sn-iracing-ranking .sn-iracing-tabs,
.sn-f1-ranking .sn-ranking-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px !important;
  overflow-x: auto;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
    rgba(9, 14, 24, 0.88) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03) !important;
  scrollbar-width: thin;
}

.sn-iracing-ranking .sn-iracing-tabs > button,
.sn-f1-ranking .sn-ranking-tabs > button,
.sn-iracing-ranking .sn-iracing-tab-btn,
.sn-f1-ranking .sn-ranking-tab {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06) !important;
  background: linear-gradient(180deg, rgba(75, 14, 14, 0.55), rgba(47, 9, 9, 0.72)) !important;
  color: #f2f6ff !important;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.sn-iracing-ranking .sn-iracing-tabs > button:hover,
.sn-iracing-ranking .sn-iracing-tabs > button:focus-visible,
.sn-f1-ranking .sn-ranking-tabs > button:hover,
.sn-f1-ranking .sn-ranking-tabs > button:focus-visible,
.sn-iracing-ranking .sn-iracing-tab-btn:hover,
.sn-iracing-ranking .sn-iracing-tab-btn:focus-visible,
.sn-f1-ranking .sn-ranking-tab:hover,
.sn-f1-ranking .sn-ranking-tab:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(201, 13, 5, 0.34) !important;
  background: linear-gradient(180deg, rgba(92, 18, 18, 0.72), rgba(58, 10, 10, 0.82)) !important;
  color: #fff !important;
}

.sn-iracing-ranking .sn-iracing-tabs > button.active,
.sn-iracing-ranking .sn-iracing-tabs > button.on,
.sn-iracing-ranking .sn-iracing-tabs > button[aria-selected="true"],
.sn-f1-ranking .sn-ranking-tabs > button.active,
.sn-f1-ranking .sn-ranking-tabs > button.on,
.sn-f1-ranking .sn-ranking-tabs > button[aria-selected="true"],
.sn-iracing-ranking .sn-iracing-tab-btn.active,
.sn-iracing-ranking .sn-iracing-tab-btn.on,
.sn-iracing-ranking .sn-iracing-tab-btn[aria-selected="true"],
.sn-f1-ranking .sn-ranking-tab.active,
.sn-f1-ranking .sn-ranking-tab.on,
.sn-f1-ranking .sn-ranking-tab[aria-selected="true"] {
  border-color: rgba(201, 13, 5, 0.65) !important;
  background: linear-gradient(135deg, #c90d05, #7f0903) !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(140, 13, 7, 0.28) !important;
}

.sn-ranking-tab,
.sn-ranking-tab span,
.sn-ranking-tab i,
.sn-iracing-tab-btn,
.sn-iracing-tab-btn span,
.sn-iracing-tab-btn i {
  color: #fff !important;
  opacity: 1 !important;
}

.sn-ranking-tab .sn-f1-sim-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 22px;
}

.sn-iracing-tab-btn i {
  color: currentColor;
}

.sn-iracing-toolbar {
  display: flex;
  justify-content: flex-end;
}

.sn-ranking-toolbar {
  display: flex;
  justify-content: flex-end;
}

.sn-iracing-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 340px);
  padding: 0 14px;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(4, 6, 10, 0.98), rgba(8, 12, 20, 0.98));
  color: #fff;
}

.sn-ranking-search {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 340px);
  padding: 0 14px;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(4, 6, 10, 0.98), rgba(8, 12, 20, 0.98));
  color: #fff;
}

.sn-ranking-search i {
  color: #c90d05;
}

.sn-ranking-search__input {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.sn-ranking-search__input::placeholder {
  color: rgba(223, 234, 248, 0.48);
}

.sn-iracing-search i {
  color: #c90d05;
}

.sn-iracing-search__input {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.sn-iracing-search__input::placeholder {
  color: rgba(223, 234, 248, 0.48);
}

.sn-iracing-tab {
  display: none;
  gap: 16px;
}

.sn-iracing-tab.is-active {
  display: grid;
}

.sn-iracing-user-pos {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(14, 21, 34, 0.96), rgba(9, 14, 23, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sn-iracing-user-pos h4 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(237, 243, 255, 0.8);
}

.sn-iracing-table-wrapper {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(150deg, rgba(10, 16, 28, 0.96), rgba(6, 10, 18, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.24);
  overflow: auto;
}

.sn-ranking-table-wrap {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(150deg, rgba(10, 16, 28, 0.96), rgba(6, 10, 18, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.24);
  overflow: auto;
}

.sn-ranking-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.sn-ranking-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 12px;
  border: 0;
  background: rgba(6, 10, 18, 0.96);
  color: rgba(225, 233, 247, 0.62);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sn-ranking-table thead th i {
  color: rgba(255, 255, 255, 0.55);
}

.sn-ranking-table tbody td {
  padding: 12px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #edf3ff;
  vertical-align: middle;
  background: transparent;
}

.sn-ranking-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.sn-f1-table .rec,
.sn-f1-table .v2,
.sn-f1-table .v3,
.sn-f1-modal-table .v2,
.sn-f1-modal-table .v3 {
  color: rgba(223, 234, 248, 0.6);
  font-size: 0.78rem;
}

.sn-f1-table .td-total,
.sn-f1-table .td-puntaje,
.sn-f1-modal-table .td-total,
.sn-f1-modal-table .td-puntaje {
  font-weight: 800;
}

.sn-f1-table .td-total,
.sn-f1-modal-table .td-total {
  color: #cab8ff;
}

.sn-f1-table .td-total .v1,
.sn-f1-modal-table .td-total .v1 {
  color: #cab8ff;
}

.sn-f1-table .td-total .v2,
.sn-f1-table .td-total .v3,
.sn-f1-modal-table .td-total .v2,
.sn-f1-modal-table .td-total .v3 {
  color: #76efb5;
}

.sn-f1-table .td-pos,
.sn-f1-modal-table .td-pos {
  color: #8fd4ff;
  font-weight: 800;
}

.sn-f1-lastupdate {
  color: rgba(223, 234, 248, 0.58);
  font-size: 0.84rem;
}

.sn-f1-modal__dialog {
  width: min(1480px, calc(100vw - 28px));
  max-width: min(1480px, calc(100vw - 28px));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(155deg, rgba(7, 12, 22, 0.98), rgba(10, 16, 28, 0.99));
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.56),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sn-f1-modal .sn-modal__header {
  padding: 18px 22px;
  background:
    radial-gradient(circle at top right, rgba(201, 13, 5, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(13, 18, 31, 0.98), rgba(9, 14, 24, 0.98));
}

.sn-f1-modal .sn-modal__title {
  color: #f7fbff;
  font-size: 1.18rem;
  font-weight: 800;
}

.sn-f1-modal .sn-modal__title i {
  color: #c90d05;
}

.sn-f1-modal .sn-modal__close {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(201, 13, 5, 0.28);
  background: linear-gradient(180deg, rgba(54, 10, 8, 0.98), rgba(27, 6, 7, 0.98));
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.sn-f1-modal .sn-modal__close:hover,
.sn-f1-modal .sn-modal__close:focus {
  background: linear-gradient(135deg, #c90d05, #790802);
  border-color: rgba(223, 51, 41, 0.95);
  color: #fff;
  transform: none;
}

.sn-ranking-toolbar--modal {
  padding: 14px 20px 0;
}

.sn-ranking-toolbar--modal .sn-ranking-search {
  width: 100%;
  min-width: 0;
  background: linear-gradient(180deg, rgba(2, 4, 8, 0.98), rgba(7, 10, 17, 0.98));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sn-ranking-toolbar--modal .sn-ranking-search__input {
  color: #f7fbff;
  background: transparent !important;
}

.sn-ranking-toolbar--modal .sn-ranking-search__input::placeholder {
  color: rgba(223, 234, 248, 0.34);
}

.sn-f1-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(201, 13, 5, 0.78);
  background: linear-gradient(135deg, #c90d05, #790802);
  color: #fff !important;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(201, 13, 5, 0.2);
}

.sn-f1-detail:hover,
.sn-f1-detail:focus {
  border-color: rgba(223, 51, 41, 0.95);
  background: linear-gradient(135deg, #df2117, #8d0b05);
  color: #fff !important;
}

.sn-f1-detail i {
  color: currentColor;
}

.sn-f1-track-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 800;
  color: #fff;
}

.sn-f1-track-head .flag {
  width: 20px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(7, 12, 22, 0.28);
  flex: 0 0 auto;
}

.sn-f1-record-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(145deg, rgba(17, 24, 38, 0.94), rgba(10, 15, 25, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sn-ranking-pilot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sn-ranking-pilot__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sn-ranking-pilot__img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sn-ranking-pilot__meta {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.sn-f1-record-card .rec {
  color: rgba(223, 234, 248, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
}

.sn-f1-record-card .sn-pilot-link i,
.sn-f1-modal-table .sn-pilot-link i {
  color: #c90d05;
  opacity: 1;
}

.sn-f1-modal-table td:nth-child(2) {
  min-width: 290px;
}

.sn-f1-modal .sn-modal__body {
  padding-top: 16px;
}

.sn-f1-modal-table {
  width: 100%;
  min-width: 1180px;
}

.sn-f1-modal-table .sn-pilot-meta-main,
.sn-f1-record-card .sn-pilot-meta-main {
  gap: 10px;
}

.sn-f1-modal-table .sn-pilot-flag,
.sn-f1-record-card .sn-pilot-flag {
  margin-right: 2px;
}

.sn-iracing-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.sn-iracing-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 12px;
  border: 0;
  background: rgba(6, 10, 18, 0.96);
  color: rgba(225, 233, 247, 0.62);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sn-iracing-table thead th i {
  color: rgba(255, 255, 255, 0.55);
}

.sn-iracing-table tbody td {
  padding: 12px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #edf3ff;
  vertical-align: middle;
  background: transparent;
}

.sn-iracing-row {
  transition: background 0.2s ease;
}

.sn-iracing-row:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.sn-iracing-row.highlight td {
  background: rgba(201, 13, 5, 0.08);
}

.sn-iracing-row td:first-child,
.sn-iracing-table thead th:first-child {
  padding-left: 16px;
}

.sn-iracing-row td:last-child,
.sn-iracing-table thead th:last-child {
  padding-right: 16px;
}

.sn-iracing-row td:nth-child(1) {
  width: 70px;
  font-weight: 800;
  color: #fff;
}

.sn-iracing-row td:nth-child(2) {
  width: 72px;
}

.sn-iracing-row td:nth-child(4),
.sn-iracing-row td:nth-child(5) {
  white-space: nowrap;
  color: rgba(223, 234, 248, 0.74);
  font-size: 0.88rem;
}

.sn-iracing-row td:nth-child(6),
.sn-iracing-row td:nth-child(7),
.sn-iracing-row td:nth-child(8),
.sn-iracing-row td:nth-child(10) {
  font-weight: 700;
}

.sn-iracing-row .sn-avatar,
.sn-user-avatar .sn-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.sn-iracing-row .sn-row-toggle {
  display: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #edf3ff;
  cursor: pointer;
  transition: var(--sn-transition-fast);
}

.sn-iracing-row .sn-row-toggle:hover,
.sn-iracing-row .sn-row-toggle:focus {
  background: rgba(255, 255, 255, 0.08);
}

.sn-iracing-row.is-expanded .sn-row-toggle i {
  transform: rotate(180deg);
}

.sn-iracing-row .sn-row-toggle i {
  transition: transform 0.2s ease;
}

.sn-iracing-row-details {
  display: none;
}

.sn-iracing-row.is-expanded + .sn-iracing-row-details {
  display: table-row;
}

.sn-iracing-row-details td {
  padding: 0 16px 16px;
  background: rgba(255, 255, 255, 0.02);
}

.sn-row-details-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sn-row-details-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(237, 243, 255, 0.82);
  font-size: 0.86rem;
}

.sn-row-details-item i {
  color: #ff8a82;
}

.sn-row-details-item span {
  font-weight: 700;
  color: #fff;
}

.sn-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(18, 27, 44, 0.95), rgba(8, 13, 22, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sn-user-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sn-user-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #213048, #121b2a);
  border: 1px solid rgba(143, 170, 210, 0.18);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(3, 8, 18, 0.28);
}

.sn-user-meta {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.sn-user-name {
  min-width: 0;
}

.sn-user-name .sn-pilot-meta-main,
.sn-ir-pilot-stack .sn-pilot-meta-main {
  gap: 10px;
}

.sn-user-name .sn-pilot-flag,
.sn-ir-pilot-stack .sn-pilot-flag {
  margin-right: 2px;
}

.sn-user-name .sn-pilot-link i,
.sn-ir-pilot-stack .sn-pilot-link i {
  color: #c90d05;
  opacity: 1;
}

.sn-user-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: rgba(223, 234, 248, 0.72);
  font-size: 0.84rem;
}

.sn-user-sub .sn-pilot-flag,
.sn-ir-pilot-stack .sn-pilot-flag {
  flex: 0 0 auto;
}

.sn-user-card-right {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 10px;
}

.sn-user-stat {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sn-user-stat-label {
  margin-bottom: 6px;
  color: rgba(223, 234, 248, 0.64);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sn-user-stat-value {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.sn-col-irating {
  color: #8fd4ff;
}

.sn-col-safety {
  color: #7ff0b4;
}

.sn-licencia-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sn-loading-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  color: rgba(237, 243, 255, 0.72);
}

.sn-iracing-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.sn-pg-info {
  margin: 0;
  min-width: 140px;
  text-align: center;
  color: rgba(223, 234, 248, 0.68);
  font-size: 0.84rem;
  font-weight: 700;
}

.sn-iracing-pagination .sn-btn {
  min-width: 138px;
  min-height: 44px;
  border-radius: 14px;
}

.sn-iracing-pagination .sn-btn--outline {
  background: linear-gradient(135deg, #c90d05, #790802);
  border-color: rgba(201, 13, 5, 0.82);
  color: #fff;
  box-shadow: 0 12px 24px rgba(201, 13, 5, 0.24);
}

.sn-iracing-pagination .sn-btn--outline:hover,
.sn-iracing-pagination .sn-btn--outline:focus {
  background: linear-gradient(135deg, #df2117, #8d0b05);
  border-color: rgba(223, 51, 41, 0.95);
  color: #fff;
}

.sn-iracing-pagination .sn-btn:disabled,
.sn-iracing-pagination .sn-btn[disabled] {
  opacity: 0.48;
  filter: grayscale(0.18);
}

@media (max-width: 1180px) {
  .sn-user-card {
    grid-template-columns: 1fr;
  }

  .sn-user-card-right {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sn-row-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .sn-iracing-ranking {
    padding: 14px;
    border-radius: 20px;
  }

  .sn-iracing-title {
    font-size: clamp(1.15rem, 5.8vw, 1.45rem);
    line-height: 1.02;
  }

  .sn-iracing-subtitle {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .sn-iracing-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .sn-iracing-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .sn-iracing-toolbar {
    justify-content: stretch;
  }

  .sn-iracing-search {
    width: 100%;
    min-width: 0;
  }

  .sn-ranking-title {
    font-size: clamp(1.15rem, 5.8vw, 1.45rem);
    line-height: 1.02;
  }

  .sn-ranking-subtitle {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .sn-ranking-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .sn-ranking-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .sn-ranking-toolbar {
    justify-content: stretch;
  }

  .sn-ranking-search {
    width: 100%;
    min-width: 0;
  }

  .sn-user-card-left {
    flex-wrap: wrap;
  }

  .sn-user-card-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sn-f1-table {
    min-width: 0;
  }

  .sn-f1-table thead th:nth-child(5),
  .sn-f1-table thead th:nth-child(6),
  .sn-f1-table thead th:nth-child(8),
  .sn-f1-table thead th:nth-child(9),
  .sn-f1-table thead th:nth-child(10),
  .sn-f1-table tbody td:nth-child(5),
  .sn-f1-table tbody td:nth-child(6),
  .sn-f1-table tbody td:nth-child(8),
  .sn-f1-table tbody td:nth-child(9),
  .sn-f1-table tbody td:nth-child(10) {
    display: none;
  }

  .sn-f1-modal__dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .sn-f1-modal-table {
    min-width: 0;
  }

  .sn-f1-modal-table thead th:nth-child(1),
  .sn-f1-modal-table thead th:nth-child(2),
  .sn-f1-modal-table thead th:nth-child(6),
  .sn-f1-modal-table thead th:nth-child(7),
  .sn-f1-modal-table thead th:nth-child(9),
  .sn-f1-modal-table thead th:nth-child(10),
  .sn-f1-modal-table tbody td:nth-child(1),
  .sn-f1-modal-table tbody td:nth-child(2),
  .sn-f1-modal-table tbody td:nth-child(6),
  .sn-f1-modal-table tbody td:nth-child(7),
  .sn-f1-modal-table tbody td:nth-child(9),
  .sn-f1-modal-table tbody td:nth-child(10) {
    display: none;
  }
}

@media (max-width: 640px) {
  .sn-ranking-header {
    gap: 8px;
    margin-bottom: 12px;
  }

  .sn-ranking-eyebrow {
    font-size: 0.68rem;
    padding: 5px 10px;
  }

  .sn-ranking-table {
    min-width: 820px;
  }

  .sn-f1-modal__dialog {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 18px;
  }

  .sn-ranking-toolbar--modal {
    padding: 12px 12px 0;
  }

  .sn-f1-modal .sn-modal__header {
    padding: 14px 14px 12px;
  }

  .sn-f1-modal .sn-modal__title {
    font-size: 0.98rem;
    line-height: 1.2;
    padding-right: 10px;
  }

  .sn-f1-modal .sn-modal__close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .sn-f1-modal .sn-modal__body {
    padding: 12px;
  }

  .sn-f1-modal-table thead th:nth-child(3),
  .sn-f1-modal-table thead th:nth-child(4),
  .sn-f1-modal-table thead th:nth-child(5),
  .sn-f1-modal-table thead th:nth-child(8),
  .sn-f1-modal-table tbody td:nth-child(3),
  .sn-f1-modal-table tbody td:nth-child(4),
  .sn-f1-modal-table tbody td:nth-child(5),
  .sn-f1-modal-table tbody td:nth-child(8) {
    padding-left: 8px;
    padding-right: 8px;
  }

  .sn-f1-track-head {
    gap: 8px;
    font-size: 0.92rem;
  }

  .sn-f1-record-card {
    padding: 10px;
    border-radius: 14px;
  }

  .sn-ranking-pilot {
    gap: 10px;
  }

  .sn-ranking-pilot__img {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .sn-iracing-heading {
    gap: 8px;
    margin-bottom: 12px;
  }

  .sn-iracing-eyebrow {
    font-size: 0.68rem;
    padding: 5px 10px;
  }

  .sn-iracing-user-pos {
    padding: 12px;
    gap: 10px;
  }

  .sn-iracing-user-pos h4 {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
  }

  .sn-iracing-table {
    min-width: 0;
  }

  .sn-iracing-table thead {
    display: none;
  }

  .sn-iracing-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    margin: 10px 10px 0;
    background: linear-gradient(150deg, rgba(18, 10, 14, 0.92), rgba(11, 16, 28, 0.96));
  }

  .sn-iracing-row td {
    display: block;
    padding: 0;
    border: 0;
  }

  .sn-iracing-row td:nth-child(1) {
    grid-row: 1 / span 2;
    align-self: start;
    width: auto;
    color: #ffb2ad;
  }

  .sn-iracing-row td:nth-child(2) {
    grid-row: 1 / span 2;
    align-self: start;
    width: auto;
  }

  .sn-iracing-row td:nth-child(4),
  .sn-iracing-row td:nth-child(5),
  .sn-iracing-row td:nth-child(8),
  .sn-iracing-row td:nth-child(9),
  .sn-iracing-row td:nth-child(10) {
    display: none;
  }

  .sn-iracing-row td:nth-child(3) {
    min-width: 0;
  }

  .sn-iracing-row td:nth-child(6),
  .sn-iracing-row td:nth-child(7) {
    align-self: center;
    font-size: 0.92rem;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
  }

  .sn-iracing-row td:nth-child(6)::before {
    content: "iRating";
    color: rgba(223, 234, 248, 0.58);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .sn-iracing-row td:nth-child(7)::before {
    content: "Safety";
    color: rgba(223, 234, 248, 0.58);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .sn-iracing-row .sn-row-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sn-iracing-row-details {
    display: none !important;
  }

  .sn-iracing-row.is-expanded + .sn-iracing-row-details {
    display: block !important;
  }

  .sn-iracing-row-details td {
    display: block;
    padding: 0 12px 12px;
    border: 0;
  }

  .sn-row-details-grid,
  .sn-user-card-right {
    grid-template-columns: 1fr;
  }

  .sn-user-card,
  .sn-iracing-user-pos {
    padding: 12px;
  }

  .sn-user-card-left {
    align-items: flex-start;
    gap: 10px;
  }

  .sn-user-pos-badge {
    min-width: 52px;
    min-height: 38px;
    font-size: 0.88rem;
    padding: 0 10px;
  }

  .sn-user-avatar .sn-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .sn-user-card-right {
    gap: 8px;
  }

  .sn-user-stat {
    padding: 10px;
  }

  .sn-user-stat-label {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  .sn-user-stat-value {
    font-size: 0.92rem;
  }

  .sn-iracing-pagination {
    flex-wrap: wrap;
  }

  .sn-pg-info {
    order: -1;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .sn-f1-modal__dialog {
    width: min(100vw - 12px, 100%);
    max-height: 92vh;
    border-radius: 18px;
  }

  .sn-f1-modal .sn-modal__header,
  .sn-f1-modal .sn-modal__body {
    padding-inline: 14px;
  }

  .sn-ranking-toolbar--modal {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sn-f1-record-card {
    padding: 12px;
  }

  .sn-f1-record-card .sn-pilot-link span,
  .sn-f1-record-card .sn-pilot-meta-main,
  .sn-user-card-left,
  .sn-user-card-right {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
