@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

* {
	box-sizing: border-box;
}

:root {
	--bg: #f7f4ee;
	--bg-accent: #e4f2f1;
	--surface: #ffffff;
	--primary: #1b6a6f;
	--primary-dark: #155458;
	--accent: #f59e0b;
	--text: #1f2933;
	--muted: #5f6c7a;
	--border: #e2e8f0;
	--shadow: 0 12px 30px rgba(23, 37, 84, 0.08);
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: "Space Grotesk", "Manrope", sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.15), transparent 55%),
		radial-gradient(circle at 90% 0%, rgba(27, 106, 111, 0.18), transparent 60%),
		linear-gradient(120deg, var(--bg), var(--bg-accent));
}

header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 24px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}

header .brand {
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: 0.4px;
	color: var(--primary);
	text-decoration: none;
}

nav {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

nav a {
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	transition: background 0.2s ease, color 0.2s ease;
}

nav a:hover {
	background: rgba(27, 106, 111, 0.1);
	color: var(--primary);
}

main {
	max-width: 980px;
	margin: 28px auto 48px;
	padding: 0 18px;
}

h2, h3 {
	margin-top: 0;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 20px 22px;
	box-shadow: var(--shadow);
	margin-bottom: 18px;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

a {
	color: var(--primary);
	text-decoration: none;
}

.button-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	background: var(--primary);
	color: #fff;
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
	box-shadow: 0 8px 18px rgba(27, 106, 111, 0.2);
}

.button-link:hover {
	transform: translateY(-1px);
	background: var(--primary-dark);
}

.button-link.secondary {
	background: #fff;
	color: var(--primary);
	border-color: var(--primary);
	box-shadow: none;
}

button {
	border: none;
	background: var(--primary);
	color: #fff;
	padding: 10px 16px;
	border-radius: 999px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.2s ease;
}

button:hover {
	transform: translateY(-1px);
	background: var(--primary-dark);
}

button.secondary {
	background: #fff;
	color: var(--primary);
	border: 1px solid var(--primary);
}

.inline {
	display: inline;
}

label {
	display: block;
	margin-top: 12px;
	margin-bottom: 6px;
	font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 12px;
	font-size: 1rem;
	font-family: inherit;
	background: #fff;
}

textarea {
	resize: vertical;
}

ol, ul {
	padding-left: 20px;
}

.error {
	background: #ffe3e3;
	color: #9b1c1c;
	padding: 8px 12px;
	border-radius: 10px;
	margin-top: 10px;
}

.warning {
	background: #fff4c4;
	color: #8a5a00;
	padding: 8px 12px;
	border-radius: 10px;
	margin-top: 10px;
}

.success {
	background: #dcfce7;
	color: #166534;
	padding: 8px 12px;
	border-radius: 10px;
	margin-top: 10px;
}

.muted {
	color: var(--muted);
	font-size: 0.95rem;
}

.badge {
	background: #fff4c4;
	color: #8a5a00;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 0.8rem;
	margin-left: 6px;
}

.split {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.timer {
	font-weight: 700;
	color: var(--accent);
}

.answer-list {
	list-style: none;
	padding: 0;
	margin: 12px 0 0;
	display: grid;
	gap: 10px;
}

.answer {
	border-radius: 12px;
	border: 1px solid var(--border);
	padding: 10px 12px;
	background: #f8fafc;
}

.answer.correct {
	border-color: #16a34a;
	background: #dcfce7;
	color: #166534;
	font-weight: 600;
}

.answer.incorrect {
	border-color: #dc2626;
	background: #fee2e2;
	color: #991b1b;
	font-weight: 600;
}

.answer.pending {
	border-style: dashed;
	color: var(--muted);
	background: #f1f5f9;
}

.podium {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	margin-top: 14px;
}

.podium-place {
	flex: 1;
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 12px;
	background: #ffffff;
	box-shadow: var(--shadow);
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.podium-place .place {
	font-weight: 700;
	color: var(--primary);
	margin-bottom: 6px;
}

.podium-place .name {
	font-weight: 700;
}

.podium-place .meta {
	color: var(--muted);
	font-size: 0.92rem;
	margin-top: 4px;
}

.podium-place.first {
	order: 2;
	min-height: 190px;
	border-color: #fbbf24;
}

.podium-place.second {
	order: 1;
	min-height: 150px;
}

.podium-place.third {
	order: 3;
	min-height: 130px;
}

.ranking-list {
	list-style: none;
	padding: 0;
	margin: 14px 0 0;
	display: grid;
	gap: 8px;
}

.ranking-item {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: #f8fafc;
}

@media (max-width: 900px) {
	header {
		padding: 14px 18px;
	}

	main {
		margin: 22px auto 40px;
	}
}

@media (max-width: 720px) {
	header {
		flex-direction: column;
		align-items: flex-start;
	}

	.actions {
		flex-direction: column;
		align-items: stretch;
	}
}

@media (max-width: 600px) {
	main {
		padding: 0 14px;
	}

	nav {
		width: 100%;
	}

	nav a {
		flex: 1 1 auto;
		text-align: center;
	}

	.card {
		padding: 16px;
		border-radius: 14px;
	}

	.split {
		flex-direction: column;
		align-items: stretch;
	}

	.actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.actions .inline {
		display: block;
	}

	.actions > * {
		width: 100%;
	}

	.button-link,
	button {
		width: 100%;
	}

	.podium {
		flex-direction: column;
		align-items: stretch;
	}

	.podium-place {
		min-height: auto;
	}

	.podium-place.first {
		order: 1;
	}

	.podium-place.second {
		order: 2;
	}

	.podium-place.third {
		order: 3;
	}

	.ranking-item {
		flex-direction: column;
		align-items: flex-start;
	}
}
