/* ============================================================
   НИЖЕГОРОДСКИЙ RP — ELEGANT THEME
   Main Structure & Layout
   ============================================================ */

/* A1 Import the colour scheme
-------------------------------------------------------------*/
@import url(style_cs.1775719982.css);

/* A2 Browser defaults reset
-------------------------------------------------------------*/

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-body);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

.punbb * {
  margin: 0;
}

.punbb ul, .punbb dl, .punbb li, .punbb dd, .punbb dt {
  padding: 0;
  list-style: none;
}

.punbb img {
  border: none;
}

.punbb .main table {
  table-layout: fixed;
  width: 100%;
}

.checkfield input[type="checkbox"],
.radiofield input[type="radio"] {
  margin: 0 0.3em;
}

p[class="checkfield"] *,
div[class="checkfield"] *,
fieldset[class="radiofield"] * {
  height: 1.8em;
  vertical-align: middle;
}

/* A3 Text setup
-------------------------------------------------------------*/

body {
  font-size: 100.01%;
}

.punbb {
  font: normal 68.75%/1.6 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
}

.punbb textarea, .punbb input, .punbb select, .punbb optgroup {
  font: 1em 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5em 0.7em;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.punbb textarea:focus,
.punbb input:focus,
.punbb select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.punbb h1, .punbb h2, .punbb h3, .punbb h4, .punbb table, .punbb th {
  font-size: 1em;
  font-weight: normal;
}

.punbb h1 span, .punbb h2 span, .punbb legend span {
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.punbb pre {
  font: 1.1em/140% 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  background-color: var(--bg-elevated);
  padding: 1em;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  color: var(--text-primary);
}

.punbb address, .punbb em {
  font-style: normal;
}

.punbb .post-content em {
  font-style: italic;
}

.punbb .post-content em.bbuline {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.punbb a {
  text-decoration: none;
  transition: color var(--transition);
}

.punbb a:hover {
  text-decoration: none;
}

.punbb optgroup {
  font-weight: bold;
}

/* A4 Float clearing and hidden items
-------------------------------------------------------------*/

#pun:after,
.punbb .container:after,
.punbb .post-links ul:after,
.punbb .main div.inline:after,
.punbb .post-box:after,
.punbb .linksb:after {
  clear: both;
  content: ".";
  display: block;
  height: 0;
  visibility: hidden;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}

.acchide,
#pun-index #pun-main h1,
#pun-navlinks h2,
#pun-pagelinks h2,
#pun-status h2,
#pun-ulinks h2,
.punbb .forum h2,
.punbb .multipage .topic h2,
.punbb dl.post-sig dt span,
.punbb p.crumbs strong,
.punbb .divider hr,
.punbb .required label em,
.punbb .formsubmit label,
.punbb .submitfield label,
.punbb .modmenu label,
#pun-userlist .main h2 {
  font-size: 0;
  height: 0;
  width: 0;
  line-height: 0;
  position: absolute;
  left: -9999px;
  overflow: hidden;
}

/* A5 Basic page layout
-------------------------------------------------------------*/

#pun {
  margin: 20px auto;
  max-width: 1100px;
  position: relative;
  padding: 0 20px;
}

.punbb {
  float: left;
  width: 100%;
  height: auto;
}

#pun-redirect, #pun-maint {
  margin: 50px 20% 12px 20%;
  width: auto;
  float: none;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.punbb .section, .punbb .main {
  margin-bottom: 1.5em;
}

.punbb .category, .punbb .post {
  margin-top: 0.5em;
}

.punbb #pun-category1, .punbb .toppost, .punbb .topicpost {
  margin-top: 0;
}

#pun-post .topic {
  margin-top: 1em;
}

/* Section & container borders */
.punbb .section, .punbb .forum, .punbb .formal, .punbb .modmenu, .punbb .info,
.punbb .category, .punbb .post {
  border-style: none;
  border-width: 0;
}

.punbb .container {
  border-style: none;
  border-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Headers */
.punbb .section h2, #pun-main h1, #pun-main h2, #pun-stats h2, #pun-debug h2 {
  padding: 0.7em 1.2em;
  border-style: none;
  border-width: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85em;
}

/* ============================================================
   B - MAIN CONTENT - GENERAL
   ============================================================ */

/* B1 Parsed Content, Signatures and Scroll Boxes
-------------------------------------------------------------*/

.punbb .post-content {
  padding: 0;
  margin: 0;
  width: 100%;
  overflow: hidden;
}

.punbb .post-sig dt {
  display: block;
  border-top: 1px solid var(--border);
  width: 250px;
  margin: 5px 0;
}

.punbb .post-content p {
  margin: 0;
  padding: 0 0 1em 0;
  line-height: 170%;
  color: var(--text-primary);
}

.punbb .post-content img {
  vertical-align: text-bottom;
}

.punbb .post-content img.postimg {
  vertical-align: middle;
  border-radius: var(--radius-sm);
}

.punbb .post-content .blockcode,
.punbb .post-content blockquote {
  width: 100%;
  overflow: hidden;
}

.punbb .post-content .scrollbox {
  width: 100%;
  overflow: auto;
}

/* Quote & Code boxes */
.punbb .post-content .quote-box,
.punbb .post-content .code-box {
  margin: 0.6em 1.2em 1.4em 1.2em;
  padding: 1.2em 1.4em;
  border-style: solid;
  border-width: 1px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  position: relative;
}

.punbb .post-content .code-box {
  border-left-color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
}

.punbb .quote-box cite,
.punbb .code-box strong.legend {
  display: block;
  padding-bottom: 0.7em;
  font-size: 0.95em;
  font-weight: 600;
  font-style: normal;
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.punbb .code-box strong.legend {
  color: var(--gold-dark);
}

/* B2 Information boxes
-------------------------------------------------------------*/

.punbb .info-box {
  padding: 1.1em 1.7em 1em 1.7em;
  border-style: solid;
  border-width: 1px;
  margin: 0 0 1.1em 0;
  border-radius: var(--radius-md);
}

.punbb .info-box * {
  padding: 0 0 0.7em 0;
}

.punbb #pun-main .info-box .legend {
  font-size: 1.1em;
  font-weight: 600;
}

/* B3 Pagination and posting links
-------------------------------------------------------------*/

.punbb .linkst {
  float: left;
  position: relative;
  width: 100%;
  font-size: 1.1em;
  height: 0;
}

.multipage {
  margin-top: 3em;
}

.linkst .pagelink {
  position: absolute;
  top: -4em;
  left: 1em;
  width: 24em;
}

.linkst .postlink {
  position: absolute;
  top: -4em;
  right: 1em;
  width: 16em;
  text-align: right;
  font-weight: 600;
}

/* "New topic" / "Post reply" button style */
.linkst .postlink a,
.linksb .postlink a {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff !important;
  padding: 0.4em 1.2em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.06em;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.linkst .postlink a:hover,
.linksb .postlink a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #fff !important;
}

.punbb .linksb {
  text-align: right;
  padding: 0.6em 1em 0.7em 1em;
  font-size: 1.1em;
}

.linksb .pagelink {
  float: left;
  width: 24em;
  text-align: left;
}

.linksb .postlink {
  float: right;
  width: 16em;
  font-weight: 600;
}

.subscribelink {
  clear: both;
  padding-top: 0.3em;
  padding-bottom: 0.5em;
}

/* ============================================================
   C - MAIN CONTENT - SPECIFIC
   ============================================================ */

/* C1 Form layout
-------------------------------------------------------------*/

.punbb .formal .container {
  padding: 1.7em 2.3em 1.1em 2.3em;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.punbb .formsubmit {
  padding: 0 0 0 1.7em;
  margin: 1em 0 0 0;
}

.punbb .formsubmit input,
.punbb .formsubmit a,
.punbb .formsubmit span {
  margin: 0 0.6em 0 0;
}

/* Submit buttons */
.punbb .formsubmit input[type="submit"],
.punbb input[type="submit"] {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  padding: 0.6em 1.8em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9em;
  transition: transform var(--transition), box-shadow var(--transition);
}

.punbb input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.punbb fieldset {
  border: 1px solid var(--border);
  padding: 0 18px 0 18px;
  margin: 0 0 1em 0;
  border-radius: var(--radius-sm);
}

.punbb fieldset legend {
  padding: 0;
  margin: 0 0 0 11px;
  font-size: 1.1em;
}

.punbb fieldset legend span {
  padding: 0 5px;
  margin: 0 0 0 -15px;
}

.punbb fieldset fieldset {
  border-style: none;
  margin: 0;
  padding: 0 0 8px 0;
}

.punbb .fs-box {
  padding: 1em 0 0.8em 0;
}

.punbb .fs-box p, .punbb .fs-box fieldset {
  padding: 0 0 0.8em 0;
}

.punbb .inline .inputfield,
.punbb .inline .selectfield,
.punbb .inline .passfield {
  float: left;
  margin-right: 1em;
}

.punbb .inline .infofield {
  clear: both;
}

.punbb .datafield br {
  display: none;
}

.punbb .required label, .punbb .datafield span.input {
  font-weight: 600;
}

.punbb .datafield span.input a {
  font-weight: normal;
}

.punbb .areafield span.input, .punbb p.longinput span.input {
  display: block;
  padding: 0 12em 0 0;
  height: 100%;
}

.punbb textarea, .punbb .longinput input {
  width: 64%;
  margin: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.punbb .hashelp {
  position: relative;
}

.punbb .helplinks {
  display: block;
  position: absolute;
  top: 1em;
  right: 0;
  font-weight: normal;
  width: 36%;
}

.punbb #profile .helplinks {
  top: 1.5em;
}

.punbb .helplinks span {
  display: block;
  padding-bottom: 0.2em;
}

#pun-post .formal .info-box li {
  padding-left: 4px;
  list-style-type: square;
  list-style-position: inside;
  line-height: 1.5;
  margin: 0;
}

/* C2 Table layout
-------------------------------------------------------------*/

.punbb .main .tcl {
  overflow: hidden;
  text-align: left;
  width: 50%;
}

.punbb .main .tc2, .punbb .main .tc3, .punbb .main .tcmod {
  text-align: center;
  width: 10%;
}

.punbb .main .tcr {
  overflow: hidden;
  text-align: left;
  width: 30%;
}

#pun-userlist .main .tcl,
#pun-searchtopics .main .tcl,
#pun-modviewforum .main .tcl {
  width: 40%;
}

#pun-userlist .main .tc2,
#pun-searchtopics .main .tc2 {
  text-align: left;
  width: 20%;
}

#pun-debug table .tcl {
  width: 15%;
  white-space: normal;
}

#pun-debug .tcr {
  width: 90%;
  white-space: normal;
}

/* Forum titles */
#pun-index .tcl h3 {
  font-size: 1.2em;
  font-weight: 600;
}

#pun-index .tcl h3 a {
  color: var(--text-primary);
  position: relative;
}

#pun-index .tcl h3 a:hover {
  color: var(--accent);
}

.punbb td span.youposted {
  font-weight: bold;
  margin-left: -1em;
  position: absolute;
}

.punbb td .modlist {
  display: block;
  padding-top: 0.3em;
  color: var(--text-muted);
  font-size: 0.9em;
}

/* Table cells */
.punbb .main td {
  border-style: solid none none solid;
  border-width: 1px 0 0 1px;
  border-color: var(--border);
  padding: 0.9em 1em;
  transition: background-color var(--transition);
}

/* Row hover effect */
.punbb .main tbody tr:hover td {
  background-color: var(--bg-card-hover);
}

.punbb .main th {
  border-style: none none none solid;
  border-width: 0 0 0 1px;
  border-color: var(--border-light);
  padding: 0.5em 1em;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8em;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.punbb .main .tcl {
  border-left-style: none;
  border-left-width: 0;
}

.punbb tbody.hasicon td.tcl {
  padding-left: 3.2em;
}

/* Topic icons — modern dots */
.punbb div.icon {
  border-style: none;
  border-width: 0;
  height: 12px;
  width: 12px;
  line-height: 0;
  margin-top: 0.3em;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  box-shadow: inset 0 0 0 2px var(--text-muted);
  transition: all var(--transition);
}

.punbb table div.icon {
  font-size: 1.05em;
  position: absolute;
  margin-left: -2.2em;
}

/* New posts icon */
div.inew {
  background: var(--accent) !important;
  box-shadow: 0 0 8px var(--accent-glow), inset 0 0 0 0 transparent !important;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% { box-shadow: 0 0 6px var(--accent-glow); }
  50%      { box-shadow: 0 0 14px var(--accent-glow); }
}

tr.iredirect div.icon {
  background-color: transparent;
  box-shadow: inset 0 0 0 2px var(--text-muted);
  opacity: 0.4;
}

/* C3 Topics / Posts
-------------------------------------------------------------*/

.punbb .post .container {
  border: 1px solid var(--border);
  border-top: none;
  margin-top: -1px;
  padding-bottom: 1px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.punbb .post h3 {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.punbb .post h3 span {
  padding: 0.6em 1em;
  display: block;
  margin-left: 19em;
  border-left-style: solid;
  border-left-width: 1px;
  border-left-color: var(--border);
  color: var(--text-muted);
  font-size: 0.9em;
}

.punbb .post h3 strong {
  float: right;
  width: 5em;
  text-align: right;
  font-weight: normal;
  color: var(--text-muted);
}

/* Post author panel */
.punbb .post .post-author {
  float: left;
  width: 19em;
  margin-top: -1.5em;
  overflow: hidden;
}

.punbb .post .post-author ul,
.punbb .post .post-author p {
  padding: 0 1em 1em 1em;
  line-height: 140%;
}

.pa-author {
  font-size: 1.1em;
  font-weight: 700;
}

.pa-author a {
  text-decoration: none;
  color: var(--accent) !important;
  transition: color var(--transition);
}

.pa-author a:hover {
  color: var(--accent-dark) !important;
}

li.pa-title {
  padding-bottom: 0.4em;
  font-weight: 600;
  color: var(--gold-dark);
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

li.pa-online {
  line-height: 0.8em;
  border-left-style: solid;
  border-left-width: 0.7em;
  padding-left: 0.4em;
  margin-top: 0.7em;
  border-left-color: var(--success);
}

.punbb .post-body {
  margin-left: 19em;
  border-left-style: solid;
  border-left-width: 1px;
  border-left-color: var(--border);
  padding: 0 0 1px 0;
}

.punbb .post-box {
  padding: 1.2em;
}

.punbb fieldset .post-box {
  margin-bottom: 0.8em;
}

/* Post links */
.punbb .post-links {
  margin-left: 19em;
  border-left-style: solid;
  border-left-width: 1px;
  border-left-color: var(--border);
}

.punbb .post-links ul {
  padding: 0 1em 0 0;
  height: 2em;
  line-height: 2em;
  margin-left: -19em;
  border-top: 1px dashed var(--border);
  background: transparent;
  text-align: right;
}

.punbb .post-links li {
  display: inline;
  padding-left: 1em;
}

.punbb .post-links li a {
  color: var(--text-muted);
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}

.punbb .post-links li a:hover {
  color: var(--accent);
}

.pl-email, .pl-website {
  float: left;
}

.punbb .clearer {
  clear: both;
  height: 0;
  font-size: 0;
}

/* C4 Moderator menu
-------------------------------------------------------------*/

.punbb .modmenu .container {
  padding: 0.5em 1em;
  text-align: right;
  border-radius: var(--radius-md);
}

.punbb .modmenu strong, .punbb .modmenu a {
  height: 1.8em;
  line-height: 1.8em;
}

.punbb .modmenu .container strong {
  float: left;
  color: var(--text-inverse);
}

.punbb .modmenu input {
  margin-left: 1em;
}

/* C5 Message boxes
-------------------------------------------------------------*/

.punbb .info .container {
  padding: 0.8em 1em;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.punbb .info .container .backlink {
  padding-top: 0.8em;
}

/* C6 Profile
-------------------------------------------------------------*/

#profile .container {
  padding-left: 18.6em;
}

#profilenav {
  float: left;
  width: 14em;
  margin-left: -16.3em;
  display: inline;
}

#profilenav li {
  padding-bottom: 0.8em;
  font-weight: 600;
}

#profilenav li a {
  display: block;
  padding: 0.5em 1em;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
  color: var(--text-primary);
}

#profilenav li a:hover {
  background-color: var(--bg-elevated);
}

#viewprofile ul, #profilenav ul {
  border: 1px solid var(--border);
  padding: 1.5em 18px 0.8em 18px;
  margin: 0 0 1em 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

#viewprofile h2, #profilenav h2 {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0 14px -0.6em 14px;
}

#viewprofile h2 span, #profilenav h2 span {
  padding: 0 5px;
  position: relative;
}

#viewprofile li, #setmods dl {
  padding: 0 0 0 16em;
  margin-bottom: 0.2em;
}

#viewprofile li span {
  float: left;
  width: 14em;
  margin-left: -16em;
  padding: 0.5em 1em;
  font-weight: 600;
  color: var(--text-secondary);
}

#setmods dt {
  float: left;
  width: 14em;
  margin-left: -16em;
  padding: 0.8em 1em;
  font-weight: 600;
  display: inline;
}

#viewprofile li strong, #viewprofile li div, #setmods dd {
  display: block;
  padding: 0.5em 1em;
  font-weight: normal;
}

.punbb img.avatardemo {
  float: right;
  margin: 0 0 0.8em 1.8em;
  border-radius: var(--radius-md);
}

/* C7 User list
-------------------------------------------------------------*/

#pun-userlist .formal, #pun-userlist .formal .container {
  border-bottom: none;
  margin-bottom: 0;
}

#pun-userlist .usertable .container {
  padding: 0 2.3em 2.3em 2.3em;
  border-top: none;
}

#pun-userlist .usertable table {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ============================================================
   D - SECTIONS OTHER THAN MAIN CONTENT
   ============================================================ */

/* D1 Logo and description
-------------------------------------------------------------*/

#pun-title {
  margin: 0;
  border: none;
  position: relative;
  overflow: hidden;
}

#pun-title h1 {
  display: block;
  height: 40px;
  padding: 2em 1em 0 1em;
}

#pun-title .container {
  border: none;
  position: relative;
  padding: 1.5em;
}

/* Decorative glow line under title */
#pun-title .container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--accent) 0%,
    var(--gold) 50%,
    var(--accent) 100%
  );
}

/* БЕЛОЕ название Нижегородский RP */
#pun-title h1 span {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 1.8em;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#pun-title table {
  border: none;
  height: 40px;
  width: 100%;
}

#pun-title td.title-logo-tdl {
  border: none;
  width: 100%;
}

#pun-title td.title-logo-tdr {
  border: none;
  width: 468px;
}

/* D2 Page navigation
-------------------------------------------------------------*/

#pun-pagelinks {
  position: absolute;
  top: -15px;
  left: 0;
  margin: 0;
  border: none;
  padding: 0;
  width: 100%;
}

#pun-pagelinks .container {
  background: transparent;
  border: none;
  padding: 0;
}

#pun-pagelinks .container li {
  display: inline;
}

#pun-pagelinks li a, #pun-pagelinks a:link, #pun-pagelinks a:hover {
  height: 2em;
  line-height: 2em;
  padding: 0;
  font-size: 1.2em;
  margin-left: -9999px;
  display: block;
  float: left;
  width: 100%;
}

#pun-pagelinks a:active, #pun-pagelinks a:focus {
  position: relative;
  margin: 0;
}

#pun-pagelinks li a span {
  display: block;
  margin: 0 1em;
}

/* D3 Forum navigation
-------------------------------------------------------------*/

#pun-navlinks, #pun-navlinks .container {
  border-style: none;
  border-width: 0;
  margin: 0;
}

#pun-navlinks .container {
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

#pun-navlinks li {
  display: inline;
  padding: 0;
}

#pun-navlinks li a {
  display: inline-block;
  padding: 0.8em 1.3em;
  font-size: 0.95em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background-color var(--transition), color var(--transition);
  position: relative;
  color: rgba(255, 255, 255, 0.9);
}

#pun-navlinks li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--gold);
  transition: transform var(--transition);
}

#pun-navlinks li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

#pun-navlinks li a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* D4 User links
-------------------------------------------------------------*/

#pun-ulinks {
  margin-top: 0;
}

#pun-ulinks .container {
  border-top: none;
  padding: 0.6em 1em;
  background: var(--bg-card);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-sm);
}

#pun-ulinks li, #pun-ulinks li a {
  display: inline;
  border-left-style: solid;
  border-left-width: 1px;
  border-left-color: var(--border);
  white-space: nowrap;
  font-size: 0.9em;
}

#pun-ulinks li a {
  padding: 0 0.3em 0 0.6em;
  color: var(--text-secondary);
}

#pun-ulinks li a:hover {
  color: var(--accent);
}

#pun-ulinks li.item1, #pun-ulinks li.item1 a {
  border-left-style: none;
  border-left-width: 0;
  padding-left: 0;
}

/* D5 Welcome box and Top Breadcrumbs
-------------------------------------------------------------*/

#pun-status, #pun-status .container {
  border-bottom: none;
  margin-bottom: 0;
}

#pun-status .container {
  padding: 0.8em 1em 1em 1em;
  color: var(--text-secondary);
  font-size: 0.95em;
}

#pun-status span {
  white-space: nowrap;
  margin-right: 0.5em;
}

/* Breadcrumbs */
#pun-crumbs1 {
  font-weight: 600;
  overflow: hidden;
  margin-top: 0;
}

#pun-crumbs1 p.container {
  border-top: none;
  padding: 0.8em 1em;
  font-size: 1em;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 0.5em;
  box-shadow: var(--shadow-sm);
}

#pun-crumbs1 a {
  color: var(--text-muted);
}

#pun-crumbs1 a:hover {
  color: var(--accent);
}

#pun-break1 {
  margin: 0 1em;
  border-style: none;
  border-width: 0;
  height: 0;
  margin: -2px 1em;
  position: relative;
  z-index: 1;
}

/* D6 Announcement
-------------------------------------------------------------*/

#pun-announcement h2 {
  padding: 0;
  margin: 0 1em -3.5em 1em;
  border-style: none none solid none;
  border-width: 0 0 1px 0;
  border-color: var(--border);
  position: relative;
  font-weight: 600;
}

#pun-announcement h2 span {
  display: block;
  padding: 1em 0 0.8em 0;
  border-bottom: 1px solid var(--border);
}

#pun-announcement .container {
  padding: 4.3em 1em 1em 1em;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

/* D7 Statistics
-------------------------------------------------------------*/

#pun-stats .container {
  padding: 1em 1.2em;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

#pun-stats li.item1, #pun-stats li.item2 {
  float: left;
  clear: both;
  line-height: 150%;
  color: var(--text-secondary);
}

#pun-stats li.item3, #pun-stats li.item4 {
  text-align: right;
  line-height: 150%;
  color: var(--text-secondary);
}

li#onlinelist {
  margin-top: 1em;
  border-top: 1px solid var(--border);
  float: left;
  width: 100%;
  line-height: 130%;
  color: var(--text-secondary);
}

li#onlinelist div {
  border-top: 1px solid var(--border);
  padding: 0.7em 0 0 0;
}

/* D8 Quick Jump - About - Bottom Breadcrumbs
-------------------------------------------------------------*/

#pun-qjump {
  margin: 0;
  border: none;
  width: 50%;
  position: relative;
  float: left;
}

#pun-qjump .container {
  border: none;
  background: transparent;
  padding: 0.8em 1em;
}

#pun-about {
  margin-top: 0;
}

#pun-about .container {
  border-top-style: none;
  text-align: right;
  line-height: 150%;
  padding: 0.8em 1em;
  color: var(--text-muted);
  font-size: 0.85em;
}

#pun-about p span {
  display: block;
  padding-left: 50%;
}

#pun-crumbs2 {
  font-weight: 600;
  overflow: hidden;
  margin-bottom: 0;
  border-bottom: none;
}

#pun-crumbs2 .container {
  border-bottom: none;
  padding: 0.8em 1em;
  font-size: 1em;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-top: 0.5em;
  box-shadow: var(--shadow-sm);
}

#pun-break4 {
  margin: -2px 1em;
  border-style: none;
  border-width: 0;
  position: relative;
  height: 0;
  z-index: 1;
}

div.punbb-admin #pun-about .container {
  border-top: 1px solid var(--border);
}

/* D9 Help file
-------------------------------------------------------------*/

#pun-help .formal .info-box h3.legend {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  margin-bottom: 0.8em;
}

#pun-help .formal .info-box h3.legend span {
  padding-bottom: 0.6em;
  display: block;
  border-bottom: 1px solid var(--border);
  font-size: 1.1em;
}

#pun-help .formal p, #pun-help .formal dd {
  margin-bottom: 1em;
}

#pun-help .formal ul, #pun-help .formal dl {
  padding: 0 0 0 1em;
}

#pun-help .formal li {
  padding: 0;
  line-height: 130%;
}

#pun-help .formal li * {
  vertical-align: text-top;
}

#pun-help .formal dt span {
  font: 1.4em/120% 'JetBrains Mono', monospace;
}

#pun-help .formal .parsedmsg, #pun-help .formal .parsedmsg .incode {
  padding-bottom: 0;
}

/* ============================================================
   CUSTOM ENHANCEMENTS
   ============================================================ */

/* Smooth scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg-elevated);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-elevated);
}

*::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Selection highlight */
::selection {
  background: var(--accent);
  color: #fff;
}

/* Smooth page transitions */
.punbb .main .container,
.punbb .post .container {
  transition: background-color var(--transition);
}

/* Subtle animation on forum description */
.punbb .main .tcl .forumdesc {
  color: var(--text-muted);
  font-size: 0.92em;
  line-height: 1.5;
  margin-top: 0.3em;
}

/* Avatar styling */
.pa-avatar img {
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pa-avatar img:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* User info in posts */
.pa-reg,
.pa-posts,
.pa-respect,
.pa-fld1,
.pa-fld2,
.pa-fld3,
.pa-fld4,
.pa-fld5 {
  font-size: 0.9em;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Online indicator glow */
li.pa-online strong {
  color: var(--success);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #pun {
    margin: 10px;
    padding: 0 10px;
  }

  .punbb .post .post-author {
    float: none;
    width: 100%;
    margin-top: 0;
  }

  .punbb .post-body {
    margin-left: 0;
    border-left: none;
  }

  .punbb .post h3 span {
    margin-left: 0;
    border-left: none;
  }

  .punbb .post-links {
    margin-left: 0;
    border-left: none;
  }

  .punbb .post-links ul {
    margin-left: 0;
  }

  #pun-navlinks .container {
    flex-direction: column;
  }

  #pun-navlinks li a {
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* --- 1. ТЕХНИЧЕСКАЯ БАЗА (Настраивает всё сразу) --- */

/* Скрываем стандартные иконки, настраиваем размеры и отступы */
[id^="forum_f"] .icon svg, [id^="forum_f"] .icon i { display: none !important; }

[id^="forum_f"] .icon {
    background: none !important; border: none !important; box-shadow: none !important;
    width: 45px !important; height: 45px !important; margin-right: 15px !important;
    display: inline-flex !important; vertical-align: middle !important;
    position: relative !important; float: left;
}

/* Настройка вывода твоих картинок */
[id^="forum_f"] .icon::before {
    content: "" !important; display: block !important;
    width: 100% !important; height: 100% !important;
    background-size: contain !important; background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Центрируем названия разделов по высоте иконки */
[id^="forum_f"] .tcl-con {
    display: flex !important; align-items: center !important; min-height: 45px !important;
}

/* Убираем синие пятна при наведении */
[id^="forum_f"] .icon:hover { background: none !important; }


/* --- 2. ТВОЙ СПИСОК (Сюда просто добавляй по одной строке) --- */

#forum_f21 .icon::before { background-image: url('https://i.imgur.com/AnQcbV9.png') !important; }
#forum_f20 .icon::before { background-image: url('https://i.imgur.com/UwaEdzQ.png') !important; }
#forum_f12 .icon::before { background-image: url('https://i.imgur.com/UwaEdzQ.png') !important; }
#forum_f4  .icon::before { background-image: url('https://i.imgur.com/UwaEdzQ.png') !important; }
#forum_f29 .icon::before { background-image: url('https://i.imgur.com/y4pfj9A.png') !important; }
#forum_f8  .icon::before { background-image: url('https://i.imgur.com/pW16dhu.png') !important; }
#forum_f44  .icon::before { background-image: url('https://i.imgur.com/kNFdDAm.png') !important; }
#forum_f27  .icon::before { background-image: url('https://i.imgur.com/kNFdDAm.png') !important; }
#forum_f9  .icon::before { background-image: url('https://i.imgur.com/k0UBLZt.png') !important; }
#forum_f26  .icon::before { background-image: url('https://i.imgur.com/qkyrHf4.png') !important; }
#forum_f24  .icon::before { background-image: url('https://i.imgur.com/UwaEdzQ.png') !important; }
#forum_f25  .icon::before { background-image: url('https://i.imgur.com/AnQcbV9.png') !important; }
#forum_f23  .icon::before { background-image: url('https://i.imgur.com/UwaEdzQ.png') !important; }
#forum_f6  .icon::before { background-image: url('https://i.imgur.com/jV6t60d.png') !important; }
#forum_f30  .icon::before { background-image: url('https://i.imgur.com/ktE0Pet.png') !important; }
#forum_f32  .icon::before { background-image: url('https://i.imgur.com/Ivx8e3H.png') !important; }
#forum_f33  .icon::before { background-image: url('https://i.imgur.com/Ivx8e3H.png') !important; }
#forum_f37  .icon::before { background-image: url('https://i.imgur.com/jV6t60d.png') !important; }
#forum_f36  .icon::before { background-image: url('https://i.imgur.com/ktE0Pet.png') !important; }
#forum_f35  .icon::before { background-image: url('https://i.imgur.com/G3a2kxe.png') !important; }
#forum_f38  .icon::before { background-image: url('https://i.imgur.com/G3a2kxe.png') !important; }
#forum_f39  .icon::before { background-image: url('https://i.imgur.com/y4pfj9A.png') !important; }
#forum_f40  .icon::before { background-image: url('https://i.imgur.com/6XPO4Fl.png') !important; }
#forum_f41  .icon::before { background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Emblem_of_the_Ministry_of_Internal_Affairs.svg/1280px-Emblem_of_the_Ministry_of_Internal_Affairs.svg.png') !important; }
#forum_f42  .icon::before { background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Emblem_of_the_Ministry_of_Internal_Affairs.svg/1280px-Emblem_of_the_Ministry_of_Internal_Affairs.svg.png') !important; }
#forum_f45  .icon::before { background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/National_Guard_of_Russia.svg/1280px-National_Guard_of_Russia.svg.png') !important; }
#forum_f46  .icon::before { background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Emblem_of_the_Ministry_of_Internal_Affairs.svg/1920px-Emblem_of_the_Ministry_of_Internal_Affairs.svg.png') !important; }
#forum_f47  .icon::before { background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/National_Guard_of_Russia.svg/1280px-National_Guard_of_Russia.svg.png') !important; }