body {
  margin: 0;
  padding: 0;
  font-family: 'Libre Baskerville', serif;
  background: #f3efe4;
  color: #212121;
}

.app {
  max-width: 900px;
  margin: auto;
  padding: 20px;
  text-align: center;
}

h1 {
  font-weight: normal;
  font-size: 2rem;
  margin-bottom: 20px;
}

.app p {
  font-family: 'Work Sans', sans-serif;
  margin: 0;
}

button,
.test-nav-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 25px;
  border: none;
  background: #5d86a2;
  color: white;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 10px;
  font-family: 'Libre Baskerville', serif;
  animation: in 0.5s;
  text-decoration: none;
}

button:hover,
.test-nav-btn:hover {
  animation: out 0.5s ease forwards;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@keyframes in {
  from {
    transform: translateY(-5px);
  }
  to {
    transform: translateY(0px);
  }
}

@keyframes out {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-5px);
  }
}

.message-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px auto;
  max-width: 500px;
}

.message-form input[type="text"],
.message-form textarea,
.message-form select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: 'Work Sans', sans-serif;
  box-sizing: border-box;
}

.message-form textarea {
  resize: none;
}

.form-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* FORUM COLOR SELECTOR */

select,
::picker(select) {
  appearance: base-select;
}

select {
  flex: 1;
}
select {
  border: none;
  background: #f3efe4;
  padding: 8px;
  transition: 0.4s;
	font-family:'Work Sans',sans-serif;
	font-size:1.2rem;
	color:black;
}

selectedcontent{
	color:black;
	font-family:'Work Sans',sans-serif;
}

select:hover,
select:focus {
  background: #f3efe4;
}
select::picker-icon {
  color: #999999;
  transition: 0.4s rotate;
}
select:open::picker-icon {
  rotate: 180deg;
}
::picker(select) {
  border: none;
}
option {
  display: flex;
  justify-content: flex-start;
  gap: 20px;

  border: none;
  background: #fffcf4;
  padding: 8px;
  transition: 0.4s;
}
option:first-of-type {
  border-radius: 8px 8px 0 0;
}

option:last-of-type {
  border-radius: 0 0 8px 8px;
}

::picker(select) {
  border-radius: 8px;
}

option:not(option:last-of-type) {
  border-bottom: none;
}
option:nth-of-type(odd) {
  background: white;
}

option:hover,
option:focus {
  background: #cd947b;
}
option .icon {
  font-size: 1rem;
  text-box: trim-both cap alphabetic;
}
selectedcontent .icon {
  display: none;
}
option:checked {
  font-weight: 400;
}
option::checkmark {
  order: 1;
  margin-left: auto;
  content: "✔";
}
::picker(select) {
  opacity: 0;
  transition: all 0.4s allow-discrete;
}
:open::picker(select) {
  opacity: 1;
}
@starting-style {
  :open::picker(select) {
    opacity: 0;
  }
}
::picker(select) {
  top: calc(anchor(bottom) + 1px);
  left: anchor(10%);
}


/* ---------------------------------- */

.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.message-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border-radius: 20px;
  min-height: 100px;
  color: white;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-image: url("images/paper texture.jpeg");
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
}

.message-tile:hover {
  transform: translateY(-4px);
}

.message-tile p {
  font-size: 1rem;
  line-height: 1.5;
}

.message-tile .name {
  display: block;
  font-size: 1rem;
  margin-top: 12px;
  font-weight: bold;
}

.message-tile.enlarged {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80%;
  max-width: 500px;
  min-height: 200px;
  transform: translate(-50%, -50%) scale(1.05);
  z-index: 1001;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: none;
}

.overlay.show {
  display: block;
}

.hidden {
  display: none;
}

#submitPage,
#messagesPage {
  width: 100%;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.popup-content {
	font-family:'Work Sans', sans-serif;
  background: #f3efe4;
  padding: 20px;
	border: dashed #513832;
  border-radius: 12px;
  width: min(90%, 320px);
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.popup-content h2 {
  margin-top: 0;
}

.close {
  float: right;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}