/* تصنيف الفيفا للمنتخبات — MatchSync (بألوان الموقع، ومعها الوضع الليلي للقالب) */
.ms-fifa {
	--fifa-main: var(--main-color, #276535);
	--fifa-card: var(--LightColor, #fff);
	--fifa-soft: #f4f5f9;
	--fifa-line: #e6e8ef;
	--fifa-text: #1f2430;
	--fifa-muted: #6b7280;
	--fifa-shadow: 0 0 4px rgba(0, 0, 0, .12);
	--fifa-gold: #e8b923;
	--fifa-silver: #c3c9d3;
	--fifa-bronze: #cd8a4a;
	--fifa-yellow: #ffd200;
	--fifa-red: #e5173f;
	direction: rtl;
	color: var(--fifa-text);
	margin: 16px 0 24px;
}
.Night .ms-fifa {
	--fifa-card: var(--LightColor, #263545);
	--fifa-soft: #1c2733;
	--fifa-line: #2b3b4d;
	--fifa-text: #fff;
	--fifa-muted: #9fb0c3;
	--fifa-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.ms-fifa *,
.ms-fifa *::before,
.ms-fifa *::after { box-sizing: border-box; }

/* الهيدر: بلون الموقع */
.ms-fifa-hero {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px 20px;
	border-radius: 14px;
	border-top: 3px solid var(--fifa-yellow);
	background: var(--fifa-main);
	background-image: linear-gradient(to left, rgba(0, 0, 0, .18), rgba(255, 255, 255, .08));
	box-shadow: var(--fifa-shadow);
	overflow: hidden;
}
.ms-fifa-hero::after {
	content: "";
	position: absolute;
	width: 170px;
	height: 170px;
	right: -40px;
	top: -55px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	pointer-events: none;
}
.ms-fifa-icon {
	position: relative;
	z-index: 1;
	flex: none;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.ms-fifa-icon img { width: 38px; height: 38px; object-fit: contain; }
.ms-fifa-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.ms-fifa-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ms-fifa .ms-fifa-title {
	margin: 0;
	padding: 0;
	font-size: 24px;
	line-height: 1.4;
	font-weight: 800;
	color: #fff;
	border: 0;
	background: none;
}
.ms-fifa-live {
	display: inline-block;
	padding: 2px 12px;
	border-radius: 999px;
	background: var(--fifa-red);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.6;
}
.ms-fifa-sub { margin: 6px 0 0; font-size: 14px; color: rgba(255, 255, 255, .9); }
.ms-fifa-badge {
	position: relative;
	z-index: 1;
	flex: none;
	padding: 12px 20px;
	border-radius: 12px;
	border: 1.5px solid var(--fifa-yellow);
	color: var(--fifa-yellow);
	font-weight: 800;
	font-size: 18px;
	letter-spacing: 1px;
	background: rgba(0, 0, 0, .12);
	direction: ltr;
}

/* المنصة */
.ms-fifa-podium {
	display: grid;
	grid-template-columns: 1fr 1.08fr 1fr;
	align-items: end;
	gap: 14px;
	margin: 22px 0 14px;
}
.ms-fifa-pod {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 18px 12px 0;
	border-radius: 14px;
	background: var(--fifa-card);
	border: 1.5px solid var(--fifa-line);
	box-shadow: var(--fifa-shadow);
	text-align: center;
	min-width: 0;
	overflow: hidden;
}
.ms-fifa-pod.is-1 { border-color: var(--fifa-gold); box-shadow: 0 4px 16px rgba(232, 185, 35, .25); }
.ms-fifa-pod.is-2 { border-color: var(--fifa-silver); }
.ms-fifa-pod.is-3 { border-color: var(--fifa-bronze); }
.ms-fifa-flag {
	display: flex;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	border: 4px solid var(--fifa-silver);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.ms-fifa-flag img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ms-fifa-pod.is-1 .ms-fifa-flag { width: 104px; height: 104px; border-color: var(--fifa-gold); }
.ms-fifa-pod.is-2 .ms-fifa-flag { width: 80px; height: 80px; }
.ms-fifa-pod.is-3 .ms-fifa-flag { width: 66px; height: 66px; border-color: var(--fifa-bronze); border-width: 3px; }
.ms-fifa-name {
	font-size: 17px;
	font-weight: 800;
	color: var(--fifa-text);
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ms-fifa-step {
	width: 78%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 6px;
	border-radius: 12px 12px 0 0;
	color: #fff;
	font-size: 28px;
	font-weight: 800;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
	direction: ltr;
}
.ms-fifa-pod.is-1 .ms-fifa-step { height: 124px; background: linear-gradient(#f6cf45, #d9a514); }
.ms-fifa-pod.is-2 .ms-fifa-step { height: 96px; background: linear-gradient(#bcc3ce, #8d96a6); }
.ms-fifa-pod.is-3 .ms-fifa-step { height: 76px; background: linear-gradient(#dba06a, #a8682e); }

/* الشريط والبحث */
.ms-fifa-bar {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin: 6px 2px 12px;
	font-size: 13px;
	color: var(--fifa-muted);
}
.ms-fifa-search { margin-bottom: 12px; }
.ms-fifa-search input {
	width: 100%;
	padding: 11px 14px;
	border-radius: 12px;
	border: 1px solid var(--fifa-line);
	background: var(--fifa-card);
	color: var(--fifa-text);
	box-shadow: var(--fifa-shadow);
	font: inherit;
	font-size: 15px;
	outline: none;
}
.ms-fifa-search input:focus { border-color: var(--fifa-main); }
.ms-fifa-search input::placeholder { color: var(--fifa-muted); }

/* القائمة */
.ms-fifa-list { list-style: none; margin: 0; padding: 0; }
.ms-fifa-row {
	display: grid;
	grid-template-columns: 46px 1fr auto;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	margin: 0 0 6px;
	border-radius: 12px;
	background: var(--fifa-card);
	box-shadow: var(--fifa-shadow);
	border-right: 3px solid transparent;
}
.ms-fifa-row.is-1 { border-right-color: var(--fifa-gold); }
.ms-fifa-row.is-2 { border-right-color: var(--fifa-silver); }
.ms-fifa-row.is-3 { border-right-color: var(--fifa-bronze); }
.ms-fifa-rank { font-weight: 800; color: var(--fifa-main); text-align: center; font-size: 15px; }
.Night .ms-fifa-rank { color: #9fd3ad; }
.ms-fifa-team { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; font-weight: 700; }
.ms-fifa-team img,
.ms-fifa-team i { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--fifa-soft); box-shadow: 0 0 0 1px var(--fifa-line); }
.ms-fifa-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-fifa-mv { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ms-fifa-mv.is-up { color: #15803d; background: #dcfce7; }
.ms-fifa-mv.is-down { color: #b91c1c; background: #fee2e2; }
.ms-fifa-mv.is-eq { color: var(--fifa-muted); }
.ms-fifa-mv.is-new { color: #92400e; background: #fef3c7; }
.Night .ms-fifa-mv.is-up { color: #4ade80; background: rgba(74, 222, 128, .14); }
.Night .ms-fifa-mv.is-down { color: #f87171; background: rgba(248, 113, 113, .14); }
.Night .ms-fifa-mv.is-new { color: #fcd34d; background: rgba(252, 211, 77, .14); }
.ms-fifa-none,
.ms-fifa-wait { text-align: center; color: var(--fifa-muted); padding: 18px 0; margin: 0; }

/* موبايل */
@media (max-width: 600px) {
	.ms-fifa-hero { padding: 16px 12px; gap: 10px; border-radius: 12px; }
	.ms-fifa-icon { width: 48px; height: 48px; }
	.ms-fifa-icon img { width: 28px; height: 28px; }
	.ms-fifa .ms-fifa-title { font-size: 16px; }
	.ms-fifa-line { gap: 6px 8px; }
	.ms-fifa-live { font-size: 12px; padding: 1px 10px; }
	.ms-fifa-sub { font-size: 12px; }
	.ms-fifa-badge { padding: 8px 10px; font-size: 13px; border-radius: 10px; }
	.ms-fifa-podium { gap: 8px; margin-top: 18px; }
	.ms-fifa-pod { padding: 12px 6px 0; border-radius: 12px; gap: 8px; }
	.ms-fifa-pod.is-1 .ms-fifa-flag { width: 76px; height: 76px; }
	.ms-fifa-pod.is-2 .ms-fifa-flag { width: 58px; height: 58px; }
	.ms-fifa-pod.is-3 .ms-fifa-flag { width: 48px; height: 48px; }
	.ms-fifa-name { font-size: 14px; }
	.ms-fifa-step { font-size: 21px; width: 82%; }
	.ms-fifa-pod.is-1 .ms-fifa-step { height: 92px; }
	.ms-fifa-pod.is-2 .ms-fifa-step { height: 72px; }
	.ms-fifa-pod.is-3 .ms-fifa-step { height: 58px; }
	.ms-fifa-row { grid-template-columns: 38px 1fr auto; padding: 9px 10px; }
}
