.profile-float {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 1.25rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.profile-float.fixed {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
}

.profile-page {
  padding-top: 34px;
  padding-bottom: 50px;
}

.profile-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(15,23,42,.92));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 18px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}

.profile-id,
.status-msg {
  color: var(--text-muted);
  font-size: .9rem;
}

.profile-edit label,
.avatar-label {
  display: block;
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 800;
  margin: 12px 0 8px;
}

.profile-edit input {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: white;
  font: inherit;
  font-weight: 700;
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.avatar-btn {
  min-height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 2px solid transparent;
  font-size: 1.35rem;
}

.avatar-btn.selected {
  border-color: var(--primary);
  background: rgba(99,102,241,.22);
}

.summary-grid,
.history-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.summary-item,
.history-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 13px;
}

.summary-item strong,
.history-item strong {
  color: var(--gold);
}

.ranking-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}

.ranking-modal.show {
  display: flex;
}

.ranking-modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface, #1e293b);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  color: white;
}

.ranking-modal-card h2 {
  margin-bottom: 8px;
}

.ranking-modal-card p {
  color: var(--text-muted, #94a3b8);
  margin-bottom: 12px;
}

.ranking-modal-card label {
  display: block;
  color: var(--text-muted, #94a3b8);
  font-size: .8rem;
  font-weight: 900;
  margin: 12px 0 7px;
}

.ranking-modal-card input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: white;
  outline: none;
  font: inherit;
  font-weight: 700;
}

.ranking-status {
  min-height: 20px;
  font-size: .85rem;
  color: var(--gold, #fbbf24) !important;
}

@media (max-width: 720px) {
  .profile-float.in-nav {
    margin-left: 6px;
  }

  .avatar-options {
    grid-template-columns: repeat(4, 1fr);
  }
}
