:root {
  --qtube-accent-green: var(--qtube-color-green, #3d8f6a);
  --qtube-accent-gold: var(--qtube-color-gold, #c9a227);
  --qtube-accent-purple: var(--qtube-color-purple, #7c6aab);
  --qtube-accent-blue: var(--qtube-color-blue, #3d7ea6);
  --qtube-accent-orange: var(--qtube-color-orange, #c47a2c);
  --qtube-accent-red: var(--qtube-color-red, #c1121f);
}

.community-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--qtube-space-3);
  margin: 0 0 var(--qtube-space-4);
  padding: var(--qtube-space-3) 0;
  border-bottom: 1px solid var(--qtube-border);
}

.community-strip__stat {
  min-width: 6rem;
}

.community-strip__stat strong {
  display: block;
  font-size: 1.35rem;
  font-family: var(--qtube-font-ui);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--qtube-accent-gold);
}

.community-strip__stat span {
  color: var(--qtube-muted);
  font-size: 0.85rem;
}

.xp-bar {
  position: relative;
  height: 0.55rem;
  background: var(--qtube-surface-2);
  border: 1px solid var(--qtube-border);
  border-radius: var(--qtube-radius);
  overflow: hidden;
}

.xp-bar__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--qtube-accent-green), var(--qtube-accent-gold));
  transition: width 0.8s ease;
}

.achievement-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0.35rem 0.2rem 0;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--qtube-border);
  border-radius: 999px;
  background: var(--qtube-surface);
  color: var(--qtube-text);
  font-family: var(--qtube-font-ui, var(--qtube-font-body));
  font-size: var(--qtube-label-size, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.3;
}

.achievement-chip.is-reveal {
  animation: community-reveal 0.7s ease;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-list__item {
  padding: var(--qtube-space-2) 0;
  border-bottom: 1px solid var(--qtube-border);
}

.activity-list__item:last-child {
  border-bottom: 0;
}

.activity-list__title {
  margin: 0 0 0.2rem;
}

.activity-list__meta {
  color: var(--qtube-muted);
  font-size: 0.85rem;
}

/* Align legacy notification rows with activity-row language */
.notification-row.activity-row {
  display: grid;
  border-bottom: 0;
  border-left: 0;
  padding: 0.75rem 0.85rem;
  align-items: start;
}

.notification-row.activity-row.is-unread {
  border-left: 3px solid var(--qtube-accent-blue);
  padding-left: calc(0.85rem - 3px);
}

.notification-row {
  display: flex;
  gap: var(--qtube-space-3);
  align-items: flex-start;
  padding: var(--qtube-space-2) 0;
  border-bottom: 1px solid var(--qtube-border);
}

.notification-row.is-unread {
  border-left: 3px solid var(--qtube-accent-blue);
  padding-left: var(--qtube-space-2);
}

.notification-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  background: var(--qtube-accent-red);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
}

.community-empty {
  padding: var(--qtube-space-4) 0;
  color: var(--qtube-muted);
}

.community-empty a {
  color: var(--qtube-accent-gold);
}

.hall-table {
  width: 100%;
  border-collapse: collapse;
}

.hall-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hall-table th,
.hall-table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--qtube-border);
  white-space: nowrap;
}

.hall-table th {
  color: var(--qtube-muted);
  font-weight: 600;
}

.profile-widgets {
  display: grid;
  gap: var(--qtube-space-3);
  margin: 0 0 var(--qtube-space-4);
}

.profile-widgets__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--qtube-space-3);
  align-items: center;
}

.soft-pulse {
  animation: community-pulse 2.4s ease-in-out infinite;
}

.counter-animate[data-count] {
  font-variant-numeric: tabular-nums;
}

.token-hub-sections {
  display: grid;
  gap: var(--qtube-space-4);
  margin-top: var(--qtube-space-4);
}

.token-hub-sections h2 {
  margin-bottom: var(--qtube-space-2);
  font-size: 1.15rem;
}

@keyframes community-reveal {
  from {
    opacity: 0;
    transform: translateY(0.4rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes community-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xp-bar__fill,
  .achievement-chip.is-reveal,
  .soft-pulse,
  .counter-animate {
    animation: none !important;
    transition: none !important;
  }
}
