body {
  font-family: sans-serif;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;     /* Vertikal layout */
  align-items: center;        /* Sentrer innhold horisontalt */
}

h2 {
	font: bold 18px Arial;
	text-align: center;
}

.explanation-container {
	width: 470px;
	border: 1px solid red;
	background: #fafafa;
}

.explanation-panel {
	font: 18px Arial;
	text-align: left;
	padding: 0px 10px 0px 10px;
	width: 330px;
	height: 290px;
	position: relative;
	left: 20px;
	border: 1px solid #999999;
}

.panel-active {
	outline: 3px solid #4caf50; /* grønn ramme */
	outline-offset: -3px;
	border-radius: 8px;
}

canvas {
  border: none;
  display: block; /* Prevents extra space below canvas */
  max-width: 100%;
}

.main-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.app-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0px;
  /* Remove width: 100% to allow container to size to content */
  justify-content: center; /* Centers the columns horizontally */
  align-items: flex-start; /* Aligns columns at the top */
  max-width: 100%; /* Prevents overflow on small screens */
}

/* Column groups */
.column-group {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

/* For horizontal pairs (3&4, 7&8) */
.horizontal-pair {
  display: flex;
  gap: 0px;
}

/* For vertical arrangement when toggled */
.vertical-pair {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

/* For enabling/disabling sections */
.hide {
  display: none;
}

.cell {
  /* Optional: Add some styling to the cells */
  padding: 0px;
  background-color: #f9f9f9;
}