*, *::before, *::after { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
	color: #fff;
	background: #1a0505;
}

#background-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(20, 0, 0, 0.25);
	z-index: 1;
}

#page-bg {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

/* --- Layout principal --- */

.loading-screen {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	padding: 16px 24px;
}

.header {
	flex-shrink: 0;
}

.server-tag {
	display: inline-block;
	padding: 6px 14px;
	margin-bottom: 8px;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	font-size: 0.95rem;
	font-weight: 600;
}

.logo-wrap {
	text-align: center;
	padding: 4px 0 10px;
}

.logo-wrap img {
	max-width: 100%;
	width: auto;
	max-height: 16vh;
	height: auto;
	filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}

.title-text {
	margin: 0;
	font-size: clamp(2rem, 6vw, 4rem);
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.content-row {
	flex: 1;
	display: flex;
	align-items: stretch;
	gap: 16px;
	min-height: 0;
	overflow: hidden;
	padding-top: 4px;
}

.content-left {
	flex: 1;
	min-width: 0;
	overflow-y: auto;
	max-height: 100%;
	align-self: center;
}

.content-right {
	width: 400px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: 100%;
}

/* --- Staff --- */

.staff-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: 100%;
	background: rgba(8, 8, 8, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.staff-panel-scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 4px;
}

.staff-panel-scroll::-webkit-scrollbar { width: 5px; }
.staff-panel-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }
.staff-panel-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }

.staff-panel-title {
	margin: 0 0 10px;
	flex-shrink: 0;
	font-size: 0.9rem;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.85);
}

.staff-role { margin-bottom: 10px; }
.staff-role:last-child { margin-bottom: 0; }

.staff-role-header {
	margin: 0 0 5px;
	padding-bottom: 4px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 0.85rem;
	font-weight: 600;
}

.staff-role-header .fa { margin-right: 5px; color: #e8b923; }
.staff-role-header .fa-cog { color: #aaa; }
.staff-role-header .fa-wrench { color: #ccc; }
.staff-role-header .fa-shield { color: #7eb8ff; }

.staff-members-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -3px;
}

.staff-member {
	display: flex;
	align-items: center;
	width: 50%;
	padding: 3px;
	min-width: 0;
}

.staff-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.15);
	margin-right: 7px;
	flex-shrink: 0;
}

.staff-name {
	font-size: 0.8rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

/* --- Cards --- */

.g4l-card {
	background: rgba(8, 8, 8, 0.82);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	padding: 14px 18px;
	margin-bottom: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.g4l-card:last-child { margin-bottom: 0; }

.g4l-card-title {
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 600;
}

.g4l-card-title .fa { margin-right: 6px; color: #e8b923; }

.tip-card .g4l-card-title .fa { color: #ffcc44; }

.welcome-card {
	display: flex;
	align-items: center;
}

.welcome-avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 2px solid rgba(200, 30, 30, 0.6);
	margin-right: 14px;
	flex-shrink: 0;
}

.welcome-avatar-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(200, 30, 30, 0.3);
	font-size: 1.5rem;
	color: rgba(255, 255, 255, 0.7);
}

.welcome-text {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
}

.welcome-meta {
	font-size: 0.85rem;
	opacity: 0.7;
	margin-top: 4px;
}

.server-info {
	font-size: 0.85rem;
	opacity: 0.85;
	margin-bottom: 6px;
}

.server-info span { margin-right: 16px; }
.server-info .fa { margin-right: 4px; }

/* --- Download --- */

.download-bar {
	flex-shrink: 0;
	padding-top: 10px;
}

.download-panel {
	background: rgba(8, 8, 8, 0.88);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 8px;
	padding: 10px 16px;
}

.download-status { margin: 0 0 4px; font-size: 0.9rem; }

.download-file {
	margin: 0 0 8px;
	font-size: 0.8rem;
	opacity: 0.65;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.progress-track {
	height: 5px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 3px;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #b01010, #e03030);
	border-radius: 3px;
}

.g4l-card ol {
	margin: 8px 0 0;
	padding-left: 20px;
	font-size: 0.85rem;
	line-height: 1.6;
}

/* --- Astuce --- */

.tip-list {
	margin: 0;
	padding-left: 18px;
	font-size: 0.88rem;
	line-height: 1.7;
	opacity: 0.92;
}

.tip-list li { margin-bottom: 4px; }
.tip-list li:last-child { margin-bottom: 0; }

.tip-list code {
	background: rgba(212, 32, 32, 0.25);
	border: 1px solid rgba(212, 32, 32, 0.4);
	border-radius: 4px;
	padding: 1px 6px;
	font-size: 0.85em;
	color: #ff8888;
}

/* --- Discord --- */

.discord-badge {
	position: fixed;
	top: 20px;
	right: 24px;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 8px;
	background: rgba(8, 8, 8, 0.88);
	border: 1px solid rgba(88, 101, 242, 0.5);
	border-radius: 24px;
	text-decoration: none;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.discord-badge img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	flex-shrink: 0;
}

/* --- Responsive --- */

@media (max-width: 768px) {
	.loading-screen { padding: 12px 16px; }

	.content-row {
		flex-direction: column;
		overflow-y: auto;
	}

	.content-left,
	.content-right {
		width: 100%;
		max-height: 45vh;
	}

	.staff-member {
		width: 50%;
	}

	.content-right { margin-top: 4px; }

	.logo-wrap img { max-height: 16vh; }

	.discord-badge {
		top: 14px;
		right: 16px;
		font-size: 0.8rem;
	}

	.discord-badge img {
		width: 24px;
		height: 24px;
	}
}

@media (max-height: 600px) {
	.logo-wrap img { max-height: 12vh; }
	.logo-wrap { padding: 0; }
}
