:root {
	--ejg-red: #ff1a1a;
	--ejg-red-dark: #cc0000;
	--ejg-grey: #e0e0e0;
	--ejg-text: #2d2d2d;
	--ejg-muted: #666666;
	--ejg-bg: #fff5f5;
	--ejg-success: #28a745;
}

.ejd-game-widget {
	background: #ffffff;
	padding: 24px;
	max-width: 400px;
	font-family: Montserrat, 'Segoe UI', sans-serif;
	color: var(--ejg-text);
	margin: 0 auto;
}

.ejd-game-header {
	text-align: center;
	margin-bottom: 8px;
}

.ejd-game-title {
	line-height: 1.2;
    font-size: 24px !important;
    font-weight: 800 !important;
	color: var(--ejg-red);
	margin: 0 0 4px;
	letter-spacing: -0.5px;
}

@media (max-width: 768px) {
	.ejd-game-title {
		font-size: 20px;
	}
}

.ejd-game-subtitle {
	font-size: 12px;
	font-weight: 600;
	color: var(--ejg-muted);
	margin: 0;
	letter-spacing: 1px;
}

.ejd-game-score {
	text-align: left;
	margin: 20px 0;
}

.ejd-game-score::after {
	content: '';
	display: table;
	clear: both;
}

.ejd-game-chart {
	position: relative;
	width: 115px;
	height: 115px;
	margin: 0;
	float: left;
	margin-right: 1rem;
}

.ejd-game-donut {
	width: 100%;
	height: 100%;
	transform: rotate( -90deg );
}

.ejd-game-donut-bg {
	fill: none;
	stroke: var(--ejg-grey);
	stroke-width: 10;
}

.ejd-game-donut-fg {
	fill: none;
	stroke: var(--ejg-red);
	stroke-width: 10;
	stroke-linecap: round;
	stroke-dasharray: 0 1;
	transition: stroke-dashoffset 0.6s ease;
}

.ejd-game-donut-fg.ejd-game-donut-fg--zero {
	stroke: var(--ejg-grey);
}

.ejd-game-percent {
	display: none;
}

.ejd-game-percent-text {
	font-size: 28px;
	font-weight: 800;
	color: var(--ejg-red);
	margin: 0;
	padding: 1rem 0 0;
}

.ejd-game-percent-text.ejd-game-percent-text--zero {
	color: var(--ejg-grey);
}

.ejd-game-score-summary {
	margin: 5px 0 25px;
	font-size: 14px;
}

.ejd-game-level-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: 64px;
	height: 64px;
	z-index: 2;
}

.ejd-game-level-badge img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ejd-game-level-progress {
	clear: both;
	margin-top: 12px;
}

.ejd-game-level-progress-text {
	font-size: 12px;
	color: var(--ejg-muted);
	display: block;
	margin-bottom: 6px;
}

.ejd-game-level-bar {
	width: 100%;
	height: 6px;
	background: var(--ejg-grey);
	overflow: hidden;
}

.ejd-game-level-bar-fill {
	display: block;
	height: 100%;
	width: 0;
	background: var(--ejg-red);
	transition: width 0.4s ease;
}

.ejd-game-level {
	font-size: 13px;
	color: var(--ejg-muted);
	margin: 10px 0 0;
}

.ejd-game-login-cta {
	text-align: center;
	font-size: 13px;
	color: var(--ejg-muted);
	margin: 0 0 16px;
}

.ejd-game-divider {
	border: 0;
	border-top: 1px solid var(--ejg-grey);
	margin: 20px 0;
}

.ejd-game-section-title {
	font-size: 13px !important;
	font-weight: 700 !important;
	letter-spacing: 0.5px;
	color: var(--ejg-text);
	margin: 0 0 14px;
}

.ejd-missions {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ejd-mission {
	display: flex;
	align-items: stretch;
	gap: 12px;
	border-bottom: 1px solid var(--ejg-grey);
	padding: 12px 0;
	margin-bottom: 0;
}

.ejd-mission:last-child {
	border-bottom: 0;
}

.ejd-mission-icon {
	width: 48px;
	align-self: stretch;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ejd-mission-icon img {
	width: 100%;
	height: auto;
	max-height: 48px;
	object-fit: contain;
}

.ejd-mission-completed .ejd-mission-icon img {
	opacity: 0.9;
}

.ejd-mission-body {
	flex: 1;
	min-width: 0;
}

.ejd-mission-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.ejd-mission-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--ejg-text);
}

.ejd-mission-count {
	font-size: 12px;
	font-weight: 700;
	color: var(--ejg-muted);
}

.ejd-mission-bar {
	width: 100%;
	height: 6px;
	background: var(--ejg-grey);
	overflow: hidden;
}

.ejd-mission-bar-fill {
	display: block;
	height: 100%;
	width: 0;
	background: var(--ejg-red);
	transition: width 0.4s ease;
}

.ejd-mission-completed .ejd-mission-bar-fill {
	background: var(--ejg-success);
}

.ejd-game-ranking {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ejd-game-ranking-item,
.ejd-game-ranking-empty {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 13px;
}

.ejd-game-ranking-item:last-child {
	border-bottom: 0;
}

.ejd-game-ranking-pos {
	font-weight: 800;
	color: var(--ejg-red);
	min-width: 18px;
}

.ejd-game-ranking-email {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--ejg-text);
}

.ejd-game-ranking-score {
	font-size: 12px;
	color: var(--ejg-muted);
	font-weight: 600;
}

.ejd-game-ranking-empty {
	color: var(--ejg-muted);
	font-style: italic;
}

.ejd-game-share {
	width: 100%;
	margin-top: 18px;
	background: var(--ejg-success);
	border: 0;
	color: #fff;
	padding: 12px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.ejd-game-share:hover {
	background: #218838;
}

@media (max-width: 480px) {
	.ejd-game-widget {
		padding: 16px;
	}
}
