* {
  font-family: 'Cascadia Code', monospace !important;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background-color: #121212;
  color: white;
}

#theme-toggle {
  position: fixed;
  top: 1%;
  left: 1%;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding: 1em;
  overflow-y: auto;
}

input, button {
  background-color: #2c2c2c;
  color: white;
  border: 1px solid #555;
  padding: 0.5em;
  margin: 0.5em;
}

button:hover {
  background-color: #444;
  cursor: pointer;
}

#result-container {
  width: 100%;
  text-align: center;
}

#result {
  font-size: 5px;
  white-space: pre;
  font-weight: 900;
  display: inline-block;
  text-align: left;
  margin: 1rem auto;
  max-width: 100%;
}

h1, h2, h3 {
  font-weight: normal;
  text-align: center;
}

.err {
  color: red;
  font-size: large;
}

#options-list {
  font-size: 0.8em;
  margin-top: 0.5em;
  text-align: center;
}

#options-list label {
  display: block;
  margin-bottom: 0.3em;
}

footer.info {
  flex-shrink: 0;
  text-align: center;
  padding: 1em;
  margin-top: auto;
}

#ascii-actions {
  display: none;
  margin-top: 2em;
  text-align: center;
}

#ascii-actions button {
  background-color: #2c2c2c;
  color: white;
  border: 1px solid #555;
  padding: 0.4em 0.8em;
  margin: 0.3em;
  font-size: 0.9em;
}

#ascii-actions button:hover {
  background-color: #444;
  cursor: pointer;
}

.footer-nav {
  margin-top: 0.5em;
  font-size: 0.85em;
}

.page-container {
  max-width: 600px;
  margin: auto;
  padding: 2em;
  text-align: center;
}

.page-container p {
  margin: 1em 0;
}

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  color: #ccc;
  text-decoration: none;
}

/* Layout container */
body > div {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (max-width: 600px) {
  input, button {
    width: 90%;
    font-size: 0.9em;
  }

  h1 {
    font-size: 1.3em;
  }

  h2 {
    font-size: 1em;
  }

  #result {
    font-size: 4px;
  }
}
