/**
 * ============================================================================
 * USER CARD - Consolidated Styles
 * ============================================================================
 *
 * Visi user-card variantu stiliai viename faile. Migracija is:
 *  - classique.css:2514-2952  -> SEKCIJA 1: sidebar variant (.user-info*)
 *  - user-card-tablet.css     -> SEKCIJA 2: tablet variant (.user-card--tablet)
 *  - classique.css:3058-3935  -> SEKCIJA 3: mobile-header variant (.game-header*)
 *  - _chain.css:828-1095      -> SEKCIJA 4: chain-sidebar variant (.chain-user-info*)
 *  - _chain.css:1100-1189     -> SEKCIJA 5a: chain-mobile-header (.chain-user-header*)
 *  - _chain.css:1267-1293     -> SEKCIJA 5b: chain-mobile-header responsive
 *
 * Svarbu:
 *  - @keyframes avatar-glow is _chain.css buvo pervadintas i chain-avatar-glow,
 *    kad nesikonfliktuotu su classique avatar-glow (skirtingos spalvos).
 *  - Likusios @keyframes (badge-gradient-shift, badge-pulse-*, pulse-glow,
 *    streak-pulse, chainFlow) perkeltos nepakeistos.
 *  - @keyframes scroll-left lieka classique.css (dalinamasi su .marquee kitur).
 */

/* =============================================================
 * SEKCIJA 1: SIDEBAR VARIANT
 * Desktop left sidebar (.user-info--sidebar-compact)
 * ============================================================= */

.user-info--sidebar-compact {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md);
	margin-bottom: var(--spacing-md);
}

/* Top Row: Position - Avatar - Level */
.user-info__top-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--spacing-md);
}

/* Animated Badge for Position and Level */
.user-info__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	position: relative;
	overflow: hidden;
	cursor: default;
}

.user-info__badge::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg,
			#667eea 0%,
			#764ba2 25%,
			#f093fb 50%,
			#f5576c 75%,
			#667eea 100%);
	background-size: 300% 300%;
	animation: badge-gradient-shift 4s ease infinite;
	border-radius: inherit;
}

.user-info__badge-number {
	position: relative;
	z-index: 1;
	font-size: 1.5rem;
	font-weight: 900;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	font-family: var(--font-display);
}

@keyframes badge-gradient-shift {
	0% {
		background-position: 0% 50%;
	}

	50% {
		background-position: 100% 50%;
	}

	100% {
		background-position: 0% 50%;
	}
}

/* Position badge - gold/amber tones */
.user-info__badge--position::before {
	background: linear-gradient(135deg,
			#f7931a 0%,
			#ffcd00 25%,
			#ffd700 50%,
			#daa520 75%,
			#f7931a 100%);
	background-size: 300% 300%;
	animation: badge-gradient-shift 3s ease infinite;
}

/* Level badge - purple/blue tones */
.user-info__badge--level::before {
	background: linear-gradient(135deg,
			#6366f1 0%,
			#8b5cf6 25%,
			#a855f7 50%,
			#7c3aed 75%,
			#6366f1 100%);
	background-size: 300% 300%;
	animation: badge-gradient-shift 3s ease infinite;
}

/* Position Tooltip */
.user-info__badge--position {
	overflow: visible;
}

.position-tooltip {
	position: absolute;
	top: calc(100% + 12px);
	left: 20px;
	transform: translateX(0);
	background: rgba(25, 28, 38, 0.95);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(247, 147, 26, 0.4);
	border-radius: 10px;
	padding: 12px 14px;
	min-width: 220px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(247, 147, 26, 0.15);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.position-tooltip::after {
	content: '';
	position: absolute;
	bottom: 100%;
	left: 16px;
	transform: translateX(0);
	border: 8px solid transparent;
	border-bottom-color: rgba(247, 147, 26, 0.4);
}

.user-info__badge--position:hover .position-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(0) translateY(4px);
}

.position-tooltip__title {
	margin: 0 0 8px 0;
	font-size: 0.85rem;
	color: var(--color-text-secondary);
	text-align: center;
}

.position-tooltip__title strong {
	color: #ffd700;
	font-size: 1.1rem;
}

.position-tooltip__ahead,
.position-tooltip__behind {
	margin: 6px 0;
	font-size: 0.8rem;
	color: var(--color-text-primary);
	line-height: 1.4;
}

.position-tooltip__ahead strong,
.position-tooltip__behind strong {
	color: #ffd700;
}

/* Level Tooltip */
.user-info__badge--level {
	overflow: visible;
}

.level-tooltip {
	position: absolute;
	top: calc(100% + 12px);
	right: 20px;
	transform: translateX(0);
	background: rgba(25, 28, 38, 0.95);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(139, 92, 246, 0.4);
	border-radius: 10px;
	padding: 12px 14px;
	min-width: 200px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.15);
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.level-tooltip::after {
	content: '';
	position: absolute;
	bottom: 100%;
	right: 16px;
	transform: translateX(0);
	border: 8px solid transparent;
	border-bottom-color: rgba(139, 92, 246, 0.4);
}

.user-info__badge--level:hover .level-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(0) translateY(4px);
}

.level-tooltip__title {
	margin: 0 0 8px 0;
	font-size: 0.85rem;
	color: var(--color-text-secondary);
	text-align: center;
}

.level-tooltip__title strong {
	color: #a855f7;
	font-size: 1.1rem;
}

.level-tooltip__description {
	margin: 0;
	font-size: 0.8rem;
	color: var(--color-text-primary);
	line-height: 1.4;
	text-align: center;
}

/* Stats Section */
.user-info__stats {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-xs);
}

.user-info__stat {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--spacing-xs) 0;
	border-bottom: 1px solid var(--color-border);
}

.user-info__stat:last-child {
	border-bottom: none;
}

.user-info__stat-label {
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
	font-weight: var(--font-weight-medium);
}

.user-info__stat-value {
	font-size: var(--font-size-md);
	font-weight: var(--font-weight-bold);
	color: var(--color-text-primary);
}

/* Sidebar Streak Display */
.user-info__streak {
	margin-top: var(--spacing-sm);
	padding: var(--spacing-sm);
	background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(239, 68, 68, 0.15) 100%);
	border: 1px solid rgba(251, 146, 60, 0.3);
	border-radius: var(--radius-md);
	display: flex;
	justify-content: center;
	align-items: center;
}

.user-info__streak-badge {
	display: flex;
	align-items: center;
	gap: var(--spacing-xs);
}

.user-info__streak-icon {
	font-size: 1.25rem;
	animation: streak-pulse 1.5s ease-in-out infinite;
}

.user-info__streak-label {
	font-size: var(--font-size-sm);
	color: var(--color-text-secondary);
	font-weight: var(--font-weight-medium);
}

.user-info__streak-number {
	font-size: var(--font-size-lg);
	font-weight: var(--font-weight-bold);
	color: var(--color-accent-gold);
	text-shadow: 0 0 10px rgba(251, 146, 60, 0.5);
}

/* Streak level styling */
.user-info__streak[data-streak-level="medium"] {
	background: linear-gradient(135deg, rgba(251, 146, 60, 0.2) 0%, rgba(249, 115, 22, 0.2) 100%);
	border-color: rgba(249, 115, 22, 0.4);
}

.user-info__streak[data-streak-level="high"] {
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
	border-color: rgba(239, 68, 68, 0.4);
}

.user-info__streak[data-streak-level="epic"] {
	background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
	border-color: rgba(168, 85, 247, 0.4);
}

.user-info__streak[data-streak-level="epic"] .user-info__streak-number {
	color: #a855f7;
	text-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
}

@keyframes streak-pulse {

	0%,
	100% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.1);
	}
}

/* Avatar Section with Marquee Username Overlay */
.user-info__avatar-wrapper {
	margin: 0;
	position: relative;
}

.user-info__avatar-container {
	position: relative;
	width: 80px;
	height: 80px;
}

.user-info__avatar {
	width: 100%;
	height: 100%;
	border-radius: var(--radius-lg);
	border: 3px solid var(--color-accent-gold);
	object-fit: cover;
	object-position: center;
	transition: box-shadow 0.3s ease;
	animation: avatar-glow 3s ease-in-out infinite;
}

.user-info__avatar:hover {
	box-shadow: 0 0 25px rgba(var(--color-accent-gold-rgb, 212, 175, 55), 0.6);
}

@keyframes avatar-glow {

	0%,
	100% {
		box-shadow: 0 0 10px rgba(var(--color-accent-gold-rgb, 212, 175, 55), 0.3);
	}

	50% {
		box-shadow: 0 0 20px rgba(var(--color-accent-gold-rgb, 212, 175, 55), 0.6);
	}
}

/* Username overlay on bottom of avatar - acts as marquee-container */
.user-info__avatar-username {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	background: linear-gradient(180deg, rgb(250 250 250 / 0%) 0%, rgb(78 80 83) 50%, rgb(0 0 0 / 86%) 100%);
	/* padding: 4px 0; */
	margin: 0;
	overflow: hidden;
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
	/* border: 2px solid #001a00; */
	/* border-top: 1px solid rgba(255, 200, 0, 0.3); */
	box-shadow: inset 0 0 20px rgba(255, 200, 0, 0.1);
}

/* Override font size for avatar marquee - uses standard .marquee classes */
.user-info__avatar-username .marquee p {
	font-size: 0.7rem;
	letter-spacing: 1px;
}

/* Pause marquee on hover */
.user-info__avatar-container:hover .marquee p {
	animation-play-state: paused;
}

/* =============================================================
 * SEKCIJA 2: TABLET VARIANT
 * Right sidebar 768px-1023px (.user-card--tablet)
 * ============================================================= */

.user-card--tablet {
  display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .user-card--tablet {
    display: block;
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(160deg,
      var(--color-bg-secondary) 0%,
      var(--color-bg-primary) 60%,
      var(--color-bg-tertiary, #16213e) 100%
    );
    border: 1px solid rgba(252, 211, 77, 0.25);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.5),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  /* Aukso linija virsuje */
  .user-card--tablet::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
      transparent,
      var(--color-accent-gold),
      transparent
    );
    opacity: 0.6;
  }

  /* Subtilus glow kampas */
  .user-card--tablet::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 140px; height: 140px;
    background: radial-gradient(
      circle,
      rgba(252, 211, 77, 0.06) 0%,
      transparent 70%
    );
    pointer-events: none;
  }

  .user-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }

  .user-card__avatar-wrap {
    position: relative;
    flex-shrink: 0;
  }

  .user-card__avatar {
    width: 56px; height: 56px;
    border-radius: 14px;
    border: 2px solid rgba(252, 211, 77, 0.35);
    object-fit: cover;
    display: block;
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.4),
      0 0 20px rgba(252, 211, 77, 0.1);
  }

  .user-card__level {
    position: absolute;
    bottom: -6px; right: -6px;
    background: linear-gradient(135deg,
      var(--color-accent-gold),
      var(--color-accent-gold-dark)
    );
    color: var(--color-bg-primary);
    font-size: 10px; font-weight: 900;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-primary);
    box-shadow: 0 2px 8px rgba(252, 211, 77, 0.4);
  }

  .user-card__identity {
    min-width: 0;
  }

  .user-card__name {
    font-size: 15px; font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-card__position {
    font-size: 11px;
    color: var(--color-accent-gold);
    opacity: 0.8;
    margin-top: 2px;
  }

  .user-card__divider {
    height: 1px;
    background: linear-gradient(90deg,
      transparent,
      rgba(252, 211, 77, 0.15),
      transparent
    );
    margin-bottom: 14px;
  }

  .user-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    list-style: none;
  }

  .user-card__stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(252, 211, 77, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
  }

  .user-card__stat-label {
    display: block;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
  }

  .user-card__stat-value {
    display: block;
    font-size: 15px; font-weight: 800;
    color: var(--color-accent-gold);
    line-height: 1;
  }

  .user-card__streak {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    background: linear-gradient(135deg,
      rgba(251, 146, 60, 0.1),
      rgba(252, 211, 77, 0.05)
    );
    border: 1px solid rgba(251, 146, 60, 0.2);
    border-radius: 10px;
    padding: 8px 10px;
  }

  .user-card__streak[hidden] {
    display: none;
  }

  .user-card__streak-icon {
    font-size: 16px;
  }

  .user-card__streak-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
  }

  .user-card__streak-num {
    font-size: 18px; font-weight: 900;
    color: #fb923c;
    margin-left: auto;
  }
}

/* =============================================================
 * SEKCIJA 3: MOBILE-HEADER VARIANT
 * Sticky horizontal banner (.game-header)
 * ============================================================= */

.game-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--spacing-fluid-md);
	background: var(--color-bg-secondary);
	border-radius: var(--radius-md);
	border: 1px solid var(--color-border);
	/* position: sticky; */
	top: var(--spacing-fluid-xs);
	z-index: var(--z-sticky, 100);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: var(--shadow-md);
}

.game-header__left,
.game-header__center,
.game-header__middle,
.game-header__right {
	display: flex;
	align-items: center;
	gap: var(--spacing-xs);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-semibold);
}

.game-header__avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid var(--color-accent-gold);
	object-fit: cover;
	object-position: center;
	flex-shrink: 0;
}

.game-header__left {
	position: relative;
}

/* Rank Badge on Avatar Corner */
.game-header__rank-badge {
	position: absolute;
	bottom: -1px;
	right: -8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2px 4px;
	border: 1px solid #FFA500;
	border-radius: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 12px rgba(255, 215, 0, 0.4);
	z-index: 10;
	transition: all 0.3s ease;
}

/* Different colors for top ranks */
.game-header__rank-badge[data-rank="1"] {
	background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 215, 0, 0.6);
	animation: badge-pulse-gold 2s ease-in-out infinite;
}

.game-header__rank-badge[data-rank="2"] {
	background: linear-gradient(135deg, #3e3e3e 0%, #958e73 100%);
	/* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(192, 192, 192, 0.6); */
	animation: badge-pulse-silver 2s ease-in-out infinite;
}

.game-header__rank-badge[data-rank="3"] {
	background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(205, 127, 50, 0.6);
	animation: badge-pulse-bronze 2s ease-in-out infinite;
}

.rank-badge__medal {
	font-size: 12px;
	line-height: 1;
	display: none;
	/* Hidden on very small screens */
}

.rank-badge__number {
	font-size: 8px;
	line-height: 1;
	font-weight: 800;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Pulse animations for rank badges */
@keyframes badge-pulse-gold {

	0%,
	100% {
		transform: scale(1);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 215, 0, 0.6);
	}

	50% {
		transform: scale(1.1);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 215, 0, 0.8);
	}
}

@keyframes badge-pulse-silver {

	0%,
	100% {
		transform: scale(1);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(192, 192, 192, 0.6);
	}

	50% {
		transform: scale(1.08);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 24px rgba(192, 192, 192, 0.8);
	}
}

@keyframes badge-pulse-bronze {

	0%,
	100% {
		transform: scale(1);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 16px rgba(205, 127, 50, 0.6);
	}

	50% {
		transform: scale(1.08);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 24px rgba(205, 127, 50, 0.8);
	}
}

.game-header__username {
	font-size: var(--font-size-xs);
	color: var(--color-text-primary);
	font-weight: var(--font-weight-medium);

}

* .game-header__center {
	display: flex;
	align-items: center;
	gap: var(--spacing-xs);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-semibold);
}

.game-header__points {
	color: var(--primitive-gold-400, #fdd970) !important; /* 5.2:1 on #1a1a2e (WCAG AA) */
	font-size: var(--font-size-fluid-md);
}

.game-header__rank-today {
	color: var(--primitive-gold-400, #fdd970) !important; /* 5.2:1 on #1a1a2e (WCAG AA) */
	font-size: var(--font-size-fluid-md);
}

.game-header__rank {
	color: var(--primitive-gold-400, #fdd970) !important; /* 5.2:1 on #1a1a2e (WCAG AA) */
	font-size: var(--font-size-fluid-md);
}

.game-header__points-today-wrapper,
.game-header__points-week-wrapper,
.game-header__points-month-wrapper {
	display: none;
	/* Hidden by default on mobile */
}

.game-header__points-today,
.game-header__points-week,
.game-header__points-month {
	color: var(--primitive-gold-400, #fdd970); /* 5.2:1 on #1a1a2e (WCAG AA) */
	font-size: var(--font-size-fluid-md);
}

/* Groups for organized layout */
.game-header__points-group,
.game-header__ranks-group {
	display: contents;
	/* Allow children to participate in parent grid on mobile */
}

/* Very small phones (250px-359px): 3 columns - Avatar | Today Rank | Overall Rank */
@media (max-width: 359px) {
	.game-header {
		display: grid;
		grid-template-columns: auto 1fr 1fr;
		gap: var(--spacing-xs);
	}

	.game-header__avatar {
		width: 32px;
		height: 32px;
	}

	.game-header__center {
		display: none;
		/* Hide points column */
	}

	.game-header__middle,
	.game-header__right {
		justify-content: center;
		font-size: 11px;
	}
}

/* Small phones (360px+): 4 columns - Avatar+Username | Points | Today Rank | Overall Rank */
@media (min-width: 360px) and (max-width: 767px) {
	.game-header {
		display: grid;
		grid-template-columns: auto 1fr 1fr 1fr;
		gap: var(--spacing-xs);
	}

	.game-header__left {
		flex-direction: column;
		align-items: center;
		gap: 2px;
	}

	.game-header__username {
		display: none;
	}

	.game-header__points {
		display: flex;
	}

	.game-header__center,
	.game-header__middle,
	.game-header__right {
		justify-content: center;
		font-size: 10px;
	}

	.game-header__avatar {
		width: 45px;
		height: 45px;
	}
}

/* ============================================
 * TABLET TO LAPTOP: ENHANCED GAME HEADER
 * Modern card-based design with glassmorphism
 * ============================================ */

/* Hide tooltips on mobile (below 768px) */
@media (max-width: 767px) {
	.points-tooltip {
		display: none !important;
	}
}

/* Tablet (768px-1023px): Compact horizontal layout */
@media (min-width: 768px) and (max-width: 1023px) {
	.game-header {
		display: grid;
		grid-template-columns: 56px 1fr auto auto;
		grid-template-rows: auto;
		align-self: start;
		gap: 6px;
		padding: 10px 10px;
		overflow: hidden;
		background: linear-gradient(135deg,
				rgba(26, 26, 46, 0.95) 0%,
				rgba(44, 41, 56, 0.92) 100%);
		border-radius: 14px;
		border: 1px solid rgba(220, 188, 72, 0.3);
		-webkit-backdrop-filter: blur(16px) saturate(180%);
		backdrop-filter: blur(16px) saturate(180%);
		box-shadow:
			0 8px 32px rgba(0, 0, 0, 0.3),
			0 2px 8px rgba(220, 188, 72, 0.1),
			inset 0 1px 0 rgba(255, 255, 255, 0.1);
		align-items: center;
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	}

	.game-header:hover {
		border-color: rgba(220, 188, 72, 0.5);
		box-shadow:
			0 12px 40px rgba(0, 0, 0, 0.4),
			0 4px 12px rgba(220, 188, 72, 0.2),
			inset 0 1px 0 rgba(255, 255, 255, 0.15);
		transform: translateY(-2px);
	}

	/* Avatar - First column, row 1 */
	.game-header__left {
		grid-column: 1;
		grid-row: 1;
		display: block;
		width: 56px;
	}

	.game-header__avatar {
		width: 56px;
		height: 56px;
		border-radius: 12px;
		border: 2px solid var(--color-accent-gold);
		box-shadow:
			0 4px 12px rgba(220, 188, 72, 0.3),
			0 0 20px rgba(220, 188, 72, 0.15);
		transition: all 0.3s ease;
		display: block;
		overflow: hidden;
	}

	.game-header__left:hover .game-header__avatar {
		transform: scale(1.05);
		box-shadow:
			0 6px 16px rgba(220, 188, 72, 0.4),
			0 0 30px rgba(220, 188, 72, 0.25);
	}

	/* HIDE badge and username overlay at this size */
	.game-header__rank-badge {
		display: none !important;
	}

	.game-header__username {
		display: none !important;
	}

	/* Points Group - 2x2 grid salia avatar */
	.game-header__points-group {
		grid-column: 2;
		grid-row: 1;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 4px;
		align-items: center;
	}

	.game-header__points-group:hover {
		background: transparent;
		border-color: transparent;
	}

	/* Individual stat cards inside points-group */
	.game-header__center,
	.game-header__points-today-wrapper,
	.game-header__points-week-wrapper,
	.game-header__points-month-wrapper {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 1px;
		padding: 5px 6px;
		background: rgba(255, 255, 255, 0.03);
		border-radius: 8px;
		border: 1px solid rgba(255, 255, 255, 0.07);
		transition: all 0.2s ease;
		min-width: 52px;
	}

	.game-header__center:hover,
	.game-header__points-today-wrapper:hover,
	.game-header__points-week-wrapper:hover,
	.game-header__points-month-wrapper:hover {
		background: rgba(255, 255, 255, 0.06);
		border-color: rgba(220, 188, 72, 0.2);
	}

	/* Show today/week/month wrappers siame diapazone */
	.game-header__points-today-wrapper,
	.game-header__points-week-wrapper,
	.game-header__points-month-wrapper {
		display: flex;
	}

	/* Ranks Group - unwrap to allow direct grid positioning */
	.game-header__ranks-group {
		display: contents;
	}

	/* Overall Rank - Column 3, Row 1 */
	.game-header__right {
		grid-column: 3;
		grid-row: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 6px 8px;
		background: rgba(220, 188, 72, 0.08);
		border-radius: 10px;
		border: 1px solid rgba(220, 188, 72, 0.2);
		transition: all 0.2s ease;
		min-width: 0;
	}

	.game-header__right:hover {
		background: rgba(220, 188, 72, 0.12);
		border-color: rgba(220, 188, 72, 0.4);
	}

	/* Today's Rank - Column 4, Row 1 */
	.game-header__middle {
		grid-column: 4;
		grid-row: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 6px 8px;
		background: rgba(220, 188, 72, 0.08);
		border-radius: 10px;
		border: 1px solid rgba(220, 188, 72, 0.2);
		transition: all 0.2s ease;
		min-width: 0;
	}

	.game-header__middle:hover {
		background: rgba(220, 188, 72, 0.12);
		border-color: rgba(220, 188, 72, 0.4);
	}

	/* Rank values - icon + number only, NO labels */
	.game-header__rank,
	.game-header__rank-today {
		font-size: clamp(16px, 2vw, 20px);
		font-weight: 700;
		color: var(--color-accent-gold);
		text-shadow: 0 2px 8px rgba(220, 188, 72, 0.4);
		display: flex;
		align-items: center;
		gap: 6px;
	}

	/* Points values styling */
	.game-header__points,
	.game-header__points-today,
	.game-header__points-week,
	.game-header__points-month {
		font-size: 14px;
		font-weight: 700;
		color: var(--primitive-gold-400, #fdd970);
		text-shadow: 0 2px 8px rgba(220, 188, 72, 0.4);
		display: flex;
		align-items: center;
		gap: 4px;
		position: relative;
		cursor: help;
		line-height: 1;
	}

	/* Stat icon (emoji) inside stat card */
	.game-header__center .stat-icon,
	.game-header__points-today-wrapper .stat-icon,
	.game-header__points-week-wrapper .stat-icon,
	.game-header__points-month-wrapper .stat-icon {
		font-size: 11px;
		opacity: 0.7;
		line-height: 1;
	}

	/* Tooltip styling */
	.points-tooltip {
		position: absolute;
		bottom: calc(100% + 8px);
		left: 50%;
		transform: translateX(-50%);
		background: linear-gradient(135deg,
				rgba(26, 26, 46, 0.98) 0%,
				rgba(44, 41, 56, 0.95) 100%);
		color: var(--color-accent-gold);
		padding: 8px 12px;
		border-radius: 8px;
		font-size: 12px;
		font-weight: 600;
		white-space: nowrap;
		border: 1px solid rgba(220, 188, 72, 0.3);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
		pointer-events: none;
		z-index: 1000;
	}

	/* Tooltip arrow */
	.points-tooltip::after {
		content: '';
		position: absolute;
		top: 100%;
		left: 50%;
		transform: translateX(-50%);
		border: 6px solid transparent;
		border-top-color: rgba(26, 26, 46, 0.98);
	}

	/* Show tooltip on hover */
	.game-header__points:hover .points-tooltip,
	.game-header__points-today:hover .points-tooltip,
	.game-header__points-week:hover .points-tooltip,
	.game-header__points-month:hover .points-tooltip {
		opacity: 1;
		visibility: visible;
		transform: translateX(-50%) translateY(-4px);
	}

	/* Remove text labels for 768-1023px - just show icons + numbers */
	.game-header__points::before,
	.game-header__points-today::before,
	.game-header__points-week::before,
	.game-header__points-month::before {
		display: none;
	}

	/* NO labels for rank elements - just icon + number */
	.game-header__rank-today::before,
	.game-header__rank::before {
		display: none;
	}
}

/* Narrow Tablet (768px-910px): Tighter spacing for smaller screens */
@media (min-width: 768px) and (max-width: 910px) {
	.game-header {
		gap: clamp(6px, 1vw, 8px);
		padding: 10px 16px;
	}

	.game-header__middle,
	.game-header__right {
		padding: 6px 10px;
	}

	.game-header__rank-today,
	.game-header__rank {
		font-size: clamp(14px, 1.8vw, 16px);
	}
}

/* Laptop (1024px-1440px): Even more expanded, premium design */
@media (min-width: 1024px) and (max-width: 1440px) {
	.game-header {
		display: grid;
		grid-template-columns: auto 1fr auto;
		gap: clamp(16px, 2.5vw, 24px);
		padding: clamp(14px, 2.5vw, 20px) clamp(20px, 3.5vw, 32px);
		background: linear-gradient(135deg,
				rgba(26, 26, 46, 0.96) 0%,
				rgba(44, 41, 56, 0.93) 50%,
				rgba(26, 26, 46, 0.96) 100%);
		border-radius: 16px;
		border: 1px solid rgba(220, 188, 72, 0.35);
		-webkit-backdrop-filter: blur(20px) saturate(200%);
		backdrop-filter: blur(20px) saturate(200%);
		box-shadow:
			0 12px 48px rgba(0, 0, 0, 0.4),
			0 4px 12px rgba(220, 188, 72, 0.15),
			inset 0 1px 0 rgba(255, 255, 255, 0.12),
			inset 0 -1px 0 rgba(0, 0, 0, 0.2);
		min-height: 90px;
		align-items: center;
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		position: relative;
		overflow: hidden;
	}

	/* Animated gradient background effect */
	.game-header::before {
		content: '';
		position: absolute;
		top: 0;
		left: -100%;
		width: 100%;
		height: 100%;
		background: linear-gradient(90deg,
				transparent 0%,
				rgba(220, 188, 72, 0.05) 50%,
				transparent 100%);
		transition: left 0.6s ease;
	}

	.game-header:hover::before {
		left: 100%;
	}

	.game-header:hover {
		border-color: rgba(220, 188, 72, 0.6);
		box-shadow:
			0 16px 56px rgba(0, 0, 0, 0.5),
			0 6px 16px rgba(220, 188, 72, 0.25),
			inset 0 1px 0 rgba(255, 255, 255, 0.18);
		transform: translateY(-3px);
	}

	/* Left section: Large avatar with username as part of image */
	.game-header__left {
		position: relative;
		display: block;
		width: 64px;
		z-index: 1;
	}

	.game-header__avatar {
		width: 64px;
		height: 64px;
		border-radius: 14px;
		border: 3px solid var(--color-accent-gold);
		box-shadow:
			0 6px 16px rgba(220, 188, 72, 0.4),
			0 0 30px rgba(220, 188, 72, 0.2),
			inset 0 2px 4px rgba(255, 255, 255, 0.1);
		transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
		cursor: pointer;
		display: block;
		overflow: hidden;
	}

	.game-header__left:hover .game-header__avatar {
		transform: scale(1.08) rotate(2deg);
		box-shadow:
			0 8px 24px rgba(220, 188, 72, 0.5),
			0 0 40px rgba(220, 188, 72, 0.3);
		border-width: 4px;
	}

	/* Enhanced rank badge for laptop */
	.game-header__rank-badge {
		bottom: -8px;
		right: -10px;
		min-width: 38px;
		height: 38px;
		padding: 4px 8px;
		border-radius: 19px;
		border-width: 3px;
	}

	.rank-badge__medal {
		display: block;
		font-size: 16px;
		margin-bottom: -2px;
	}

	.rank-badge__number {
		font-size: 11px;
	}

	/* Username overlay on bottom of avatar - container like marquee-container */
	.game-header__username {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: auto;
		background: linear-gradient(to top,
				rgba(0, 0, 0, 0.98) 0%,
				rgba(0, 0, 0, 0.88) 35%,
				rgba(0, 0, 0, 0.5) 75%,
				transparent 100%);
		border-radius: 0 0 11px 11px;
		pointer-events: none;
		padding: 5px 8px;
		display: block;
		overflow: hidden;
		color: var(--color-accent-gold);
		font-size: 11px;
		font-weight: 700;
		text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
		letter-spacing: 0.03em;
		line-height: 1.3;
	}

	/* Inner span animated by JavaScript - like .marquee p */
	.game-header__username span {
		display: inline-block;
		white-space: nowrap;
		animation: username-scroll 10s linear infinite;
	}

	/* Pause animation on hover for laptop */
	.game-header__left:hover .game-header__username span {
		animation-play-state: paused;
	}

	.game-header__left:hover .game-header__username {
		background: linear-gradient(to top,
				rgba(220, 188, 72, 0.98) 0%,
				rgba(220, 188, 72, 0.85) 35%,
				rgba(220, 188, 72, 0.4) 75%,
				transparent 100%);
		transform: translateY(-1px);
		color: rgba(0, 0, 0, 0.95);
		text-shadow: 0 1px 3px rgba(255, 255, 255, 0.4);
	}

	/* Points Group - 2x2 grid */
	.game-header__points-group {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 1fr 1fr;
		gap: 10px;
		padding: 14px;
		background: rgba(255, 255, 255, 0.04);
		border-radius: 12px;
		border: 1px solid rgba(255, 255, 255, 0.1);
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		position: relative;
		z-index: 1;
	}

	.game-header__points-group:hover {
		background: rgba(255, 255, 255, 0.06);
		border-color: rgba(220, 188, 72, 0.4);
		transform: translateY(-2px);
		box-shadow: 0 4px 12px rgba(220, 188, 72, 0.15);
	}

	/* Individual stat cards */
	.game-header__center,
	.game-header__points-today-wrapper,
	.game-header__points-week-wrapper,
	.game-header__points-month-wrapper,
	.game-header__middle,
	.game-header__right {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 6px;
		padding: 10px 16px;
		background: rgba(255, 255, 255, 0.03);
		border-radius: 10px;
		border: 1px solid rgba(255, 255, 255, 0.08);
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		min-width: 100px;
	}

	.game-header__center:hover,
	.game-header__points-today-wrapper:hover,
	.game-header__points-week-wrapper:hover,
	.game-header__points-month-wrapper:hover,
	.game-header__middle:hover,
	.game-header__right:hover {
		background: rgba(255, 255, 255, 0.08);
		border-color: rgba(220, 188, 72, 0.3);
		transform: translateY(-1px);
	}

	/* Ranks Group - vertical stack */
	.game-header__ranks-group {
		display: flex;
		flex-direction: column;
		gap: 10px;
		padding: 14px;
		background: rgba(220, 188, 72, 0.1);
		border-radius: 12px;
		border: 1px solid rgba(220, 188, 72, 0.25);
		transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		position: relative;
		z-index: 1;
	}

	.game-header__ranks-group:hover {
		background: rgba(220, 188, 72, 0.15);
		border-color: rgba(220, 188, 72, 0.5);
		transform: translateY(-2px);
		box-shadow: 0 4px 12px rgba(220, 188, 72, 0.2);
	}

	.game-header__points,
	.game-header__points-today,
	.game-header__points-week,
	.game-header__points-month,
	.game-header__rank-today,
	.game-header__rank {
		font-size: clamp(20px, 3vw, 26px);
		font-weight: 700;
		color: var(--color-accent-gold);
		text-shadow:
			0 2px 8px rgba(220, 188, 72, 0.5),
			0 0 20px rgba(220, 188, 72, 0.3);
		display: flex;
		align-items: center;
		gap: 8px;
		animation: pulse-glow 3s ease-in-out infinite;
	}

	/* Stat labels - use data-label attribute */
	.game-header__points::before,
	.game-header__points-today::before,
	.game-header__points-week::before,
	.game-header__points-month::before,
	.game-header__rank-today::before {
		content: attr(data-label);
		font-size: 11px;
		font-weight: 600;
		color: rgba(255, 255, 255, 0.65);
		text-transform: uppercase;
		letter-spacing: 0.08em;
		display: block;
		width: 100%;
		text-align: center;
	}

	.game-header__rank::before {
		content: attr(data-label);
		font-size: 11px;
		font-weight: 600;
		color: rgba(220, 188, 72, 0.9);
		text-transform: uppercase;
		letter-spacing: 0.08em;
		display: block;
		width: 100%;
		text-align: center;
	}
}

/* Pulse glow animation for stats */
@keyframes pulse-glow {

	0%,
	100% {
		filter: brightness(1);
	}

	50% {
		filter: brightness(1.15);
	}
}

/* ============================================
 * ALTERNATIVE: USERNAME OVERLAY ON AVATAR
 * Uncomment this section to place username directly on avatar image
 * ============================================ */


@media (min-width: 768px) {
	.game-header__left {
		position: relative;
		display: block !important;
	}

	.game-header__avatar-wrapper {
		position: relative;
		display: inline-block;
	}

	.game-header__avatar {
		display: block;
	}

	.game-header__username {
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		padding: 6px 8px;
		background: linear-gradient(to top,
				rgba(0, 0, 0, 0.85) 0%,
				rgba(0, 0, 0, 0.6) 70%,
				transparent 100%);
		color: var(--color-accent-gold);
		font-size: 11px;
		font-weight: 700;
		text-align: center;
		text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
		border-radius: 0 0 12px 12px;
		letter-spacing: 0.02em;
		overflow: hidden;
		white-space: nowrap;
	}

	.game-header__avatar:hover+.game-header__username {
		background: linear-gradient(to top,
				rgba(220, 188, 72, 0.9) 0%,
				rgba(220, 188, 72, 0.6) 70%,
				transparent 100%);
		color: #000;
	}
}

/* =============================================================
 * SEKCIJA 4: CHAIN-SIDEBAR VARIANT
 * Chain mode desktop left sidebar (.chain-user-info)
 * ============================================================= */

.chain-user-info {
  background: var(--chain-card-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--chain-primary-border);
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(245, 158, 11, 0.04) inset;
}

.chain-user-info::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--chain-primary), var(--chain-accent), transparent);
  background-size: 200% 100%;
  animation: chainFlow 3s linear infinite;
}

/* =====================
   TOP ROW
   ===================== */
.chain-user-info__top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

/* =====================
   BADGES
   ===================== */
.chain-user-info__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  cursor: default;
  flex-shrink: 0;
}

.chain-user-info__badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Gold position badge */
.chain-user-info__badge--position::before {
  background: linear-gradient(145deg, #d97706 0%, #f59e0b 40%, #fcd34d 60%, #f59e0b 80%, #d97706 100%);
}

/* Mint level badge */
.chain-user-info__badge--level::before {
  background: linear-gradient(145deg, #0d9488 0%, #2dd4bf 40%, #99f6e4 60%, #2dd4bf 80%, #0d9488 100%);
}

.chain-user-info__badge-number {
  position: relative;
  z-index: 1;
  font-family: 'Bebas Neue', 'Exo 2', sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #08060c;
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* =====================
   BADGE TOOLTIPS
   ===================== */
.chain-position-tooltip,
.chain-level-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 6, 12, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--chain-primary-border);
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 100;
  min-width: 190px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.60);
}

.chain-user-info__badge:hover .chain-position-tooltip,
.chain-user-info__badge:hover .chain-level-tooltip {
  opacity: 1;
  visibility: visible;
  top: calc(100% + 12px);
}

.chain-position-tooltip__title,
.chain-level-tooltip__title {
  font-size: 0.82rem;
  color: var(--chain-primary);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.chain-position-tooltip__ahead,
.chain-position-tooltip__behind,
.chain-level-tooltip__description {
  font-size: 0.72rem;
  color: var(--chain-text-muted);
  line-height: 1.4;
}

.chain-position-tooltip__ahead  { color: var(--chain-primary); }
.chain-position-tooltip__behind { color: var(--chain-success);  }

/* =====================
   AVATAR
   ===================== */
.chain-user-info__avatar-wrapper {
  margin: 0;
  flex-shrink: 0;
}

.chain-user-info__avatar-container {
  position: relative;
  width: 74px;
  height: 74px;
}

.chain-user-info__avatar {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 2px solid var(--chain-primary);
  object-fit: cover;
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.10),
    0 4px 20px rgba(0, 0, 0, 0.40);
  animation: chain-avatar-glow 3s ease-in-out infinite;
}

@keyframes chain-avatar-glow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245,158,11,0.10), 0 4px 20px rgba(0,0,0,0.40); }
  50%       { box-shadow: 0 0 0 4px rgba(245,158,11,0.22), 0 4px 24px rgba(245,158,11,0.14); }
}

.chain-user-info__avatar-username {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(8,6,12,0.90) 100%);
  padding: 0.2rem 0.35rem;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
}

.chain-user-info__avatar-username .marquee { overflow: hidden; }

.chain-user-info__avatar-username .marquee p {
  margin: 0;
  font-size: 0.60rem;
  font-weight: 800;
  color: var(--chain-primary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

/* =====================
   STATS
   ===================== */
.chain-stats-divider {
  border: none;
  border-top: 1px solid rgba(245, 158, 11, 0.18);
  margin: 0.75rem 0;
}

.chain-user-info__stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.chain-user-info__stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid rgba(245, 158, 11, 0.08);
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.chain-user-info__stat:hover {
  background: rgba(245, 158, 11, 0.05);
  border-left-color: var(--chain-primary);
  padding-left: 0.65rem;
}

.chain-user-info__stat:last-child { border-bottom: none; }

.chain-user-info__stat-label {
  font-size: 0.75rem;
  color: var(--chain-text-dim);
  font-weight: 500;
  margin: 0;
}

.chain-user-info__stat-value {
  font-size: 0.88rem;
  color: var(--chain-primary);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.30);
  margin: 0;
}

/* =====================
   TWO-COLUMN STATS
   ===================== */
.chain-user-info__stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.chain-user-info__stats-column {
  display: flex;
  flex-direction: column;
}

.chain-stats-title {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--chain-accent);
  margin: 0 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(45, 212, 191, 0.28);
}

.chain-user-info__stats-column .chain-user-info__stat {
  padding: 0.38rem 0.25rem;
}

.chain-user-info__stats-column .chain-user-info__stat-label { font-size: 0.68rem; }
.chain-user-info__stats-column .chain-user-info__stat-value { font-size: 0.75rem; }

@media (max-width: 1200px) {
  .chain-user-info__stats-container { grid-template-columns: 1fr; }
}

/* =============================================================
 * SEKCIJA 5: CHAIN-MOBILE-HEADER VARIANT
 * Chain mode sticky horizontal banner (.chain-user-header)
 * ============================================================= */

.chain-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  background: rgba(8, 6, 12, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--chain-primary-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.40);
  position: sticky;
  top: 60px;
  z-index: 90;
  margin-bottom: 0.75rem;
}

.chain-user-header__left {
  position: relative;
  flex-shrink: 0;
}

/* 250px baseline */
.chain-user-header__avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px solid var(--chain-primary);
  object-fit: cover;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.chain-user-header__rank-badge {
  position: absolute;
  top: -5px; right: -5px;
  width: 18px; height: 18px;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(8, 6, 12, 0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* NOTE: .rank-badge__number is also defined in Section 3 (game-header).
   Chain-specific override below uses Bebas Neue font. */
.chain-user-header .rank-badge__number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.58rem;
  color: #08060c;
}

.chain-user-header__points-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.chain-user-header__center,
.chain-user-header__points-today-wrapper {
  display: flex;
  align-items: center;
}

.chain-user-header__points,
.chain-user-header__points-today,
.chain-user-header__rank {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--chain-text-dim);
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.chain-user-header__points span,
.chain-user-header__points-today span,
.chain-user-header__rank span {
  color: var(--chain-primary);
  font-weight: 800;
}

.chain-user-header__ranks-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  flex-shrink: 0;
}

/* Mobile header size steps */
@media (min-width: 360px) {
  .chain-user-header { padding: 0.5rem 0.75rem; gap: 0.7rem; }
  .chain-user-header__avatar { width: 32px; height: 32px; }
  .chain-user-header__rank-badge { width: 20px; height: 20px; }
  .chain-user-header__points,
  .chain-user-header__points-today,
  .chain-user-header__rank { font-size: 0.70rem; }
}

@media (min-width: 480px) {
  .chain-user-header { padding: 0.6rem 1rem; gap: 0.85rem; }
  .chain-user-header__avatar { width: 38px; height: 38px; border-radius: 8px; }
  .chain-user-header__rank-badge { width: 22px; height: 22px; top: -6px; right: -6px; }
  .chain-user-header__points,
  .chain-user-header__points-today,
  .chain-user-header__rank { font-size: 0.78rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .chain-user-header { gap: 1.25rem; padding: 0.65rem 1rem; }
  .chain-user-header__avatar { width: 44px; height: 44px; }
  .chain-user-header__rank-badge { width: 24px; height: 24px; }
  .chain-user-header__points,
  .chain-user-header__points-today,
  .chain-user-header__rank { font-size: 0.85rem; }
}
