#ranking-mgm {
  margin-bottom: 6rem;
}

#ranking-mgm.cadastro-realizado {
  margin-bottom: 0;
  padding-bottom: 6rem;
  padding-top: 7rem;
  background: linear-gradient(to top, #070707 85%, transparent);
}

.div-conteudo section.conteudo.container {
  padding-bottom: 20px;
}

@media (max-width: 1199.98px) {
  #ranking-mgm {
    margin: 4.5rem 0 2rem;
  }

  .div-conteudo {
    padding-bottom: 0;
  }

  .div-conteudo section.conteudo.container {
    padding-bottom: 0;
  }
}

@media (min-width: 1200px) {
  #ranking-mgm .container {
    padding-bottom: 0 !important;
  }
}

@media (max-width: 575.98px) {
  #ranking-mgm img {
    width: 100%;
  }
}

#ranking-mgm h2 {
  text-wrap: balance;
}

#ranking-mgm h3 {
  font-family: 'Margem-regular', sans-serif;
  font-size: 24px;
  color: #fff;
}

#ranking-mgm p,
#ranking-mgm li {
  font-family: 'Margem-regular', sans-serif;
  font-size: 20px;
  line-height: 135%;
  letter-spacing: -1px;
  color: #fff;
}

#ranking-mgm ul {
  list-style: none;
  padding: 0;
}

#ranking-mgm button {
  font-family: 'Margem-medium', sans-serif;
  border-radius: 12px;
  margin: 0;
}

a.mgm-link,
#ranking-mgm a,
#ranking-mgm a:focus {
  font-family: 'Margem-regular', sans-serif;
  font-size: 16px;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
}

#ranking-mgm .text {
  width: 100%;
  max-width: 610px;
}

#ranking-mgm img + span,
#ranking-mgm .top-10 + span {
  font-family: 'Margem-medium', sans-serif;
  font-size: 12px;
  color: #6B778C;
}

#ranking-mgm .top-10 + span {
  font-family: 'Margem-regular', sans-serif;
  color: #fff;
}

#ranking-mgm .loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 367px;
}

#ranking-mgm .top-10 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, 1fr);
  grid-auto-flow: column;
  gap: 8px;
  min-height: 367px;
}

@media (max-width: 499.98px) {
  #ranking-mgm .top-10 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(10, 1fr);
  }
}

#ranking-mgm .top-10 .item > div {
  background: #1B1E2D;
  border: 1px solid #42526E;
  padding: 12px 16px;
  border-radius: 8px;
}

#ranking-mgm .top-10 .item span {
  font-family: 'Margem-bold', sans-serif;
  color: #fff;
}

#ranking-mgm .top-10 .item > div > span {
  text-align: center;
  width: 32px;
  height: 24px;
  border-radius: 50%;
  background: #001C52;
  margin-right: 10px;
}

#ranking-mgm .top-10 .item span.name {
  font-size: 20px;
  line-height: 100%;

  white-space: nowrap;      /* Não quebra a linha */
  overflow: hidden;         /* Esconde o excedente */
  text-overflow: ellipsis;  /* Adiciona "..." */
  width: 150px;             /* Defina um limite */
}

@media (max-width: 499.98px) {
  #ranking-mgm .top-10 .item span.name {
    white-space: normal;
    overflow: unset;
    text-overflow: unset;
    width: fit-content;
  }
}

#ranking-mgm .top-10 .item span.code {
  font-family: 'Margem-regular', sans-serif;
  font-size: 14px;
  color: #505F79;
}

/* Estilos para input e botão de código de referência */
.referral-code-container {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 434px;
}

.referral-code-input {
  flex: 1;
  background-color: #1B1E2D;
  border: 1px solid #42526E;
  border-radius: 8px;
  padding: 12px 16px;
  color: #C1C7D0;
  font-family: 'Margem-regular', sans-serif;
  font-size: 14px;
  outline: none;
  min-width: 70%;
  width: 100%;
  text-align: center;
  text-transform: uppercase;

  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.referral-code-input:focus {
  border-color: #DD303E;
}

.referral-code-input::placeholder {
  color: #6B778C;
}

.btn-copy-referral-code {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid #DD303E;
  border-radius: 8px;
  padding: 12px 24px;
  color: #fff;
  font-family: 'Margem-medium', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  min-width: 120px;
}

.btn-copy-referral-code:hover {
  background-color: rgba(221, 48, 62, 0.1);
  border-color: #DD303E;
  color: #fff;
}

.btn-copy-referral-code:active {
  transform: scale(0.98);
}

.btn-copy-referral-code.copied {
  background-color: rgba(221, 48, 62, 0.2);
  border-color: #DD303E;
}

@media (max-width: 992px) {
  .btn-copy-referral-code {
    min-width: fit-content;
  }
}

@media (max-width: 767.98px) {
  .referral-code-container {
    width: 100%;
    max-width: 100%;
  }

  .referral-code-container > div {
    width: 100%;
    gap: 12px !important;
  }

  .referral-code-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    text-align: center;
    border-radius: 8px;
  }

  .btn-copy-referral-code {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    border-radius: 8px;
    min-height: 48px;
  }

 #invite-friends-btn.btn-red {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .referral-code-container {
    width: 100%;
    padding: 0;
  }

  .referral-code-container > div {
    width: 100%;
    gap: 10px !important;
  }

  .referral-code-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    text-align: center;
    letter-spacing: 0.5px;
  }

  .btn-copy-referral-code {
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
    min-height: 46px;
  }
}

/* Estilo para o botão CONVIDAR AMIGOS NO WHATSAPP */
#ranking-mgm .btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 15px 20px;
  background-color: #DD303E;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Margem-medium', sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#ranking-mgm .btn-red:hover {
  background-color: #c02a36;
}

#ranking-mgm .btn-red i {
  font-size: 16px;
  color: #fff;
}

@media (max-width: 375px) {
  #ranking-mgm .btn-red{
    font-size: 14px;
  }
}

#ranking-mgm .modal * {
  color: #070707;
  font-size: 18px;
}

#ranking-mgm .modal h3 {
  font-family: 'Margem-bold', sans-serif;
  font-size: 18px;
}

#ranking-mgm .modal table * {
  font-family: 'Margem-regular', sans-serif;
  font-size: 16px;
}

#ranking-mgm .modal table td {
  padding-right: 18px;
}

#ranking-mgm .modal button {
  color: #fff;
}

#ranking-mgm .modal .modal-header h5 {
  font-family: 'Margem-bold', sans-serif;
  font-size: 20px;
}

#ranking-mgm .modal.open {
  z-index: 9999;
}
