@import url('/fonts/fonts.css');

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

body {
	font-family: 'Montserrat', sans-serif;
	font-size: 17px;
	background: #1a2332;
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	color: #e0e8f0;
}

/* ===== BACKGROUND ===== */
.waves-bg {
	position: fixed;
	width: 200%;
	height: 200%;
	top: -50%;
	left: -50%;
	z-index: 0;
	background: linear-gradient(45deg,
		#0d1621 0%,
		#1a2940 25%,
		#2d4a6b 50%,
		#1a2940 75%,
		#0d1621 100%);
	animation: waveAnimation 20s ease-in-out infinite;
}

@keyframes waveAnimation {
	0%, 100% { transform: rotate(0deg) scale(1); }
	25% { transform: rotate(1deg) scale(1.05); }
	50% { transform: rotate(-1deg) scale(1); }
	75% { transform: rotate(1deg) scale(1.05); }
}

/* ===== PARTICLES ===== */
.particles {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	pointer-events: none;
	overflow: visible;
}

.particle {
	position: absolute;
	width: 2px;
	height: 2px;
	background: linear-gradient(45deg, #d4a574, #f4e4c1);
	border-radius: 50%;
	animation: floatUp 15s infinite linear;
	opacity: 0;
}

@keyframes floatUp {
	0%   { opacity: 0; transform: translateY(100vh) scale(0); }
	10%  { opacity: 1; transform: translateY(80vh) scale(1); }
	90%  { opacity: 1; transform: translateY(10vh) scale(1); }
	100% { opacity: 0; transform: translateY(-10vh) scale(0); }
}

/* ===== PAGE ===== */
.page-wrapper {
	position: relative;
	z-index: 10;
	min-height: 100vh;
	padding: 40px 20px 80px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* ===== HEADER ===== */
.header {
	width: 100%;
	max-width: 600px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 50px;
	animation: fadeInDown 0.8s ease-out;
}

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

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #7a9ec7;
	text-decoration: none;
	font-size: 0.9em;
	font-weight: 400;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	padding: 8px 0;
}

.back-link:hover {
	color: #d4a574;
}

.back-link:hover .back-arrow {
	transform: translateX(-4px);
}

.back-arrow {
	transition: transform 0.3s ease;
	display: inline-flex;
}

.header-logo {
	height: 40px;
	width: auto;
	opacity: 0.6;
	transition: all 0.3s ease;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.header-logo:hover {
	opacity: 1;
	filter: drop-shadow(0 4px 12px rgba(212, 165, 116, 0.3));
	transform: scale(1.05);
}

/* ===== SECTION HEADING ===== */
.section-heading {
	text-align: center;
	margin-bottom: 60px;
	animation: fadeInUp 1s ease-out 0.2s both;
}

.section-title {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 300;
	font-size: 2.6em;
	letter-spacing: 2px;
	line-height: 1.2;
	background: linear-gradient(135deg, #d4a574, #f4e4c1, #d4a574);
	background-size: 200% 200%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: shimmer 3s ease-in-out infinite;
}

.section-subtitle {
	margin-top: 16px;
	font-size: 0.92em;
	font-weight: 300;
	color: #7a9ec7;
	letter-spacing: 0.5px;
	line-height: 1.6;
}

@keyframes shimmer {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

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

/* ===== GAMES GRID ===== */
/* Две колонки: страница держится той же узкой оси, что и остальной сайт,
   а чётное число игр ложится ровными рядами без «сироты» в конце. */
.games-grid {
	width: 100%;
	max-width: 640px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 26px;
}

/* ===== GAME CARD ===== */
.game-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 36px 26px 30px;
	border-radius: 14px;
	text-decoration: none;
	color: inherit;
	background: rgba(13, 22, 33, 0.35);
	border: 1px solid rgba(212, 165, 116, 0.12);
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.3),
		0 0 30px rgba(212, 165, 116, 0.04);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	animation: fadeInUp 0.8s ease-out both;
}

.game-card:nth-child(1) { animation-delay: 0.30s; }
.game-card:nth-child(2) { animation-delay: 0.38s; }
.game-card:nth-child(3) { animation-delay: 0.46s; }
.game-card:nth-child(4) { animation-delay: 0.54s; }
.game-card:nth-child(5) { animation-delay: 0.62s; }
.game-card:nth-child(6) { animation-delay: 0.70s; }

.game-card:hover {
	border-color: rgba(212, 165, 116, 0.3);
	background: rgba(13, 22, 33, 0.5);
	box-shadow:
		0 24px 60px rgba(0, 0, 0, 0.45),
		0 0 40px rgba(212, 165, 116, 0.1);
	transform: translateY(-4px);
}

.game-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	margin-bottom: 20px;
	border-radius: 50%;
	color: #d4a574;
	border: 1px solid rgba(212, 165, 116, 0.25);
	background: radial-gradient(circle at 50% 30%, rgba(212, 165, 116, 0.12), transparent 70%);
	transition: all 0.4s ease;
}

.game-card-icon svg {
	width: 27px;
	height: 27px;
}

.game-card:hover .game-card-icon {
	color: #f4e4c1;
	border-color: rgba(244, 228, 193, 0.45);
	transform: scale(1.06);
}

.game-card-title {
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.6em;
	font-weight: 400;
	color: #d4a574;
	letter-spacing: 0.5px;
	line-height: 1.3;
	margin-bottom: 12px;
}

.game-card-text {
	font-size: 0.85em;
	font-weight: 300;
	line-height: 1.65;
	color: rgba(224, 232, 240, 0.65);
	margin-bottom: 24px;
	max-width: 30ch;
}

/* Кнопка «Играть» — тот же силуэт, что у кнопок разделов на главной */
.game-card-cta {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 12px 28px;
	font-family: 'Montserrat', sans-serif;
	font-size: 0.82em;
	font-weight: 500;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #d4a574;
	border: 1px solid rgba(212, 165, 116, 0.3);
	border-radius: 50px;
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.game-card-cta svg {
	transition: transform 0.3s ease;
}

.game-card:hover .game-card-cta {
	color: #f4e4c1;
	border-color: rgba(244, 228, 193, 0.5);
	background: linear-gradient(135deg, rgba(212, 165, 116, 0.12), rgba(244, 228, 193, 0.06));
	box-shadow:
		0 0 20px rgba(212, 165, 116, 0.15),
		inset 0 0 20px rgba(212, 165, 116, 0.04);
}

.game-card:hover .game-card-cta svg {
	transform: translateX(4px);
}

/* ===== EMPTY ===== */
.games-empty {
	text-align: center;
	padding: 60px 0;
	color: #7a9ec7;
	font-weight: 300;
	letter-spacing: 1px;
}

/* ===== FOOTER ===== */
.privacy-footer {
	position: relative;
	z-index: 10;
	text-align: center;
	padding: 30px 20px 10px;
}

.privacy-footer-divider {
	width: 40px;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.25), transparent);
	margin: 0 auto 18px;
}

.privacy-footer-link {
	font-family: 'Montserrat', sans-serif;
	font-size: 0.78em;
	font-weight: 300;
	color: rgba(122, 158, 199, 0.4);
	text-decoration: none;
	letter-spacing: 0.5px;
	border-bottom: 1px solid transparent;
	transition: all 0.3s ease;
	padding-bottom: 2px;
}

.privacy-footer-link:hover {
	color: #d4a574;
	border-bottom-color: rgba(212, 165, 116, 0.3);
}

/* ===== SCROLLBAR ===== */
body::-webkit-scrollbar {
	width: 6px;
}

body::-webkit-scrollbar-track {
	background: rgba(212, 165, 116, 0.05);
}

body::-webkit-scrollbar-thumb {
	background: rgba(212, 165, 116, 0.2);
	border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
	background: rgba(212, 165, 116, 0.35);
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
	.page-wrapper {
		padding: 20px 14px 60px;
	}

	.header {
		margin-bottom: 36px;
	}

	.back-link {
		font-size: 0.8em;
	}

	.header-logo {
		height: 32px;
	}

	.section-heading {
		margin-bottom: 40px;
	}

	.section-title {
		font-size: 2em;
	}

	.games-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		max-width: 420px;
	}

	.game-card {
		padding: 30px 22px 26px;
	}

	.game-card-title {
		font-size: 1.4em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.waves-bg,
	.particle,
	.section-title,
	.game-card {
		animation: none;
	}
}
