/* Base */
* {
  box-sizing: border-box;
}

/* Shimmer Skeleton Loading Effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-text-sm {
  height: 12px;
  margin-bottom: 6px;
}

.skeleton-text-lg {
  height: 24px;
  margin-bottom: 10px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #1a1a1a;
}

.skeleton-row .skeleton-avatar {
  flex-shrink: 0;
}

.skeleton-row .skeleton-content {
  flex: 1;
}

.skeleton-box {
  height: 100px;
  border-radius: 8px;
  margin-bottom: 12px;
}

body {
  margin: 0;
  padding: 0;
  background-color: #101010;
  color: #ddd;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

a {
  color: #6fb3ff;
  text-decoration: none;
}

a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.wrapper {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Header */
#header {
  background: linear-gradient(135deg, #151515 0, #111 60%);
  border-bottom: 1px solid #222;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.header-logo .logo-text {
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.header-logo .logo-slogan {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.top-links {
  list-style: none;
  margin: 0 0 4px 0;
  padding: 0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.top-links li a {
  font-size: 12px;
  color: #aaa;
}

.top-links li a:hover {
  color: #fff;
}

.auth-links {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
}

.btn-small {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-primary {
  background-color: #386b8d;
  border-color: #386b8d;
  color: #fff;
}

.btn-primary:hover {
  background-color: #488db9;
  border-color: #488db9;
}

.btn-outline {
  background: transparent;
  border-color: #555;
  color: #ddd;
}

.btn-outline:hover {
  border-color: #888;
}

/* Navbar */
#navbar {
  background-color: #1a1a1a;
  border-bottom: 1px solid #222;
}

.navbar-inner {
  padding: 8px 0;
}

.nav-main {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-main li a {
  font-size: 13px;
  color: #bbb;
  padding: 4px 0;
}

.nav-main li a.active,
.nav-main li a:hover {
  color: #ffffff;
}

/* Container */
#container {
  background-color: #101010;
  padding: 15px 0 40px 0;
}

/* Card panels */
.card-panel {
  background-color: #151515;
  border-radius: 6px;
  border: 1px solid #222;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.5);
  padding: 10px 12px;
}

.card-title {
  font-size: 13px;
  margin: 0 0 6px 0;
  color: #ddd;
}

/* Top index section */
.index-top {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.welcome {
  flex: 2;
}

.welcome h1 {
  margin: 0 0 8px 0;
  font-size: 20px;
}

.welcome p {
  margin: 0 0 8px 0;
  color: #aaa;
}

.welcome-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: #c0c0c0;
}

.welcome-highlights li {
  margin-bottom: 4px;
}

.welcome-highlights i {
  color: #6fb3ff;
  margin-right: 6px;
}

.stats-box {
  flex: 1;
  font-size: 12px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.stat-label {
  color: #888;
}

.stat-value {
  color: #ddd;
  font-weight: 600;
}

.stat-footnote {
  margin-top: 6px;
  font-size: 11px;
  color: #777;
}

/* SHOUTBOX REBUILD (Isolated Design) */
.ds-shout-wrap {
  margin-bottom: 24px;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid #30363d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  color: #c9d1d9;
  text-align: left !important; /* Force global left align */
}

.ds-shout-header {
  padding: 12px 16px;
  background: rgba(22, 27, 34, 0.9);
  border-bottom: 1px solid #30363d;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ds-shout-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f0f6fc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ds-shout-title i { color: #818cf8; }

.ds-shout-meta {
  font-size: 0.75rem;
  color: #8b949e;
}

.ds-shout-body {
  height: 320px; /* Reduced vertical footprint */
  overflow-y: auto;
  padding: 10px;
  background: #0d1117;
  display: flex;
  flex-direction: column;
  gap: 8px; /* tighter spacing */
  scroll-behavior: smooth;
}

.ds-shout-body::-webkit-scrollbar { width: 5px; }
.ds-shout-body::-webkit-scrollbar-thumb { background: #30363d; border-radius: 10px; }

.ds-shout-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.ds-shout-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ds-shout-item.mention {
  background: rgba(79, 70, 229, 0.1);
  box-shadow: inset 4px 0 0 #6366f1;
}

.ds-shout-avatar {
  width: 30px; /* smaller avatar */
  height: 30px;
  border-radius: 6px;
  background: #21262d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #8b949e;
  border: 1px solid #30363d;
  flex-shrink: 0;
  overflow: hidden;
}

.ds-shout-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ds-shout-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ds-line-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ds-shout-user {
  font-weight: 700;
  font-size: 0.82rem; /* slightly smaller */
  color: #58a6ff;
}

.ds-shout-time {
  font-size: 0.68rem;
  color: #57606a;
  font-weight: 500;
}

.ds-shout-text {
  font-size: 0.8rem; /* smaller message text */
  line-height: 1.4;
  color: #c9d1d9;
  word-break: break-word;
}

.ds-shout-form-wrap {
  padding: 12px;
  background: #161b22;
  border-top: 1px solid #30363d;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ds-shout-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.ds-toolbar-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ds-emote-btn {
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
  user-select: none;
}

.ds-emote-btn:hover {
  transform: scale(1.3);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}

.ds-color-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ds-color-btn:hover {
  transform: scale(1.4);
  box-shadow: 0 0 10px currentColor;
}

.ds-shout-form {
  display: flex;
  gap: 10px;
}

.ds-shout-input {
  flex: 1;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px 14px;
  color: #f0f6fc;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ds-shout-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ds-shout-footer {
  padding: 8px 16px;
  background: #0d1117;
  border-top: 1px solid #21262d;
  font-size: 0.7rem;
  color: #8b949e;
}

/* CONTEXT MENU */
.ds-context-menu {
  position: fixed;
  z-index: 10000;
  background: #161b22;
  border: 1px solid #444c56;
  border-radius: 8px;
  padding: 6px 0;
  min-width: 170px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  animation: dsFadeIn 0.1s ease-out;
}

@keyframes dsFadeIn { from { opacity:0; transform:scale(0.98); } to { opacity:1; transform:scale(1); } }

.ds-context-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #c9d1d9;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ds-context-item:hover { background: #30363d; color: #f0f6fc; }
.ds-context-item.delete:hover { color: #f85149; background: rgba(248, 81, 73, 0.1); }

/* Category / forum – NEW FLEX LAYOUT */
.category {
  margin-bottom: 22px;
}

.cat-header {
  background-color: #181818;
  border: 1px solid #222;
  padding: 6px 10px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-link {
  font-size: 11px;
  color: #888;
}

.cat-link:hover {
  color: #fff;
}

.card-table {
  padding: 0;
}

/* container */
.forums-wrap {
  max-width: 1120px;
  margin: 0 auto 18px;
}

/* header row */
.forum-header-row {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3c9;
  background: linear-gradient(to right, #171a22, #111319);
  border-bottom: 1px solid #222;
}

.fh-col {
  padding-right: 8px;
}

.fh-main {
  flex: 1 1 auto;
}

.fh-stats {
  flex: 0 0 80px;
  text-align: center;
}

.fh-last {
  flex: 0 0 210px;
  text-align: left;
}

/* data rows */
.forum-row-flex {
  display: flex;
  align-items: stretch;
  padding: 10px 10px;
  background: #05070c;
  border-bottom: 1px solid #191919;
}

.forum-row-flex.alt {
  background: #070a10;
}

.forum-row-flex:hover {
  background-color: #161616;
}

/* cells */
.forum-cell {
  display: flex;
  align-items: center;
}

.forum-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.forum-main-text {
  display: flex;
  flex-direction: column;
}

.forum-stats {
  flex: 0 0 80px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.forum-last {
  flex: 0 0 210px;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

/* forum visual bits */
.forum-icon {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(135deg, #386b8d, #264a63);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.forum-title a {
  font-size: 14px;
  font-weight: 700;
  color: #e0e0e0;
}

.forum-desc {
  font-size: 12px;
  color: #999;
  margin-top: 3px;
}

.stats-count {
  font-size: 14px;
  color: #e0e0e0;
}

.stats-desc {
  font-size: 11px;
  color: #888;
}

.last-title a {
  color: #c8e0ff;
}

.last-meta {
  color: #888;
  margin-top: 3px;
  font-size: 11px;
}

/* thread-table columns */
.thread-table .col-icon {
  width: 40px;
  text-align: center;
}

.thread-table .col-thread-main {
  width: auto;
}

/* Premium User Pill & Logout Button */
.ds-nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ds-nav-user:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.ds-nav-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ds-nav-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  transform: translateY(-1px);
}

/* keep your existing text layout but allow for avatar on left */
.shout-user.rank-member {
  margin-right: 4px;
}

.user-avatar-header {
  width: 28px;        /* keep width */
  height: 10px;       /* make shorter vertically */
  min-width: 28px;
  min-height: 20px;
  border-radius: 3px;
  object-fit: cover;
  display: block;
}

.thread-table .col-stats {
  width: 80px;          /* compact like old layout */
  text-align: center;
  white-space: nowrap;
}

/* accounts thread table header – full-width bar */
.thread-table thead tr {
  background-color: #1b1b1b;   /* same as your th background */
}

.thread-table thead th {
  background-color: transparent;  /* let the <tr> color show */
}

.thread-meta {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.thread-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 6px;
  background-color: #223646;
  color: #9fd0ff;
}

/* Thread controls */
.thread-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.thread-controls-left,
.thread-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 12px;
  color: #aaa;
}

.control-select {
  background-color: #141414;
  color: #ddd;
  border-radius: 3px;
  border: 1px solid #333;
  padding: 4px 8px;
  font-size: 12px;
}

.control-select:focus {
  outline: none;
  border-color: #386b8d;
}

/* Optional: keep as hooks but don't affect color *

/* Bottom links/footer */
.index-bottom {
  margin-top: 25px;
  font-size: 12px;
  color: #888;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.index-links a {
  color: #888;
}

.index-links a:hover {
  color: #fff;
}

/* Login page */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #1f1f1f 0, #101010 60%);
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background-color: #151515;
  border: 1px solid #222;
  border-radius: 6px;
  color: #ddd;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.65);
}

.login-card .card-body {
  padding: 22px;
}

.login-logo {
  text-align: center;
  margin-bottom: 10px;
}

.login-logo .logo-text {
  font-size: 20px;
  font-weight: 700;
  display: block;
}

.login-logo .logo-slogan {
  font-size: 11px;
  color: #888;
}

.login-card h3 {
  margin-top: 5px;
  margin-bottom: 15px;
  text-align: center;
}

.form-label {
  font-size: 12px;
  color: #aaa;
  display: block;
  margin-top: 8px;
  margin-bottom: 3px;
}

.form-control {
  width: 100%;
  padding: 7px 9px;
  border-radius: 3px;
  border: 1px solid #333;
  background-color: #101010;
  color: #ddd;
  font-size: 13px;
}

.form-control:focus {
  border-color: #386b8d;
  outline: none;
}

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.small-link {
  font-size: 12px;
}

.login-card .btn-primary {
  width: 100%;
  margin-top: 4px;
}

.login-footer {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: #aaa;
}

.login-back {
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
}

/* Card helper */
.card {
  border-radius: 6px;
}
.card-body {
  padding: 15px;
}

/* Responsive */
@media (max-width: 800px) {
  .index-top {
    flex-direction: column;
  }

  /* flex forums: stack on mobile */
  .forum-header-row {
    display: none;
  }

  .forum-row-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .forum-main,
  .forum-stats,
  .forum-last {
    flex: 1 1 auto;
    width: 100%;
    margin-bottom: 6px;
  }

  .forum-stats,
  .forum-last {
    align-items: flex-start;
    text-align: left;
  }
}

/* SITE STATISTICS DASHBOARD */
.stats-dashboard {
  background: radial-gradient(circle at center, #161b22 0, #0d1117 100%);
  border: 1px solid #30363d;
  padding: 24px !important;
  margin-top: 25px;
  margin-bottom: 25px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  transition: transform 0.2s, background 0.2s;
}

.stat-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.stat-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  border: 1px solid #3730a3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #818cf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-top: 2px;
}

.newest-member-item .stat-icon {
  background: linear-gradient(135deg, #064e3b, #062016);
  border-color: #059669;
  color: #34d399;
}

.newest-member-item .stat-value {
  color: #34d399;
  font-size: 1.1rem;
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 400px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ANIMATIONS */
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.thread-anim {
  animation: fadeInSlide 0.4s ease forwards;
  opacity: 0;
}

