/* forums/assets/forum.css */
.forum-wrap{ max-width: 90%; margin: 0 auto; }

.banner{ width:100%; display:block; border-radius:10px; margin: 14px auto 16px; box-shadow:0 6px 14px rgba(0,0,0,0.5); }

.forum-card{
  background: rgba(30, 30, 30, 0.9);
  border: 1px solid rgba(255, 140, 0, 0.5);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 8px rgba(255, 140, 0, 0.25);
  margin: 16px 0;
}

.forum-row{ display:flex; gap:12px; align-items:center; justify-content:space-between; flex-wrap:wrap; }

.forum-btn{
  background: rgba(255, 140, 0, 0.9);
  border: none;
  padding: 10px 14px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  text-decoration:none;
  display:inline-block;
}
.forum-btn:hover{ background: rgba(255, 100, 0, 0.9); }

.forum-input, .forum-select, .forum-textarea{
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,10,10,0.6);
  color: #e0e0e0;
  box-sizing:border-box;
}

.forum-textarea{ min-height: 220px; }

.post{ border-top: 1px solid rgba(255,255,255,0.15); padding-top: 14px; margin-top: 14px; }

.post-meta{
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  font-size: 0.9em; color:#bdbdbd;
}

.post a.permalink{ color:#ff8c00; text-decoration:none; }
.post a.permalink:hover{ text-decoration:underline; }

code{ color:#ffb74d; }

.editor-toolbar{
  display:flex; flex-wrap:wrap; gap:6px;
  padding: 10px; border-radius:10px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,140,0,0.35);
  margin-bottom: 10px;
}
.editor-toolbar button{
  background: rgba(50,50,50,0.9);
  color:#e0e0e0;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 8px 10px;
  cursor:pointer;
}
.editor-toolbar button:hover{ background: rgba(255,140,0,0.85); color:#fff; }

.notice{
  color:#bdbdbd;
  font-size:0.95em;
}

/* Threads list (category cards on index) */
/* Keeps each category to ~5 visible items, with a nice scroll for more */
.thread-list{
  max-height: 22rem; /* tuned to roughly 5 items */
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: auto; /* allow scroll to propagate to page when reaching ends */
}

.thread-list-ul{ list-style:none; padding:0; margin:10px 0 0; }

.thread-list-item{
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.thread-link{
  color:#e0e0e0;
  text-decoration:none;
  font-weight:bold;
}
.thread-link:hover{ text-decoration: underline; }

.thread-meta{
  color:#bdbdbd;
  font-size:0.9em;
  margin-top: 2px;
}

/* Subtle scrollbar styling */
.thread-list::-webkit-scrollbar{ width: 10px; }
.thread-list::-webkit-scrollbar-track{ background: rgba(255,255,255,0.06); border-radius: 999px; }
.thread-list::-webkit-scrollbar-thumb{ background: rgba(255,140,0,0.35); border-radius: 999px; }
.thread-list::-webkit-scrollbar-thumb:hover{ background: rgba(255,140,0,0.55); }

/* News list scrolling + pagination */
.news-list{
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 6px;
}

.news-pagination{
  display:flex;
  gap:8px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  margin: 14px 0 24px;
}

.page-pill{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(50,50,50,0.9);
  border: 1px solid rgba(255,255,255,0.15);
  color:#e0e0e0;
  text-decoration:none;
  font-weight:bold;
}
.page-pill:hover{ background: rgba(255,140,0,0.85); color:#fff; }
.page-pill.active{
  background: rgba(255,140,0,0.95);
  color:#fff;
  border-color: rgba(255,140,0,0.6);
}

.readmore-btn{
  display:inline-block;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255,140,0,0.9);
  color:#fff;
  text-decoration:none;
  font-weight:bold;
}
.readmore-btn:hover{ background: rgba(255,100,0,0.9); }

/* --- Global search (threads + posts) --- */
.forum-wrap .forum-searchbar{
  position: relative !important;
  margin: 12px auto 18px !important;
  max-width: 820px;
  padding: 0 10px;
  box-sizing: border-box;
}

.forum-wrap .forum-searchbar input{
  width: 100%;
  border-radius: 999px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: #e0e0e0;
}

.forum-wrap .forum-search-results{
  position: absolute;
  top: calc(100% + 8px);
  left: 10px;
  right: 10px;
  z-index: 999;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.92);
  border: 1px solid rgba(255,140,0,0.45);
  box-shadow: 0 10px 22px rgba(0,0,0,0.55);
  display: none;
}

.forum-wrap .forum-search-results.open{ display:block; }

.fs-empty{
  padding: 12px 14px;
  color: #bdbdbd;
}

.fs-item{
  display:block;
  padding: 12px 14px;
  text-decoration:none;
  color:#e0e0e0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.fs-item:first-child{ border-top: none; }
.fs-item:hover, .fs-item.active{
  background: rgba(255,140,0,0.18);
}

.fs-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.fs-title{
  font-weight:bold;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fs-tag{
  flex: 0 0 auto;
  font-size: 0.82em;
  color:#ffb74d;
  background: rgba(255,140,0,0.16);
  border: 1px solid rgba(255,140,0,0.25);
  padding: 2px 8px;
  border-radius: 999px;
}

.fs-snippet{
  margin-top: 6px;
  font-size: 0.92em;
  color:#bdbdbd;
  line-height: 1.25em;
  max-height: 2.5em;
  overflow:hidden;
}

@media (max-width: 720px){
  .forum-wrap{ max-width: 96%; }
  .thread-list{ max-height: 18rem; }
  .fs-title{ max-width: 70%; }
}


/* Visibility fixes */
.forum-wrap{
  color: #e6e6e6;
}

.forum-card{
  color: #e6e6e6;
  background: rgba(24, 24, 24, 0.94);
}

.forum-card,
.forum-card p,
.forum-card div,
.forum-card li,
.forum-card span,
.forum-card label,
.forum-card strong,
.forum-card em{
  color: inherit;
}

.forum-card h1,
.forum-card h2,
.forum-card h3,
.forum-card h4{
  color: #f1f1f1;
}

.forum-card a{
  color: #ffd08a;
}

.forum-card a.thread-link,
.forum-card a.readmore-btn,
.forum-card a.forum-btn,
.forum-card a.page-pill,
.forum-card h3 a,
.forum-card .permalink{
  color: inherit;
}

.notice,
.thread-meta,
.post-meta,
.fs-empty,
.fs-snippet{
  color: #d0d0d0;
}

.forum-wrap .forum-searchbar input{
  background: rgba(20,20,20,0.72);
  color: #f0f0f0;
  border-color: rgba(255,255,255,0.24);
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}

.forum-wrap .forum-searchbar input::placeholder{
  color: rgba(255,255,255,0.72);
}

.forum-wrap .forum-searchbar input::-webkit-input-placeholder{
  color: rgba(255,255,255,0.72);
}

.forum-wrap .forum-searchbar input::-moz-placeholder{
  color: rgba(255,255,255,0.72);
  opacity: 1;
}

.forum-wrap .forum-searchbar input:-ms-input-placeholder{
  color: rgba(255,255,255,0.72);
}

.forum-wrap .forum-searchbar input:focus{
  outline: none;
  border-color: rgba(255,140,0,0.65);
  background: rgba(24,24,24,0.84);
}


/* Uploaded/forum images: each image is its own centered row, so multi-image uploads form a clean vertical stack. */
.forum-image-stack-item{
  display:block;
  text-align:center;
  margin:14px auto;
  clear:both;
}
.forum-image-stack-item a{
  display:inline-block;
  max-width:100%;
}
.forum-image-stack-item img{
  display:block;
  max-width:min(900px, 92%);
  max-height:720px;
  width:auto;
  height:auto;
  margin:0 auto;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,0.45);
}
@media (max-width:700px){
  .forum-image-stack-item img{
    max-width:100%;
    max-height:none;
  }
}

/* Discord News Feed */
.dnews-top-card code{
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 2px 6px;
  border-radius: 6px;
  color: #ffd08a;
}
.dnews-status-line{
  margin-top: 12px;
  color: #d0d0d0;
  font-size: 0.92em;
}
.dnews-loader{
  display:flex;
  align-items:center;
  gap:16px;
}
.dnews-spinner{
  width:34px;
  height:34px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,0.16);
  border-top-color: rgba(255,140,0,0.95);
  animation:dnews-spin 0.8s linear infinite;
  flex:0 0 auto;
}
@keyframes dnews-spin{to{transform:rotate(360deg)}}
.dnews-loader-title{font-weight:800;color:#f1f1f1;}
.dnews-loader-sub{margin-top:4px;color:#d0d0d0;font-size:0.94em;}
.dnews-error{
  border-color: rgba(255,90,90,0.45);
  background: rgba(70,20,20,0.55);
  color:#f0d0d0;
}
.dnews-list{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.dnews-card{
  background: rgba(24,24,24,0.94);
  border: 1px solid rgba(255,140,0,0.22);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  color:#e6e6e6;
}
.dnews-card-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.dnews-avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  flex:0 0 auto;
  background:#222;
}
.dnews-meta{min-width:0;flex:1 1 auto;}
.dnews-author{font-weight:800;color:#f5f5f5;line-height:1.15;}
.dnews-date{font-size:0.88em;color:#cfcfcf;margin-top:3px;}
.dnews-edited,.dnews-pinned{
  display:inline-block;
  margin-left:6px;
  font-size:0.92em;
  opacity:0.85;
}
.dnews-pinned{
  color:#ffd08a;
}
.dnews-open{
  flex:0 0 auto;
  text-decoration:none;
  color:#ffd08a;
  font-size:0.9em;
  border:1px solid rgba(255,140,0,0.30);
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,140,0,0.09);
}
.dnews-content{
  color:#eeeeee;
  line-height:1.58;
  overflow-wrap:anywhere;
}
.dnews-content a,
.dnews-embed a{
  color:#ffd08a;
}
.dnews-heading{
  margin: 10px 0 6px;
  color:#f5f5f5;
  line-height:1.25;
}
.dnews-mention{
  display:inline-block;
  padding:1px 6px;
  border-radius:6px;
  background:rgba(88,101,242,0.20);
  color:#cfd4ff;
  font-weight:700;
}
.dnews-emoji{
  width:1.35em;
  height:1.35em;
  object-fit:contain;
  vertical-align:-0.25em;
}
.dnews-time-inline{
  color:#d8d8d8;
  background:rgba(255,255,255,0.08);
  border-radius:4px;
  padding:1px 4px;
}
.dnews-inline-code{
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius:5px;
  padding:1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color:#f0f0f0;
}
.dnews-codeblock{
  margin:12px 0;
  border:1px solid rgba(255,255,255,0.13);
  border-radius:10px;
  background:rgba(0,0,0,0.42);
  overflow:hidden;
}
.dnews-code-lang{
  padding:6px 10px;
  font-size:0.82em;
  color:#ffd08a;
  background:rgba(255,255,255,0.06);
  border-bottom:1px solid rgba(255,255,255,0.1);
}
.dnews-codeblock pre{
  margin:0;
  padding:12px;
  overflow:auto;
  white-space:pre-wrap;
}
.dnews-codeblock code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color:#f0f0f0;
}
.dnews-spoiler{
  background:#111;
  color:transparent;
  border-radius:4px;
  padding:0 4px;
  cursor:pointer;
}
.dnews-spoiler:hover,
.dnews-spoiler:focus{
  color:#f0f0f0;
}
.dnews-quote{
  margin:8px 0;
  padding:8px 12px;
  border-left:4px solid rgba(255,140,0,0.55);
  background:rgba(255,255,255,0.06);
  border-radius:0 8px 8px 0;
  color:#e6e6e6;
}
.dnews-attachments{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:12px;
  margin-top:14px;
}
.dnews-image-link{
  display:block;
  border-radius:12px;
  overflow:hidden;
  background:rgba(0,0,0,0.35);
  border:1px solid rgba(255,255,255,0.10);
}
.dnews-image-link img{
  display:block;
  width:100%;
  max-height:720px;
  object-fit:contain;
  background:#080808;
}
.dnews-video{
  display:block;
  width:100%;
  max-height:720px;
  border-radius:12px;
  background:#000;
}
.dnews-file{
  display:block;
  padding:12px;
  border-radius:10px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  color:#ffd08a;
  text-decoration:none;
}
.dnews-embeds{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.dnews-embed{
  border-left:4px solid rgba(255,140,0,0.7);
  background:rgba(0,0,0,0.28);
  border-radius:10px;
  padding:12px;
  overflow:hidden;
}
.dnews-embed-provider{
  color:#cfcfcf;
  font-size:0.86em;
  margin-bottom:6px;
}
.dnews-embed-title{
  display:block;
  font-weight:800;
  color:#ffd08a;
  text-decoration:none;
  margin-bottom:6px;
}
.dnews-embed-desc{
  color:#e6e6e6;
  line-height:1.45;
}
.dnews-embed-field{
  margin-top:8px;
  color:#e6e6e6;
}
.dnews-embed-image,
.dnews-embed-thumb{
  display:block;
  max-width:100%;
  max-height:600px;
  object-fit:contain;
  border-radius:10px;
  margin-top:10px;
  background:#080808;
}
.dnews-embed-thumb{max-width:260px;}
.dnews-reactions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.dnews-reaction{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.10);
  padding:4px 8px;
  color:#f0f0f0;
  font-size:0.92em;
}
.dnews-reaction img{
  width:18px;
  height:18px;
  object-fit:contain;
}
.dnews-pagination{
  margin-top:18px;
}
.dnews-page-gap{
  display:inline-block;
  padding:8px 4px;
  color:#d0d0d0;
}
@media (max-width:700px){
  .dnews-card-head{align-items:flex-start;}
  .dnews-open{font-size:0.82em;padding:5px 8px;}
  .dnews-attachments{grid-template-columns:1fr;}
  .dnews-card{padding:13px;}
}
