:root{
    --page-bg: #121212;
    --panel: #232323;
    --panel-2: #313131;
    --row-bg: #212121;
    --row-divider: #191919;
    --border: #121212;
    --text: #b4b4b4;
    --text-bright: #e4e4e4;
    --text-dim: #8e8e8e;
    --text-dim2: #757575;
    --link: #5590c2;
    --link-bright: #74acd8;
    --olive-green: #9ec01f;
    --underline-green: #869a2c;
    --chat-name: #35bb35;
    --premium-red: #cc3232;
    --radius: 5px;
    --heading-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  }
  *{ box-sizing: border-box; }
  html,body{ height:100%; }
  body{
    margin:0;
    background: var(--page-bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  .heading-font{ font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
  .rainbow-bar{
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg,
      #293c55 0.0%,
      #2d3a56 2.9%,
      #31395a 5.7%,
      #35375b 8.6%,
      #3a365e 11.4%,
      #3d3360 14.3%,
      #433161 17.1%,
      #473063 20.0%,
      #4c2e68 22.8%,
      #502d69 25.7%,
      #542c6b 28.6%,
      #5a2a6e 31.4%,
      #5d286f 34.3%,
      #612671 37.1%,
      #662472 40.0%,
      #6a2375 42.8%,
      #6e2178 45.7%,
      #74207a 48.5%,
      #752078 51.4%,
      #732472 54.2%,
      #71286a 57.1%,
      #6f2c65 60.0%,
      #6d2e5e 62.8%,
      #6b3256 65.7%,
      #68354f 68.5%,
      #683a49 71.4%,
      #653d42 74.2%,
      #63403b 77.1%,
      #614535 79.9%,
      #60482f 82.8%,
      #5c4b27 85.7%,
      #5b4f21 88.5%,
      #59531a 91.4%,
      #575713 94.2%,
      #565a0c 97.1%,
      #535e05 99.9%);
  }
  .top-bar-extra{
    height: 2px;
    width: 100%;
    background: #000000;
  }
  .wrap{
    max-width: 1060px;
    margin: 0 auto;
    padding: 20px 6px 40px;
  }

  /* ---------- Header ---------- */
  .header{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 10px 14px;
    position: relative;
    overflow: hidden;
  }
  .header::before{
    content:"";
    position:absolute;
    top:0; left:0; right:0;
    height:3px;
    background: #3a3a3a;
    pointer-events:none;
  }
  .logo{
    font-family: var(--heading-font);
    font-size: 19px;
    font-weight: normal;
    letter-spacing: 0.2px;
  }
  .logo .g1{ color: var(--text-bright); }
  .logo .g2{ color: var(--olive-green); }

  .navbar{
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-top: none;
    padding: 7px 14px;
    display:flex;
    align-items:center;
    gap: 18px;
    font-size: 11px;
    color: #a9a9a9;
    position: relative;
    z-index: 100;
  }
  .navbar a{ color:#a9a9a9; text-decoration:none; }
  .navbar a:hover{ text-decoration:underline; color:#c8c8c8; }
  .navbar .premium{ color: var(--premium-red); font-weight:bold; }
  .navbar .icon{ opacity:.8; width:14px; display:inline-flex; align-items:center; justify-content:center; }
  .navbar .icon svg{ width:13px; height:13px; fill:#a9a9a9; }

  .subbar{
    background: var(--panel);
    border: 1px solid var(--border);
    border-top:none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 8px 14px 10px;
    display:flex;
    justify-content: space-between;
    align-items:flex-start;
    font-size: 11px;
  }
  .subbar .left{ color: var(--text-dim); }
  .subbar .left .status-icons{ display:inline-flex; gap:5px; vertical-align:middle; margin-left:4px; }
  .subbar .left .status-icons svg{ width:12px; height:12px; vertical-align:middle; }
  .subbar .left b{ color: var(--text-bright); }
  .subbar .left a{ color: var(--link-bright); text-decoration:none; }
  .subbar .left a:hover{ text-decoration:underline; }
  .subbar .left .dotline{ color:#5a5a5a; margin: 0 5px; }
  .subbar .right{ text-align:right; color:#8a8a8a; white-space:nowrap; }
  .subbar .right a{ color: var(--link-bright); text-decoration:none; }
  .subbar .right a:hover{ text-decoration:underline; }

  /* ---------- Chat box ---------- */
  .chatbox{
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .chat-title{
    background: var(--panel-2);
    color: #cfcfcf;
    font-family: var(--heading-font);
    font-weight: normal;
    padding: 6px 10px;
    display:flex;
    justify-content: space-between;
    align-items:center;
  }
  .chat-title .icons{ display:flex; gap:10px; opacity:.8; }
  .chat-title .icons svg{ width:12px; height:12px; fill:#9a9a9a; }
  .chat-log{
    background: #232321;
    height: 118px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 10px;
    font-size: 10.5px;
  }
  .chat-log .line{ white-space:normal; word-break:break-word; padding: 1.5px 0; }
  .chat-log .ts{ color: var(--text-dim2); margin-right:6px; }
  .chat-log .name{ color: var(--chat-name); font-weight:bold; }
  .chat-log .msg{ color: var(--text); font-weight:bold; margin-left:3px; }
  .chat-input-row{
    background:#1b1b1b;
    border-top: 1px solid #111111;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0;
    margin: 0;
    display:flex;
    align-items:stretch;
    overflow:hidden;
  }
  .chat-input-row .em{ font-size:14px; }
  .chat-input{
    flex:1;
    min-width:0;
    height:32px;
    margin:0;
    background:#1b1b1b;
    border:none;
    outline:none;
    box-shadow:none;
    -webkit-appearance:none;
    appearance:none;
    border-radius:0;
    color: var(--text-bright);
    font-family: inherit;
    font-size:11px;
    padding:0 10px;
  }
  .chat-input::placeholder{ color:#6a6a6a; }
  .chat-input:focus{ background:#212121; }
  .chat-send-btn{
    flex-shrink:0;
    width:0;
    min-width:0;
    height:32px;
    margin:0;
    background:#242424;
    border:none;
    border-left: 1px solid #111111;
    border-radius:0;
    color: var(--link-bright);
    font-family: inherit;
    font-size:11px;
    padding:0;
    cursor:pointer;
    overflow:hidden;
    opacity:0;
    white-space:nowrap;
    transition: width .12s ease, opacity .12s ease, padding .12s ease;
  }
  .chat-send-btn.is-visible{
    width:56px;
    opacity:1;
    padding:0 14px;
  }
  .chat-send-btn:hover{ background:#2c2c2c; color:var(--text-bright); }

  /* ---------- Forum sections ---------- */
  .forum-section{
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .section-title{
    background: var(--panel-2);
    color: #b7c4cf;
    font-family: var(--heading-font);
    font-weight: normal;
    padding: 6px 10px 4px;
    display:flex;
    align-items:center;
    gap:6px;
  }
  .section-title .caret{ color:#7f96a3; font-size:11px; }

  .col-headers{
    background: var(--panel-2);
    color: #8f8f8f;
    font-size: 10px;
    display:flex;
    padding: 3px 10px 6px;
    border-bottom: 2px solid var(--underline-green);
  }
  .col-headers .forum-col{ flex:1; }
  .col-headers .last-col{ width: 240px; }

  .forum-row{
    display:flex;
    align-items:center;
    padding: 7px 10px;
    background: var(--row-bg);
    border-top: 1px solid var(--row-divider);
  }
  .forum-row:first-child{ border-top:none; }

  .row-icon{
    width: 22px;
    flex-shrink:0;
    display:flex;
    align-items:center;
  }
  .row-icon .sq{
    width:9px; height:9px;
    border-radius: 2px;
    background:#4d7ea8;
  }
  .row-icon .sq.empty{
    border-radius: 2px;
    background:#4a4a4a;
  }

  .forum-col{ flex:1; min-width:0; }
  .forum-col .fname{ color:#e2e2e2; font-family:var(--heading-font); font-weight:normal; font-size:11.5px; }
  .forum-col .fname .newtag{ color:#9a9a9a; font-weight:normal; font-size:10.5px; }
  .forum-col .fdesc{ color:#787878; font-size:10px; margin-top:2px; }

  .last-col{
    width: 240px;
    flex-shrink:0;
    font-size:10px;
    color:#a6a6a6;
    line-height:1.5;
  }
  .last-col a{ color: var(--link); text-decoration:none; }
  .last-col a:hover{ text-decoration:underline; color:var(--link-bright); }
  .last-col .lp-time{ color:#c2c2c2; font-weight:bold; }
  .last-col .lp-by{ color:#8a8a8a; }
  .last-col .none{ color:#777; }

  /* ---------- Footer ---------- */
  .online-box{
    margin-top:10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-2);
    padding: 8px 12px;
    font-size:10.5px;
  }
  .online-box .count{ color:#c8c8c8; }
  .online-box .count b{ color:#fff; }
  .online-box .names a{ text-decoration:none; }
  .online-box .staff{ color:#ab1f1f; }
  .online-box .staff:hover{ text-decoration:underline; }
  .online-box .member{ color: var(--link-bright); }
  .online-box .member:hover{ text-decoration:underline; }

  .site-footer{
    margin-top:10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 10px 12px;
    font-size:10.5px;
    color:#787878;
  }
  .site-footer a{ color: var(--link-bright); text-decoration:none; }
  .site-footer a:hover{ text-decoration:underline; }

  /* ---------- Navigation / interactive ---------- */
  .navbar a[data-nav]{ cursor:pointer; }
  .logo{ cursor:pointer; }
  .section-title{ cursor:pointer; user-select:none; }
  .section-title .caret{ display:inline-block; transition:transform .15s ease; }
  .forum-section.collapsed .section-title .caret{ transform:rotate(-90deg); }
  .forum-section.collapsed .col-headers,
  .forum-section.collapsed .forum-row{ display:none; }

  .forum-row{ cursor:pointer; transition:background-color .1s ease; }
  .forum-row:hover{ background:#262626; }
  .forum-row .fname{ cursor:pointer; }
  .forum-row .fname:hover{ text-decoration:underline; }
  .last-col a{ cursor:pointer; }

  /* ---------- Breadcrumb ---------- */
  .breadcrumb{
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 7px 14px;
    font-size:10.5px;
    color:#8a8a8a;
    margin-top:6px;
  }
  .breadcrumb a{ color: var(--link-bright); text-decoration:none; cursor:pointer; }
  .breadcrumb a:hover{ text-decoration:underline; }
  .breadcrumb .sep{ color:#555; margin:0 5px; }

  /* ---------- Thread list ---------- */
  .thread-row{
    display:flex;
    align-items:center;
    padding: 8px 10px;
    background: var(--row-bg);
    border-top: 1px solid var(--row-divider);
    cursor:pointer;
    transition:background-color .1s ease;
  }
  .thread-row:first-child{ border-top:none; }
  .thread-row:hover{ background:#262626; }
  .thread-col{ flex:1; min-width:0; }
  .thread-col .tname{ color:#e2e2e2; font-family:var(--heading-font); font-weight:normal; font-size:11.5px; }
  .thread-col .tname:hover{ text-decoration:underline; }
  .thread-col .tmeta{ color:#787878; font-size:10px; margin-top:2px; }
  .thread-stats{
    width: 90px;
    flex-shrink:0;
    text-align:center;
    font-size:10px;
    color:#9a9a9a;
  }
  .thread-stats b{ display:block; color:#d0d0d0; font-size:11px; }
  .empty-state{
    background: var(--row-bg);
    padding: 26px 14px;
    text-align:center;
    color:#787878;
    font-size:11px;
  }

  /* ---------- Thread / post view ---------- */
  .thread-title-bar{
    background: var(--panel-2);
    color: #e2e2e2;
    font-family:var(--heading-font);
    font-weight:normal;
    font-size:13px;
    padding: 9px 12px;
  }
  .post-card{
    display:flex;
    gap:12px;
    background: var(--row-bg);
    border-top: 1px solid var(--row-divider);
    padding: 12px;
  }
  .post-card:first-child{ border-top:none; }
  .post-avatar{
    width:44px; height:44px;
    flex-shrink:0;
    border-radius:4px;
    background: linear-gradient(135deg,#3a3a3a,#242424);
    display:flex; align-items:center; justify-content:center;
    font-family:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-weight:700;
    font-size:15px;
    color:#7f96a3;
  }
  .post-body{ flex:1; min-width:0; }
  .post-meta{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    margin-bottom:5px;
  }
  .post-author{ color:#e2e2e2; font-weight:normal; font-family:var(--heading-font); font-size:11.5px; }
  .post-date{ color:#787878; font-size:10px; }
  .post-content{ color:#b4b4b4; font-size:11px; line-height:1.6; }
  .post-content p{ margin: 0 0 8px; }
  .post-content p:last-child{ margin-bottom:0; }
  .back-link{
    display:inline-block;
    margin-top:10px;
    color: var(--link-bright);
    text-decoration:none;
    font-size:10.5px;
    cursor:pointer;
  }
  .back-link:hover{ text-decoration:underline; }

  /* ---------- Buttons ---------- */
  .btn-small{
    background: #3d3d3d;
    border: 1px solid #4a4a4a;
    color: #dcdcdc;
    font-size: 10.5px;
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
  }
  .btn-small:hover{ background:#484848; }
  .btn-primary{
    background: #3f7ab5;
    border: 1px solid #4d8ac7;
    color: #fff;
    font-size: 11px;
    padding: 8px 14px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
  }
  .btn-primary:hover{ background:#4787c4; }

  /* ---------- Modal ---------- */
  .modal-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index: 1000;
  }
  .modal-card{
    background: var(--panel);
    border: 1px solid #3a3a3a;
    border-radius: var(--radius);
    width: 320px;
    max-width: 90vw;
    padding: 16px;
  }
  .modal-tabs{
    display:flex;
    align-items:center;
    gap: 4px;
    border-bottom: 2px solid var(--underline-green);
    padding-bottom: 8px;
    margin-bottom: 12px;
  }
  .modal-tab{
    background:none;
    border:none;
    color:#8a8a8a;
    font-size: 12px;
    padding: 4px 8px;
    cursor:pointer;
    font-family: inherit;
  }
  .modal-tab.active{ color:#e2e2e2; font-weight:bold; }
  .modal-close{
    margin-left:auto;
    color:#8a8a8a;
    cursor:pointer;
    font-size:16px;
    line-height:1;
    padding: 0 4px;
  }
  .modal-close:hover{ color:#e2e2e2; }
  .modal-error{
    background:#472525;
    border:1px solid #7a3535;
    color:#e2a3a3;
    font-size:10.5px;
    padding:7px 9px;
    margin-bottom:10px;
  }
  .modal-form{ display:flex; flex-direction:column; gap:3px; }
  .modal-form label{ font-size:10px; color:#9a9a9a; margin-top:6px; }
  .modal-form input, .modal-form textarea{
    background:#1a1a1a;
    border:1px solid #3a3a3a;
    color:#e2e2e2;
    font-size:11px;
    padding:7px 8px;
    font-family: inherit;
    resize: vertical;
  }
  .modal-form input:focus, .modal-form textarea:focus{ outline:none; border-color:#4d8ac7; }
  .modal-note{ font-size:9.5px; color:#666; margin-top:12px; line-height:1.4; }

  /* ---------- Reply box ---------- */
  .reply-box{
    border-top: 1px solid var(--row-divider);
    padding: 12px;
    background: var(--row-bg);
  }
  .reply-box textarea{
    width:100%;
    background:#1a1a1a;
    border:1px solid #3a3a3a;
    color:#e2e2e2;
    font-size:11px;
    padding:8px;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
  }
  .reply-box textarea:focus{ outline:none; border-color:#4d8ac7; }
  .reply-login-prompt{
    text-align:center;
    color:#8a8a8a;
    font-size:11px;
    padding: 6px 0;
  }
  .reply-login-prompt a{ color:var(--link-bright); cursor:pointer; text-decoration:none; }
  .reply-login-prompt a:hover{ text-decoration:underline; }

/* ---------- Authentication pages ---------- */
.auth-panel{
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--panel);
  overflow:hidden;
}
.auth-panel .panel-title{
  background:var(--panel-2);
  color:#cfcfcf;
  font-weight:bold;
  padding:7px 10px;
  border-bottom:1px solid var(--border);
}
.auth-body{ padding:12px 20px 18px; }
.auth-fieldset{
  border:1px solid #666;
  margin:10px 0 14px;
  padding:12px 12px 10px;
}
.auth-fieldset legend{ color:#5590c2; padding:0 6px; font-size:10px; }
.auth-label{ display:block; color:#ddd; font-weight:bold; margin-bottom:3px; }
.auth-input{
  width:100%; max-width:360px; height:28px; padding:4px 7px;
  background:#171717; color:#ddd; border:1px solid #555; border-radius:2px;
  font:inherit;
}
.auth-input:focus{ outline:1px solid #5590c2; border-color:#5590c2; }
.auth-actions{ margin-top:8px; }
.auth-button{
  background:#252525; color:#ddd; border:1px solid #555; border-radius:2px;
  padding:3px 9px; font:inherit; cursor:pointer;
}
.auth-button:hover{ background:#303030; }
.auth-check{ display:flex; align-items:center; gap:7px; margin-top:8px; color:#bbb; }
.auth-links{ margin-top:8px; }
.auth-links a{ color:var(--link-bright); text-decoration:none; }
.auth-links a:hover{ text-decoration:underline; }
.auth-error{
  margin:0 0 10px; padding:7px 9px; border:1px solid #6f3333;
  background:#2b1d1d; color:#e3a0a0; border-radius:2px;
}
.auth-success{
  margin:0 0 10px; padding:7px 9px; border:1px solid #47613a;
  background:#202a1c; color:#b9d7a9; border-radius:2px;
}
.auth-help{ color:#999; margin-top:4px; }
@media (max-width:800px){
  .wrap{ padding-left:10px; padding-right:10px; }
  .auth-body{ padding-left:12px; padding-right:12px; }
  .subbar{ flex-direction:column; gap:7px; }
  .subbar .right{ text-align:left; white-space:normal; }
}
/* ---------- Role badges ---------- */
.role-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.3;
}
.role-member  { background: #3a3a3a; color: #b0b0b0; }
.role-premium { background: #3d3510; color: #f1c40f; }
.role-mod     { background: #2d1f3d; color: #b57edc; }
.role-support { background: #1a2a3a; color: #5dade2; }
.role-admin   { background: #3d1515; color: #e74c3c; }

/* ---------- Profile page ---------- */
.profile-wrap {
  margin-top: 14px;
}
.profile-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #1c1c1c;
  border-bottom: 1px solid #111;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #2a2a2a;
  color: #e4e4e4;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #333;
}
.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 4px;
}
.profile-meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}
.profile-section {
  padding: 14px 20px 16px;
  border-bottom: 1px solid #1a1a1a;
}
.profile-section:last-child {
  border-bottom: none;
}
.profile-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #9a9a9a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.profile-stat {
  background: #1b1b1b;
  border: 1px solid #121212;
  border-radius: 4px;
  padding: 10px 12px;
}
.stat-label {
  font-size: 10px;
  color: #757575;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 500;
}
.profile-perms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 16px;
}
.profile-perms li {
  font-size: 12px;
  color: #8e8e8e;
  padding-left: 18px;
  position: relative;
}
.profile-perms li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: #555;
  font-weight: bold;
}
.profile-perms li.yes {
  color: #b4b4b4;
}
.profile-perms li.yes::before {
  content: "✓";
  color: #9ec01f;
}
.profile-note {
  font-size: 11px;
  color: #8e8e8e;
  line-height: 1.5;
  background: #1b1b1b;
  border: 1px solid #222;
  border-radius: 4px;
  padding: 10px 12px;
}
.profile-note code {
  background: #2a2a2a;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  color: #c8c8c8;
}

/* User profile links */
a.user-link {
  color: inherit;
  text-decoration: none;
}
a.user-link:hover {
  text-decoration: underline;
  color: var(--link-bright);
}
.chat-log a.name.user-link {
  color: var(--chat-name);
}
.chat-log a.name.user-link:hover {
  text-decoration: underline;
}

.role-banned {
  background: #3d1515;
  color: #ff6b6b;
  border: 1px solid #5a2020;
}




/* ---------- Thread badges & tools ---------- */
.thread-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1px 5px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.thread-badge.sticky {
  background: #2a3218;
  color: #9ec01f;
  border: 1px solid #3a4520;
}
.thread-badge.locked {
  background: #2a2a2a;
  color: #a0a0a0;
  border: 1px solid #3a3a3a;
}

.thread-title-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}
.thread-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-tool {
  font-size: 10px;
  padding: 3px 8px;
  background: #2a2a2a;
  color: #b4b4b4;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
}
.btn-tool:hover {
  background: #353535;
  color: #e4e4e4;
}
.btn-tool.danger {
  color: #cc6666;
  border-color: #4a2a2a;
}
.btn-tool.danger:hover {
  background: #3a1a1a;
  color: #ff8888;
}

.btn-post-del {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #555;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  font-family: inherit;
}
.btn-post-del:hover {
  color: #cc6666;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-locked {
  font-size: 11px;
  color: #8e8e8e;
  padding: 10px 0;
  border-top: 1px solid #1a1a1a;
}

/* ---------- Admin panel (matches forum panels) ---------- */
.admin-panel {
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.admin-panel .profile-section-title {
  color: #c07070;
}
.admin-row {
  margin-bottom: 12px;
}
.admin-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.admin-msg {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 11px;
}
.admin-msg.ok {
  background: #1a2418;
  color: #9ec01f;
  border: 1px solid #2a3a20;
}
.admin-msg.err {
  background: #241818;
  color: #cc6666;
  border: 1px solid #3a2020;
}
.post-meta-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

/* ---------- Ban page (GameSense style) ---------- */
.ban-panel {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ban-title {
  background: var(--panel-2);
  color: #e2e2e2;
  font-family: var(--heading-font);
  font-size: 13px;
  font-weight: normal;
  padding: 9px 14px;
  border-bottom: 1px solid #111;
}
.ban-body {
  padding: 16px 18px 20px;
  color: #c8c8c8;
  font-size: 12px;
  line-height: 1.65;
}
.ban-lead {
  margin: 0 0 14px;
  color: #c8c8c8;
}
.ban-reason {
  margin: 0 0 16px;
  color: #e4e4e4;
  font-weight: 700;
  font-size: 13px;
}
.ban-contact {
  margin: 0;
  color: #9a9a9a;
  font-size: 11.5px;
}
.ban-contact a {
  color: var(--link-bright);
  text-decoration: none;
}
.ban-contact a:hover {
  text-decoration: underline;
}

/* Ban reason input on admin profile */
.ban-reason-input {
  width: 100%;
  max-width: 360px;
  margin-top: 6px;
  margin-bottom: 8px;
}
.site-footer .footer-links {
  margin-top: 4px;
  font-size: 10px;
}
.navbar .premium {
  color: #9ec01f !important;
  font-weight: 600;
}

/* ---------- GameSense-style profile ---------- */
.gs-profile {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gs-profile-bar {
  background: var(--panel-2);
  color: #e2e2e2;
  font-family: var(--heading-font);
  font-size: 13px;
  font-weight: normal;
  padding: 9px 14px;
  border-bottom: 1px solid #111;
}
.gs-profile-body {
  padding: 0;
}
.gs-block {
  border-bottom: 1px solid #1a1a1a;
  padding: 10px 0 6px;
}
.gs-block:last-child {
  border-bottom: none;
}
.gs-block-title {
  font-size: 11px;
  color: #7a9ab8;
  padding: 2px 14px 8px;
  font-weight: 500;
}
.gs-admin-block .gs-block-title {
  color: #c07070;
}
.gs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.gs-table tr {
  border-top: 1px solid #1c1c1c;
}
.gs-table tr:first-child {
  border-top: none;
}
.gs-label {
  width: 130px;
  padding: 7px 14px;
  color: #8e8e8e;
  vertical-align: top;
  white-space: nowrap;
}
.gs-value {
  padding: 7px 14px 7px 0;
  color: #c8c8c8;
  vertical-align: top;
}
.gs-value .role-badge {
  margin-left: 8px;
}
.gs-link {
  color: var(--link-bright);
  text-decoration: none;
}
.gs-link:hover {
  text-decoration: underline;
}
.gs-muted {
  color: #666;
}
.gs-mono {
  font-size: 10px;
  color: #8e8e8e;
  word-break: break-all;
}
.title-premium {
  color: #c9a227;
}
.title-admin {
  color: #e74c3c;
}
.title-mod {
  color: #b57edc;
}

/* Premium page */
.prem-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 8px;
  font-size: 12px;
  color: #c8c8c8;
}
.prem-icon {
  color: #9ec01f;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.prem-text b {
  color: #e4e4e4;
  font-weight: 600;
}
.prem-clients {
  display: flex;
  gap: 8px;
  padding: 4px 14px 12px;
  flex-wrap: wrap;
}
.prem-client-btn {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #b4b4b4;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  cursor: default;
  opacity: 0.85;
}
.prem-discord {
  display: flex;
  gap: 8px;
  padding: 4px 14px 12px;
  align-items: center;
}
.prem-invites-empty {
  padding: 4px 14px 12px;
  font-size: 12px;
  color: #8e8e8e;
}
.invite-code {
  background: #1b1b1b;
  border: 1px solid #2a2a2a;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  color: #9ec01f;
  letter-spacing: 0.5px;
}
.buy-body {
  padding: 4px 14px 16px;
  font-size: 12px;
  color: #c8c8c8;
  line-height: 1.6;
}
.sub-until {
  margin-left: 6px;
  color: #8e8e8e;
  font-size: 10.5px;
}
.sub-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* ---------- Members list (admin) ---------- */
.members-table {
  width: 100%;
  border-collapse: collapse;
}
.members-table thead th {
  text-align: left;
  font-weight: normal;
  color: #8e8e8e;
  font-size: 11px;
  padding: 8px 10px;
  border-bottom: 1px solid #2a2a2a;
  background: #1f1f1d;
}
.members-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #222;
  vertical-align: middle;
  font-size: 12px;
}
.members-table tbody tr:hover {
  background: #242422;
}
.members-table .role-badge {
  font-size: 10px;
  padding: 2px 7px;
}

/* ---------- Notifications ---------- */
.notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
  z-index: 110;
}
.notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a9a9a9 !important;
  text-decoration: none !important;
  padding: 2px 6px;
  line-height: 1;
}
.notif-btn:hover {
  color: #e4e4e4 !important;
}
.notif-badge {
  position: absolute;
  top: -4px;
  left: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 8px;
  background: #e74c3c;
  color: #fff;
  font-size: 9px;
  font-weight: bold;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 1px #1a1a18;
  pointer-events: none;
}
.notif-panel {
  position: fixed;
  top: 0;
  left: 0;
  margin-top: 0;
  width: 320px;
  max-width: 90vw;
  background: #1f1f1d;
  border: 1px solid #333;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55);
  z-index: 99999;
  overflow: hidden;
  pointer-events: auto;
}
.navbar .notif-btn.icon {
  opacity: 1;
  width: auto;
  padding: 2px 6px;
}
.navbar .notif-btn.icon svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #242422;
  border-bottom: 1px solid #2a2a2a;
  font-size: 12px;
  color: #c8c8c8;
  font-weight: 600;
}
.notif-mark-all {
  background: none;
  border: none;
  color: #74acd8;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.notif-mark-all:hover {
  text-decoration: underline;
}
.notif-panel-body {
  max-height: 360px;
  overflow-y: auto;
}
.notif-empty {
  padding: 20px 12px;
  text-align: center;
  color: #8e8e8e;
  font-size: 11px;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #222;
  text-decoration: none !important;
  color: inherit;
  transition: background .1s;
}
.notif-item:hover {
  background: #282826;
}
.notif-item.notif-unread {
  background: #232a20;
}
.notif-item.notif-unread:hover {
  background: #2a3226;
}
.notif-type {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2a2a28;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #c8c8c8;
}
.notif-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-title {
  font-size: 11.5px;
  color: #e4e4e4;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-body {
  font-size: 11px;
  color: #9a9a9a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-size: 10px;
  color: #6a6a6a;
  margin-top: 1px;
}

.post-hidden { opacity: 0.7; border-left: 2px solid #665522; }
.post-actions { display: inline-flex; align-items: center; gap: 2px; }


/* Avatar */
.avatar-row { display:flex; align-items:flex-start; gap:12px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 6px; object-fit: cover;
  border: 1px solid #333; background: #1a1a18; flex-shrink: 0;
}
.profile-avatar-placeholder {
  display:flex; align-items:center; justify-content:center;
  font-size: 22px; font-weight: bold; color: #9a9a9a;
}
.avatar-controls { flex:1; }

/* Chat delete */
.btn-chat-del {
  background: none; border: none; color: #666; cursor: pointer;
  font-size: 12px; margin-left: 6px; padding: 0 4px; line-height: 1;
  vertical-align: middle;
}
.btn-chat-del:hover { color: #e74c3c; }

/* Notification delete */
.notif-head-actions { display:inline-flex; gap:10px; align-items:center; }
.notif-item {
  display: flex; align-items: stretch; gap: 0;
  border-bottom: 1px solid #222;
}
.notif-item-main {
  display: flex; gap: 10px; padding: 10px 12px; flex: 1; min-width: 0;
  text-decoration: none !important; color: inherit;
}
.notif-item-main:hover { background: #282826; }
.notif-del {
  background: none; border: none; border-left: 1px solid #222;
  color: #666; cursor: pointer; padding: 0 10px; font-size: 14px;
}
.notif-del:hover { color: #e74c3c; background: #2a2220; }

/* ========== Settings / Personal area ========== */
.settings-layout {
  display: flex;
  gap: 0;
  margin-top: 12px;
  align-items: flex-start;
}
.settings-menu {
  width: 160px;
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden;
}
.settings-menu-title {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-bright);
  background: var(--panel-2);
  border-bottom: 1px solid #1a1a1a;
}
.settings-menu a {
  display: block;
  padding: 8px 12px;
  color: #a9a9a9;
  text-decoration: none;
  font-size: 11px;
  border-bottom: 1px solid #1c1c1c;
}
.settings-menu a:hover {
  background: #2a2a2a;
  color: #d0d0d0;
}
.settings-menu a.active {
  background: #2e2e2c;
  color: var(--olive-green);
  font-weight: 600;
}
.settings-menu .menu-sep {
  height: 1px;
  background: #333;
  margin: 4px 0;
}
.settings-content {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 0 16px;
}
.settings-content-title {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-bright);
  background: var(--panel-2);
  border-bottom: 1px solid #1a1a1a;
}
.settings-section {
  margin: 14px 14px 0;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  background: #1e1e1e;
}
.settings-section-legend {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--link);
  border-bottom: 1px solid #2a2a2a;
}
.settings-section-body {
  padding: 12px 14px;
}
.settings-section-body .auth-label {
  display: block;
  margin-bottom: 3px;
  color: #c8c8c8;
}
.settings-section-body .auth-input {
  max-width: 320px;
}
.settings-section-body .gs-muted,
.settings-hint {
  font-size: 10px;
  color: #7a7a7a;
  margin-top: 4px;
}
.settings-actions {
  margin: 16px 14px 0;
}
.settings-actions .auth-button,
.settings-actions .btn-tool {
  margin-right: 8px;
}
.settings-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.settings-row > div { flex: 1; min-width: 180px; }
.ticket-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a2a;
  font-size: 11px;
}
.ticket-list-item:last-child { border-bottom: none; }
.ticket-list-item a { color: var(--link-bright); text-decoration: none; }
.ticket-list-item a:hover { text-decoration: underline; }
.status-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  text-transform: uppercase;
}
.status-pill.open { background: #2a3a2a; color: #9ec01f; }
.status-pill.answered { background: #2a2a3a; color: #74acd8; }
.status-pill.closed { background: #333; color: #888; }

/* Settings refinements for 1:1 GS look */
.settings-menu a.active {
  color: #9ec01f;
  background: #2a2a28;
  border-left: 2px solid #9ec01f;
  padding-left: 10px;
}
.settings-section {
  margin: 12px 14px 0;
}
.settings-section-legend {
  color: #6a9fc7;
  font-size: 11px;
  padding: 5px 10px;
}
.invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  flex-wrap: wrap;
}
.invite-code {
  display: inline-block;
  background: #111;
  border: 1px solid #333;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.3px;
}
.invite-code.valid {
  color: #9ec01f;
  border-color: #3a4a20;
  background: #1a2210;
}
.invite-code.invalid {
  color: #888;
}
.invite-meta {
  font-size: 11px;
  color: #9a9a9a;
}
.invite-meta.valid-text { color: #9ec01f; }
.invite-meta.expired { color: #cc6666; }

/* Subbar premium line closer to real site */
.subbar .left .premium-line {
  display: block;
  margin-top: 2px;
  color: #cc3232;
  font-size: 11px;
}
.subbar .left .premium-line a {
  color: var(--link-bright);
  text-decoration: none;
  margin-left: 6px;
}
.subbar .left .premium-line a:hover { text-decoration: underline; }

/* ========== Private Messages (GS style) ========== */
.pm-page { margin-top: 10px; }
.pm-breadcrumb {
  font-size: 11px;
  color: #8a8a8a;
  margin-bottom: 10px;
}
.pm-breadcrumb a { color: var(--link-bright); text-decoration: none; }
.pm-breadcrumb a:hover { text-decoration: underline; }
.pm-breadcrumb span { margin: 0 4px; color: #666; }

.pm-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pm-folders {
  width: 170px;
  flex-shrink: 0;
}
.pm-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.pm-box-title {
  background: var(--panel-2);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-bright);
  border-bottom: 1px solid #1a1a1a;
}
.pm-folder-link {
  display: block;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--link-bright);
  text-decoration: none;
  border-bottom: 1px solid #222;
}
.pm-folder-link:last-child { border-bottom: none; }
.pm-folder-link:hover { background: #2a2a28; }
.pm-folder-link.active {
  background: #2a2a28;
  color: #9ec01f;
  font-weight: 600;
}
.pm-storage-line {
  padding: 5px 10px;
  font-size: 11px;
  color: #9a9a9a;
}

.pm-main { flex: 1; min-width: 0; }

.pm-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
}
.pm-pages { color: #9a9a9a; }
.pm-new-dialogue {
  color: var(--link-bright);
  text-decoration: none;
  font-size: 11px;
}
.pm-new-dialogue:hover { text-decoration: underline; }

.pm-table-head {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-bright);
}
.pm-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 11px;
}
.pm-table thead th {
  background: #1c1c1a;
  color: #9a9a9a;
  font-weight: normal;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 2px solid #9ec01f;
}
.pm-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid #222;
  color: #c8c8c8;
  vertical-align: middle;
}
.pm-table tbody tr:hover { background: #242422; }
.pm-topic {
  color: var(--link-bright);
  text-decoration: none;
}
.pm-topic:hover { text-decoration: underline; }
.pm-last { color: #8a8a8a; white-space: nowrap; }
.pm-table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 0;
  font-size: 11px;
}

/* Thread view — forum-like posts */
.pm-thread-toolbar { margin-bottom: 8px; font-size: 11px; }
.pm-thread-title {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-bright);
}
.pm-thread-posts {
  border: 1px solid var(--border);
  border-top: none;
  background: #1a1a18;
}
.pm-post {
  display: flex;
  border-bottom: 1px solid #2a2a2a;
  min-height: 70px;
}
.pm-post:last-child { border-bottom: none; }
.pm-post-side {
  width: 140px;
  flex-shrink: 0;
  padding: 10px 12px;
  background: #1e1e1c;
  border-right: 1px solid #2a2a2a;
}
.pm-post-author {
  font-size: 12px;
  font-weight: 600;
}
.pm-post-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}
.pm-post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #8a8a8a;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #2a2a2a;
}
.pm-post-text {
  font-size: 12px;
  color: #c8c8c8;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.pm-reply-box {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--panel);
  padding: 12px 14px;
}

/* Coming soon placeholder */
.coming-soon {
  color: #9a9a9a;
  font-size: 12px;
  padding: 8px 0;
  font-style: italic;
}

/* Custom scrollbar (Firefox + Chromium) */
* {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a #1a1a1a;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 5px;
}
*::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 5px;
  border: 2px solid #1a1a1a;
}
*::-webkit-scrollbar-thumb:hover {
  background: #4a4a4a;
}
*::-webkit-scrollbar-corner {
  background: #1a1a1a;
}
