body {
  margin: 0;
  font-family: sans-serif;
  background: #f4f4f4;
  color: #333;
}

header {
  background: #2196f3;
  color: white;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.2rem;
  position: sticky;
  top: 0;
  z-index: 1000; /* Ensure header stays on top */
  flex-wrap: wrap;
}

header .nav-buttons {
  display: flex;
  gap: 10px;
}

button.header-btn {
  /*background: white;*/
  color: #2196f3;
  border: none;
  border-radius: 4px;
  /*padding: 6px 12px;*/
  cursor: pointer;
  min-width: 60px;
}

.view {
  display: none;
  padding: 16px;
  padding-bottom: 90px;
}

.active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
  min-height: 300px;
}


.tile {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 0;
  padding-top: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.tile .title {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6); /* Black tint */
  color: white;
  text-align: center;
  padding: 10px;
  font-weight: bold;
  font-size: 1rem;
}

select,
button {
  padding: 8px;
  margin: 10px 0;
  max-width: 500px;
  min-width: 150px;
}

.result {
  margin-top: 20px;
  padding: 10px;
  border-radius: 6px;
  color: white;
  font-weight: bold;
}
.buttons-row {
	text-align: center;
}
.submit-button {
	background: #2196f3;
    color: white;
    font-weight: bold;
    border: 2px solid #2196f3;
    padding: 15px;
    max-width: 150px;
	border-radius: 5px;
	margin-right: 10px;
}
.reset-button {
	background: white;
    color: #2196f3;
    font-weight: bold;
    border: 2px solid white;
    padding: 15px;
    max-width: 150px;
	border-radius: 5px;
}
label {
	display: block;
}

select {
	width: 100%;
}
.back-button {
  margin-top: 20px;
  padding: 10px 20px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

pre {
  white-space: pre-wrap;
  font-size: 14px;
  margin-top: 0;
}
div#content-area p {
    line-height: 22px;
	margin: 0 0 -5px 0;
}
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #2196f3;
  text-align: center;
  padding: 10px;
  z-index: 999;
}
.bottom-bar button {
  /*background: white;*/
  color: #2196f3;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: white;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 1rem;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2225%22%20height%3D%2225%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22gray%22%20xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M7%2010l5%205%205-5H7z%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  width: 100%;
  cursor: pointer;
  transition: border 0.2s ease-in-out, box-shadow 0.2s;
}

select:focus {
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
  outline: none;
}

#page-title {
	font-weight: bold;
    font-size: 24px;
}

pre span {
    text-align: center;
    font-weight: bold;
    display: block;
}

@media (max-width: 500px) {
  header {
    flex-direction: row;
    text-align: center;
  }

  .nav-buttons {
    justify-content: center;
  }
}
