* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #1a1a2e;
	background-image:
		radial-gradient(ellipse at 50% 0%, #16213e 0%, #1a1a2e 70%),
		radial-gradient(
			circle at 20% 80%,
			rgba(255, 215, 0, 0.03) 0%,
			transparent 50%
		),
		radial-gradient(
			circle at 80% 80%,
			rgba(192, 192, 192, 0.03) 0%,
			transparent 50%
		);
	font-family: "Georgia", serif;
	overflow: hidden;
	gap: 2rem;
}

.medals-container {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: clamp(1rem, 4vw, 3rem);
	flex-wrap: wrap;
	padding: 1rem;
}

.medal-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	animation: sway 4s ease-in-out infinite;
	transform-origin: top center;
	cursor: pointer;
	transition: transform 0.3s ease;
}

.medal-wrapper:nth-child(1) {
	animation-delay: 0s;
}
.medal-wrapper:nth-child(2) {
	animation-delay: 0.5s;
}
.medal-wrapper:nth-child(3) {
	animation-delay: 1s;
}

.medal-wrapper:hover {
	transform: scale(1.05);
}

@keyframes sway {
	0%,
	100% {
		transform: rotate(-1.5deg);
	}
	50% {
		transform: rotate(1.5deg);
	}
}

.ribbon {
	width: clamp(28px, 5vw, 40px);
	height: clamp(60px, 10vw, 90px);
	position: relative;
	z-index: 1;
}

.ribbon::before,
.ribbon::after {
	content: "";
	position: absolute;
	top: 0;
	width: 55%;
	height: 100%;
	border-radius: 0 0 2px 2px;
}

.ribbon::before {
	left: 0;
	transform: skewX(5deg);
}

.ribbon::after {
	right: 0;
	transform: skewX(-5deg);
}

.gold .ribbon::before {
	background: linear-gradient(180deg, #1a3a8a, #2255cc);
}
.gold .ribbon::after {
	background: linear-gradient(180deg, #cc2222, #8a1a1a);
}

.silver .ribbon::before {
	background: linear-gradient(180deg, #1a6a3a, #22aa55);
}
.silver .ribbon::after {
	background: linear-gradient(180deg, #1a6a3a, #22aa55);
}

.bronze .ribbon::before {
	background: linear-gradient(180deg, #8a1a5a, #cc2288);
}
.bronze .ribbon::after {
	background: linear-gradient(180deg, #1a3a8a, #2255cc);
}

.medal {
	width: clamp(90px, 18vw, 140px);
	height: clamp(90px, 18vw, 140px);
	border-radius: 50%;
	position: relative;
	margin-top: -10px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow:
		0 8px 32px rgba(0, 0, 0, 0.5),
		inset 0 2px 4px rgba(255, 255, 255, 0.3),
		inset 0 -4px 8px rgba(0, 0, 0, 0.3);
}

.medal::before {
	content: "";
	position: absolute;
	inset: 6px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.medal::after {
	content: "";
	position: absolute;
	inset: 12px;
	border-radius: 50%;
	border: 1.5px dashed rgba(255, 255, 255, 0.15);
}

.gold .medal {
	background:
		radial-gradient(ellipse at 30% 25%, #fff7cc 0%, transparent 40%),
		radial-gradient(ellipse at 70% 75%, #8b6914 0%, transparent 50%),
		conic-gradient(
			from 0deg,
			#ffd700,
			#daa520,
			#ffd700,
			#b8860b,
			#ffd700,
			#daa520,
			#ffd700
		);
}

.silver .medal {
	background:
		radial-gradient(ellipse at 30% 25%, #ffffff 0%, transparent 40%),
		radial-gradient(ellipse at 70% 75%, #666 0%, transparent 50%),
		conic-gradient(
			from 0deg,
			#c0c0c0,
			#a8a8a8,
			#e8e8e8,
			#909090,
			#c0c0c0,
			#a8a8a8,
			#c0c0c0
		);
}

.bronze .medal {
	background:
		radial-gradient(ellipse at 30% 25%, #ffcc99 0%, transparent 40%),
		radial-gradient(ellipse at 70% 75%, #5a3010 0%, transparent 50%),
		conic-gradient(
			from 0deg,
			#cd7f32,
			#a0522d,
			#deb887,
			#8b4513,
			#cd7f32,
			#a0522d,
			#cd7f32
		);
}

.emblem {
	width: 60%;
	height: 60%;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 3;
}

.gold .emblem {
	background: radial-gradient(circle, #ffe44d 0%, #daa520 100%);
	box-shadow:
		inset 0 2px 6px rgba(0, 0, 0, 0.3),
		0 1px 2px rgba(255, 255, 255, 0.4);
}

.silver .emblem {
	background: radial-gradient(circle, #f0f0f0 0%, #999 100%);
	box-shadow:
		inset 0 2px 6px rgba(0, 0, 0, 0.3),
		0 1px 2px rgba(255, 255, 255, 0.6);
}

.bronze .emblem {
	background: radial-gradient(circle, #e8a050 0%, #8b4513 100%);
	box-shadow:
		inset 0 2px 6px rgba(0, 0, 0, 0.3),
		0 1px 2px rgba(255, 255, 255, 0.3);
}

.emblem-icon {
	font-size: clamp(1.4rem, 4vw, 2.2rem);
	user-select: none;
	line-height: 1;
}

.gold .emblem-icon {
	color: #8b6914;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

.silver .emblem-icon {
	color: #555;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}

.bronze .emblem-icon {
	color: #4a2008;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.shine {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	overflow: hidden;
	z-index: 4;
	pointer-events: none;
}

.shine::before {
	content: "";
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: linear-gradient(
		45deg,
		transparent 40%,
		rgba(255, 255, 255, 0.25) 45%,
		rgba(255, 255, 255, 0.4) 50%,
		rgba(255, 255, 255, 0.25) 55%,
		transparent 60%
	);
	animation: shine-sweep 5s ease-in-out infinite;
}

.medal-wrapper:nth-child(2) .shine::before {
	animation-delay: 1.5s;
}
.medal-wrapper:nth-child(3) .shine::before {
	animation-delay: 3s;
}

@keyframes shine-sweep {
	0%,
	70%,
	100% {
		transform: translateX(-100%) rotate(0deg);
	}
	85% {
		transform: translateX(100%) rotate(0deg);
	}
}

.message {
	text-align: center;
	color: rgba(255, 255, 255, 0.35);
	font-size: clamp(0.75rem, 2vw, 0.95rem);
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin-top: 1rem;
	transition: color 0.5s ease;
	user-select: none;
}

.message:hover {
	color: rgba(255, 215, 0, 0.5);
}

.message .dot {
	display: inline-block;
	animation: pulse-dot 2s ease-in-out infinite;
}

.message .dot:nth-child(2) {
	animation-delay: 0.3s;
}
.message .dot:nth-child(3) {
	animation-delay: 0.6s;
}

@keyframes pulse-dot {
	0%,
	100% {
		opacity: 0.3;
	}
	50% {
		opacity: 1;
	}
}

.sparkle {
	position: fixed;
	width: 4px;
	height: 4px;
	background: gold;
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	animation: sparkle-float 3s ease-in-out infinite;
}

@keyframes sparkle-float {
	0% {
		opacity: 0;
		transform: translateY(0) scale(0);
	}
	20% {
		opacity: 0.8;
		transform: translateY(-10px) scale(1);
	}
	100% {
		opacity: 0;
		transform: translateY(-60px) scale(0);
	}
}

.ripple {
	position: absolute;
	border-radius: 50%;
	border: 2px solid rgba(255, 215, 0, 0.6);
	animation: ripple-out 0.8s ease-out forwards;
	pointer-events: none;
	z-index: 10;
}

@keyframes ripple-out {
	0% {
		width: 0;
		height: 0;
		opacity: 1;
	}
	100% {
		width: 150px;
		height: 150px;
		opacity: 0;
		margin-top: -75px;
		margin-left: -75px;
	}
}

@media (max-width: 480px) {
	.medals-container {
		gap: 0.5rem;
	}
	.medal-wrapper:nth-child(2) {
		order: -1;
		transform: translateY(-10px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.medal-wrapper {
		animation: none;
	}
	.shine::before {
		animation: none;
	}
	.sparkle {
		animation: none;
		display: none;
	}
}
