:root {
	--glass-bg: rgba(255, 255, 255, 0.10);
	--glass-border: rgba(255, 255, 255, 0.22);
	--glass-bg-strong: rgba(255, 255, 255, 0.18);
	--text: #ffffff;
	--text-muted: rgba(255, 255, 255, 0.78);
	--text-dim: rgba(255, 255, 255, 0.55);
	--accent: #5cffaa;
	--accent-hover: #3fe893;
	--danger: #ff6b6b;
	--radius-card: 20px;
	--radius-btn: 14px;
	--shadow-card: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
	box-sizing: border-box;
}

[hidden] {
	display: none !important;
}

html, body {
	margin: 0;
	padding: 0;
	min-height: 100%;
}

body {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--text);
	background:
		linear-gradient(rgba(20, 26, 35, 0.55), rgba(20, 26, 35, 0.55)),
		url("/img/minecraft.png") no-repeat center center fixed;
	background-size: cover;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	line-height: 1.5;
	position: relative;
	overflow-x: hidden;
}

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

/* ===== Top bar (back + discord floating) ===== */
.top-bar {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 40px 0 40px;
	max-width: 1240px;
	margin: 0 auto;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-btn);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	font-weight: 600;
	font-size: 14px;
	transition: background 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
	background: var(--glass-bg-strong);
	transform: translateX(-2px);
}

.discord-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-btn);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: background 0.2s ease, transform 0.2s ease;
}

.discord-link:hover {
	background: var(--glass-bg-strong);
	transform: translateY(-2px);
}

/* ===== Hero logo (animated pulse, same as base page) ===== */
.hero {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 20px 20px 0 20px;
}

.hero .brand {
	display: inline-block;
}

.hero .brand img {
	width: 320px;
	max-width: 85vw;
	height: auto;
	filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
	animation:
		logoDropin 2s ease-in-out,
		logoPulse 5s 2s infinite ease-in-out;
}

@keyframes logoDropin {
	0% { transform: translateY(-80px); opacity: 0; }
	100% { transform: translateY(0); opacity: 1; }
}

@keyframes logoPulse {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.07); }
	100% { transform: scale(1); }
}

/* ===== Main layout ===== */
.page {
	position: relative;
	z-index: 1;
	max-width: 1240px;
	margin: 0 auto;
	padding: 10px 40px 60px 40px;
}

.intro {
	text-align: center;
	margin: 20px 0 36px 0;
}

.intro h1 {
	font-size: 40px;
	font-weight: 800;
	margin: 0 0 10px 0;
	letter-spacing: -0.5px;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.intro p {
	font-size: 17px;
	color: var(--text-muted);
	margin: 0;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ===== Cards (glass morphism) ===== */
.card {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-card);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	box-shadow: var(--shadow-card);
	padding: 28px;
}

.grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

/* ===== Vote links ===== */
.vote-links-card {
	padding: 20px;
}

.vote-links {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.vote-links-loading {
	padding: 30px;
	text-align: center;
	color: var(--text-muted);
}

.vote-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 26px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: 16px;
	color: var(--text);
	transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
	cursor: pointer;
}

.vote-link:hover {
	background: var(--glass-bg-strong);
	border-color: rgba(255, 255, 255, 0.45);
	transform: translateX(4px);
}

.vote-link-main {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.vote-link-name {
	font-weight: 800;
	font-size: 22px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	line-height: 1.1;
}

.vote-link-status {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.3px;
	line-height: 1.2;
}

.vote-link-status.available {
	color: var(--accent);
}

.vote-link-status.cooldown-text {
	color: rgba(255, 255, 255, 0.6);
}

.vote-link-status.muted {
	color: rgba(255, 255, 255, 0.5);
	font-style: italic;
	font-weight: 500;
}

.vote-link-status:empty {
	display: none;
}

.vote-link.cooldown {
	opacity: 0.58;
	cursor: not-allowed;
}

.vote-link.cooldown:hover {
	transform: none;
	background: var(--glass-bg);
	border-color: var(--glass-border);
}

.vote-link.shake {
	animation: shake 0.35s ease;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	50% { transform: translateX(6px); }
	75% { transform: translateX(-3px); }
}

.vote-link .arrow {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: var(--text);
	transition: transform 0.25s ease;
}

.vote-link:hover:not(.cooldown) .arrow {
	transform: translate(4px, -4px);
}

/* ===== Player card ===== */
.player-card {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100%;
}

.player-logged-out {
	text-align: center;
	padding: 12px;
}

.player-skin-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 110px;
	height: 110px;
	border-radius: 50%;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	color: var(--text-muted);
	margin-bottom: 18px;
}

.player-logged-out h2 {
	font-size: 22px;
	margin: 0 0 8px 0;
	font-weight: 700;
}

.player-logged-out p {
	color: var(--text-muted);
	font-size: 14px;
	margin: 0 0 22px 0;
}

.player-logged-in {
	display: flex;
	gap: 24px;
	align-items: center;
}

.player-skin {
	flex: 0 0 auto;
	width: 130px;
	height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--glass-border);
	border-radius: 16px;
	padding: 10px;
}

.player-skin img {
	max-width: 100%;
	max-height: 100%;
	image-rendering: pixelated;
	-ms-interpolation-mode: nearest-neighbor;
}

.player-info {
	flex: 1;
	min-width: 0;
}

.player-name {
	font-size: 24px;
	font-weight: 800;
	margin-bottom: 16px;
	word-break: break-word;
}

.player-stats {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 18px;
}

.stat {
	flex: 1;
}

.stat-value {
	display: block;
	font-size: 32px;
	font-weight: 800;
	color: var(--accent);
	line-height: 1;
	margin-bottom: 4px;
}

.stat-label {
	display: block;
	font-size: 12px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.stat-sep {
	width: 1px;
	height: 40px;
	background: var(--glass-border);
}

/* ===== Buttons ===== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border: none;
	border-radius: var(--radius-btn);
	font-family: inherit;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
	background: var(--accent);
	color: #052e1a;
	box-shadow: 0 8px 24px rgba(92, 255, 170, 0.35);
}

.btn-primary:hover {
	background: var(--accent-hover);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(92, 255, 170, 0.45);
}

.btn-ghost {
	background: transparent;
	color: var(--text-muted);
	border: 1px solid var(--glass-border);
	padding: 10px 18px;
	font-size: 13px;
}

.btn-ghost:hover {
	background: var(--glass-bg);
	color: var(--text);
}

/* ===== How-to ===== */
.howto-card h2 {
	font-size: 24px;
	margin: 0 0 18px 0;
	font-weight: 700;
}

.howto-steps {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 24px;
}

.howto-steps li {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--text-muted);
	font-size: 15px;
}

.step-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: var(--accent);
	color: #052e1a;
	border-radius: 50%;
	font-weight: 800;
	font-size: 15px;
}

.howto-steps code {
	background: rgba(0, 0, 0, 0.25);
	padding: 2px 8px;
	border-radius: 6px;
	font-family: "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: 13px;
	color: var(--accent);
}

.howto-steps em {
	font-style: normal;
	color: var(--text);
	font-weight: 600;
}

/* ===== Footer ===== */
.site-footer {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 30px 40px;
	color: var(--text-dim);
	font-size: 13px;
}

/* ===== Modal ===== */
.modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(5, 30, 45, 0.6);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 20px;
	animation: fadeIn 0.2s ease;
}

.modal-backdrop[hidden] {
	display: none;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.modal {
	position: relative;
	width: 100%;
	max-width: 460px;
	background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
	color: #0c2836;
	border-radius: 22px;
	padding: 32px 28px 28px 28px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
	animation: slideUp 0.25s ease;
}

@keyframes slideUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.modal h2 {
	margin: 0 0 22px 0;
	font-size: 22px;
	font-weight: 800;
	text-align: center;
	color: #0c2836;
}

.modal-close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 34px;
	height: 34px;
	background: transparent;
	border: none;
	border-radius: 10px;
	color: #6b7c8b;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #0c2836;
}

/* Version selector */
.version-selector {
	background: #e9eef4;
	border-radius: 16px;
	padding: 18px 18px 16px 18px;
	margin-bottom: 16px;
}

.version-label {
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: #6b7c8b;
	margin-bottom: 12px;
}

.version-toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.version-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 14px;
	border: 2px solid transparent;
	background: #ffffff;
	color: #0c2836;
	border-radius: 12px;
	font-family: inherit;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
	position: relative;
}

.version-btn.active {
	background: var(--accent);
	border-color: var(--accent);
	color: #052e1a;
	box-shadow: 0 6px 16px rgba(92, 255, 170, 0.4);
}

.version-btn.disabled {
	background: #f1f3f6;
	color: #a8b3be;
	cursor: not-allowed;
}

.version-btn.disabled svg {
	opacity: 0.6;
}

.soon-badge {
	position: absolute;
	top: -8px;
	right: -6px;
	background: #ffb020;
	color: #5a3500;
	font-size: 9px;
	font-weight: 800;
	padding: 3px 6px;
	border-radius: 6px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

/* Pseudo form */
.pseudo-form {
	display: flex;
	gap: 10px;
	background: #e9eef4;
	border-radius: 14px;
	padding: 6px;
}

.pseudo-form input {
	flex: 1;
	min-width: 0;
	background: #ffffff;
	border: none;
	border-radius: 10px;
	padding: 14px 18px;
	font-family: inherit;
	font-size: 15px;
	color: #0c2836;
	outline: none;
	transition: box-shadow 0.2s ease;
}

.pseudo-form input::placeholder {
	color: #9aa6b2;
}

.pseudo-form input:focus {
	box-shadow: 0 0 0 2px var(--accent);
}

.pseudo-submit {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	background: var(--accent);
	color: #052e1a;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.pseudo-submit:hover {
	background: var(--accent-hover);
	transform: translateX(2px);
}

.pseudo-submit:disabled {
	background: #c7ced5;
	cursor: not-allowed;
	transform: none;
}

.form-error {
	margin-top: 14px;
	padding: 10px 14px;
	background: rgba(255, 107, 107, 0.12);
	border: 1px solid rgba(255, 107, 107, 0.3);
	border-radius: 10px;
	color: #c23333;
	font-size: 13px;
	text-align: center;
}

.form-error[hidden] {
	display: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
	.top-bar {
		padding: 16px 20px 0 20px;
	}

	.hero .brand img {
		width: 230px;
	}

	.page {
		padding: 10px 20px 40px 20px;
	}

	.intro h1 {
		font-size: 30px;
	}

	.intro p {
		font-size: 15px;
	}

	.grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.vote-link {
		padding: 18px 22px;
	}

	.vote-link-name {
		font-size: 18px;
	}

	.player-logged-in {
		flex-direction: column;
		text-align: center;
		gap: 18px;
	}

	.player-stats {
		justify-content: center;
	}

	.howto-steps {
		grid-template-columns: 1fr;
	}

	.card {
		padding: 22px;
	}
}

@media (max-width: 520px) {
	.back-link span {
		display: none;
	}

	.back-link {
		padding: 10px;
	}

	.hero .brand img {
		width: 180px;
	}

	.intro h1 {
		font-size: 26px;
	}

	.modal {
		padding: 26px 20px 22px 20px;
	}
}

@media (min-width: 1250px) {
	.hero .brand img {
		width: 420px;
	}
}
