:root {
	--pink-bg: #f7c6df;
	--pink-soft: #fbe0ec;
	--pink-row: #f6b8d4;
	--magenta: #c2185b;
	--magenta-dark: #a01248;
	--burgundy: #7a0f38;
	--white: #ffffff;
	--gold: #ffb300;
	--silver: #b8c0cc;
	--bronze: #d98246;
	--radius: 22px;
	--gap: clamp(12px, 1.6vw, 24px);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	height: 100%;
}

body {
	font-family: 'Poppins', system-ui, sans-serif;
	color: var(--burgundy);
	background:
		radial-gradient(120% 120% at 0% 0%, #ffd9ea 0%, var(--pink-bg) 55%, #ec9dc2 100%);
	overflow: hidden;
}

.board {
	height: 100vh;
	width: 100%;
	display: grid;
	grid-template-columns: 1.9fr 1fr;
	gap: var(--gap);
	padding: var(--gap);
}

/* ---------- LEADERBOARD ---------- */
.leaderboard {
	background: var(--pink-soft);
	border-radius: var(--radius);
	padding: var(--gap);
	display: flex;
	flex-direction: column;
	min-height: 0;
	box-shadow: 0 12px 40px rgba(122, 15, 56, 0.15);
}

.lb-head {
	display: flex;
	align-items: center;
	gap: 14px;
	background: linear-gradient(135deg, var(--magenta), var(--magenta-dark));
	color: var(--white);
	border-radius: 16px;
	padding: clamp(10px, 1.4vw, 18px) clamp(16px, 2vw, 26px);
	box-shadow: 0 6px 18px rgba(160, 18, 72, 0.35);
}

.lb-head__icon {
	display: grid;
	place-items: center;
	width: clamp(34px, 3vw, 46px);
	height: clamp(34px, 3vw, 46px);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
}

.lb-head__icon svg {
	width: 60%;
	height: 60%;
	color: #ffe27a;
}

.lb-head__title {
	font-size: clamp(20px, 2.4vw, 36px);
	font-weight: 700;
	letter-spacing: 0.5px;
}

.lb-list {
	flex: 1;
	min-height: 0;
	margin-top: var(--gap);
	display: flex;
	flex-direction: column;
	gap: clamp(6px, 0.7vw, 12px);
	overflow: hidden;
}

.lb-empty {
	margin: auto;
	font-size: clamp(16px, 1.6vw, 22px);
	color: var(--magenta-dark);
	opacity: 0.7;
}

.row {
	display: flex;
	align-items: center;
	gap: clamp(10px, 1.2vw, 18px);
	background: rgba(255, 255, 255, 0.75);
	border-radius: 14px;
	padding: clamp(6px, 0.7vw, 12px) clamp(12px, 1.4vw, 20px);
	flex: 1;
	min-height: 0;
	border: 1px solid rgba(255, 255, 255, 0.4);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.row:hover {
	transform: scale(1.015) translateX(4px);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 6px 18px rgba(122, 15, 56, 0.1);
}

.row__rank {
	flex: 0 0 auto;
	width: clamp(30px, 2.6vw, 44px);
	text-align: center;
	font-weight: 700;
	font-size: clamp(15px, 1.5vw, 22px);
	color: var(--magenta-dark);
}

.row__avatar {
	flex: 0 0 auto;
	width: clamp(30px, 2.8vw, 46px);
	height: clamp(30px, 2.8vw, 46px);
	border-radius: 50%;
	background: rgba(194, 24, 91, 0.15);
	display: grid;
	place-items: center;
	color: var(--magenta);
}

.row__avatar svg {
	width: 62%;
	height: 62%;
}

.row__name {
	flex: 1;
	min-width: 0;
	font-weight: 500;
	font-size: clamp(15px, 1.5vw, 24px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.row__amount {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: clamp(15px, 1.55vw, 25px);
	color: var(--burgundy);
	font-variant-numeric: tabular-nums;
}

/* Top 3 highlighted */
.row--top {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 235, 240, 0.95));
	box-shadow: 0 4px 14px rgba(160, 18, 72, 0.12);
}

.row--1 {
	border-left: 6px solid var(--gold);
	background: linear-gradient(135deg, #fffcf0, #fbe0ec) !important;
	box-shadow: 0 6px 18px rgba(255, 179, 0, 0.22) !important;
}
.row--2 {
	border-left: 6px solid var(--silver);
	background: linear-gradient(135deg, #f7f8fa, #fbe0ec) !important;
	box-shadow: 0 4px 14px rgba(184, 192, 204, 0.15) !important;
}
.row--3 {
	border-left: 6px solid var(--bronze);
	background: linear-gradient(135deg, #fdf8f4, #fbe0ec) !important;
	box-shadow: 0 4px 14px rgba(217, 130, 70, 0.15) !important;
}

.row--top .row__avatar {
	background: rgba(255, 255, 255, 0.55);
}

.medal {
	font-size: clamp(18px, 1.9vw, 30px);
	line-height: 1;
}

.lb-foot {
	margin-top: var(--gap);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: var(--magenta-dark);
}

.lb-foot__name {
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
	font-size: clamp(12px, 1.3vw, 18px);
}

.lb-foot__status {
	font-size: clamp(10px, 1vw, 14px);
	opacity: 0.65;
}

/* ---------- SIDE (prize + terms) ---------- */
.side {
	display: grid;
	grid-template-rows: 1.15fr 1fr;
	gap: var(--gap);
	min-height: 0;
}

.card {
	position: relative;
	background: var(--white);
	border-radius: var(--radius);
	padding: clamp(16px, 1.8vw, 28px);
	box-shadow: 0 12px 40px rgba(122, 15, 56, 0.12);
	display: flex;
	min-height: 0;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 1px solid rgba(194, 24, 91, 0.05);
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 48px rgba(122, 15, 56, 0.18);
}

.card__icon {
	position: absolute;
	top: clamp(12px, 1.4vw, 20px);
	left: clamp(12px, 1.4vw, 20px);
	display: grid;
	place-items: center;
	width: clamp(30px, 2.6vw, 42px);
	height: clamp(30px, 2.6vw, 42px);
	border-radius: 50%;
}

.card__icon svg {
	width: 58%;
	height: 58%;
}

.card__icon--gift {
	background: rgba(255, 179, 0, 0.15);
	color: var(--gold);
}

.card__icon--star {
	background: rgba(255, 179, 0, 0.16);
	color: var(--gold);
}

.card__body {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

/* Prize */
.card--prize .card__body {
	align-items: center;
	justify-content: center;
	gap: clamp(8px, 1vw, 16px);
}

.prize__img {
	max-width: 100%;
	max-height: 82%;
	object-fit: contain;
	border-radius: 14px;
	filter: drop-shadow(0 10px 25px rgba(255, 179, 0, 0.35));
	animation: floatPrize 4s ease-in-out infinite;
	transition: transform 0.3s ease;
}

@keyframes floatPrize {
	0%, 100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-8px) scale(1.02);
	}
}

.prize__fallback {
	width: 100%;
	max-height: 78%;
	aspect-ratio: 4 / 3;
	border-radius: 14px;
	background: rgba(194, 24, 91, 0.08);
	border: 2px dashed rgba(194, 24, 91, 0.3);
	place-items: center;
	gap: 8px;
	color: var(--magenta);
	text-align: center;
	font-size: clamp(11px, 1.1vw, 15px);
	font-weight: 500;
}

.prize__fallback svg {
	width: clamp(40px, 4vw, 64px);
	height: clamp(40px, 4vw, 64px);
	opacity: 0.6;
}

.prize__caption {
	text-align: center;
	font-weight: 700;
	color: var(--magenta-dark);
	font-size: clamp(14px, 1.5vw, 22px);
}

/* Terms */
.card--terms .card__body {
	justify-content: center;
	padding-left: clamp(6px, 0.8vw, 12px);
}

.terms__title {
	font-size: clamp(16px, 1.7vw, 26px);
	font-weight: 700;
	color: var(--magenta-dark);
	margin-bottom: clamp(8px, 1vw, 16px);
}

.terms__list {
	list-style: decimal;
	padding-left: 1.4em;
	display: flex;
	flex-direction: column;
	gap: clamp(8px, 1.1vw, 20px);
}

.terms__list li {
	font-size: clamp(14px, 1.3vw, 20px);
	font-weight: 500;
	line-height: 1.5;
	color: var(--burgundy);
}

.terms__list li::marker {
	font-weight: 700;
	color: var(--magenta);
}

/* Portrait / narrow fallback */
@media (max-aspect-ratio: 1/1), (max-width: 820px) {
	.board {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		height: auto;
		min-height: 100vh;
		overflow: auto;
	}
	body {
		overflow: auto;
	}
	.side {
		grid-template-rows: auto auto;
	}
	.row {
		flex: 0 0 auto;
	}
}
