body {
  font-family: "Hina Mincho", sans-serif;
  background-color: snow;
  padding: 3rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white; /* white text for contrast */
  position: relative;
  z-index: 1;
}

.container {
  position: relative;
  max-width: 600px;
  width: min(100%, 600px);
  background: rgba(0, 0, 0, 0.6); /* semi-transparent dark background */
  border-radius: 1px;
  padding: 2rem;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); */
  box-shadow:
    inset 1vw -2vh 2em rgb(0 0 0 / 80%),
    0.3em 0.3em 1em rgb(105 105 105 / 75%);
  z-index: 2;
}

.title,
.subtitle {
  font-weight: bold;
  margin-bottom: 2rem;
  color: whitesmoke;
  text-align: center;
}

/* box contains label, control, textarea, select & 2 buttons */
.box {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.label {
  color: snow;
}

.control {
  background:
    conic-gradient(
      from 270deg at 100% 125%,
      transparent,
      snow,
      white,
      #b7e0e7,
      transparent 30deg
    ),
    radial-gradient(
      ellipse farthest-corner at 100% 100%,
      transparent 70%,
      #b7e0e7 90%,
      white,
      snow
    );
}

textarea.textarea {
  background: rgba(255 255 255 / 0.25);
  font-family: "Klee One";
  color: crimson;
  /* font-style: italic; */
  border: none;
  resize: vertical;
  border-radius: unset;
  box-shadow: -0.9em 0 1.5em -0.5em white;
}

textarea.textarea::placeholder {
  color: lightgray;
  font-style: italic;
  opacity: 1;
}

.select select {
  background: linear-gradient(
    to right,
    #200830,
    #004d59,
    #3c7b13,
    #c8695a,
    #c594e4,
    #b7e0e7,
    #ffffff
  );
  color: snow;
  border: none;
  border-radius: unset;
}

.select select:hover {
  color: #b7e0e7;
  border-color: white;
  font-weight: bold;
}

button.button {
  border-radius: 0.1rem;
  background: linear-gradient(to right, transparent 25%, dimgray);
  box-shadow: inset -1px 1px 2px snow;
  color: snow;
  font-family: "Noto Sans Japanese", sans-serif;
  font-size: 1rem;
  font-weight: normal;
  transition:
    color 5s ease,
    font-weight 0.5s ease;
}

button.button:hover {
  background: linear-gradient(
    to right,
    #200830,
    #004d59,
    #3c7b13,
    #c8695a,
    #c8695a,
    #c594e4,
    #b7e0e7,
    #ffffff
  );
  color: #b7e0e7;
  font-weight: bold;
}

.button span:nth-of-type(2) {
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: 0.5s;
}

.button span:nth-of-type(2)::after {
  content: "\00bb";
  position: absolute;
  opacity: 0;
  top: 0;
  right: -20px;
  transition: 0.5s;
}

.button:hover span:nth-of-type(2) {
  padding-right: 25px;
}

.button:hover span:nth-of-type(2):after {
  opacity: 1;
  right: 0;
}

.board-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  font-family: "Klee One", sans-serif;
  font-style: normal;
  color: rgba(248, 248, 255, 0.75);
  text-align: left;
  margin-top: 2.5em;
  height: 50vh;
}

/* Show text when no input text */
.has-text-muted {
  max-width: 25%;
  margin-left: auto;
  margin-right: 1%;
  writing-mode: vertical-rl;
  font-size: 1.25rem;
  letter-spacing: 4px;
}

.has-text-muted strong {
  color: crimson;
}

.has-text-muted p {
  margin-left: none;
}

ruby {
  ruby-align: center;
}

ruby rt {
  letter-spacing: normal;
}

.user-guide {
  writing-mode: vertical-rl;
  font-size: 1rem;
  letter-spacing: 2px;
}

.user-guide ol li {
  list-style-position: outside;
  list-style-type: japanese-formal;
}

/* Spacing between list items except last item */
.user-guide ol li:not(:last-child) {
  margin-left: 7px;
}

.emphasis {
  font-family: "Klee One";
  text-emphasis: filled sesame;
}

.table-container {
  margin-top: 2rem;
}

/* Table styling for dark background */
table.table {
  background: url("/static/tokenizer_app/textures/light-paper-fibers.png");
  background-size: contain;
  background-color: rgba(105 105 105 / 0.9);
  color: white;
}

table.table th,
table.table td {
  border-color: rgba(255 255 255 / 0.2);
}

table.table th {
  color: silver; /* Change the Header Text Colors */
}

table.table td {
  color: white;
}

/* Highlight the table rows */
table.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.75); /* Light white color on hover */
  color: black; /* Highlight the text on the table */
  transition: background-color 0.3s ease; /* Smooth transition */
}

footer {
  writing-mode: vertical-rl;
  padding: 3rem;
  text-align: right;
  color: snow;
  fonr-size: 0.5rem;
  font-weight: bold;
  letter-spacing: 2px;
}

a[href^="mailto:"] {
  color: whitesmoke;
  text-decoration: none;
}

#about-link {
  color: inherit; /* Use the inherited text color */
  text-decoration: none; /* Remove underline */
  cursor: pointer; /* Show pointer cursor */
}

/* Canvas background */
#terrain-outline-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

#whitenoise-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* behind textarea */
  pointer-events: none; /* allow clicks to pass through */
  display: block; /* remove inline default */
}

.content-wrapper {
  position: relative;
  z-index: 1; /* Place the main content above the canvas */
}

/* Style for the line art inside the container */
#rand-waves {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Place it behind the content */
}

#noise-waveform {
  position: absolute;
  width: 100%;
  margin: -5vh 0;
}

#toast {
  visibility: hidden;
  margin-top: auto;
  margin-left: auto;
  background: radial-gradient(circle at 100%, snow 25%, #b7e0e7 75%);
  box-shadow: inset 3em 1em 3em -3em white;
  text-align: center;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  z-index: 9999;
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: crimson;
  font-size: 1em;
  font-weight: bold;
  opacity: 0;
  transition:
    opacity 0.25s,
    visibility 0.5s;
}
