:root {
  --bg-color: #1a1e13;
  --panel-bg: #2b3a24;
  --text-color: #ffc0cb;
  --accent-orange: #ff7f50;
  --accent-green: #39ff14;
  --gore-red: #8b0000;
  --light-red: #ff4444;
  --border-color: #556b2f;
}

body {
  background: linear-gradient(135deg, #1a1e13 0%, #2b3a24 50%, #301f1f 100%);
  background-size: 200% 200%;
  color: var(--text-color);
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  padding: 20px;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
}

a:hover {
  color: var(--accent-green);
  text-shadow: 0 0 5px var(--accent-green);
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

header {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

h1.logo {
  font-size: 3em;
  color: var(--accent-green);
  text-shadow: 2px 2px 0px var(--gore-red), -2px -2px 0px var(--accent-orange);
  display: inline-block;
  margin: 0;
}

.flashes {
  list-style: none;
  padding: 0;
}

.flashes li {
  background: var(--gore-red);
  color: white;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ff0000;
  font-weight: bold;
}

.flashes li.success {
  background: var(--panel-bg);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

form {
  background: var(--panel-bg);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  margin-bottom: 20px;
}

label {
  display: block;
  margin-top: 10px;
  color: var(--accent-orange);
}

input[type="text"], input[type="password"], textarea, input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  background: #111;
  color: var(--accent-green);
  border: 1px solid var(--border-color);
  padding: 8px;
  margin-top: 5px;
  font-family: inherit;
  font-size: 1em;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input[type="submit"], button {
  background: var(--gore-red);
  color: white;
  border: none;
  padding: 10px 20px;
  margin-top: 15px;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
  transition: all 0.3s;
}

input[type="submit"]:hover, button:hover {
  background: #ff0000;
  box-shadow: 0 0 10px #ff0000;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thread-row {
  background: var(--panel-bg);
  padding: 15px;
  border-left: 5px solid var(--accent-green);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.thread-info {
  min-width: 0;
  flex-grow: 1;
  padding-right: 15px;
}

.thread-title {
  font-size: 1.2em;
  font-weight: bold;
  word-wrap: break-word;
}

.thread-meta {
  font-size: 0.9em;
  color: #aaa;
}

.thread-info .thread-meta {
  padding-top: 5px;
}

.thread-last-reply {
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.post {
  background: var(--panel-bg);
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid var(--border-color);
  display: flex;
  gap: 30px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 5px;
  margin-bottom: 10px;
  font-size: 0.9em;
}

.post-author {
  color: var(--accent-green);
  font-weight: bold;
}

.post-id {
  cursor: pointer;
  color: var(--accent-orange);
}

.post-id:hover {
  text-decoration: underline;
}

.post-content {
  line-height: 1.4;
  flex-grow: 1;
  max-height: 3800px;
  overflow-y: auto;
}

.post-sidebar {
  width: 100px;
  flex-shrink: 0;
  text-align: center;
}

.avatar {
  max-width: 100px;
  max-height: 100px;
  border: 2px solid var(--accent-orange);
  box-shadow: 0 0 5px var(--accent-orange);
}

blockquote {
  color: var(--accent-green);
  border-left: 3px solid var(--accent-green);
  margin-left: 0;
  padding-left: 10px;
  background: rgba(57, 255, 20, 0.1);
}

.greentext {
  color: #a5c261;
}

.nav {
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
}

.separator {
  color: var(--border-color);
  font-weight: bold;
}

.action-links {
  display: contents;
}

button.action-btn {
  background: none;
  border: none;
  color: var(--accent-orange);
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-weight: normal;
  box-shadow: none;
  font-size: 1em;
  font-family: inherit;
}

button.action-btn:hover {
  background: none;
  box-shadow: none;
  color: var(--accent-green);
  text-shadow: 0 0 5px var(--accent-green);
}

/* Image Gallery and Modal */
.post-images {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post-thumbnail {
  max-width: 150px;
  max-height: 150px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s, filter 0.2s;
  object-fit: cover;
}

.post-thumbnail:hover {
  filter: brightness(1.2);
  border-color: var(--accent-green);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  border: 2px solid var(--accent-green);
  box-shadow: 0 0 20px var(--accent-green);
}

.close {
  position: fixed;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1010;
}

.close:hover,
.close:focus {
  color: var(--accent-orange);
  text-decoration: none;
  cursor: pointer;
}

.modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  padding: 16px;
  user-select: none;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1010;
}

.modal-nav:hover {
  color: var(--accent-orange);
  background: rgba(0,0,0,0.8);
}

#modal-prev {
  left: 15px;
}

#modal-next {
  right: 15px;
}

.modal-content.expanded {
  max-width: 100%;
  max-height: none;
  width: 100%;
  top: 0;
  transform: none;
  margin: 0 auto;
  box-sizing: border-box;
}

.modal.expanded {
  overflow-y: auto;
}
