/* REMINDER FOR MARGIN, ETC. SIZING: Size order is clockwise (top, right, bottom, left) */

* {
  font-family: 'VT323', monospace; /* Retro terminal font */
  font-size: 16px;
}

body {
  background: #0a0a0a url('lain-bg.gif') repeat fixed center; /* Black with animated GIF */
  color: #00ff00; /* Neon green text */
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

h1 {
  text-decoration: none;
  font-size: 3.5em;
  text-align: center;
  margin: 0.5em auto;
  color: #00cc00; /* Slightly darker green */
}

h2 {
  text-align: center;
  text-decoration: underline;
  font-size: 175%;
  margin: 0.5em auto;
  color: #00ff00;
}

h3 {
  font-size: 150%;
  text-decoration: underline;
  margin: 0.5em 0;
  color: #00ff00;
}

a:link {
  text-decoration: none;
  color: #66ff66; /* Lighter green */
  font-style: italic;
}

a:visited {
  text-decoration: none;
  color: #33cc33; /* Muted green */
}

a:hover {
  text-decoration: underline;
  line-height: 1.4em;
  color: #aaaaaa; /* Grayish hover */
}

.container {
  border-width: 0.5em;
  border-color: #333333; /* Dark gray border */
  background-color: rgba(10, 10, 10, 0.9); /* Semi-transparent black */
  border-style: solid;
  margin: 2em auto;
  padding: 1em 2em;
  width: 40em;
  max-width: 90%;
  box-sizing: border-box;
}

nav {
  text-align: center;
  margin-bottom: 1em;
}

#auth, #admin-tools, .sort-buttons {
  margin-bottom: 20px;
  text-align: center;
}

input, textarea {
  margin-right: 10px;
  padding: 5px;
  background-color: #1a1a1a; /* Darker gray */
  color: #00ff00;
  border: 1px solid #555555; /* Medium gray */
}

input {
  width: 150px;
}

textarea {
  width: 100%;
  height: 100px;
  resize: vertical; /* Allow vertical resizing only */
}

button {
  padding: 5px 10px;
  background-color: #333333; /* Dark gray */
  color: #00ff00;
  border: 0.2em solid #555555;
  cursor: pointer;
}

button:hover {
  background-color: #555555; /* Lighter gray */
}

.post, .comment {
  margin: 10px 0;
  border-width: 0.25em;
  border-color: #555555;
  border-style: solid;
  background: #1a1a1a; /* Dark gray background */
  padding: 1em;
  color: #00ff00;
}

.post img {
  max-width: 100px;
  margin-top: 5px;
  display: block;
}

.post-description,
#post-description {
  white-space: pre-line;
}

#post-details img {
  max-width: 100%; /* Fit container width */
  height: auto;
  margin-top: 5px;
  display: block;
}

.upvote-btn, .delete-btn, .pin-btn, .unpin-btn, .reply-btn {
  cursor: pointer;
  margin-right: 10px;
}

.pinned {
  font-weight: bold;
  color: #00ffff; /* Cyan for pinned posts */
}

#posts-list {
  padding-left: 2em;
}

#comments-list {
  padding-left: 2em;
}

#post-details {
  margin-bottom: 20px;
}

.warning {
  text-align: center;
  color: #00ffff; /* Cyan for warning */
  font-size: 14px;
  margin: 0.5em 0;
}

.rules-content, .about-content {
  padding: 1em;
  line-height: 1.6;
  color: #00ff00;
}

/* New styles for replies */
.replies {
  margin-left: 2em; /* Indent replies */
  border-left: 2px solid #00cc00; /* Darker green border */
  padding-left: 1em;
}

.reply {
  margin: 5px 0;
  padding: 0.5em;
  background: #222222; /* Slightly lighter gray for contrast */
  border-width: 0.1em;
  border-color: #444444;
  border-style: dashed;
  color: #00ff00;
}

.reply-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.reply-form textarea {
  width: 100%;
  max-width: 300px;
  height: 50px;
  background-color: #1a1a1a;
  color: #00ff00;
  border: 1px solid #555555;
  padding: 5px;
  resize: vertical; /* Allow vertical resizing only */
}

.reply-form button {
  align-self: flex-start;
}

/* Styles for profile page */
#profile-image {
  width: 120px; /* 4:3 ratio */
  height: 90px;
  object-fit: cover;
  border: 2px solid #00ff00;
  margin-bottom: 10px;
}

#about-me {
  margin-bottom: 20px;
}

#edit-profile {
  margin-top: 20px;
}

#edit-profile textarea {
  width: 100%;
  height: 100px;
  background-color: #1a1a1a;
  color: #00ff00;
  border: 1px solid #555555;
  padding: 5px;
}

#edit-profile input {
  width: 100%;
  margin-bottom: 10px;
}

/* Styles for the new thread button and modal */
#new-thread-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 18px;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent; /* No overlay */
  z-index: 1000;
}

.modal-content {
  background-color: #1a1a1a; /* Dark gray background */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  width: 300px; /* Smaller width */
  border: 2px solid #00ff00;
  box-shadow: 0 0 10px #00ff00;
  cursor: move;
}

.close-btn {
  color: #00ff00;
  float: right;
  font-size: 24px;
  cursor: pointer;
}

.close-btn:hover {
  color: #aaaaaa;
}

#post-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#post-form input, #post-form textarea {
  width: 100%;
  margin-right: 0;
}

#post-form textarea {
  height: 150px; /* Larger description box, like 4chan */
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* Pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 5px 10px;
  background-color: #333333;
  color: #00ff00;
  border: 0.2em solid #555555;
  cursor: pointer;
}

.pagination button:hover {
  background-color: #555555;
}