:root
{
	--bg-color: #050505;
	--text-main: #F5FBEF;
	--text-dim: rgba(245, 251, 239, 0.75);
	--accent-cyan: #00f0ff;
	--accent-blue: #1e3a8a;
	--accent-green: #94C9A9;
	--border-light: rgba(255, 255, 255, 0.2);
	--font-mono: Consolas, monaco, monospace;
}

html, body
{
	margin: 0;
	padding: 0;
	color: var(--text-main);
	background-color: var(--bg-color);
	font-size: 14px;
	font-family: var(--font-mono);
	font-weight: lighter;
	overflow-x: hidden;
}

body
{
	min-height: 100vh;
	width: 100vw;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/* KEYFRAMES */
@keyframes float
{
	0%, 100% { transform: translate(0px, 0px) rotate(0deg); }
	33%      { transform: translate(2px, -8px) rotate(0.5deg); }
	66%      { transform: translate(-2px, -12px) rotate(-0.5deg); }
}

@keyframes breathe
{
	0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4)) blur(0px); }
	50%      { filter: drop-shadow(0 0 30px rgba(30, 58, 138, 0.9)) blur(1.5px); }
}

@keyframes panGradient
{
	0%   { background-position: 0% center; }
	100% { background-position: 200% center; }
}

@keyframes mistBreathe
{
	0%   { opacity: 0.3; transform: scale(1); }
	100% { opacity: 0.7; transform: scale(1.1); }
}

/* TOP BAR STYLING */
#topbar
{
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 2rem;
	box-sizing: border-box;
	background: linear-gradient(90deg, rgba(15, 23, 42, 0.8), rgba(30, 58, 138, 0.6));
	backdrop-filter: blur(12px);
	border-bottom: 1px solid rgba(0, 240, 255, 0.15);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(30, 58, 138, 0.5);
	z-index: 100;
	font-family: var(--font-mono);
	font-size: 14px;
}

#topbar-links, #auth-status
{
	display: flex;
	gap: 1.5rem;
	align-items: center;
}

#topbar a
{
	text-decoration: none;
	color: var(--text-dim);
	font-weight: bold;
	transition: all 0.6s ease;
}

#topbar a:hover, #topbar a:focus
{
	color: var(--accent-cyan);
	text-shadow: 0 0 15px var(--accent-cyan), 0 0 30px var(--accent-blue);
	outline: none;
}

#topbar a::before
{
	content: '[ ';
	color: var(--border-light);
	transition: color 0.6s ease;
}

#topbar a::after
{
	content: ' ]';
	color: var(--border-light);
	transition: color 0.6s ease;
}

#topbar a:hover::before, #topbar a:hover::after
{
	color: var(--accent-cyan);
	text-shadow: 0 0 15px var(--accent-cyan);
}

.auth-greeting
{
	color: var(--text-dim);
	margin-right: 1rem;
}

.logout
{
	color: var(--accent-red) !important;
}

.logout:hover
{
	text-shadow: 0 0 8px rgba(217, 83, 79, 0.6) !important;
}

.logout:hover::before, .logout:hover::after
{
	color: var(--accent-red) !important;
}

#main-content
{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	z-index: 5;
	padding-top: 6rem; /* Offset for fixed topbar */
	padding-bottom: 4rem; /* Buffer for scrolling */
}

#background
{
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-image: url('../media/GreenTreeTopsMediumMistFog.jpg');
	background-size: cover;
	background-position: center;
	filter: brightness(30%);
	z-index: -2;
}

#background::after
{
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 50% 50%, rgba(30, 58, 138, 0.4), rgba(15, 23, 42, 0.9));
	animation: mistBreathe 12s ease-in-out infinite alternate;
}

#logo
{
	display: flex;
	align-items: center;
	flex-direction: column;
	margin-bottom: 2rem;
	z-index: 5;
}

#logo > div
{
	white-space: pre;
	background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), #a855f7, var(--accent-cyan));
	background-size: 200% auto;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: breathe 5s ease-in-out infinite alternate, panGradient 10s linear infinite;
	margin-bottom: 0.5rem;
	font-weight: bold;
}

#logo .gray
{
	font-size: 1.1rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--text-dim);
}

#container
{
	z-index: 5;
	width: 100%;
	max-width: 1000px;
	padding: 0 2rem;
	box-sizing: border-box;
}

#links
{
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	justify-content: center;
	width: 100%;
}

.linksbox
{
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 58, 138, 0.4));
	border: 1px solid transparent;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 240, 255, 0.1), inset 0 0 32px rgba(30, 58, 138, 0.5);
	padding: 1.5rem;
	flex: 1 1 300px;
	max-width: 400px;
	position: relative;
	backdrop-filter: blur(12px);
	animation: float 14s ease-in-out infinite;
	box-sizing: border-box;
}

.linksbox::before
{
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 16px;
	padding: 1px; /* border thickness */
	background: linear-gradient(45deg, var(--accent-blue), #c026d3, #f472b6); /* Softer rose/pink */
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	z-index: -1;
	pointer-events: none;
}

.linksbox:nth-child(even)
{
	animation-delay: -2s;
}

.linksbox:nth-child(3n)
{
	animation-delay: -4s;
}

.linksbox:nth-child(5n)
{
	animation-delay: -1.5s;
}

.linksbox h3
{
	font-size: 1.2rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-top: 0;
	margin-bottom: 1rem;
	border-bottom: 1px solid transparent;
	border-image: linear-gradient(90deg, rgba(30, 58, 138, 0.8), rgba(219, 39, 119, 0.5), transparent) 1;
	padding-bottom: 0.5rem;
	color: #93c5fd; /* Soft, dreamy blue */
	text-shadow: 0 0 10px rgba(147, 197, 253, 0.6);
}

.linksbox a
{
	display: block;
	text-decoration: none;
	font-weight: bold;
	color: var(--text-dim);
	padding: 0.35rem 0;
	transition: all 0.5s ease;
}

.linksbox a::before
{
	content: '├ ';
	color: var(--border-light);
	transition: color 0.5s ease;
}

.linksbox a:focus,
.linksbox a:hover
{
	color: var(--accent-cyan);
	outline: none;
	text-shadow: 0 0 15px var(--accent-cyan), 0 0 30px var(--accent-blue);
	padding-left: 0.5rem;
}

.linksbox a:hover::before
{
	color: var(--accent-cyan);
	text-shadow: 0 0 15px var(--accent-cyan);
}

/* Auth specific block styling (if it exists) */
#auth-box h3
{
	color: var(--accent-cyan);
	text-shadow: 0 0 5px rgba(0, 240, 255, 0.6);
}

.cyan
{
	color: var(--accent-cyan);
}

.green
{
	color: var(--accent-green);
}

.gray
{
	color: var(--text-dim);
}

.lightgray
{
	color: var(--text-main);
}

@media screen and (max-width: 768px)
{
	body
	{
		justify-content: flex-start;
	}

	#topbar
	{
		flex-direction: column;
		gap: 1rem;
		padding: 1rem;
		position: relative; /* Scrolls with page on mobile */
	}

	#topbar-links, #auth-status
	{
		flex-wrap: wrap;
		justify-content: center;
		gap: 1rem;
	}

	#main-content
	{
		padding-top: 2rem;
	}

	#links
	{
		flex-direction: column;
		align-items: center;
	}

	.linksbox
	{
		width: 100%;
		flex: none;
	}
}