body {
	font-family: 'Inter', sans-serif;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
.container-fluid {
	width: 100%;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}
.main-content-grid {
	flex-grow: 1;
	display: grid;
}
#canvasContainer {
	width: 100%;
	height: 100%;
	min-height: 480px; /* Ensure canvas has a minimum height */
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0.5rem;
}
canvas#simulationCanvas { /* Specific ID for simulation canvas */
	border: 1px solid #ccc;
	background-color: #f0f0f0;
	display: block;
	max-width: 100%;
	max-height: 100%;
	cursor: pointer;
	transition: background-color 0.5s ease;
}
.control-panel {
    position: relative;
	max-height: calc(100vh - 100px); /* Adjusted for header and padding */
	overflow-y: auto;
}
.control-panel input[type="number"] {
	width: 70px;
	padding: 0.3rem 0.5rem;
}
.control-panel input[type="number"].wider-input {
	width: 100px;
}
.control-panel label, .control-panel .input-group-label {
	margin-right: 2px;
	font-size: 0.8rem;
	cursor: help;
	display: inline-block;
}
.control-group {
	padding: 0.6rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background-color: #f7fafc;
}
.control-group h3, .control-group h4, .control-group h5 {
	font-size: 1rem;
	margin-bottom: 0.5rem;
}
.control-group h5 { /* More specific styling for sub-headers */
	font-size: 0.9rem;
	font-weight: 600;
	color: #4a5568; /* Slightly darker gray for sub-headers */
}
.button-group button, .manual-setup-button, .cell-type-button, .preset-select-button {
	margin-top: 0.4rem;
	padding: 0.4rem 0.8rem;
	font-size: 0.9rem;
	transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.cell-type-button.active {
	background-color: #4a5568;
	color: white;
}
.manual-setup-button.active-selection {
	ring-2 ring-offset-2 ring-blue-500;
}
.manual-setup-button.active-attacker { ring-color: #ef4444; }
.manual-setup-button.active-prey { ring-color: #3b82f6; }
.manual-setup-button.active-defender { ring-color: #d97706; }
.manual-setup-button.active-barrier { ring-color: #78350f; } /* amber-900 for dark brown */
.manual-setup-button.active-remove { ring-color: #6b7280; }

#simulationErrorDisplay {
	color: red;
	font-weight: bold;
	text-align: center;
	padding: 0.5rem;
	margin-bottom: 0.5rem;
	background-color: #fee2e2;
	border: 1px solid #f87171;
	border-radius: 0.375rem;
}
.tooltip-trigger {
	position: static;
	display: inline-block;
	cursor: help;
}
.tooltip-trigger .tooltip-content {
	visibility: hidden;
	width: max-content;
	white-space: normal;
	max-width: 250px;
	background-color: #2d3748;
	color: #fff;
	text-align: left;
	border-radius: 6px;
	padding: 8px 10px;
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	opacity: 0;
	transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
	font-size: 0.75rem;
	line-height: 1.4;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	pointer-events: none;
}
.tooltip-trigger:hover .tooltip-content {
	visibility: visible;
	opacity: 1;
}
.tooltip-trigger .tooltip-content::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border-width: 5px;
	border-style: solid;
	border-color: #2d3748 transparent transparent transparent;
}
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 1rem;
}
.modal-content {
	background-color: white;
	padding: 1.5rem 2rem;
	border-radius: 0.75rem;
	box-shadow: 0 10px 25px rgba(0,0,0,0.1);
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
}
.modal-content.large-modal {
	max-width: 90vw; /* Adjusted for 2x2 grid */
	max-height: 90vh;
}
.modal-title {
	font-size: 1.5rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1f2937;
}
.modal-body p, .modal-body li {
	margin-bottom: 0.5rem;
	font-size: 0.90rem;
	color: #4b5563;
}
 .modal-body strong {
	color: #374151;
}
.modal-body ul {
	list-style-type: disc;
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}
.modal-body h4 {
	font-size: 1.1rem;
	font-weight: 600;
	color: #374151;
	margin-top: 1rem;
	margin-bottom: 0.5rem;
}
.modal-close-button {
	margin-top: 1.5rem;
	padding: 0.6rem 1.2rem;
}
.arena-info {
	font-size: 0.75rem;
	color: #4b5563;
	margin-top: 0.5rem;
	text-align: center;
}
.report-buttons-container button {
	margin: 0.25rem;
}
.hidden {
	display: none !important;
}
.cell-params-section {
	border-top: 1px solid #cbd5e1;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
}
.preset-group {
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	display: flex; /* For better internal alignment if needed */
	flex-direction: column;
}
.preset-group.active-group {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}
.preset-select-button.active-preset-subtype {
	outline: 2px solid #1d4ed8;
	outline-offset: 1px;
	box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.4);
	background-color: #3b82f6;
	color: white;
}
.vertical-th {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  text-align: center;
}
input[type="range"]:disabled {
    cursor: not-allowed;
}