:root {
  --profile-bg: #060501;
  --profile-card: #181f20;
  --profile-card-dark: #14191a;
  --profile-border: #243533;
  --profile-muted: #9ca3af;
  --profile-text: #f8fafc;
  --profile-primary: #ee2445;
  --profile-primary-hover: #c81e3a;
  --profile-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.profile-page {
  min-height: 100vh;
  background: var(--profile-bg);
  color: var(--profile-text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  padding: clamp(18px, 3vw, 32px) clamp(16px, 4vw, 40px) 72px;
}

body.modal-open {
  overflow: hidden;
}

.profile-page ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.profile-page ::-webkit-scrollbar-track {
  background: var(--profile-bg);
}

.profile-page ::-webkit-scrollbar-thumb {
  background: var(--profile-border);
  border-radius: 4px;
}

.profile-page ::-webkit-scrollbar-thumb:hover {
  background: var(--profile-primary);
}

.profile-cover {
  position: relative;
  height: clamp(220px, 30vw, 350px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--profile-border);
  box-shadow: var(--profile-shadow);
}

.profile-cover__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.profile-cover__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 5, 1, 0.2), rgba(6, 5, 1, 0.85));
}

.profile-cover__action {
  position: absolute;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.profile-cover__action_ {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background: rgba(0, 0, 0, 0.55); 
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 8px 12px;
	border-radius: 8px;
	text-decoration: none;
}

.profile-cover__action_:hover {
	cursor: pointer;
	background: rgba(0, 0, 0, 0.7);
}

.profile-cover__action_pending {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background: rgba(50, 50, 50, 0.55); 
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 8px 12px;
	border-radius: 8px;
	text-decoration: none;
}

.profile-cover__actions {
	position: absolute;
	right: clamp(16px, 3vw, 28px);
	top: clamp(16px, 3vw, 28px);
	display: flex;
	flex-direction: column;
	align-items: end;
	gap: 12px;
	border-radius: 8px;
	text-decoration: none;
}

.profile-cover__action:hover {
  background: rgba(0, 0, 0, 0.7);
}

.profile-cover__action_invite {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background: rgba(var(--primary-accent-rgb), 0.55);
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 8px 12px;
	border-radius: 8px;
	text-decoration: none;
}

.profile-cover__action_invite:hover {
	background: rgba(var(--primary-accent-hover-rgb), 0.55);
	cursor: pointer;
}

.profile-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.profile-avatar {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 16px;
  border: 4px solid #243533;
  background: #0b0f10;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.profile-avatar:hover img {
  transform: scale(1.03);
}

.profile-status-dot {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--profile-card);
}

.profile-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
}

.profile-status-dot.offline {
  background: #64748b;
}

.profile-summary__info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-summary__info h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
}

.profile-role {
  background: rgba(238, 36, 69, 0.16);
  color: var(--profile-primary);
  border: 1px solid rgba(238, 36, 69, 0.3);
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.profile-status {
  font-size: 0.85rem;
  color: var(--profile-muted);
}

.profile-layout {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 32px);
}

@media (max-width: 1100px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

.profile-sidebar,
.profile-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card {
  background: #171f20;
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  box-shadow: var(--profile-shadow);
  padding: 20px;
}

.profile-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-card__header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-card__header p {
  margin: 6px 0 0;
  color: var(--profile-muted);
  font-size: 0.8rem;
}

.profile-card__header--split {
  align-items: flex-start;
}

.profile-card__title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.profile-card__title .material-symbols-outlined {
  color: var(--profile-primary);
  font-size: 1.3rem;
  margin-top: 2px;
}

.profile-card__title h2 {
  text-transform: none;
  letter-spacing: 0.02em;
}

.profile-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-primary,
.btn-secondary,
.btn-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--profile-primary), #ff6b6b);
  color: #fff;
  box-shadow: 0 12px 20px rgba(238, 36, 69, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: #0b0f10;
  color: #fff;
  border-color: var(--profile-border);
}

.btn-secondary:hover {
  border-color: var(--profile-primary);
}

.btn-muted {
  background: #0b0f10;
  color: var(--profile-muted);
  border-color: transparent;
}

.btn-muted:hover {
  color: #fff;
  border-color: var(--profile-border);
}

.btn-muted:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-detail {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.profile-detail:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-detail dt {
  color: var(--profile-muted);
  font-weight: 600;
}

.profile-detail dd {
  margin: 0;
  text-align: right;
}

.profile-location-flag {
  margin-right: 6px;
  font-size: 1rem;
  vertical-align: -1px;
}

.profile-detail dd a {
  color: var(--profile-primary);
  text-decoration: none;
}

.profile-detail dd a:hover {
  text-decoration: underline;
}

.profile-detail--reputation {
  flex-direction: column;
  align-items: flex-start;
}

.rep-meter {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.rep-meter__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--profile-primary), #ff6b6b);
}

.rep-meter__count {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--profile-muted);
}

.profile-detail--reputation dd {
  width: 100%;
  text-align: left;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: #060501;
  border: 1px solid var(--profile-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 14px;
}

.stat-card__value {
  font-size: 1.6rem;
  font-weight: 800;
}

.stat-card__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--profile-muted);
  margin-top: 2px;
}

.stat-card--accent .stat-card__value {
  color: var(--profile-primary);
}

.stat-card--accent .stat-card__label {
  color: var(--profile-primary);
}

.stack-list {
  display: grid;
  gap: 12px;
}

.stack-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--profile-border);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
}

.stack-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.stack-avatar {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--profile-border);
  background: #0b0f10;
}

.stack-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-label {
  display: block;
  color: var(--profile-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.stack-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.stack-pill {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 4px 8px;
  border-radius: 999px;
}

.profile-count {
  font-size: 0.85rem;
  color: var(--profile-muted);
}

.friend-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.friend-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--profile-muted);
  font-size: 0.75rem;
}

.friend-chip__avatar {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: 1px solid var(--profile-border);
  background: #0b0f10;
  overflow: hidden;
}

.friend-chip__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friend-chip:hover {
  color: #fff;
}

.profile-empty {
  color: var(--profile-muted);
  font-size: 0.85rem;
  margin: 0;
}

.profile-card--activity {
  padding: 0;
  overflow: hidden;
}

.profile-card--activity .profile-card__header {
  padding: 20px 20px 0;
}

.activity-tabs {
  display: flex;
  gap: 0;
  padding: 0 8px;
  border-bottom: 1px solid var(--profile-border);
  background: #14191a;
}

.activity-tab {
  background: transparent;
  border: none;
  color: var(--profile-muted);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 16px 12px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  flex: 1;
  text-align: center;
}

.activity-tab.active {
  color: #fff;
  border-color: var(--profile-primary);
  background: rgba(255, 255, 255, 0.02);
}

.activity-tab:hover {
  color: #fff;
}

.recent-activity {
  max-height: 480px;
  overflow-y: auto;
  padding: 20px;
}

.activity-entry {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  line-height: 1.4;
}

.activity-entry:last-child {
  border-bottom: none;
}

.activity-entry__icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(238, 36, 69, 0.35);
  background: rgba(238, 36, 69, 0.1);
  color: var(--profile-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-entry__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-entry__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.activity-entry__title {
  margin: 0;
  color: #fff;
  font-weight: 600;
  line-height: 1.5;
}

.activity-entry__link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.activity-entry__link:hover {
  text-decoration: underline;
}

.activity-entry__user {
  color: var(--profile-primary);
  font-weight: 700;
  text-decoration: none;
}

.activity-entry__user:hover {
  text-decoration: underline;
}

.timestamp {
  display: block;
  color: var(--profile-muted);
  font-size: 0.75rem;
  margin: 0;
  white-space: nowrap;
}

.activity-match {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #060501;
  border: 1px solid var(--profile-border);
  border-radius: 10px;
  padding: 10px 14px;
}

.activity-team {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.activity-team__logo {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--profile-border);
  overflow: hidden;
  background: #101414;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.activity-team__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-team__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.activity-vs {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--profile-muted);
  letter-spacing: 0.08em;
}

.activity-result {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.activity-result.result-win {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

.activity-result.result-loss {
  color: #ee2445;
  border-color: rgba(238, 36, 69, 0.4);
  background: rgba(238, 36, 69, 0.12);
}

.activity-result.result-tie {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.08);
}

.activity-reply {
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  color: var(--profile-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.profile-card--chart .chart-container {
  height: 320px;
  padding: 0 20px 20px;
}

.profile-card__meta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--profile-muted);
  background: #060501;
  border: 1px solid var(--profile-border);
  padding: 6px 12px;
  border-radius: 8px;
}

.tag {
	text-transform: none !important;
}

.hidden {
  display: none;
}

.friends-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2000;
}

.friends-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.friends-modal__backdrop {
  position: absolute;
  inset: 0;
}

.friends-modal__panel {
  position: relative;
  width: min(92vw, 520px);
  max-height: 80vh;
  background: var(--profile-card);
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  box-shadow: var(--profile-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.friends-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--profile-card-dark);
  border-bottom: 1px solid var(--profile-border);
}

.friends-modal__header h3 {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  background: transparent;
  border: none;
  color: var(--profile-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.friends-modal__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #0b0f10;
}

.friends-modal__search input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.friends-modal__list {
  overflow-y: auto;
  padding: 8px 12px;
}

.friends-modal__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
}

.friends-modal__item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.friends-modal__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.friends-modal__avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--profile-border);
  background: #0b0f10;
}

.friends-modal__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.friends-modal__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.friends-modal__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.friends-modal__status {
  font-size: 0.75rem;
  color: var(--profile-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.online {
  background: #22c55e;
}

.status-indicator.offline {
  background: #64748b;
}

.friends-modal__footer {
  padding: 12px 18px 18px;
  border-top: 1px solid var(--profile-border);
  background: var(--profile-card-dark);
}

.sensitive-reveal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.sensitive-reveal [data-sensitive-target] {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sensitive-reveal__button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--profile-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.sensitive-reveal__button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 720px) {
  .profile-detail {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-detail dd {
    text-align: left;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}
