h1,
h3 {
    text-align: center;
    margin-bottom: 0em;
    margin-top: .3em;
}

.intro {
    font-size: 1em;
    color: #666;
    margin-top: 0em;
}

input {
    /*width: 1em;*/
    text-align: center;
    margin-bottom: 0px;
    border: 0px solid #000088;
    border-radius: 3px;
    background-color: lightgrey;    font-weight: bold;
    padding: 2px;
}

#inputContainerSBH { 
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transition: transform 0.2s ease;
}

#inputContainerLBH { 
    font-size: 1.2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    text-align: center;
    align-items: center;
    padding-top: 1px; /* Adjust based on header height */
    padding-bottom: 1px; /* Adjust based on footer height */
}

.body {
    width: 100%;
    min-width: 350px;
    padding: 10px;
    box-sizing: border-box;
}

.right-spot {
    font-size: 1.2em;
    width: 1em;
    text-align: center;
    background-color: #E57A3B;
}

.wrong-spot {
    font-size: 1.1em;
    width: 3em;
    text-align: center;
    background-color: #85b5f5;
}

.wrong-spots {
    display: block;
}

.misses-input {
    font-size: 1.1em;
    width: 80%;
    max-width: 17em;
    text-align: center;
    position: center;
    background-color: #B4B4B4;
}

.explainer {
    font-size: 1em;
    color: #888;
    text-align: center;
    margin-top: 0em;
    margin-bottom: .2em;
}

.filters {
    color: #888;
    margin-top: .1em;
    margin-bottom: .1em;
}

#refreshButton {
    background-color: #85b5f5;
    color: white;
    border: none;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 1em;
    cursor: pointer;
    margin-top: .4em;
}

#refreshButton:hover {
    background-color: #6a9edb;
}

#toggleExplanationButton {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 1em;
    cursor: pointer;
    margin-top: .4em;
    margin-right: 5px;
}

#toggleExplanationButton:hover {
    background-color: #45a049;
}

#toggleDarkModeButton {
    background-color: #555;
    color: white;
    border: none;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 1em;
    cursor: pointer;
    margin-top: .4em;
    margin-left: 5px;
}

#toggleDarkModeButton:hover {
    background-color: #444;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 8px; /* Space between buttons */
    margin-top: 4px; /* Margin on top */
}

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

.dark-mode .right-spot {
    background-color: #E57A3B;
}

.dark-mode .wrong-spot {
    background-color: #85b5f5;
}

.dark-mode .misses-input {
    background-color: #B4B4B4;
}

.dark-mode button {
    background-color: #333;
    color: white;
}

.dark-mode button:hover {
    background-color: #555;
}

.dark-mode .solutions {
    color: white;
}

body, html {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.wrapper {
    flex: 1;
}

footer {
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #f1f1f1; /* Light gray background */
    color: #666; /* Darker gray text */
    text-align: center;
}

.dark-mode footer {
    background-color: #333; /* Dark gray background */
    color: #999; /* Lighter gray text */
}

a {
    color: inherit; /* Match the text color */
    text-decoration: none; /* Remove underline */
}

footer a:hover {
    text-decoration: underline; /* Underline on hover */
}

#footerLinks {
    padding: 0;
    margin: 0;
}

#inputContainer {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000; /* Ensure it stays on top */
    padding-bottom: 8px;
    background-color: inherit;
    color: inherit;
}

#solutionsDiv {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

#solutionsDiv::-webkit-scrollbar {
    display: none;  /* Safari and Chrome */
}

button {
    width: 3em;
}

#wellActually {
    display: none;
}

.explanation #wellActually {
    display: block;
}

#anchorLetter {
    background-color: #ffeb3b;
    color: black;
}

.letter-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 1em auto;
}

.solutions-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 1rem 0;
}

.column {
    flex: 1;
    min-width: 0;
}

.column h3 {
    font-size: 1em;
    margin-bottom: 0.5rem;
    color: #666;
    text-transform: uppercase;
}

#licenseContainer {
    text-align: left;
}

#inputContainerSBH input {
    width: 1em;
    text-align: center;
    font-size: 1.2em;
    padding: 2px;
    margin: 0 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

#startsWith {
    font-size: 1.2em;
    width: 1em;
    background-color: #ffeb3b;
}

#includes {
    font-size: 1.2em;
    width: 5em;
    background-color: #85b5f5;
}

#endsWith {
    font-size: 1.2em;
    width: 1em;
    background-color: #ffeb3b;
}

.letter-inputs input {
    width: 3em;
    text-align: center;
    font-size: 1.2em;
    padding: 2px;
    margin: 0 2px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #eea39b;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    max-width: 800px;
    margin: auto;
}

.grid-item {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: lightgrey;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px;
    font-size: 1.2em;
    text-transform: uppercase;
    cursor: move;
    height: 80px;
}

.grid-item textarea {
    width: 100%;
    height: 100%;
    text-align: center;
    border: none;
    background: none;
    font-size: 1.2em;
    text-transform: uppercase;
    resize: none; /* Prevent resizing */
    overflow-wrap: break-word; /* Allow text to wrap */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px; /* Add padding to center text vertically */
    box-sizing: border-box; /* Include padding in element's total width and height */
}

.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-box {
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
}

.legend-label {
  width: 100px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

#sortButton {
  display: block;
  width: auto;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #85b5f5;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.grid-item.category1 { background-color: #ba81c5; }
.grid-item.category2 { background-color: #b0c4ef; }
.grid-item.category3 { background-color: #f9df6d; }
.grid-item.category4 { background-color: #a0c35a; }
