/**
 * Elite Gamified Profile - GitHub-Inspired Design
 * Version: 1.0.2
 * Dark Sci-Fi Theme with Glassmorphism
 */

/* ====================================
   PROFILE CONTAINER
   ==================================== */
.elite-profile-container {
	min-height: 100vh;
	padding: 40px 0;
}

.elite-profile-wrapper {
	margin: 0 auto;
	padding: 0 20px;
}

/* ====================================
   PROFILE HEADER - GitHub Style
   ==================================== */
.elite-profile-header {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 32px;
	padding: 32px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	backdrop-filter: blur(20px);
	position: relative;
	overflow: hidden;
	margin-bottom: 32px;
}

.elite-profile-header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #fbbf24 100%);
	opacity: 0.8;
}

.elite-avatar-section {
	position: relative;
}

.elite-avatar-wrapper {
	width: 280px;
	height: 280px;
	border-radius: 50%;
	position: relative;
	padding: 6px;
	background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #fbbf24 100%);
	box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
	animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
	0%, 100% {
		box-shadow: 0 0 40px rgba(59, 130, 246, 0.4);
	}
	50% {
		box-shadow: 0 0 60px rgba(139, 92, 246, 0.6);
	}
}

.elite-avatar-wrapper img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #0a0e1a;
}

.elite-level-badge {
	position: absolute;
	bottom: 10px;
	right: 10px;
	background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
	color: #0a0e1a;
	padding: 8px 16px;
	border-radius: 20px;
	font-weight: 700;
	font-size: 14px;
	font-family: 'SF Mono', 'Monaco', monospace;
	border: 3px solid #0a0e1a;
	box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.elite-info-section {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.elite-user-meta {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.elite-username {
	font-size: 42px;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	line-height: 1.2;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.elite-rank-title {
	font-size: 20px;
	font-weight: 600;
	color: #8b5cf6;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.elite-rank-title i {
	font-size: 24px;
	color: #fbbf24;
}

.elite-bio {
	font-size: 16px;
	color: rgba(255, 255, 255, 0.7);
	line-height: 1.6;
	margin: 0;
}

/* Stats Overview Cards */
.elite-stats-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
}

.elite-stat-card {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 20px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

.elite-stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: linear-gradient(180deg, var(--stat-color) 0%, transparent 100%);
	opacity: 0.6;
}

.elite-stat-card.xp-card {
	--stat-color: #3b82f6;
}

.elite-stat-card.coins-card {
	--stat-color: #fbbf24;
}

.elite-stat-card.streak-card {
	--stat-color: #8b5cf6;
}

.elite-stat-card.challenges-card {
	--stat-color: #10b981;
}

.elite-stat-card:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.2);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.elite-stat-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.5);
	font-weight: 600;
	font-family: 'SF Mono', 'Monaco', monospace;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.elite-stat-label i {
	font-size: 14px;
}

.elite-stat-value {
	font-size: 32px;
	font-weight: 700;
	color: #ffffff;
	font-family: 'SF Mono', 'Monaco', monospace;
	line-height: 1;
}

.elite-stat-change {
	font-size: 12px;
	color: #10b981;
	margin-top: 8px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.elite-stat-change.negative {
	color: #ef4444;
}

/* ====================================
   MAIN CONTENT GRID
   ==================================== */
.elite-profile-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 32px;
	margin-bottom: 32px;
}

@media (max-width: 1024px) {
	.elite-profile-grid {
		grid-template-columns: 1fr;
	}
}

/* ====================================
   ACTIVITY HEATMAP - GitHub Style
   ==================================== */
.elite-activity-section {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 24px;
	backdrop-filter: blur(20px);
}

.elite-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.elite-section-title {
	font-size: 20px;
	font-weight: 600;
	color: #ffffff;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.elite-section-title i {
	font-size: 22px;
	color: #3b82f6;
}

.elite-activity-meta {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
	font-family: 'SF Mono', 'Monaco', monospace;
}

.elite-heatmap-container {
	position: relative;
	padding: 20px;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 12px;
}

.elite-heatmap-grid {
	display: grid;
	grid-template-columns: repeat(53, 1fr);
	grid-template-rows: repeat(7, 1fr);
	gap: 3px;
	max-width: 100%;
	overflow-x: visible;
}

.elite-heatmap-cell {
	width: 12px;
	height: 12px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 2px;
	transition: all 0.2s ease;
	cursor: pointer;
	position: relative;
}

.elite-heatmap-cell:hover {
	transform: scale(1.3);
	z-index: 10;
	outline: 1px solid rgba(255, 255, 255, 0.3);
}

.elite-heatmap-cell[data-level="0"] {
	background: rgba(255, 255, 255, 0.05);
}

.elite-heatmap-cell[data-level="1"] {
	background: rgba(59, 130, 246, 0.3);
}

.elite-heatmap-cell[data-level="2"] {
	background: rgba(59, 130, 246, 0.5);
}

.elite-heatmap-cell[data-level="3"] {
	background: rgba(59, 130, 246, 0.7);
}

.elite-heatmap-cell[data-level="4"] {
	background: rgba(59, 130, 246, 0.9);
	box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.elite-heatmap-legend {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	justify-content: flex-end;
}

.elite-heatmap-legend span {
	margin: 0 4px;
}

/* ====================================
   CHARTS SECTIONS
   ==================================== */
.elite-chart-section {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 24px;
	backdrop-filter: blur(20px);
	margin-bottom: 24px;
}

.elite-chart-wrapper {
	position: relative;
	height: 300px;
	padding: 16px 0;
}

.elite-chart-wrapper canvas {
	max-height: 100%;
}

/* ====================================
   ACHIEVEMENTS SHOWCASE
   ==================================== */
.elite-achievements-section {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 24px;
	backdrop-filter: blur(20px);
}

.elite-achievements-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 16px;
}

.elite-achievement-item {
	position: relative;
	aspect-ratio: 1;
	background: rgba(255, 255, 255, 0.05);
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	overflow: hidden;
}

.elite-achievement-item.earned {
	border-color: rgba(251, 191, 36, 0.4);
	background: rgba(251, 191, 36, 0.1);
}

.elite-achievement-item.locked {
	opacity: 0.4;
	filter: grayscale(100%);
}

.elite-achievement-item:hover {
	border-color: rgba(251, 191, 36, 0.6);
	background: rgba(251, 191, 36, 0.15);
}

.elite-achievement-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.elite-achievement-icon i {
	font-size: 32px;
	color: #fbbf24;
}

.elite-achievement-name {
	font-size: 11px;
	color: #ffffff;
	text-align: center;
	font-weight: 600;
	line-height: 1.2;
}

/* View All Button */
.elite-view-all-btn {
	width: 100%;
	margin-top: 16px;
	padding: 12px 20px;
	background: rgba(59, 130, 246, 0.1);
	border: 1px solid rgba(59, 130, 246, 0.3);
	border-radius: 8px;
	color: #3b82f6;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: inherit;
}

.elite-view-all-btn:hover {
	background: rgba(59, 130, 246, 0.2);
	border-color: rgba(59, 130, 246, 0.5);
	transform: translateY(-2px);
}

/* ====================================
   ACHIEVEMENTS MODAL
   ==================================== */
.elite-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.elite-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(8px);
}

.elite-modal-content {
	position: relative;
	background: #0a0e1a;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	max-width: 800px;
	width: 100%;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.elite-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.elite-modal-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #ffffff;
	display: flex;
	align-items: center;
	gap: 10px;
}

.elite-modal-header h3 i {
	color: #fbbf24;
	font-size: 22px;
}

.elite-modal-close {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.5);
	font-size: 24px;
	cursor: pointer;
	padding: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: all 0.3s ease;
}

.elite-modal-close:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.elite-modal-body {
	padding: 24px;
	overflow-y: auto;
}

.elite-achievements-modal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 16px;
}

.elite-achievement-modal-item {
	display: flex;
	gap: 16px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	transition: all 0.3s ease;
}

.elite-achievement-modal-item:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(251, 191, 36, 0.3);
}

.elite-achievement-modal-icon {
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(251, 191, 36, 0.1);
	border: 2px solid rgba(251, 191, 36, 0.3);
}

.elite-achievement-modal-icon img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.elite-achievement-modal-icon i {
	font-size: 28px;
	color: #fbbf24;
}

.elite-achievement-modal-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.elite-achievement-modal-info h4 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.3;
}

.elite-achievement-modal-info p {
	margin: 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	line-height: 1.5;
}

.elite-achievement-date {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'SF Mono', 'Monaco', monospace;
}

.elite-achievement-date i {
	font-size: 13px;
}

/* ====================================
   PINNED CHALLENGES
   ==================================== */
.elite-pinned-section {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 24px;
	backdrop-filter: blur(20px);
	margin-bottom: 24px;
}

.elite-pinned-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
}

.elite-pinned-card {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 20px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	position: relative;
	overflow: hidden;
}

.elite-pinned-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
}

.elite-pinned-card:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.2);
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.elite-pinned-title {
	font-size: 16px;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 12px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.elite-pinned-title i {
	color: #10b981;
}

.elite-pinned-desc {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	line-height: 1.6;
	margin-bottom: 16px;
}

.elite-pinned-stats {
	display: flex;
	gap: 16px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	font-family: 'SF Mono', 'Monaco', monospace;
}

.elite-pinned-stat {
	display: flex;
	align-items: center;
	gap: 4px;
}

.elite-pinned-stat i {
	font-size: 14px;
}

/* ====================================
   SIDEBAR SECTIONS
   ==================================== */
.elite-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.elite-ranks-section,
.elite-collections-section {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 24px;
	backdrop-filter: blur(20px);
}

.elite-rank-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	margin-bottom: 12px;
	transition: all 0.3s ease;
}

.elite-rank-item:hover {
	background: rgba(255, 255, 255, 0.08);
	transform: translateX(4px);
}

.elite-rank-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
	flex-shrink: 0;
}

.elite-rank-icon img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

.elite-rank-info {
	flex: 1;
}

.elite-rank-name {
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 4px 0;
}

.elite-rank-category {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-family: 'SF Mono', 'Monaco', monospace;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */
@media (max-width: 768px) {
	.elite-profile-header {
		grid-template-columns: 1fr;
		text-align: center;
	}
	
	.elite-avatar-wrapper {
		width: 200px;
		height: 200px;
		margin: 0 auto;
	}
	
	.elite-username {
		font-size: 32px;
	}
	
	.elite-stats-overview {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.elite-heatmap-grid {
		grid-template-columns: repeat(26, 1fr);
	}
	
	.elite-achievements-grid {
		grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	}
}

/* ====================================
   LOADING & EMPTY STATES
   ==================================== */
.elite-loading,
.elite-error {
	padding: 40px 20px;
	text-align: center;
	color: rgba(255, 255, 255, 0.5);
	font-size: 14px;
}

.elite-loading i {
	font-size: 24px;
	color: #3b82f6;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.elite-error {
	color: #ef4444;
}

.elite-empty-state {
	opacity: 0.6;
	text-align: center;
}

.elite-empty-state .elite-pinned-title {
	color: rgba(255, 255, 255, 0.7);
}

.elite-empty-state .elite-pinned-desc {
	color: rgba(255, 255, 255, 0.5);
}

/* ====================================
   ANIMATIONS & EFFECTS
   ==================================== */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.elite-profile-header,
.elite-activity-section,
.elite-chart-section,
.elite-achievements-section,
.elite-pinned-section {
	animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation delays */
.elite-stat-card:nth-child(1) { animation-delay: 0.1s; }
.elite-stat-card:nth-child(2) { animation-delay: 0.2s; }
.elite-stat-card:nth-child(3) { animation-delay: 0.3s; }
.elite-stat-card:nth-child(4) { animation-delay: 0.4s; }



