:root {
	font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	font-weight: 400;

	color-scheme: light dark;
	color: rgba(255, 255, 255, 0.87);
	background-color: #242424;

	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	font-weight: 500;
	color: #646cff;
	text-decoration: inherit;
}
a:hover {
	color: #535bf2;
}

header {
	display: flex;
	align-items: center;
	background-color: #303030;
}

body {
	overflow: hidden;
	margin: 0;
	min-width: 320px;
	min-height: 100vh;
}

ul {
	margin: 0 0 0 10px;
	padding: 0;
}

li {
	list-style: none;
	font-size: 1.2em;
}

h1 {
	font-size: 1.2em;
	line-height: 1.1;
}

h2,
h3,
h1 {
	margin: 0;
}

p {
	padding: 0;
	margin: 0;
}

#app {
	height: 100%;
	margin: 0 auto;
}

.material-symbols-outlined {
	font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.logo {
	height: 4em;
	padding: 1.5em;
	will-change: filter;
	transition: filter 300ms;
}
.logo:hover {
	filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vanilla:hover {
	filter: drop-shadow(0 0 2em #f7df1eaa);
}

.card {
	padding: 2em;
}

.read-the-docs {
	color: #888;
}

button {
	border-radius: 8px;
	border: 1px solid transparent;
	padding: 0.6em 1.2em;
	font-size: 1em;
	font-weight: 500;
	font-family: inherit;
	background-color: #1a1a1a;
	cursor: pointer;
	transition: border-color 0.25s;
}
button:hover {
	border-color: #646cff;
}
button:focus,
button:focus-visible {
	outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
	:root {
		color: #213547;
		background-color: #ffffff;
	}
	a:hover {
		color: #747bff;
	}
	button {
		background-color: #f9f9f9;
	}
}

/*Common Styles For Visualization*/

/* Data Structures  */
.input-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
}

.add-input {
	font-size: 2rem;
}

.add-button {
	border-radius: 5px;
	background-color: #901e1e;
	padding: 5px;
}

.node-container {
	display: flex;
	gap: 1em;
	overflow: auto;
	width: 80%;
	align-items: baseline;
	justify-content: center;
}

.selected-node {
	animation: highlight 1s ease-in;
}

.node {
	display: flex;
	align-items: center;
	font-size: 2rem;
}
.square.right-border {
	border-right: 3px solid #000;
}

.node-data {
	border-bottom: 3px solid #000;
}

.square {
	padding: 10px;
	background: #efefef;
	color: #000;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Algorithms  */

.pillar-container {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.pillar {
	min-width: 40px;
	width: auto;
	min-height: 10px;
	max-height: 50vh;
	background-color: #8b8b8b;
}

.pillar {
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.current {
	background-color: yellow; /* Current checked item */
}

.swap {
	background-color: red; /* Swapped items */
}

/* Visualization Animations */

.new-node {
	animation: fadeIn 3s ease-in;
}

@keyframes highlight {
	from {
		background-color: #9ecc47;
	}
	to {
		background-color: #ffffff;
	}
}

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

.floating-node {
	position: absolute;
	width: 40px;
	height: 40px;
	background-color: #4caf50;
	color: white;
	font-weight: bold;
	text-align: center;
	line-height: 40px;
	border-radius: 50%;
	z-index: 1000;
	box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Delay arrow animation to simulate linking */
.arrow {
	opacity: 0;
	animation: fadeIn 0.5s ease-in-out 0.5s forwards;
}

/* Content Styles */

#content {
	width: 100%;
	padding: 20px;
}

.visualization-container {
	display: flex;
	justify-content: center;
	margin: 0 auto;
}

/*Navigation Bar*/

#burger-menu {
	display: none;
	background: none;
	border: none;
	font-size: 2rem;
	cursor: pointer;
}

#sidebar {
	background-color: #363636;
	padding: 10px;
	min-width: 15%;
	height: 100vh;
}

.nav-section {
	background-color: #3030302d;
	margin-top: 10px;
	padding: 10px;
}

.flex {
	display: flex;
	align-items: center;
}

span.material-symbols-outlined {
	cursor: pointer;
}

.nested-item {
	margin-left: 10px;
	font-size: 0.9em;
}

.nav-item {
	cursor: pointer;
}

.hide {
	display: none;
}

.show {
	display: block;
}

.rotated {
	transform: rotate(-90deg);
}

@media (max-width: 768px) {
	#burger-menu {
		display: block;
	}

	.logo {
		display: none;
	}

	#sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 250px;
		height: 100%;
		transform: translateX(-100%); /* Hide by default */
		z-index: 1000;
		transition: 1s;
	}

	/* When sidebar is open */
	#sidebar.open {
		transform: translateX(0);
	}

	/* Remove the margin on main content when sidebar is hidden */
	#content {
		margin-left: 0;
		padding: 20px;
	}

	/* Optionally, add an overlay behind the sidebar */
	#overlay {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.5);
		z-index: 900;
	}
	#overlay.active {
		display: block;
	}
}
