body {
  background-color: white; /* Needs to be editable */
  background-image: none;  /* Needs to be editable, if selected then take priority */
  color: #b3b8c3;           /* Needs to be editable */
  font-family: Arial, sans-serif;
  padding: 20px;
}
img {
  border: solid 2px #4e5053;
}

a{
  word-break: break-all;
}

h1, h2, #post, form {
  font-size: 14px !important;
  width: 555px;
  background-color: white; /* Needs to be editable */
  color: #4e5053;           /* Needs to be editable */
  border: solid 2px #4e5053; /* Needs to be editable */
  margin-left: auto;
  margin-right: auto;
  padding: 1em;
  margin-bottom: 10px;
  text-align: justify !important;
}

#flex_content {
  display: flex;
  flex-wrap: wrap;          /* Allows wrapping when image isn't present or on small screens */
  align-items: flex-start;
  gap: 10px;
}

.thumbnail {
  float: left;
  margin: 0 10px 10px 0;
  width: auto;
  max-width: 40%;
  max-height: 200px; /* change this to fit your layout needs */
  height: auto;
  object-fit: contain;
  border: solid 2px #4e5053;
}

.post_content::after {
  content: "";
  display: block;
  clear: both;
}


.post_meta {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 0.5em;
}

#header {
  margin-top: 5px;
  padding: 2px;
}

.post_number {
  color: #888;
}

#edit-link {
  color: #4e5053;
  text-decoration: none;
  font-size: 1em;
  cursor: pointer;
}

#edit-link:visited,
#edit-link:active,
#edit-link:hover,
#edit-link:focus {
  color: #4e5053;
  text-decoration: none;
}

pre.post_code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-width: 100%;
  background: #f0f0f0;
  padding: 10px;
  border: 1px solid #ccc;
  font-family: monospace;
}

/* Button Styles - Minimalist but Better */
button, input[type="submit"], input[type="button"] {
  font-family: Arial, sans-serif;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid #4e5053;
  background-color: white;
  color: #4e5053;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  margin: 2px;
}

button:hover, input[type="submit"]:hover, input[type="button"]:hover {
  background-color: #f5f5f5;
  border-color: #333;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button:active, input[type="submit"]:active, input[type="button"]:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  background-color: #e8e8e8;
}

button:focus, input[type="submit"]:focus, input[type="button"]:focus {
  outline: 1px solid #4e5053;
  outline-offset: 1px;
}

/* Specific button variants */
.btn-primary {
  background-color: #4e5053;
  color: white;
}

.btn-primary:hover {
  background-color: #3a3d40;
  color: white;
}

.btn-danger {
  color: #cc1105;
  border-color: #cc1105;
}

.btn-danger:hover {
  background-color: #cc1105;
  color: white;
}

.btn-small {
  font-size: 11px;
  padding: 4px 8px;
}

/* Editor toolbar buttons */
.editor-btn {
  background: white;
  border: 1px solid #ccc;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 2px;
  margin: 1px;
  transition: all 0.2s ease;
}

.editor-btn:hover {
  background: #f0f0f0;
  border-color: #999;
  transform: translateY(-1px);
}

.editor-btn:active {
  background: #e0e0e0;
  transform: translateY(0);
}

.editor-btn.active {
  background: #4e5053;
  color: white;
  border-color: #4e5053;
}

/* Chat-specific styles */
body {
  font-family: monospace;
  background: #fff;
  color: #222;
}
#chatbox {
  width: 70%;
  max-width: 600px;
  margin: 40px 0 0 0;
  border: 1px solid #ccc;
  border-radius: 0;
  padding: 0.5em 1em 1em 1em;
  background: #fafafa;
  float: left;
}
#userlist {
  width: 25%;
  min-width: 120px;
  max-width: 200px;
  float: right;
  margin: 40px 2% 0 0;
  border: 1px solid #ccc;
  border-radius: 0;
  background: #fafafa;
  padding: 0.5em 1em;
}
#userlist h3 {
  margin-top: 0;
  font-size: 1em;
}
#messages {
  height: 300px;
  overflow-y: auto;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.5em;
  padding-bottom: 0.5em;
  border-radius: 0;
}
.msg {
  margin: 0.2em 0;
  border-radius: 0;
}
.msg .user {
  color: #789922;
  font-weight: bold;
}
.msg .me {
  color: #4e5053;
  font-weight: bold;
}
#typing {
  color: #aaa;
  font-size: 0.9em;
  margin-top: 0.2em;
}
#input {
  width: 100%;
  box-sizing: border-box;
  font-size: 1em;
  padding: 0.3em;
  border-radius: 0;
  border: 1px solid #ccc;
  margin-top: 0.5em;
}
#send {
  display: none;
}
.spoiler {
  background: #222;
  color: #222;
  border-radius: 0;
  padding: 0 2px;
  cursor: pointer;
}
.spoiler:hover, .spoiler:active {
  color: #fff;
  transition: color 0.2s;
}

/* Responsive chat layout for small screens */
@media (max-width: 800px) {
  #chatbox, #userlist {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 10px 0;
    box-sizing: border-box;
  }
  #userlist {
    margin-top: 0;
    margin-right: 0;
    padding-top: 0.5em;
  }
  #messages {
    height: 200px;
    font-size: 1em;
  }
  #input {
    font-size: 1.1em;
  }
}

@media (max-width: 500px) {
  #messages {
    height: 120px;
    font-size: 0.95em;
  }
  #input {
    font-size: 1em;
  }
  #chatbox, #userlist {
    padding: 0.5em 0.5em;
  }
}
