:root {
 --background-top: #2f0c08;
  --background-bottom: #150402;
  --post-border: #cc9617;
  --form-label: #311407;
  --label-border: #cc9617;
  --title: #BAC6D1;
  --post-background: #2f0c0b;
  --link-color: #BAC6D1;
  --link-color-hover: #ffffff;
  --user-color: #d75b1e;
  --thread-subject: #6a4230;
  --reply-color: #d00;
  --post-highlight: #55211b;
}
input[type="text"],input[type="password"], textarea, select {
	background: var(--background-bottom);
	color: #CCCCCC;
	border: 1px solid var(--label-border);
	padding-left: 5px;
	padding-right: -5px;
	font-family: sans-serif;
	font-size: 10pt;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 30px;
}

body {
    min-height: 100vh;
    margin: 0 8px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(var(--background-top) 3em, var(--background-bottom) 300px);
    color: #BAC6D1;
    font-family: arial,helvetica,sans-serif;
    font-size: 10pt;
}

header {
    display: flex;
    gap: 0px 3px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom:  1px solid var(--post-border);
    font-size: 9pt;
    position: sticky;
    top: 0;
    background: var(--background-top);
    margin-left: -8px;
    margin-right: -8px;
    z-index: 30;
    padding: 0 4px;
}

a, a:visited {
    color: var(--link-color);
}

header a, header .link-button {
    text-decoration: none;
    font-size: 9pt;
}

a:hover, .link-button:hover {
    color: var(--link-color-hover);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0px;
}

hgroup {
    margin-top: 14px;
    margin-bottom: 14px;
}

hgroup h1 {
    font-family: tahoma;
    letter-spacing: -2px;
    font-size: 30px;
    text-align: center;
    color: var(--title);
}

hgroup p {
    margin: 0px;
    text-align: center;
    color: var(--title);
    font-size: 11px;
}

main {
    margin: 0 4px;
}

footer {
    text-align: center;
    margin-top: auto;
    margin-bottom: 8px;
    font-size: 10px;
}

form {
    margin: auto;
    margin-bottom: 0px;
}

.grid-form {
    display: grid;
    gap: 1px 2px;
    width: max-content;
    margin-bottom: 50px;
}

label:not(.image-box, .drop-zone), #reply-handle {
    border: 1px solid var(--label-border);
    padding: 0 3px;
    grid-column: 1;
    font-weight: bold;
    background: var(--form-label);
    display: flex;
    align-items: center;
}

#reply-handle {
    cursor: move;
    padding: 2px 0px;
    margin-bottom: 2px;
    text-align: center;
    display: block;
}

input {
    grid-column: 2;
    color: #DCE6EE;
    background-color: #44150f;
    border: 2px solid var(--label-border);
}

hr {
    border: none;
    border-top: 1px solid var(--post-border);
}

fieldset {
    margin: auto;
    min-width: auto;
}

.inline {
    display: inline;
    margin: 0;
}

.link-button {
    background: none;
    border: none;
    color: var(--link-color);
    padding: 0;
    text-decoration: underline;
    cursor: pointer;
    font-family: arial,helvetica,sans-serif;
    font-size: 10pt;
}

.link-button:focus {
    outline: none;
}

.link-button:active {
    color:red;
}

.search-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    flex-grow: 1;
}

.categories-list {
    display: flex;
    flex-direction: column;
}

.forums-list, .forum-thread-list {
    border: 1px solid var(--label-border);
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.news-block {
    display: flex;
    flex-direction: column;
    margin: 0px auto 12px;
    width: 85%;
    border: 1px solid var(--label-border);
}

.block-header {
    background: var(--form-label);
    padding: 4px;
}

.block-entry {
    display: flex;
    flex-direction: row;
    padding: 4px;
    flex-wrap: nowrap;
    gap: 4px;
}

.block-title {
    width: 25%;
}

.block-content {
    width: 65%;
}

@media only screen and (max-width: 800px) {
    .forums-list, .forum-thread-list, .news-block {
        width: 100%;
    }
}

.category-desc, .forum-desc, .forum-index-desc, .forum-threads, .forum-posts, .forum-last-post, .thread-preview-desc, .thread-posts, .thread-views, .thread-last-post {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 4px;
}

.forum-last-post, .thread-last-post {
   flex: 1 1 25%;
}

dd {
    margin: 0px;
}

.forum-desc, .thread-preview-desc {
    flex: 1 1 65%;
}

@media only screen and (max-width: 800px) {
    .forum-desc, .thread-preview-desc {
        flex: 1 1 25%;
    }
}

.category-desc, .forum-index-desc {
    background: var(--form-label);
}

.forum-entry, .thread-preview, .manage-account {
    display: flex;
    flex-direction: row;
}

.forum-entry:nth-child(odd), .thread-preview:nth-child(odd) {
    background: var(--post-background);
}

.post.reply {
    padding: 2px 8px 6px 8px;
    background: var(--post-background);
    border-width: 1px;
    border-style: none solid solid none;
    border-color: var(--post-border);
    align-self: flex-start;
    max-width: 95%;
    border-radius: 5px;
}

.thread {
    display: flex;
    gap: 6px;
    flex-direction: column;
    margin-bottom: 6px;
}

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

.user a, a.user {
    text-decoration: none;
    color: var(--user-color);
    font-weight: bold;
}

.user a:hover {
    text-decoration: none;
    color: var(--link-color-hover);
    font-weight: bold;
}

.post .info {
    margin: 3px 0 4px 0;
    display: flex;
    gap: 4px;
    flex-direction: row;
    flex-wrap: wrap;
    word-wrap: nowrap;
    align-items: first baseline;
}

.post .body {
    margin-left: 24px;
    margin-right: 36px;
    margin-top: 11px;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.original-name {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    white-space:nowrap;
    vertical-align: text-bottom;
}

.post .files {
    display: flex;
    gap: 20px;
    flex-direction: row;
    flex-wrap: wrap;
}

.post .files .file {
    display: flex;
    gap: 5px;
    flex-direction: column;
    width: fit-content;
}

.grid-form input[type='checkbox'] {
    margin-right: auto;
}

.pages {
    padding: 10px;
    background: var(--post-background);
    border-width: 1px;
    border-style: none solid solid none;
    border-color: var(--post-border);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px;
    width: fit-content;
}

.page-current {
    color: var(--user-color);
}

.pages > a {
    text-decoration: none;
}

span.quote {
  color: #789922;
}

span.quote2 {
    color: #f6750b;
}

span.heading {
    color: var(--title);
    font-size: 11pt;
    font-weight: bold;
}

span.glow {
    text-shadow:0px 0px 40px #00fe20, 0px 0px 2px #00fe20;
}

span.echo {
    background: #faf8f8;
    color: #3060a8;
    text-shadow: 0 0 5px rgba(48, 96, 168, 0.5);
}

table {
    border-collapse: collapse;
    border-style: hidden;
    background: #150402;
    border: 1px solid var(--label-border);
}

th {
    background: #481913;
    padding: 0px 12px;
}

tbody th {
    text-align: left;
}

td, th {
    border: 1px solid var(--label-border);
}

.inline-image {
    max-height: 400px;
    max-width: 600px;
}

.post-controls {
  position: relative;
}

.post-controls .popup {
  position: absolute;
  background: var(--background-bottom);
  border: 1px solid #ccc;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 29;
}

.popup ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.popup li {
  padding: 8px;
}

details > summary {
    list-style-type: '▸';
}

details[open] > summary {
    list-style-type: '▾';
}

summary::marker {
    font-size: 18px;
}

.show-image {
    display: none;
}

.image-box {
    width:fit-content;
    cursor: pointer;
}

.post-image, .post-video {
    display: none;
    max-width: 98%;
    max-height: 98vh;
    width: auto;
    height: auto;
}

.image-box input[type=checkbox]:checked + .post-thumbnail {
    display: none;
}

.image-box input[type=checkbox]:checked + .post-thumbnail + .post-image {
    display: block;
}

.post-collapse-video {
    float: left;
    display: none;
}

.image-box input[type=checkbox]:checked + .post-thumbnail + .post-collapse-video {
    display: block;
}

.image-box:has(input[type=checkbox]:checked) + .post-video {
    display: block;
}

#reply {
    display: none;
}

#reply.reply-default-position {
    top: 102px;
    right: 25px;
}

@media only screen and (min-width: 800px) {
    #reply:target, #reply.reply-focus {
        display: block;
        position: fixed;
        background: var(--post-background);
        padding: 5px;
        border-width: 1px;
        border-color: var(--post-border);
        border-style: solid;
        z-index: 2;
        touch-action: none;
    }
}

#reply-close {
    position: absolute;
    top: 7px;
    right: 7px;
}

#reply form {
    margin: 0px;
}

.post-link, .post-link:visited {
    color: #5FA4E4;
    text-decoration: none;
}

.post-link:hover {
    color: red;
    
}

.ban-message {
    display: block;
    color: red;
    font-weight: bold;
    margin-top: 15px;
}

.expired {
    text-decoration:line-through;
}

.thread-subject {
    color: var(--thread-subject);
    font-weight: bold;
}

div.body a.post-reply {
    color: var(--reply-color);
}

.navigation-links {
    margin-bottom: 10px;
    font-size: 9pt;
    display: flex;
    flex-direction: row;
    gap: 3px;
    justify-content: center;
}

.omitted {
    display: block;
    margin-top: 12px;
}

.post:target {
    background: var(--post-highlight);
}

.post.highlighted {
    background: var(--post-highlight);
}

.sage a {
    color: var(--link-color);
}

.thread-preview-desc > span {
    display: flex;
    gap: 4px;
    flex-direction: row;
}

.box {
    background: #150402;
    border: 1px solid var(--post-border);
    max-width: 700px;
    margin: 30px auto;
    padding: 10px;
}

.mod-controls {
    display: inline-flex;
    flex-direction: row;
    gap: 3px;
    width: fit-content;
}

.mod-controls a, .mod-controls .link-button {
    text-decoration: none;
}

noscript {
    display: contents;
}

.capcode, .not-approved {
    color: red;
}

.vpn {
    color: blue;
}

.tor {
    color: purple;
}

.thread-not-approved {
    color: orange;
}

.centered {
    margin: auto;
}

.multiple-files {
    max-width: min-content;
}

.multiple-files:has(input[type=checkbox]:checked) {
    max-width: fit-content;
}

.table2 {
    margin: auto;
    width: 100%;
    background: none;
    border: none;
    font-size: 10pt;
    border-collapse: separate;
    border-spacing: 2px;
}

.table2 th {
    background: #481913;
    white-space: nowrap;
}

.table2 td, .table2 th {
    padding: 4px 15px 5px 5px;
    text-align: left;
    border: none;
}

.error {
    text-align: center;
}

.news-elem {
    background: white;
    border: 1px solid var(--label-border);
    max-width: 700px;
    margin: 30px auto;

}

.news-elem-content {
    padding: 0px 10px;
    background-color: #150402;

}

.news-elem-title {
    background: var(--form-label);
    padding: 4px;
}

.news-elem-title time {
    float: right;
}

.embed-elem {
    float: left;
    margin: 10px 20px;
}

.banner {
    width: 300px;
    height: 100px;
    display: block;
    margin: 12px auto 0 auto;
}

.cc-container {
    position: relative;
}

.cc-counter {
    position: absolute;
    right: 8px;
    bottom: 5px;
    font-size: 12px;
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.cc-counter.warn {
    color: red;
    opacity: 1;
    font-weight: bold;
}

a {
    cursor: pointer;
}

.own-post {
    font-style: italic;
    font-weight: normal;
    opacity: 0.67;
}

.drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 1em;
  border: 2px dashed #BAC6D1;
  background: #2f0c08;
  cursor: pointer;
}

.drop-zone input {
  display: none;
}

.preview {
  grid-column: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  list-style: none;
  padding: 0;
  overflow-y: scroll;
  max-height: 100px;
  margin: 0;
}

.preview li {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 0;
  padding: 5px;
}

.preview img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.preview .file-ext {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: lightgray;
  font-weight: bold;
}

.preview a {
  margin-left: auto;
  margin-right: 5px;
  font-size: 25px;
  text-decoration: none;
}

.info-box {
  padding: 8px;
  border-width: 1px;
  background: var(--post-background);
  border-style: none solid solid none;
  border-color: var(--post-border);
  display: flex;
  width: fit-content;
  flex-basis: content;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.listener-status {
  align-items: baseline;
  gap: 7px;
}

.dot {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.vertical-line {
  width: 1px;
  height: 100%;
  background-color: red;
  display: none;
  position: absolute;
}

.horizontal-line {
  width: 100%;
  height: 1px;
  background-color: red;
  display: none;
  position: absolute;
}

.forum-catalog {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5em;
  justify-content: center;
}

.catalog-entry {
  display: flex;
  flex-direction: column;
  width: 140px;
  height: 180px;
  border-width: 1px;
  background: var(--post-background);
  border-style: none solid solid none;
  border-color: var(--post-border);
  overflow: auto;
  text-align: center;
  overflow-wrap: break-word;
  gap: 2px;
}

.catalog-entry .post-thumbnail {
  max-height: 100px;
  max-width: 100px;
  width: auto;
  height: auto;
}

.catalog-thread-info {
  display: flex;
  flex-direction: column;
}

.catalog-thread-info a {
  text-decoration: none;
}

.thread-form {
  margin: auto;
}

.thread-form form, .popup form {
  margin-bottom: 0;
}

@media only screen and (max-width: 800px) {
  .grid-form {
    width: 100%;
  }

  textarea {
    width: 100%;
  }
}
