@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
	--home-bg: #f0f7ff;
	--home-surface: #ffffff;
	--home-surface-soft: #fbfcf9;
	--home-border: rgba(92, 110, 95, 0.16);
	--home-border-strong: rgba(92, 110, 95, 0.26);
	--home-text: #24312b;
	--home-muted: #66706b;
	--home-accent: #5cae7f;
	--home-accent-warm: #f0c36b;
	--home-shadow: 0 14px 30px rgba(44, 57, 48, 0.08);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

body.home-page {
	font-family: 'Montserrat', sans-serif;
	color: var(--home-text);
	background: var(--home-bg);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body.home-page > * {
	position: relative;
}

body.home-page .main-content {
	width: min(1040px, calc(100% - 2rem));
	margin: 0 auto;
	padding: 2.75rem 0 2.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 0.5rem;
	flex-grow: 1;
	text-align: center;
}

body.home-page .hero-container {
	width: 100%;
	padding: 0 0 0.5rem;
	display: flex;
	justify-content: center;
}

body.home-page .page-heading-styled {
	width: min(880px, 100%);
	margin: 0 auto 0;
	padding: 1.5rem;
	background: #ffffff;
	border: 1px solid rgba(92, 110, 95, 0.12);
	border-radius: 16px;
	box-shadow: 0 4px 12px rgba(44, 57, 48, 0.04);
}

body.home-page .page-heading {
	margin: 0;
	padding: 0;
}

body.home-page .page-heading h2 {
	margin: 0;
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--home-text);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

body.home-page .page-heading p {
	margin: 0.6rem 0 0;
	color: var(--home-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

/* Survival/SkyBlock Game Mode Styling */
body.home-page .survival-layout {
	width: 100%;
	padding: 0.15rem 0 0;
	display: flex;
	justify-content: center;
}

body.home-page .survival-panel {
	width: min(880px, 100%);
	margin: 0 auto;
	background: #ffffff;
	border: 1px solid rgba(92, 110, 95, 0.1);
	border-radius: 16px;
	box-shadow: 0 8px 18px rgba(44, 57, 48, 0.06);
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.3rem;
}

body.home-page .survival-panel.compact {
	padding: 1.1rem;
}

body.home-page .survival-panel.compact img {
	width: 100%;
	max-height: 150px;
	object-fit: cover;
	border-radius: 12px;
	margin-bottom: 1rem;
}

body.home-page .survival-copy {
	height: 100%;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

body.home-page .survival-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
}

body.home-page .stat-card {
	padding: 0.75rem 0.65rem;
	border-radius: 14px;
	background: linear-gradient(180deg, #f8fbf7 0%, #edf5ef 100%);
	border: 1px solid rgba(92, 110, 95, 0.1);
	text-align: center;
	transition: all 0.3s ease;
}

body.home-page .stat-card:nth-child(1) {
	background: #bbdefb;
	border: 1px solid #64b5f6;
}

body.home-page .stat-card:nth-child(2) {
	background: #e1bee7;
	border: 1px solid #ce93d8;
}

body.home-page .stat-card:nth-child(3) {
	background: #ffcc80;
	border: 1px solid #ffa726;
}

body.home-page .stat-card strong {
	display: block;
	color: #24312b;
	font-size: 1rem;
	line-height: 1.1;
	margin-bottom: 0.25rem;
}

body.home-page .stat-card span {
	color: #66706b;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

body.home-page .detail-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.3rem;
}

body.home-page .detail-card {
	padding: 0.85rem 0.9rem;
	border-radius: 14px;
	background: #ffffff;
	border: 1px solid rgba(92, 110, 95, 0.1);
	box-shadow: 0 4px 12px rgba(44, 57, 48, 0.04);
}

body.home-page .detail-card.actions-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

body.home-page .cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #5cae7f;
	color: #ffffff;
	padding: 0.82rem 1.35rem;
	border-radius: 999px;
	text-decoration: none;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	border: none;
	cursor: pointer;
}

body.home-page .cta-button:hover {
	background: #4a9a6d;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(92, 174, 127, 0.2);
}

/* Modal Styles */
body.home-page .modal {
	display: none;
	position: fixed;
	z-index: 300;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(25, 33, 25, 0.45);
	backdrop-filter: blur(10px);
	justify-content: center;
	align-items: center;
	padding: 1rem;
}

body.home-page .modal.active {
	display: flex;
}

body.home-page .modal-content {
	background: #ffffff;
	padding: 0;
	border: 1px solid #e5e5e5;
	width: 100%;
	max-width: 420px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	position: relative;
	animation: slideIn 0.3s ease;
	border-radius: 16px;
	overflow: hidden;
}

body.home-page .modal-login {
	border: 1px solid #e5e5e5;
}

body.home-page .modal-register {
	border: 1px solid #e5e5e5;
}

body.home-page .modal-content h2 {
	margin: 1.5rem 0 0.2rem 0;
	padding: 0 2.25rem;
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #1a1a1a;
}

body.home-page .modal-content form {
	padding: 0 2.25rem 2rem;
}

body.home-page .form-group {
	margin-bottom: 1.2rem;
}

body.home-page .modal-content .form-group:last-of-type {
	margin-bottom: 1.5rem;
}

body.home-page .form-group label {
	display: block;
	margin-bottom: 0.6rem;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 0.05em;
	color: #1a1a1a;
}

body.home-page .form-group input,
body.home-page .form-group select {
	width: 100%;
	padding: 0.95rem 1.1rem;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 0.95rem;
	background: #f9f9f9;
	color: #1a1a1a;
	transition: all 0.25s ease;
	font-family: 'Montserrat', sans-serif;
}

body.home-page .form-group input:focus,
body.home-page .form-group select:focus {
	outline: none;
	background: #ffffff;
	border-color: #0d7fbf;
	box-shadow: 0 0 0 3px rgba(13, 127, 191, 0.1), 0 0 0 1px #0d7fbf;
	transform: translateY(-1px);
}

body.home-page .modal-content .btn-primary {
	width: 100%;
	padding: 1rem 1.25rem;
	border: none;
	border-radius: 8px;
	background: #0d7fbf;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 4px 12px rgba(13, 127, 191, 0.15);
	font-family: 'Montserrat', sans-serif;
}

body.home-page .modal-content .btn-primary:hover {
	background: #0a5fa0;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(13, 127, 191, 0.25);
}

body.home-page .form-switch {
	text-align: center;
	margin-top: 1.2rem;
	padding-top: 1.2rem;
	border-top: 1px solid #e5e5e5;
	color: #666666;
	font-size: 0.85rem;
	line-height: 1.6;
}

body.home-page .form-switch a {
	color: #0d7fbf;
	text-decoration: none;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.2s ease;
}

body.home-page .form-switch a:hover {
	color: #0a5fa0;
	text-decoration: underline;
}

body.home-page .close {
	position: absolute;
	right: 1.25rem;
	top: 1.25rem;
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 1.4rem;
	font-weight: bold;
	color: #999;
	background: transparent;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

body.home-page .close:hover {
	color: #0d7fbf;
	background: rgba(13, 127, 191, 0.08);
}

body.home-page .overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(25, 33, 25, 0.35);
	z-index: 150;
}

body.home-page .overlay.active {
	display: block;
}

/* Responsive */
@media (max-width: 900px) {
	body.home-page .main-content {
		width: min(100%, calc(100% - 1.5rem));
		padding: 2.5rem 0 2rem;
	}

	body.home-page .page-heading-styled {
		width: min(100%, calc(100% - 1rem));
		padding: 1.25rem;
	}

	body.home-page .survival-panel {
		width: min(100%, calc(100% - 1rem));
	}

	body.home-page .stat-card {
		padding: 0.65rem 0.55rem;
	}

	body.home-page .survival-stats {
		gap: 0.4rem;
	}
}

@media (max-width: 768px) {
	body.home-page .main-content {
		width: calc(100% - 1rem);
		padding: 2rem 0 1.5rem;
	}

	body.home-page .page-heading h2 {
		font-size: 1.8rem;
	}

	body.home-page .survival-panel {
		width: calc(100% - 1rem);
	}

	body.home-page .stat-card span {
		font-size: 0.65rem;
	}
}

@media (max-width: 620px) {
	body.home-page .main-content {
		width: calc(100% - 0.5rem);
		padding: 1.5rem 0 1rem;
	}

	body.home-page .page-heading h2 {
		font-size: 1.6rem;
	}

	body.home-page .survival-stats {
		grid-template-columns: 1fr;
	}

	body.home-page .detail-card {
		padding: 0.7rem 0.75rem;
	}

	body.home-page .cta-button {
		padding: 0.7rem 1.1rem;
		font-size: 0.75rem;
	}
}
