* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	--primary-color: #6366f1;
	--secondary-color: #8b5cf6;
	--accent-color: #ec4899;
	--bg-dark: #0f172a;
	--bg-card: #1e293b;
	--text-primary: #f1f5f9;
	--text-secondary: #cbd5e1;
	--glow-color: rgba(99, 102, 241, 0.5);
}

html {
	background: var(--bg-dark);
}

body {
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-card) 100%);
	color: var(--text-primary);
	min-height: 100vh;
	padding: 2rem 1rem;
	position: relative;
	overflow-x: hidden;
}

body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
		radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
		radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
	pointer-events: none;
	z-index: 0;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

header {
	text-align: center;
	margin-bottom: 3rem;
	animation: fadeInDown 0.8s ease-out;
}

.title {
	font-size: 4rem;
	font-weight: 800;
	background: linear-gradient(
		135deg,
		var(--primary-color),
		var(--secondary-color),
		var(--accent-color)
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 0.5rem;
	text-shadow: 0 0 30px var(--glow-color);
	letter-spacing: -2px;
}

.subtitle {
	font-size: 1.25rem;
	color: var(--text-secondary);
	font-weight: 300;
}

.games-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 2rem;
	margin-bottom: 3rem;
}

.game-card {
	background: var(--bg-card);
	border-radius: 1rem;
	padding: 2rem;
	text-decoration: none;
	color: var(--text-primary);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 2px solid transparent;
	position: relative;
	overflow: hidden;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
	animation: fadeInUp 0.6s ease-out;
	animation-fill-mode: both;
}

.game-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
	transition: left 0.5s;
}

.game-card:hover::before {
	left: 100%;
}

.game-card:hover {
	transform: translateY(-8px) scale(1.02);
	border-color: var(--primary-color);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px var(--glow-color);
}

.game-card:active {
	transform: translateY(-4px) scale(1.01);
}

.game-icon {
	font-size: 3.5rem;
	margin-bottom: 1rem;
	display: block;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
	transition: transform 0.3s ease;
}

.game-card:hover .game-icon {
	transform: scale(1.1) rotate(5deg);
}

.game-title {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	color: var(--text-primary);
}

.game-description {
	font-size: 0.95rem;
	color: var(--text-secondary);
	line-height: 1.6;
}

footer {
	text-align: center;
	padding: 2rem 0;
	color: var(--text-secondary);
	font-size: 0.9rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: 3rem;
}

@keyframes fadeInDown {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive design */
@media (max-width: 768px) {
	.title {
		font-size: 2.5rem;
	}

	.subtitle {
		font-size: 1rem;
	}

	.games-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 1.5rem;
	}

	.game-card {
		padding: 1.5rem;
	}
}

@media (max-width: 480px) {
	.games-grid {
		grid-template-columns: 1fr;
	}

	.title {
		font-size: 2rem;
	}
}

/* Settings Modal */
.settings-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(5px);
	z-index: 2000;
	align-items: center;
	justify-content: center;
	animation: fadeIn 0.3s ease;
}

.settings-modal.active {
	display: flex;
}

.settings-content {
	background: var(--bg-card);
	border-radius: 1rem;
	padding: 2rem;
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	border: 2px solid var(--primary-color);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	animation: slideUp 0.3s ease;
}

.settings-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.settings-header h2 {
	color: var(--text-primary);
	font-size: 2rem;
	margin: 0;
}

.close-btn {
	background: none;
	border: none;
	color: var(--text-secondary);
	font-size: 2rem;
	cursor: pointer;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.close-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-primary);
	transform: rotate(90deg);
}

.settings-body {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.setting-group {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.setting-group label {
	color: var(--text-primary);
	font-weight: 600;
	font-size: 1.1rem;
}

.setting-input {
	padding: 0.75rem;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.5rem;
	background: var(--bg-dark);
	color: var(--text-primary);
	font-size: 1rem;
	transition: all 0.3s ease;
	font-family: inherit;
}

.setting-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.setting-hint {
	color: var(--text-secondary);
	font-size: 0.85rem;
	margin: 0;
}

.settings-footer {
	display: flex;
	gap: 1rem;
	justify-content: flex-end;
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-save,
.btn-reset {
	padding: 0.75rem 2rem;
	border: none;
	border-radius: 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: inherit;
}

.btn-save {
	background: var(--primary-color);
	color: white;
}

.btn-save:hover {
	background: var(--secondary-color);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px var(--glow-color);
}

.btn-reset {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-primary);
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-reset:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: translateY(-2px);
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		transform: translateY(50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@media (max-width: 768px) {
	.settings-content {
		padding: 1.5rem;
	}

	.settings-footer {
		flex-direction: column;
	}

	.btn-save,
	.btn-reset {
		width: 100%;
	}
}
