.ranking-layout {
  align-items: start;
}

.hf-sidebar-left .hf-user-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hf-sidebar-left .hf-user-action-btn {
  width: 100%;
}

.ranking-content {
  padding: 16px;
}

.ranking-header-line {
  margin-bottom: 16px;
}

.ranking-header-line h2 {
  margin: 0;
  color: #f8f2dc;
}

.rankingFilterBtn {
  transition:
    transform 0.08s ease,
    filter 0.08s ease,
    background 0.08s ease;
}

.rankingFilterBtn:hover {
  filter: brightness(1.05);
}

.rankingFilterBtn.is-active {
  color: #f8f8ff;
  background: linear-gradient(to bottom, #3a6ad6 0%, #244ba0 100%);
  border-left-color: #7ea1ff;
  border-top-color: #7ea1ff;
  border-right-color: #173063;
  border-bottom-color: #173063;
}

@media (max-width: 768px) {
  .hf-sidebar-left .hf-user-actions {
    gap: 8px;
  }

  .ranking-content {
    padding: 12px;
  }
}

/* ========================================
   ESTILOS DO RANKING (integrados e ajustados)
   ======================================== */

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(
    to right,
    rgba(18, 67, 20, 0.78),
    rgba(10, 45, 14, 0.58)
  );
  border: 2px solid rgba(241, 219, 165, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.12);
}

.ranking-card.is-top-1 {
  background: linear-gradient(
    to right,
    rgba(104, 81, 18, 0.86),
    rgba(58, 38, 7, 0.72)
  );
  border-color: #f1d47a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 179, 0.22),
    0 0 18px rgba(241, 212, 122, 0.08);
}

.ranking-card.is-top-2 {
  background: linear-gradient(
    to right,
    rgba(105, 109, 117, 0.8),
    rgba(50, 54, 60, 0.68)
  );
  border-color: #d6d9de;
  box-shadow:
    inset 0 0 0 1px rgba(245, 247, 250, 0.12),
    0 0 18px rgba(214, 217, 222, 0.06);
}

.ranking-card.is-top-3 {
  background: linear-gradient(
    to right,
    rgba(123, 76, 34, 0.82),
    rgba(66, 37, 14, 0.68)
  );
  border-color: #c78b52;
  box-shadow:
    inset 0 0 0 1px rgba(255, 221, 195, 0.12),
    0 0 18px rgba(199, 139, 82, 0.06);
}

.ranking-position {
  font-size: 1.45rem;
  font-weight: 900;
  color: #f1dba5;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
  min-width: 42px;
}

.ranking-card.is-top-1 .ranking-position {
  color: #ffe78a;
}

.ranking-card.is-top-2 .ranking-position {
  color: #eef1f5;
}

.ranking-card.is-top-3 .ranking-position {
  color: #e6a36a;
}

.ranking-avatar {
  width: 54px;
  height: 54px;
  background: #18331a;
  border: 2px solid rgba(241, 219, 165, 0.35);
  flex-shrink: 0;
}

.ranking-card.is-top-1 .ranking-avatar {
  border-color: #f1d47a;
}

.ranking-card.is-top-2 .ranking-avatar {
  border-color: #d6d9de;
}

.ranking-card.is-top-3 .ranking-avatar {
  border-color: #c78b52;
}

.ranking-user-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ranking-user-name {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
  color: #fff6d6;
  word-break: break-word;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.ranking-user-meta {
  color: #f0e8c6;
  font-size: 0.82rem;
  word-break: break-word;
  opacity: 0.95;
}

.ranking-score-box {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  margin-left: auto;
}

.ranking-score-label {
  color: #e4d7ac;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ranking-score-value {
  font-size: 1.18rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  word-break: break-word;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.ranking-card.is-top-1 .ranking-score-value {
  color: #ffe78a;
}

.ranking-card.is-top-2 .ranking-score-value {
  color: #eef1f5;
}

.ranking-card.is-top-3 .ranking-score-value {
  color: #e6a36a;
}

.ranking-empty {
  padding: 16px;
  background: rgba(13, 33, 13, 0.2);
  border: 2px dashed rgba(241, 219, 165, 0.25);
  color: #d9d1a9;
}

/* modo compacto (se usado com ?compact=1) */
.ranking-compact-mode .ranking-list {
  gap: 8px;
}

.ranking-card.is-compact {
  display: grid;
  grid-template-columns: 34px 42px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 56px;
  padding: 8px 10px;
  align-items: center;
}

.ranking-card.is-compact .ranking-position {
  font-size: 1rem;
  text-align: left;
}

.ranking-card.is-compact .ranking-avatar {
  width: 38px;
  height: 38px;
}

.ranking-card.is-compact .ranking-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ranking-card.is-compact .ranking-user-name {
  font-size: 0.85rem;
  line-height: 1.1;
}

.ranking-card.is-compact .ranking-score-box {
  text-align: right;
  align-items: flex-end;
}

.ranking-card.is-compact .ranking-score-value {
  font-size: 0.86rem;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .ranking-card {
    gap: 10px;
    padding: 12px;
  }

  .ranking-score-box {
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .ranking-card {
    gap: 10px;
    padding: 12px;
  }

  .ranking-user-name {
    font-size: 1rem;
  }

  .ranking-score-value {
    font-size: 1.05rem;
  }
}
