:root {
	/* Dark theme color scheme */
	--primary-color: #22d3ee;
	--secondary-color: #0ea5e9;
	--accent-color: #06b6d4;
	--background-color: #0a0f1a;
	--card-background: rgba(19, 26, 39, 0.9);
	--text-color: #e2e8f0;
	--shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	--card-border: 1px solid rgba(148, 163, 184, 0.2);
	--table-border: 1px solid rgba(148, 163, 184, 0.1);
	--group-header-bg: rgba(19, 26, 39, 0.9);
	--hover-row-bg: rgba(36, 46, 63, 0.7);

	/* Adding new color variables */
	--white: #ffffff;
	--transparent: transparent;
	--black: #020617;

	/* Text colors */
	--text-color-secondary: #94a3b8;
	--text-color-light: #64748b;
	--text-color-lighter: #475569;
	--text-color-bright: #e2e8f0;

	/* Opacity levels */
	--opacity-90: 0.9;
	--opacity-70: 0.7;
	--opacity-50: 0.5;
	--opacity-30: 0.3;
	--opacity-20: 0.2;
	--opacity-15: 0.15;
	--opacity-10: 0.1;
	--opacity-05: 0.05;

	/* Shadow colors */
	--shadow-color: rgba(0, 0, 0, 0.3);
	--shadow-color-medium: rgba(0, 0, 0, 0.4);
	--shadow-color-dark: rgba(0, 0, 0, 0.5);
	--primary-shadow-color: rgba(34, 211, 238, 0.1);
	--primary-shadow-color-dark: rgba(34, 211, 238, 0.2);

	/* Background with opacity */
	--header-bg: rgba(19, 26, 39, 0.9);
	--primary-bg-10: rgba(34, 211, 238, 0.1);
	--primary-bg-15: rgba(34, 211, 238, 0.15);
	--secondary-bg-15: rgba(14, 165, 233, 0.15);
	--footer-divider: rgba(148, 163, 184, 0.2);
	--footer-bg-overlay: rgba(0, 0, 0, 0.3);
}

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

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial,
		sans-serif;
	background-color: var(--background-color);
	color: var(--text-color);
	line-height: 1.6;
	min-height: 100vh;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem;
	padding-top: 2rem;
}

/* Header Styles - Fixed Header */
.site-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.6rem 1.5rem;
	background-color: var(--header-bg);
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
	border: 1px solid var(--primary-color);
	position: fixed;
	top: 10px;
	left: 0;
	right: 0;
	z-index: 1000;
	width: 90%;
	max-width: 1200px;
	margin: 0 auto;
	transform: translateZ(0);
}

.header-content {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
}

/* View toggle control */
.view-toggle {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}
.toggle-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--footer-divider);
	background: var(--header-bg);
	color: var(--text-color-secondary);
	border-radius: 8px;
	cursor: pointer;
}
.toggle-btn .label { display: none; }
.toggle-btn:hover { color: var(--text-color-bright); border-color: var(--primary-color); }
.toggle-btn.is-active {
	background: var(--primary-color);
	color: var(--black);
	border-color: var(--primary-color);
}

@media (min-width: 768px) {
	.toggle-btn .label { display: inline; }
}

h1 {
	font-size: 2rem;
	color: var(--text-color-bright);
	position: relative;
	display: inline-block;
}

h1:before {
	content: '🧰';
	margin-right: 0.5rem;
}

.site-title {
	text-decoration: none;
	color: inherit;
	display: inline-block;
	transition: transform 0.2s ease;
}

.site-title:hover {
	transform: translateY(-2px);
}

.site-title h1 {
	margin: 0;
}

.search-container {
	position: relative;
}

#searchInput {
	padding: 0.75rem 3rem 0.75rem 3rem; /* extra right padding for clear button */
	border: 1px solid var(--primary-color);
	border-radius: 30px;
	font-size: 1rem;
	width: 240px;
	background-color: rgba(15, 23, 42, 0.7);
	color: var(--text-color);
	outline: none;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px var(--shadow-color);
}

#searchInput:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 8px var(--primary-shadow-color);
	width: 270px;
}

#searchInput::placeholder {
	color: var(--text-color-light);
}

.search-container:before {
	content: '\f002';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
	position: absolute;
	left: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--primary-color);
	pointer-events: none;
}

/* Clear search button */
.clear-search {
	position: absolute;
	right: 0.35rem;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: var(--text-color-secondary);
	cursor: pointer;
	padding: 0.4rem; /* more padding for easier click */
	min-width: 36px; /* larger hit area */
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}
.clear-search:hover {
	color: var(--text-color-bright);
	background-color: rgba(255,255,255,0.06);
}
.clear-search:focus-visible {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

/* Search results dropdown */
.search-results {
	position: absolute;
	top: 110%;
	left: 0;
	right: 0;
	background: var(--card-background);
	border: var(--card-border);
	box-shadow: var(--shadow);
	border-radius: 10px;
	height: 320px; /* fixed height */
	overflow-y: auto; /* show scrollbar for more content */
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	z-index: 1001;
}
.search-item {
	display: grid;
	grid-template-columns: 28px 1fr;
	grid-template-areas: 'icon title' 'icon desc';
	gap: 2px 8px;
	padding: 0.6rem 0.8rem;
	cursor: pointer;
}
.search-item .icon { grid-area: icon; display: flex; align-items: center; justify-content: center; }
.search-item .title { grid-area: title; font-weight: 600; color: var(--text-color-bright); }
.search-item .desc { grid-area: desc; font-size: 0.85rem; color: var(--text-color-secondary); }
.search-item:hover, .search-item.active { background: var(--hover-row-bg); }
.search-item.empty { color: var(--text-color-secondary); cursor: default; }

/* Optional scrollbar styling */
.search-results::-webkit-scrollbar { width: 10px; }
.search-results::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 8px; }
.search-results::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.4); border-radius: 8px; }
.search-results::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.6); }

/* Hero Section */
.hero-section {
	text-align: center;
	padding: 3rem 2rem;
	margin-bottom: 1.5rem;
	background-color: var(--card-background);
	border-radius: 12px;
	border: var(--card-border);
	position: relative;
	overflow: hidden;
	box-shadow: var(--shadow);
}

.hero-content {
	position: relative;
	z-index: 1;
}

.hero-section h2 {
	font-size: 2.5rem;
	color: var(--text-color-bright);
	margin-bottom: 1rem;
}

.hero-section p {
	font-size: 1.1rem;
	color: var(--text-color-secondary);
	max-width: 700px;
	margin: 0 auto 1.5rem;
}

.cta-button {
	display: inline-block;
	padding: 0.8rem 1.8rem;
	background-color: var(--primary-color);
	color: var(--black);
	border-radius: 30px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 4px 10px var(--primary-shadow-color);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 15px var(--primary-shadow-color-dark);
}

/* Table View */
.table-view {
	width: 100%;
	padding: 0 1rem 1rem;
	display: flex;
	justify-content: center;
}

/* Grid (gallery) view */
.grid-view-wrapper {
	width: 100%;
	max-width: 1000px;
	display: grid;
	gap: 1.25rem;
}
.grid-section-title {
	color: var(--text-color-bright);
	font-size: 1.1rem;
}
.tools-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
}
@media (min-width: 640px) {
	.tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
	.tools-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tool-card {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 0.75rem;
	align-items: center;
	background: var(--card-background);
	border: var(--card-border);
	border-radius: 12px;
	box-shadow: var(--shadow);
	padding: 0.75rem;
	color: inherit;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px var(--shadow-color-dark);
	border-color: var(--primary-color);
}
.card-icon {
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	background: var(--primary-bg-10);
	border-radius: 8px;
	font-size: 1.5rem;
}
.card-title {
	font-weight: 600;
	color: var(--text-color-bright);
}
.card-desc {
	font-size: 0.9rem;
	color: var(--text-color-secondary);
}

.tools-table {
	width: 100%;
	max-width: 1000px;
	border-collapse: separate;
	border-spacing: 0;
	background-color: var(--card-background);
	border-radius: 0.75rem;
	overflow: hidden;
	box-shadow: var(--shadow);
	margin-bottom: 1.5rem;
	border: var(--card-border);
}

.tools-table thead th {
	background-color: var(--primary-color);
	color: var(--black);
	text-align: left;
	padding: 1rem;
	font-weight: 700;
}

.tools-table thead th:first-child {
	border-top-left-radius: 0.75rem;
	width: 80px;
}

.tools-table thead th:last-child {
	border-top-right-radius: 0.75rem;
}

.tools-table tbody td {
	padding: 0.75rem 1rem;
	border-bottom: var(--table-border);
	color: var(--text-color);
}

.group-header {
	background-color: rgba(6, 182, 212, 0.15);
	font-weight: 600;
	color: var(--text-color-bright);
	border-left: 3px solid var(--primary-color);
	position: sticky;
	top: 0;
	z-index: 2;
}

.group-header td {
	padding: 0.75rem 1rem !important;
	font-size: 1.1rem;
	letter-spacing: 0.5px;
}

.empty-state {
	text-align: center;
	color: var(--text-color-secondary);
	padding: 1rem 0.5rem;
}

.tool-row {
	cursor: pointer;
	transition: all 0.2s ease;
}

.tool-row:hover {
	background-color: var(--hover-row-bg);
	transform: translateY(-2px);
	box-shadow: 0 2px 8px var(--shadow-color);
}

.tool-icon {
	font-size: 1.5rem;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 48px;
	height: 48px;
	background-color: var(--primary-bg-10);
	border-radius: 0.5rem;
}

.tools-table tbody tr:last-child td {
	border-bottom: none;
}

.tool-row td:nth-child(2) {
	font-weight: 500;
	color: var(--text-color-bright);
}

.tools-table tbody td:nth-child(3) {
	font-size: 0.9rem;
	color: var(--text-color-secondary);
	line-height: 1.4;
	max-width: 300px;
}

/* Notes Section Styles */
.notes-section {
	max-width: 1200px;
	margin: 1.5rem auto;
	padding: 0 1.5rem;
}

.notes-container {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	background-color: var(--card-background);
	padding: 1.5rem 2rem;
	border-radius: 12px;
	border: var(--card-border);
	border-left: 3px solid var(--primary-color);
	box-shadow: var(--shadow);
	transform: translateY(0);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notes-container:hover {
	box-shadow: 0 8px 25px var(--shadow-color-dark);
	transform: translateY(-3px);
}

.notes-icon {
	flex-shrink: 0;
	font-size: 2rem;
	color: var(--primary-color);
	background-color: rgba(34, 211, 238, 0.1);
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.notes-content h3 {
	color: var(--text-color-bright);
	margin-bottom: 0.75rem;
	font-size: 1.25rem;
}

.notes-content p {
	color: var(--text-color-secondary);
	line-height: 1.7;
	font-size: 0.95rem;
}

.notes-content strong {
	color: var(--primary-color);
	background-color: rgba(34, 211, 238, 0.1);
	padding: 0.2rem 0.4rem;
	border-radius: 4px;
	font-weight: 600;
}

/* Footer Styles */
.site-footer {
	background-color: rgba(19, 26, 39, 0.9);
	color: var(--text-color);
	padding: 2rem 0 0;
	margin-top: 2rem;
	box-shadow: 0 -2px 10px var(--shadow-color);
	border-top: var(--card-border);
}

.footer-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	padding: 0 2rem 2rem;
	flex-wrap: wrap;
	gap: 2rem;
}

.footer-logo h3 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
	font-weight: 700;
	color: var(--text-color-bright);
}

.footer-logo p {
	opacity: var(--opacity-90);
	max-width: 250px;
}

.footer-links {
	display: flex;
	gap: 3rem;
}

.link-column h4 {
	font-size: 1.1rem;
	margin-bottom: 1rem;
	font-weight: 600;
	color: var(--primary-color);
}

.link-column ul {
	list-style: none;
}

.link-column li {
	margin-bottom: 0.7rem;
}

.link-column a {
	color: var(--text-color-secondary);
	text-decoration: none;
	opacity: var(--opacity-90);
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.link-column a:hover {
	opacity: 1;
	color: var(--primary-color);
	transform: translateX(3px);
}

.footer-bottom {
	border-top: 1px solid var(--footer-divider);
	padding: 1.5rem 2rem;
	text-align: center;
	font-size: 0.9rem;
	background-color: var(--footer-bg-overlay);
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 1rem;
	}

	.site-header {
		padding: 0.8rem 1rem;
	}

	.header-content {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.tools-table th:nth-child(3),
	.tools-table td:nth-child(3) {
		display: none;
	}

	.group-header td {
		font-size: 0.9rem;
	}

	.hero-section {
		padding: 2rem 1rem;
	}

	.hero-section h2 {
		font-size: 1.8rem;
	}

	.footer-content {
		flex-direction: column;
		gap: 2rem;
	}

	.footer-links {
		flex-direction: column;
		gap: 1.5rem;
	}

	.notes-container {
		flex-direction: column;
		text-align: center;
		padding: 1.5rem 1rem;
	}

	.notes-icon {
		margin-bottom: 0.5rem;
	}
}

.content-container {
	max-width: 800px;
	margin: 0 auto 1.5rem;
	padding: 2rem;
	background-color: var(--card-background);
	border-radius: 12px;
	border: var(--card-border);
	box-shadow: var(--shadow);
}

.content-container h2 {
	color: var(--text-color-bright);
	margin-bottom: 1.5rem;
	font-size: 1.8rem;
}

.content-container h3 {
	color: var(--text-color-bright);
	margin: 1.5rem 0 1rem;
	font-size: 1.3rem;
}

.content-container p {
	margin-bottom: 1rem;
	line-height: 1.7;
	color: var(--text-color-secondary);
}

.content-container ul {
	margin-bottom: 1.5rem;
}

.content-container li {
	margin-bottom: 0.5rem;
	line-height: 1.6;
	color: var(--text-color-secondary);
}

.breadcrumb {
	display: flex;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
}

.breadcrumb a {
	color: var(--accent-color);
	text-decoration: none;
}

.breadcrumb span {
	margin: 0 0.5rem;
	color: var(--text-color-light);
}

.last-updated {
	font-style: italic;
	font-size: 0.9rem;
	color: var(--text-color-lighter);
	margin-top: 2rem;
}

.team-section {
	margin-top: 2rem;
}

/* Categories Section */
.categories-section {
	margin-bottom: 1.5rem;
}

.categories-container {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	padding: 0.5rem 1rem;
}

.category-btn {
	padding: 0.5rem 1rem;
	background-color: var(--header-bg);
	border: 1px solid var(--footer-divider);
	border-radius: 20px;
	color: var(--text-color-secondary);
	font-size: 0.9rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.category-btn:hover {
	background-color: rgba(34, 211, 238, 0.1);
	transform: translateY(-2px);
	border-color: var(--primary-color);
	color: var(--text-color-bright);
}

.category-btn.active {
	background-color: var(--primary-color);
	color: var(--black);
	font-weight: 600;
	border-color: var(--primary-color);
}

.category-count {
	margin-left: 0.4rem;
	font-size: 0.8rem;
	color: var(--text-color-secondary);
}

/* Skip link for accessibility */
.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.skip-link:focus {
	position: fixed;
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: 0.5rem 0.75rem;
	background: var(--primary-color);
	color: var(--black);
	border-radius: 6px;
	z-index: 1100;
}

/* Visually hidden utility */
.visually-hidden {
	position: absolute !important;
	height: 1px; width: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.noscript-warning {
	max-width: 1200px;
	margin: 1rem auto;
	background: #4b5563;
	color: white;
	padding: 0.75rem 1rem;
	border-radius: 8px;
}
