.header {
	position: relative;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(20px);
	border-bottom: 1px solid rgba(148, 163, 184, 0.2);
	z-index: 1000;
	transition: all 0.3s;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

body.dark .header {
	background: rgba(15, 15, 35, 0.98);
	border-bottom: 1px solid rgba(76, 106, 158, 0.35);
}

.header.scrolled {
	box-shadow: 0 10px 40px rgba(124, 58, 237, 0.15);
	border-bottom-color: rgba(124, 58, 237, 0.2);
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 5.5rem;
	gap: 2rem;
}

.logo {
	display: flex;
	align-items: center;
	gap: 1rem;
	text-decoration: none;
	color: inherit;
	transition: transform 0.3s;
	position: relative;
}

.logo:hover {
	transform: scale(1.05);
}

.logo-icon {
	width: 4rem;
	height: 4rem;
	background: linear-gradient(135deg, #1f2937, #000000);
	border-radius: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	box-shadow:
		0 10px 40px rgba(0, 0, 0, 0.3),
		0 0 30px rgba(255, 215, 0, 0.3),
		inset 0 2px 0 rgba(255, 255, 255, 0.1);
	border: 3px solid rgba(255, 215, 0, 0.4);
	animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
	0%, 100% {
		box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
			0 0 30px rgba(255, 215, 0, 0.3),
			inset 0 2px 0 rgba(255, 255, 255, 0.1);
	}
	50% {
		box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
			0 0 40px rgba(255, 215, 0, 0.5),
			inset 0 2px 0 rgba(255, 255, 255, 0.2);
	}
}

.chess-pattern {
	position: absolute;
	inset: 0;
	opacity: 0.2;
	background:
		linear-gradient(45deg, #ffffff 25%, transparent 25%),
		linear-gradient(-45deg, #ffffff 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #ffffff 75%),
		linear-gradient(-45deg, transparent 75%, #ffffff 75%);
	background-size: 10px 10px;
	background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.logo-sparkle {
	position: absolute;
	width: 0.5rem;
	height: 0.5rem;
	background: #ffd700;
	border-radius: 50%;
	animation: sparkle 2s ease-in-out infinite;
}

.logo-sparkle:nth-child(1) { top: 0.5rem; left: 0.5rem; animation-delay: 0s; }
.logo-sparkle:nth-child(2) { top: 0.5rem; right: 0.5rem; animation-delay: 0.5s; }
.logo-sparkle:nth-child(3) { bottom: 0.5rem; left: 0.5rem; animation-delay: 1s; }
.logo-sparkle:nth-child(4) { bottom: 0.5rem; right: 0.5rem; animation-delay: 1.5s; }

@keyframes sparkle {
	0%, 100% { transform: scale(0); opacity: 0; }
	50% { transform: scale(1); opacity: 1; }
}

.nav {
	display: none;
	align-items: center;
	gap: 0.5rem;
}

@media (min-width: 1024px) {
	.nav { display: flex; }
}

.nav-link {
	color: inherit;
	text-decoration: none;
	font-weight: 600;
	padding: 0.75rem 1.5rem;
	border-radius: 1rem;
	transition: all 0.3s;
	position: relative;
	background: transparent;
}

.nav-link:hover {
	color: var(--primary);
	background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(59, 130, 246, 0.1));
	transform: translateY(-2px);
}

.nav-link::after {
	content: '';
	position: absolute;
	bottom: 0.25rem;
	left: 50%;
	width: 0;
	height: 3px;
	background: linear-gradient(90deg, #7c3aed, #3b82f6);
	border-radius: 2px;
	transition: all 0.3s;
	transform: translateX(-50%);
}

.nav-link:hover::after {
	width: 60%;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.auth-buttons {
	display: none;
	align-items: center;
	gap: 0.75rem;
}

@media (min-width: 1024px) {
	.auth-buttons { display: flex; }
	.user-actions { display: flex; }
}

.btn-login,
.btn-register,
.btn-secondary {
	padding: 0.75rem 1.75rem;
	border-radius: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
	position: relative;
	overflow: hidden;
}

.btn-login {
	background: transparent;
	border: 2px solid var(--primary);
	color: var(--primary);
}

.btn-login::before,
.btn-register::before,
.btn-secondary::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	transition: left 0.5s;
	z-index: -1;
}

.btn-login::before {
	background: var(--primary);
	transition: left 0.3s;
}

.btn-login:hover {
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(124, 58, 237, 0.3);
}

.btn-login:hover::before {
	left: 0;
}

.btn-register {
	background: linear-gradient(135deg, #7c3aed, #3b82f6);
	color: white;
	border: none;
	box-shadow: 0 5px 20px rgba(124, 58, 237, 0.3);
}

.btn-register:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.btn-register:hover::before {
	left: 100%;
}

.btn-secondary {
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: white;
	border: none;
	box-shadow: 0 5px 20px rgba(245, 158, 11, 0.3);
}

.btn-secondary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
}

.btn-secondary:hover::before {
	left: 100%;
}

.theme-toggle {
	background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(59, 130, 246, 0.1));
	border: 2px solid var(--primary);
	border-radius: 50%;
	width: 3.5rem;
	height: 3.5rem;
	display: flex;
	align	items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s;
	color: var(--primary);
	position: relative;
	overflow: hidden;
}

.theme-toggle::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #7c3aed, #3b82f6);
	opacity: 0;
	transition: opacity 0.3s;
}

.theme-toggle i {
	position: relative;
	z-index: 2;
	font-size: 1.25rem;
}

.theme-toggle:hover {
	transform: rotate(20deg) scale(1.1);
	box-shadow: 0 5px 20px rgba(124, 58, 237, 0.4);
}

.theme-toggle:hover::before {
	opacity: 1;
}

.theme-toggle:hover i {
	color: white;
}

.mobile-menu-btn {
	display: block;
	background: none;
	border: none;
	color: inherit;
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0.5rem;
}

@media (min-width: 1024px) {
	.mobile-menu-btn { display: none; }
}

.mobile-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--card-light);
	border-top: 2px solid var(--primary);
	padding: 2rem;
	transform: translateY(-100%);
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
	display: none;
}

body.dark .mobile-menu {
	background: var(--card-dark);
}

.mobile-menu.active {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
	display: block;
}

.mobile-auth {
	display: none;
	flex-direction: column;
	gap: 0.75rem;
	width: 100%;
}

