/*
 * LoFriDast neon-dark overrides for phpBB prosilver.
 * Loaded after default prosilver styles.
 */

:root {
  --lf-bg-main: #050814;
  --lf-bg-alt: #070b1c;
  --lf-bg-soft: #0f1833;
  --lf-surface: rgba(5, 8, 20, 0.92);
  --lf-surface-2: rgba(10, 16, 40, 0.95);
  --lf-cyan: #4ff3ff;
  --lf-violet: #8f7bff;
  --lf-warm: #ffb86c;
  --lf-text: #f5f7ff;
  --lf-muted: #9aa0c6;
  --lf-ok: #3adf9b;
  --lf-danger: #ff7f9f;
}

html,
body {
  color: var(--lf-text);
  background:
    radial-gradient(circle at 12% -10%, rgba(79, 243, 255, 0.16), transparent 38%),
    radial-gradient(circle at 88% 0%, rgba(143, 123, 255, 0.2), transparent 42%),
    radial-gradient(circle at 50% 120%, rgba(255, 184, 108, 0.11), transparent 38%),
    linear-gradient(180deg, var(--lf-bg-alt), var(--lf-bg-main));
}

body#phpbb {
  margin: 0;
  padding: 0;
}

.wrap {
  background: var(--lf-surface);
  border-color: rgba(79, 243, 255, 0.28);
  border-radius: 14px;
  box-shadow: 0 0 26px rgba(79, 243, 255, 0.14);
  margin-top: 3rem;
}

/* Duplicate with custom header.nav - hide default phpBB headerbar */
#page-header .headerbar {
  display: none !important;
}

/* Keep standard phpBB navbar visible but non-sticky (no top offset side effects) */
#page-header {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin: 0 !important;
  backdrop-filter: none !important;
  background: transparent !important;
  border: 0 !important;
}

#page-body {
  margin-top: 0 !important;
}

.headerbar,
.forumbg,
.forabg {
  color: var(--lf-text);
  background: linear-gradient(130deg, rgba(79, 243, 255, 0.15), rgba(143, 123, 255, 0.16) 45%, rgba(5, 8, 20, 0.95));
  border-color: rgba(79, 243, 255, 0.3);
}

.navbar {
  background: var(--lf-surface-2);
  border-color: rgba(143, 123, 255, 0.35);
}

.site_logo {
  width: clamp(46px, 3vw, 56px);
  height: clamp(46px, 2.7vw, 52px);
  background-size: contain;
  background-position: left center;
  background-repeat: no-repeat;
}

/* Top global navigation (custom header.nav above .wrap) */
header.nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(to right, rgba(5, 8, 20, 0.92), rgba(5, 8, 20, 0.7));
  border-bottom: 1px solid rgba(143, 123, 255, 0.25);
}

header.nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

header.nav .nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

header.nav .logo {
  display: inline-block !important;
  float: left;
  width: auto;
  padding: 10px 13px 0 10px;
  flex: 0 0 auto;
}

header.nav .site_logo {
  display: inline-block !important;
}

header.nav .nav-logo-text {
  float: none;
  width: auto;
  text-align: left;
  margin: 0;
  overflow: hidden;
  text-transform: none;
  letter-spacing: normal;
  font-size: inherit;
  color: inherit;
}

header.nav .nav-logo-text h1 {
  margin: 15px 0 0;
  display: block;
  min-height: 0;
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  line-height: normal;
}

header.nav .nav-logo-text h1 a {
  color: var(--lf-cyan);
  text-decoration: none;
}

header.nav .nav-logo-text p {
  display: block;
  margin: 0 0 16.5px;
  font-family: Verdana, Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: #c8cdea;
  line-height: 14.3px;
}

header.nav .nav-menu {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}

header.nav .nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

header.nav .nav-links .nav-links-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

header.nav .nav-links .nav-links-row.top {
  margin-bottom: 0.1rem;
}

header.nav .nav-links .nav-links-row.top a {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

header.nav .nav-links a {
  position: relative;
  color: #c8cdea;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  text-decoration: none;
  white-space: nowrap;
}

header.nav .nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.32rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lf-cyan), var(--lf-violet));
  transition: width 0.2s ease-out;
}

header.nav .nav-links a:hover {
  color: #f5f7ff;
}

header.nav .nav-links a:hover::after {
  width: 100%;
}

header.nav .nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(79, 243, 255, 0.45);
  background: rgba(5, 8, 20, 0.92);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

header.nav .nav-toggle .hamburger-icon {
  position: relative;
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--lf-cyan);
  box-shadow:
    0 -6px 0 var(--lf-cyan),
    0 6px 0 var(--lf-cyan),
    0 0 8px rgba(79, 243, 255, 0.45);
}

@media (max-width: 1100px) {
  header.nav .nav-toggle {
    display: inline-flex;
  }

  header.nav .nav-menu .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 12;
    min-width: 250px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    margin-top: 0;
    padding: 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(79, 243, 255, 0.35);
    background: rgba(7, 11, 28, 0.98);
    box-shadow: 0 10px 32px rgba(2, 4, 12, 0.55);
  }

  header.nav .nav-menu .nav-links .nav-links-row {
    display: contents;
  }

  header.nav .nav-menu .nav-links .nav-links-row.top a:nth-child(1) {
    order: 1;
  }

  header.nav .nav-menu .nav-links .nav-links-row.bottom a:nth-child(1) {
    order: 2;
  }

  header.nav .nav-menu .nav-links .nav-links-row.bottom a:nth-child(2) {
    order: 3;
  }

  header.nav .nav-menu .nav-links .nav-links-row.bottom a:nth-child(3) {
    order: 4;
  }

  header.nav .nav-menu .nav-links .nav-links-row.bottom a:nth-child(4) {
    order: 5;
  }

  header.nav .nav-menu .nav-links .nav-links-row.bottom a:nth-child(5) {
    order: 6;
  }

  header.nav .nav-menu .nav-links .nav-links-row.top a:nth-child(2) {
    order: 7;
  }

  header.nav .nav-menu .nav-links .nav-links-row.top a:nth-child(3) {
    order: 8;
  }

  header.nav .nav-menu .nav-links .nav-links-row.top a:nth-child(4) {
    order: 9;
  }

  header.nav .nav-menu .nav-links .nav-links-row.bottom a {
    margin-left: 0.9rem;
    padding-left: 0.55rem;
    border-left: 2px solid rgba(79, 243, 255, 0.35);
  }

  header.nav .nav-menu .nav-links a {
    width: 100%;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
  }

  header.nav .nav-menu:hover .nav-links,
  header.nav .nav-menu.is-open .nav-links,
  header.nav .nav-menu .nav-links:focus-within {
    display: flex;
  }
}

@media (max-width: 760px) {
  header.nav .nav-inner {
    padding: 0.62rem 0.75rem;
    gap: 0.6rem;
  }

  header.nav .logo {
    display: inline-block !important;
    padding: 8px 10px 0 8px;
  }

  header.nav .site_logo {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  header.nav .nav-logo-text h1 {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  header.nav .nav-logo-text p {
    display: block;
    margin: 2px 0 0;
    font-size: 0.62rem;
    line-height: 1.2;
    color: #c8cdea;
  }
}

.forumbg .header,
.forabg .header,
table.table1 thead th,
th {
  background: linear-gradient(90deg, rgba(79, 243, 255, 0.2), rgba(143, 123, 255, 0.2));
  color: var(--lf-cyan);
}

.panel-container table.table1 thead th,
.panel-container .panel li.header dd,
.panel-container .panel li.header dt,
.panel-container table.table1 thead th a {
  color: #e8edff !important;
  text-shadow: none;
}




h1,
h2,
h3,
h3 a,
.content h2,
.panel h2,
.post h3,
.forabg .header a,
.forumbg .header a,
th a {
  color: var(--lf-cyan);
}

a,
a:visited,
.postlink,
.signature a,
.top i {
  color: var(--lf-cyan);
}

a:hover,
.postlink:hover,
.forabg .header a:hover,
.forumbg .header a:hover,
th a:hover {
  color: var(--lf-warm);
  background-color:rgba(143, 123, 255, 0.11);
}

.tabs .tab > a {
  background: rgba(79, 243, 255, 0.09);
  border-color: rgba(79, 243, 255, 0.24);
  color: #c8cdea;
}

.tabs .tab > a:hover {
  background: rgba(79, 243, 255, 0.15);
  border-color: rgba(79, 243, 255, 0.4);
  color: #f5f7ff;
}

.navigation a,
.rtl .navigation a {
  color: #c8cdea;
  background: linear-gradient(to right, rgba(10, 16, 40, 0.96) 45%, rgba(79, 243, 255, 0.11) 100%);
  border-color: rgba(79, 243, 255, 0.2);
}

.navigation a:hover {
  color: #f5f7ff;
  background: linear-gradient(to right, rgba(10, 16, 40, 0.98) 45%, rgba(79, 243, 255, 0.18) 100%);
  border-color: rgba(79, 243, 255, 0.38);
}

.navigation .active-subsection a,
.navigation .active-subsection a:hover {
  color: #4ff3ff;
  background: linear-gradient(to right, rgba(10, 16, 40, 0.98) 30%, rgba(79, 243, 255, 0.24) 100%);
  border-color: rgba(79, 243, 255, 0.45);
}

hr {
  border-top-color: rgba(79, 243, 255, 0.25);
  border-bottom-color: rgba(143, 123, 255, 0.26);
}

.panel,
.post,
.bg1,
.bg2,
.bg3,
.ucprowbg,
.fieldsbg,
.dropdown,
.dropdown-extended ul,
.jumpbox .dropdown .dropdown-contents,
.notification_list,
.cp-main .panel {
  background: var(--lf-surface);
  color: var(--lf-text);
  border-color: rgba(79, 243, 255, 0.24);
}

.dropdown-extended .header,
.dropdown-extended .footer {
    background-image: linear-gradient(to bottom, #2a7ccf 0%, #031b30 100%);
    color: var(--lf-text);
    text-shadow: 1px 1px 1px #171334;
    border-color: #1e4a9f;
}


/* Darken PM area in UCP to avoid bright default background bleed-through */
.cp-main .pm {
  background: rgba(7, 12, 30, 0.94) !important;
  border-color: rgba(79, 243, 255, 0.24) !important;
}

.cp-main .pm-message,
.cp-main .pm .inner,
.cp-main .pm .postbody {
  background: rgba(7, 12, 30, 0.94) !important;
}

/* Keep mini CP blocks aligned with dark neon palette */
.cp-mini {
  background: rgba(7, 12, 30, 0.94) !important;
  border-color: rgba(79, 243, 255, 0.24) !important;
}

/* Replace light default list separators in CP panel rows */
.panel-container .panel li.row {
  border-top-color: rgba(79, 243, 255, 0.12) !important;
  border-bottom-color: rgba(143, 123, 255, 0.22) !important;
}

/* CP list border should not use bright default separator */
ul.cplist {
  border-top-color: rgba(143, 123, 255, 0.28) !important;
}

/* PM replied marker in neon palette (default is gray) */
.pmlist li.pm_replied_colour,
.pm_replied_colour {
  border-color: rgba(79, 243, 255, 0.55) !important;
  box-shadow: inset 3px 0 0 rgba(79, 243, 255, 0.35);
}

.dropdown .dropdown-contents,
.dropdown-up .dropdown-contents {
  background: rgba(9, 14, 36, 0.98);
  border-color: rgba(79, 243, 255, 0.35);
  box-shadow: 0 10px 28px rgba(5, 8, 20, 0.65), 0 0 18px rgba(79, 243, 255, 0.14);
}

.dropdown li,
.dropdown li li,
.dropdown-extended ul li {
  border-color: rgba(143, 123, 255, 0.2);
}

.dropdown li:hover,
.dropdown li li:hover,
.dropdown-extended ul li:hover {
  background: rgba(79, 243, 255, 0.12);
  color: var(--lf-text);
}

.dropdown .pointer {
  border-color: rgba(79, 243, 255, 0.35) transparent;
}

.dropdown .pointer-inner,
.dropdown-extended .pointer-inner {
  border-color: rgba(9, 14, 36, 0.98) transparent;
}

.bg1,
table.zebra-list tr:nth-child(odd) td,
ul.zebra-list li:nth-child(odd) {
  background: rgba(79, 243, 255, 0.06);
}

.bg2,
table.zebra-list tr:nth-child(even) td,
ul.zebra-list li:nth-child(even) {
  background: rgba(143, 123, 255, 0.11);
}

.bg3 {
  background: rgba(255, 184, 108, 0.11);
}

ul.forums,
ul.topiclist li,
li.row,
li.header,
li.row strong,
table.table1 tbody tr,
table.table1 tbody th,
table.table1 td,
table.table1 tbody td {
  color: var(--lf-text);
  border-color: rgba(79, 243, 255, 0.2);
}

ul.forums {
  background: linear-gradient(180deg, rgba(79, 243, 255, 0.12), rgba(5, 8, 20, 0.98));
}

li.row:hover,
table.table1 tbody tr:hover,
table.table1 tbody tr.hover,
.jumpbox-forum-link:hover,
.jumpbox-sub-link:hover,
.dropdown-extended li:hover,
li.header dt,
li.header dd {
  background: rgba(79, 243, 255, 0.12);
  color: var(--lf-text);
}

ul.topiclist dd,
li.row:hover dd {
  border-left-color: rgba(143, 123, 255, 0.3);
}

.post:target .content,
.post h3 a.first-unread,
.post:target h3 a,
dl.details dt,
dl.details dd,
.copyright,
legend,
label,
small,
.timestamp,
select,
option,
.message-box textarea,
.inputbox,
input,
textarea {
  color: var(--lf-text);
}

.inputbox,
select,
textarea,
.message-box textarea,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"] {
  background: #7492a763;
  border-color: rgba(79, 243, 255, 0.35);
}

.inputbox:hover,
select:hover,
textarea:hover,
.message-box textarea:hover,
.inputbox:focus,
select:focus,
textarea:focus,
.message-box textarea:focus {
  border-color: rgba(79, 243, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(79, 243, 255, 0.25);
}

.search-box .inputbox,
.search-box .inputbox:hover,
.search-box .inputbox:focus {
  border-color: rgba(79, 243, 255, 0.35);
}

.search-box .inputbox:hover,
.search-box .inputbox:focus {
  border-color: rgba(79, 243, 255, 0.7);
}

fieldset.quick-login input.inputbox {
  background: #7492a763;
}

.inputbox::placeholder,
textarea::placeholder,
.message-box textarea::placeholder,
input[type="text"]::placeholder,
input[type="search"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: #c8cdea;
  opacity: 0.88;
}

.inputbox:-moz-placeholder,
textarea:-moz-placeholder,
.message-box textarea:-moz-placeholder {
  color: #c8cdea;
  opacity: 0.88;
}

.inputbox::-webkit-input-placeholder,
textarea::-webkit-input-placeholder,
.message-box textarea::-webkit-input-placeholder {
  color: #c8cdea;
}

/* Buttons aligned with LoFriDast dark-neon style */
.button,
a.button1,
input.button1,
input.button3,
a.button2,
input.button2 {
  color: #f5f7ff;
  border-color: rgba(79, 243, 255, 0.48);
  background-color: rgba(11, 17, 41, 0.96);
  background-image: linear-gradient(135deg, rgba(32, 47, 88, 0.9), rgba(11, 17, 41, 0.98));
  box-shadow: inset 0 0 0 1px rgba(79, 243, 255, 0.08);
  text-shadow: none;
  filter: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.button:hover,
a.button1:hover,
input.button1:hover,
a.button2:hover,
input.button2:hover,
input.button3:hover {
  color: #f5f7ff;
  border-color: rgba(79, 243, 255, 0.75);
  background-color: rgba(18, 28, 61, 0.99);
  background-image: linear-gradient(135deg, rgba(48, 74, 136, 0.9), rgba(18, 28, 61, 0.99));
  box-shadow: 0 0 14px rgba(79, 243, 255, 0.24);
  text-shadow: 0 1px 0 rgba(5, 8, 20, 0.95), 0 0 8px rgba(79, 243, 255, 0.35);
  text-decoration: none;
  filter: none;
}

.button:focus,
a.button1:focus,
input.button1:focus,
a.button2:focus,
input.button2:focus,
input.button3:focus,
.button:active,
a.button1:active,
input.button1:active,
a.button2:active,
input.button2:active,
input.button3:active {
  color: #f5f7ff;
  border-color: rgba(143, 123, 255, 0.85);
  background-color: rgba(14, 21, 48, 0.99);
  background-image: linear-gradient(135deg, rgba(36, 54, 103, 0.94), rgba(14, 21, 48, 0.99));
  box-shadow: 0 0 0 2px rgba(79, 243, 255, 0.2);
  text-shadow: 0 1px 0 rgba(5, 8, 20, 0.95), 0 0 8px rgba(79, 243, 255, 0.3);
  outline: none;
  filter: none;
}

.pagination li a,
.pagination li span,
.tabs .tab > a,
.minitabs .tab > a {
  background: rgba(5, 8, 20, 0.92);
  border-color: rgba(79, 243, 255, 0.3);
  color: var(--lf-text);
}

.pagination li.active span,
.tabs .activetab > a,
.minitabs .activetab > a {
  color: var(--lf-cyan);
  border-color: rgba(79, 243, 255, 0.65);
  background: rgba(79, 243, 255, 0.12);
}

.notification_list p,
.notification_list span,
p,
li,
dd,
dt,
span,
blockquote {
  color: #c8cdea;
}

/* Override prosilver PM current marker color (default is black) */
.current {
  color: var(--lf-cyan) !important;
}

dd label,
dd label span,
dd label strong {
  color: #98a3ca !important;
}

fieldset dl:hover dt label,
fieldset dl:hover dt label span,
fieldset dl:hover dt label strong {
  color: #eef4ff !important;
  text-shadow: 0 0 10px rgba(170, 240, 255, 0.78), 0 0 2px rgba(240, 248, 255, 0.7);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

.content {
  color: #c8cdea;
}

.error,
#message.error,
.warning,
.reported,
div.rules,
p.post-notice {
  color: #ffd6df;
  background: rgba(255, 0, 64, 0.5);
  border-color: rgba(255, 127, 159, 0.32);
  font-size: 1.6em;
  padding: 1.2rem 1.2rem;
}

.icon.icon-blue,
a:hover .icon.icon-blue,
.icon.icon-green,
a:hover .icon.icon-green,
.icon.icon-red,
a:hover .icon.icon-red,
.icon.icon-orange,
a:hover .icon.icon-orange,
.icon.icon-bluegray,
a:hover .icon.icon-bluegray,
.icon.icon-gray,
a:hover .icon.icon-gray,
.icon.icon-lightgray,
a:hover .icon.icon-lightgray,
.icon.icon-black,
a:hover .icon.icon-black {
  color: var(--lf-cyan);
}

.jumpbox-cat-link,
.jumpbox-cat-link:hover {
  background: rgba(79, 243, 255, 0.2);
  border-top-color: rgba(79, 243, 255, 0.4);
  color: var(--lf-text);
}

.jumpbox-forum-link,
.jumpbox-sub-link,
.dropdown-extended a.mark_read,
.alert_close .icon:before {
  background: rgba(5, 8, 20, 0.95);
}

.sep,
small,
.timestamp,
.postprofile,
.postprofile strong,
.signature,
.posthilit,
.note,
h5 {
  color: var(--lf-muted);
}

blockquote {
  background: rgba(79, 243, 255, 0.06);
  border-color: rgba(79, 243, 255, 0.28);
}

.online {
  background-repeat: no-repeat;
  background-position: right top;
}

.rtl .online {
  background-position: right top;
}

.phpbb_alert {
  background: rgba(5, 8, 20, 0.97);
  border-color: rgba(79, 243, 255, 0.45);
  color: #e8edff;
  box-shadow: 0 16px 34px rgba(5, 8, 20, 0.72), 0 0 20px rgba(79, 243, 255, 0.2);
}

.phpbb_alert .alert_title {
  color: #4ff3ff;
  border-bottom: 1px solid rgba(79, 243, 255, 0.24);
  margin-bottom: 0.5rem;
  padding-bottom: 0.45rem;
}

.phpbb_alert .alert_text,
.phpbb_alert p,
.phpbb_alert label,
.phpbb_alert .alert_text a {
  color: #c8cdea;
}

.phpbb_alert .alert_close .icon:before {
  color: #9aa0c6;
}

.phpbb_alert .alert_close:hover .icon:before {
  color: #f5f7ff;
}

.darken {
  background-color: rgba(2, 4, 10, 0.72);
}

@media (max-width: 700px) {
  .wrap {
    border-radius: 10px;
  }

  .headerbar,
  .forumbg,
  .forabg,
  .panel,
  .post {
    border-radius: 10px;
  }
}

/* Guard against UA/system keyword colors like background-color: field */
input:not([type="range"]):not([type="color"]):not([type="image"]):not([type="file"]),
select,
textarea {
  background-color: rgba(11, 17, 41, 0.96) !important;
  color: #c8cdea;
}

input[type="number"] {
  border: 1px solid rgba(79, 243, 255, 0.35) !important;
  background-color: rgba(11, 17, 41, 0.96) !important;
  color: #c8cdea !important;
  color-scheme: dark;
}

input[type="number"]:hover,
input[type="number"]:focus {
  border-color: rgba(79, 243, 255, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(79, 243, 255, 0.25);
  outline: none;
}

/* Specific alignment for search chars field to match nearby select proportions */
#ch {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
  width: 5ch !important;
  min-width: 0;
  height: auto !important;
  padding: 1px 2px !important;
  line-height: normal !important;
  vertical-align: baseline !important;
  margin: 0 !important;
  box-sizing: border-box;
}

#ch::-webkit-outer-spin-button,
#ch::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  background-color: rgba(11, 17, 41, 0.96) !important;
  border-color: rgba(79, 243, 255, 0.55) !important;
  border: 1px solid rgba(79, 243, 255, 0.55) !important;
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  margin: 0 4px 0 0;
  box-shadow: inset 0 0 0 1px rgba(79, 243, 255, 0.08);
}

input[type="checkbox"] {
  border-radius: 3px;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]::before,
input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  transform: scale(0);
  transition: transform 0.14s ease-in-out;
  background: #4ff3ff;
}

input[type="radio"]::before {
  border-radius: 50%;
}

input[type="checkbox"]::before {
  border-radius: 2px;
}

input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 243, 255, 0.2);
}

/* Mobile typography + spacing refinement (aligned to index.html breakpoints) */
@media (max-width: 960px) {
  html,
  body {
    font-size: 15px;
    line-height: 1.5;
  }

  #page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    margin: 0;
    backdrop-filter: blur(18px);
    background: linear-gradient(to right, rgba(5, 8, 20, 0.92), rgba(5, 8, 20, 0.7));
    border-bottom: 1px solid rgba(143, 123, 255, 0.25);
  }

  #page-header .headerbar,
  #page-header .navbar {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #page-header .navbar {
    display: block !important;
    padding: 0;
    border-top: 1px solid rgba(143, 123, 255, 0.22);
  }

  #page-header .headerbar {
    padding: 0;
  }

  #page-header .headerbar > .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
  }

  #page-header .navbar .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.35rem 1rem 0.55rem;
    display: block;
  }

  #page-header .navbar ul.linklist {
    margin: 0;
    padding: 0;
  }

  #page-header #nav-main {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: center;
  }

  #page-header #nav-main > li,
  #page-header #nav-main > li.rightside {
    float: none;
  }

  #page-header #nav-main > li > a,
  #page-header #nav-main > li > .header-profile > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(79, 243, 255, 0.24);
    background: rgba(79, 243, 255, 0.08);
    font-size: 0.69rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c8cdea;
    line-height: 1.2;
  }

  #page-header #nav-main > li > a:hover,
  #page-header #nav-main > li > .header-profile > a:hover {
    border-color: rgba(79, 243, 255, 0.45);
    color: #f5f7ff;
  }

  #page-header #nav-breadcrumbs {
    margin-top: 0.35rem;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.1rem;
  }

  #page-header #nav-breadcrumbs .breadcrumbs {
    float: none;
  }

  #page-header #nav-breadcrumbs .crumb {
    margin-right: 0.25rem;
  }

  #page-header #nav-breadcrumbs .breadcrumbs > .crumb:first-of-type > a > span {
    display: none;
  }

  #page-header #nav-breadcrumbs .crumb a {
    font-size: 0.72rem;
    color: #9aa0c6;
  }

  #page-header #nav-breadcrumbs .crumb a:hover {
    color: #f5f7ff;
  }

  #page-header #site-description {
    float: none;
    width: auto;
    text-align: left;
    margin: 0;
    overflow: hidden;
  }

  #page-header #site-description h1 {
    margin: 0 0 0 0.5rem;
    display: inline-grid;
    min-height: 46px;
    align-content: center;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4ff3ff;
    line-height: 1.15;
  }

  #page-header #site-description p {
    display: none !important;
  }

  #page-header #search-box.search-header {
    display: none !important;
    float: none;
    margin: 0;
    margin-left: auto;
  }

  #page-header .logo {
    display: inline-grid !important;
    float: left;
    padding: 0;
    margin: 0 0.5rem 0 0;
  }

  #page-header .site_logo {
    transform: none;
  }

  #page-header .search-header fieldset {
    display: flex;
    align-items: center;
  }

  #page-header .search-box .inputbox {
    height: 32px;
    background: rgba(11, 17, 41, 0.96);
    border: 1px solid rgba(79, 243, 255, 0.45);
    border-right-width: 0;
    border-radius: 999px 0 0 999px;
    padding: 0.35rem 0.65rem;
  }

  #page-header .search-header .button-search,
  #page-header .search-header .button-search-end {
    height: 32px;
    border: 1px solid rgba(79, 243, 255, 0.5);
    background: radial-gradient(circle at top left, rgba(79, 243, 255, 0.15), rgba(5, 8, 20, 0.95));
    color: #f5f7ff;
    box-shadow: none;
  }

  #page-header .search-header .button-search {
    border-left-width: 0;
    border-right-width: 0;
    border-radius: 0;
  }

  #page-header .search-header .button-search-end {
    border-left-width: 0;
    border-radius: 0 999px 999px 0;
  }

  #page-body {
    margin-top: 7.15rem;
  }

  .wrap {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .inner {
    padding: 0;
  }

  .forabg {
    padding: 5px 0;
  }

  h1 {
    font-size: 1.32rem;
  }

  h2,
  .content h2,
  .panel h2 {
    font-size: 1.1rem;
    line-height: 1.28;
    margin-bottom: 0.45rem;
  }

  h3,
  .post h3,
  .forumbg .header,
  .forabg .header {
    font-size: 0.98rem;
  }

  .panel,
  .post,
  .forabg,
  .forumbg {
    margin-bottom: 0.65rem;
  }

  p,
  li,
  dd,
  dt,
  .content,
  fieldset {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  fieldset dl {
    padding: 5px 0;
  }

  fieldset dd {
    margin-bottom: 4px;
  }

  .button,
  a.button1,
  input.button1,
  input.button3,
  a.button2,
  input.button2 {
    font-size: 0.89rem;
    padding: 3px 9px;
  }
}

@media (max-width: 640px) {
  html,
  body {
    font-size: 14px;
  }

  #page-header .headerbar > .inner {
    padding: 0.65rem 0.75rem;
  }

  #page-header .navbar .inner {
    padding: 0.3rem 0.75rem 0.5rem;
  }

  #page-header #site-description h1 {
    font-size: 0.74rem;
  }

  #page-body {
    margin-top: 6.85rem;
  }

  .wrap {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .inner {
    padding: 0;
  }

  .forabg {
    padding: 5px 0;
  }

  h2,
  .content h2,
  .panel h2 {
    font-size: 1.03rem;
  }

  .panel,
  .post,
  .forabg,
  .forumbg {
    margin-bottom: 0.55rem;
  }

  p,
  li,
  dd,
  dt,
  .content,
  fieldset {
    font-size: 0.93rem;
  }

  .button,
  a.button1,
  input.button1,
  input.button3,
  a.button2,
  input.button2 {
    font-size: 0.86rem;
    padding: 3px 8px;
  }
}
