/* ==========================================================================
   Hacker Forum Theme — desktop / PC
   Restrained dark terminal aesthetic. Font stack intentionally untouched.
   No gradients, no neon glow, no glassmorphism.
   ========================================================================== */

:root {
  --hk-bg:        #0b0e10;
  --hk-panel:     #12171a;
  --hk-panel-2:   #161c20;
  --hk-panel-3:   #1b2226;
  --hk-head:      #1a2226;
  --hk-line:      #262f34;
  --hk-line-2:    #1e262a;
  --hk-txt:       #b8c2c6;
  --hk-txt-dim:   #718087;
  --hk-txt-hi:    #dfe7e9;
  --hk-accent:    #4a9d7f;
  --hk-accent-hi: #63c39f;
  --hk-accent-dk: #2f6b57;
  --hk-amber:     #b99048;
  --hk-link:      #6fb59a;
  --hk-link-hi:   #93d6b9;
}

html { background: var(--hk-bg); }

body {
  background: var(--hk-bg) !important;
  color: var(--hk-txt) !important;
  min-width: 1000px;
}

a { color: var(--hk-link) !important; }
a:hover { color: var(--hk-link-hi) !important; }

/* ---- top utility bar ---- */
#toptb {
  background: #080a0c !important;
  border-bottom: 1px solid var(--hk-line-2) !important;
  color: var(--hk-txt-dim) !important;
  height: 30px;
}
#toptb a { color: var(--hk-txt-dim) !important; }
#toptb a:hover { color: var(--hk-accent-hi) !important; }

/* ---- header band ---- */
#hd { background: var(--hk-panel) !important; border-bottom: 1px solid var(--hk-line) !important; }
.hdc { padding: 14px 0 !important; }
/* wordmark: replace Killnet logo with KILLNET text, no font-family override */
#hd h2 a { font-size: 0; }
#hd h2 a img.boardlogo { display: none !important; }
#hd h2 a::after {
  content: "KILLNET";
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #dfe7e9;
  text-transform: uppercase;
}
#hd h2 a::after::first-letter { color: #4a9d7f; }
#boardlogo { max-height: 40px; }
/* quick login inputs & labels */
#lsform label, .fastlg_l label { color: var(--hk-txt-dim) !important; }

/* ---- main nav ---- */
#nv {
  background: var(--hk-head) !important;
  background-image: none !important;
  border-bottom: 2px solid var(--hk-accent-dk) !important;
  height: 42px;
}
#nv::before, #nv::after { background: none !important; display: none !important; }
#nv > ul { background-image: none !important; background: transparent !important; }
#nv li { border-radius: 2px !important; }
#nv li a { border-radius: 2px !important; }
#nv li.a { box-shadow: none !important; }
#nv a { color: var(--hk-txt) !important; }
#nv ul li { background: none !important; }
#nv ul li.a, #nv ul li.a a {
  background: var(--hk-accent-dk) !important;
  color: #e7f3ee !important;
}
#nv ul li a span { color: var(--hk-txt-dim) !important; font-size: 11px; }
#qmenu {
  color: var(--hk-txt) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 10px !important;
}
#qmenu:hover { color: var(--hk-accent-hi) !important; }
/* nav quick-search / reply buttons that keep core blue background images */
#nv .y a, #nv a.pn, #scbar_btn.pnc, #scbar_btn {
  background: var(--hk-accent-dk) !important;
  border: 1px solid var(--hk-accent-dk) !important;
  color: #e7f3ee !important;
  border-radius: 2px !important;
}
#scbar_btn strong { color: #e7f3ee !important; }

/* ---- search bar ---- */
#scbar {
  background: var(--hk-panel-2) !important;
  border: 1px solid var(--hk-line) !important;
}
#scbar_txt {
  background: var(--hk-bg) !important;
  color: var(--hk-txt) !important;
  border: 1px solid var(--hk-line) !important;
}
#scbar_btn {
  background: var(--hk-accent-dk) !important;
  border: 1px solid var(--hk-accent-dk) !important;
}
#scbar_btn a, #scbar_btn td a { color: #e7f3ee !important; }
#scbar p, #scbar .scbar_hot { color: var(--hk-txt-dim) !important; }

/* ---- breadcrumb ---- */
#pt { color: var(--hk-txt-dim) !important; }
#pt a { color: var(--hk-link) !important; }
.bm.bm_c { border: 1px solid var(--hk-line) !important; }

/* ---- generic panels ---- */
.bm {
  border: 1px solid var(--hk-line) !important;
  background: var(--hk-panel) !important;
  box-shadow: none !important;
}
.bm_h {
  background: var(--hk-head) !important;
  border-bottom: 1px solid var(--hk-line) !important;
  color: var(--hk-txt-hi) !important;
}
.bm_h h2, .bm_h h3, .bm_h h2 a, .bm_h h3 a { color: var(--hk-txt-hi) !important; }
.bm_c { background: var(--hk-panel) !important; color: var(--hk-txt) !important; }

/* category header bar */
#category_grid h4 {
  background: var(--hk-head) !important;
  color: var(--hk-txt-hi) !important;
  border-bottom: 1px solid var(--hk-line) !important;
}

/* ---- forum list rows ---- */
.fl_tb, .fl_tb td { border-color: var(--hk-line-2) !important; }
.fl_row td { background: var(--hk-panel-2) !important; }
.fl_row:hover td, .fl_tb td.fl_g:hover { background: var(--hk-panel-3) !important; }
.fl_g dt h2 a, .fl_tb td h2 a { color: var(--hk-txt-hi) !important; }
.fl_g dd, .fl_g dd a, .xg2, .xg1 { color: var(--hk-txt-dim) !important; }
.fl_icn svg path, .fl_icn_g svg path { fill: var(--hk-accent) !important; }

/* ---- online members block ---- */
#online { background: var(--hk-panel) !important; }
#online .bm_h { background: var(--hk-head) !important; }
#onlinelist { border-color: var(--hk-line-2) !important; }

/* ---- buttons & inputs ---- */
.pn, .pn post, .btn {
  background: var(--hk-panel-3) !important;
  border: 1px solid var(--hk-line) !important;
  color: var(--hk-txt) !important;
  box-shadow: none !important;
  border-radius: 2px !important;
}
.pn:hover { border-color: var(--hk-accent-dk) !important; color: var(--hk-accent-hi) !important; }
.pnc, .pn.pnc { background: var(--hk-accent-dk) !important; color: #e7f3ee !important; border-color: var(--hk-accent-dk) !important; }
.px, input[type=text], input[type=password], textarea, select {
  background: var(--hk-bg) !important;
  color: var(--hk-txt) !important;
  border: 1px solid var(--hk-line) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}
.px:focus, input:focus, textarea:focus { border-color: var(--hk-accent-dk) !important; }

/* ---- footer ---- */
#ft {
  background: #080a0c !important;
  border-top: 1px solid var(--hk-line) !important;
  color: var(--hk-txt-dim) !important;
}
#ft a { color: var(--hk-txt-dim) !important; }
#ft a:hover { color: var(--hk-accent-hi) !important; }
#ft .pipe { color: #333d42 !important; }

/* ---- misc text utilities ---- */
.xg1, .xg2, .xg0 { color: var(--hk-txt-dim) !important; }
.xi1, .xw1 { color: var(--hk-txt-hi) !important; }
.bbda, .mbm, .mtn { border-color: var(--hk-line-2) !important; }

/* ---- popup menus ---- */
.p_pop, .p_popo {
  background: var(--hk-panel-2) !important;
  border: 1px solid var(--hk-line) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.5) !important;
}
.p_pop li a { color: var(--hk-txt) !important; }
.p_pop li a:hover { background: var(--hk-accent-dk) !important; color: #e7f3ee !important; }

/* ---- pagination ---- */
.pg a, .pg strong, .pg span {
  background: var(--hk-panel-2) !important;
  border: 1px solid var(--hk-line) !important;
  color: var(--hk-txt) !important;
  border-radius: 2px !important;
}
.pg strong { background: var(--hk-accent-dk) !important; color: #e7f3ee !important; }

/* ---- collapsed category strip ---- */
#category_1_img, .tg_no { filter: grayscale(1) brightness(1.6); }

/* ---- search submit buttons (public search / advanced search) ---- */
.schbtn, .pgsbtn, #scform_submit, button.schbtn, .td_srchbtn button {
  background: #2f6b57 !important;
  background-image: none !important;
  border: 1px solid #2f6b57 !important;
  color: #e7f3ee !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}
.schbtn:hover, .pgsbtn:hover, #scform_submit:hover, .td_srchbtn button:hover {
  background: #4a9d7f !important;
  border-color: #4a9d7f !important;
}
.pgsbtn:active, .schbtn:active { box-shadow: none !important; }

/* KILLNET per-forum SVG icons: unify glyph colour to the accent tone */
.kn-forum-icon path { fill: var(--hk-accent) !important; }

/* ===== showmessage / popup notice: kill hardcoded light surfaces ===== */
.tip, #messagetext {
  background: #12171a !important;
  border: 1px solid #2f6b57 !important;
  color: #b8c2c6 !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.5) !important;
}
.tip .tit, .tip dt, .tip dd, #messagetext p { color: #b8c2c6 !important; }
.tip dt.mpt, .tip dt .pxbg { background: #1a2226 !important; }
.tip .close, .tip a { color: #8fc9b2 !important; }
.jump_c, .jump_bdl li, #shortcuttip { background: #12171a !important; color: #b8c2c6 !important; border-color: #262f34 !important; }

/* ===== forms / register / login: kill hardcoded white inputs & notice bars ===== */
.px, .pt, .ps, select, textarea, input[type=text], input[type=password],
input[type=email], input[type=number], input[type=tel], input[type=search] {
  background: #0b0e10 !important;
  color: #cdd6da !important;
  border: 1px solid #2f3a3f !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}
.px:focus, .pt:focus, .ps:focus, select:focus, textarea:focus,
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus {
  border-color: #2f6b57 !important;
}
::placeholder { color: #6f7c82 !important; }
/* inline validation / notice bars on register & post forms */
#regmsg, #registermsg, .reg_alert, .alert_error, .error_msg, .msg_error,
.rfm .p_tip, .p_tip, .fwin .bd, .errorbox, .notice {
  background: #1a2226 !important;
  color: #e0a0a0 !important;
  border: 1px solid #5a3030 !important;
}
/* the three white panels next to the register form (zone/select columns) */
.pg_register .registerbox .area, .pg_register .mli, .registerbox select,
.registerbox .px { background: #0b0e10 !important; color: #cdd6da !important; }

/* search-bar type dropdown ("帖子") + injected language switcher button */
#scbar_type, .scbar_type_td a, #kn-lang-btn, .kn-lang-btn {
  background: #1b2226 !important;
  color: #b8c2c6 !important;
  border: 1px solid #2f3a3f !important;
}
#scbar_type:hover, #kn-lang-btn:hover, .kn-lang-btn:hover { background: #2f6b57 !important; color: #e7f3ee !important; }
/* language dropdown menu (injected) */
.kn-lang-menu, #kn-lang-menu { background: #12171a !important; border: 1px solid #2f6b57 !important; }
.kn-lang-menu a, #kn-lang-menu a { color: #b8c2c6 !important; }
.kn-lang-menu a:hover, #kn-lang-menu a:hover, .kn-lang-menu a.cur, #kn-lang-menu a.cur { background: #2f6b57 !important; color: #e7f3ee !important; }
/* small language badge at very top-right of header */
.pg_register #kn-lang-btn, #kn-lang-btn { padding: 2px 8px !important; }
/* desktop i18n switch injected into header (hardcoded #FBF5E4 / #EE831F) */
#i18n-switch, #i18n-switch:hover {
  background: #1b2226 !important;
  border: 1px solid #2f3a3f !important;
  color: #8fc9b2 !important;
  box-shadow: none !important;
}
#i18n-switch_menu {
  background: #12171a !important;
  border: 1px solid #2f3a3f !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.45) !important;
}
#i18n-switch_menu a, #i18n-switch_menu a.xi2 { color: #b8c2c6 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; }
#i18n-switch_menu a:hover { background: #1e2c2a !important; color: #8fc9b2 !important; }

/* ===== search page: force dark input surface (was transparent over white) ===== */
#scform_srchtxt, .td_srchtxt, .td_srchtxt input {
  background: #0b0e10 !important;
  color: #cdd6da !important;
  border: 1px solid #2f6b57 !important;
  outline: none !important;
}
#scform_srchtxt::placeholder { color: #6f7c82 !important; }
#scform_submit, #scform_submit:hover { background: #2f6b57 !important; color: #e7f3ee !important; }
#scform_tb .a, #scform_tb a { color: #8fc9b2 !important; }
#scform_tb .a::before { border-bottom-color: #2f6b57 !important; }
#quick_sch_menu, .p_pop { background: #12171a !important; border-color: #2f6b57 !important; }
#quick_sch_menu a, .p_pop a { color: #b8c2c6 !important; }

/* ===== KILLNET: AJAX popup shells (login / lost password / dialog) ===== */
.fwinmask, #fwin_dialog, #fwin_login { background: rgba(0,0,0,.55) !important; }
.fwinmask table.fwin, .fwin, .fwin td { background: #12171a !important; }
.fwin .m_c, td.m_c, .m_c { background: #12171a !important; color: #b8c2c6 !important; }
.m_c .o, .m_c .fsb, .m_c .bp { background: #1a2226 !important; border-color: #2f3a3f !important; }
.m_c .flb, h3.flb, .flb { background: #1a2226 !important; border-bottom: 1px solid #2f3a3f !important; }
.flb em, .flb span, .flb span a, .flb strong { color: #b8c2c6 !important; }
.flb em { color: #8fc9b2 !important; }
.flbc { background: #2f3a3f !important; }
.flbc:before { color: #cdd6da !important; }
.fwinmask .bm, .fwin .bm, .bm { background: #12171a !important; border-color: #2f3a3f !important; }
.fwinmask .bm_h, .fwin .bm_h, .bm_h { background: #1a2226 !important; border-color: #2f3a3f !important; color: #b8c2c6 !important; }
.fwinmask .bm_c, .fwin .bm_c, .bm_c { background: #12171a !important; color: #b8c2c6 !important; }
.fwinmask .rfm, .fwin .rfm, .rfm table, .rfm td, .rfm th { background: #12171a !important; color: #b8c2c6 !important; }
.fwinmask input, .fwin input, .fwinmask select, .fwin select { background: #0b0e10 !important; color: #cdd6da !important; border-color: #2f3a3f !important; }
.fwinmask a, .fwin a, .fwinmask .xi2, .fwin .xi2 { color: #8fc9b2 !important; }
.c.altw, .f_c.altw, .altw { background: #12171a !important; color: #b8c2c6 !important; }
.alert_error, .alert_right, .alert_info { background: #1a2226 !important; color: #e0a0a0 !important; border-color: #5a3030 !important; }

/* ===== KILLNET: home/space, user-group and search light surfaces (mobile screenshots) ===== */
/* search result notice bar: <div class="sttl mbn"> grey-white */
.sttl, .sttl.mbn, .searchresult .sttl, #searchresult .sttl, .bm .sttl {
  background: #12171a !important; color: #b8c2c6 !important;
  border-bottom: 1px solid #262f34 !important;
}
.sttl h2, .sttl em, .sttl span { color: #8fc9b2 !important; }

/* space / profile card (admin's Posts, KILLNET's Posts) */
#space_card, .space_card, .card, #space, .hm, .space .hm,
.spacecp .bm, #ct .bm, #ct2 .bm, #ct2_a .bm, .mn .bm, .appl .bm {
  background: #12171a !important; color: #b8c2c6 !important;
  border-color: #262f34 !important;
}
/* the pale user info band under the avatar */
.space_card .bm_c, .hm .bm_c, #space_card .bm_c, .userinfo, .uinfo,
.profile_card, .space_info, .spacecp .bm_c, #ct .bm_c {
  background: #12171a !important; color: #b8c2c6 !important;
}

/* tab bars: Topic|Profile, Topic|Reply|Comment, My User Groups|... */
.tb, .tb li, .tb a, .tb .a a, .tb .current a,
.tbn, .tbn li, .tbn li.a, .tbs, .tbs li, .tbs a,
.tabs, .tabs li, .tab, .tab a,
#tab_ul li, #tab_ul a, .space_tab, .space_tab a {
  background: #1a2226 !important; color: #b8c2c6 !important;
  border-color: #2f3a3f !important;
}
.tb .a a, .tb .current a, .tbn li.a, .tabs li.a, .tab.cur, .tab .cur {
  background: #2f6b57 !important; color: #e6f2ec !important;
}
.tb a:hover, .tbn a:hover, .tabs a:hover, .tab a:hover { color: #8fc9b2 !important; }

/* permission / data tables: white zebra rows + orange header (User Groups) */
table.list, table.list th, table.list td,
.list table, .bm_c table, #ct table, .spacecp table {
  background: #12171a !important; color: #b8c2c6 !important;
  border-color: #262f34 !important;
}
table.list tr, table.list tr.alt, table.list tr.altw,
.list tr, .list tr.alt, .list tr.altw,
table tr.alt, table tr.altw, .bm_c tr, .bm_c td {
  background: #12171a !important; color: #b8c2c6 !important;
}
table.list th, table.list thead, table.list .th, .list th {
  background: #1a2226 !important; color: #8fc9b2 !important;
}
/* orange primary-group header cell -> accent */
.orange, .usergroup .orange, td.orange, .grouptable .orange,
[style*="background-color: #FF"], [style*="background:#FF"],
[style*="background-color:#FF"] {
  background: #2f6b57 !important; color: #e6f2ec !important;
}

/* side menu (spacecp left nav) pale blue-white */
.side, .side .bm, .side a, .side li, .side dl, .side dt, .side dd,
.appl, .appl a, #ct .side, .ct2_a .side, .ct1 .side {
  background: #12171a !important; color: #b8c2c6 !important;
  border-color: #262f34 !important;
}
.side a:hover, .appl a:hover { color: #8fc9b2 !important; }
.side .current, .side a.current, .side li.a, .appl .current {
  background: #1a2226 !important; color: #8fc9b2 !important;
}
/* generic panels that still ship a white frame on these pages */
.frame, .frame-tab, .umn .umh_cb, .f_c {
  background: #12171a !important; color: #b8c2c6 !important;
  border-color: #262f34 !important;
}

/* ===== KILLNET v1.3: spacecp user-group permission tables (hard dark override) =====
   These target the exact selectors shipped by style_1_home_spacecp.css which are
   compiled-time hardcoded light colors (#FFF2DF/#FAEDDA/#F60/#FFF) that the
   earlier generic rules (table.list) never matched. High specificity + !important. */
body.pg_spacecp .tdats,
body.pg_spacecp .tdats table,
body.pg_spacecp .tdat,
body.pg_spacecp .tfx,
body.pg_spacecp .tfxf,
body.pg_spacecp .tscr { background: #0b0e10 !important; }

/* base cells: white borders -> dark, light text -> readable grey */
body.pg_spacecp .tdats th,
body.pg_spacecp .tdats td,
body.pg_spacecp .tdat th,
body.pg_spacecp .tdat td { border-color: #262f34 !important; color: #b8c2c6 !important; background: #12171a !important; }

/* the two cream columns: .tfx th/td (#FFF2DF) and .tfx .alt (#FAEDDA) */
body.pg_spacecp .tfx th,
body.pg_spacecp .tfx td,
body.pg_spacecp .tfx .alt,
body.pg_spacecp .tfx .alt th,
body.pg_spacecp .tfx .alt td { background: #12171a !important; color: #b8c2c6 !important; border-color: #262f34 !important; }

/* orange column-title bar h4 (#F60) and grey gradient .h th */
body.pg_spacecp .tdats .c0 h4,
body.pg_spacecp .tdats .h th,
body.pg_spacecp .tfx .h th,
body.pg_spacecp .tscr .h th { background: #2f6b57 !important; color: #e6f2ec !important; border-color: #262f34 !important; }

/* zebra .alt rows anywhere in spacecp tables */
body.pg_spacecp .tdats .alt,
body.pg_spacecp .tdats .alt th,
body.pg_spacecp .tdats .alt td,
body.pg_spacecp .tscr .alt,
body.pg_spacecp .tscr .alt th,
body.pg_spacecp .tscr .alt td { background: #1a2226 !important; color: #b8c2c6 !important; }

/* colored tab bars .tb li / c0 h4 and the c1..c4 group tabs */
body.pg_spacecp .tdats .tb,
body.pg_spacecp .tdats .tb li,
body.pg_spacecp .tdats .tb a { background: #1a2226 !important; color: #b8c2c6 !important; border-color: #2f3a3f !important; }
body.pg_spacecp .tdats .tb .a,
body.pg_spacecp .tdats .tb li.a,
body.pg_spacecp .tdats #c1, body.pg_spacecp .tdats #c2,
body.pg_spacecp .tdats #c3, body.pg_spacecp .tdats #c4 { background: #2f6b57 !important; color: #e6f2ec !important; }

/* generic light panels inside user center */
body.pg_spacecp .p_tbl table td,
body.pg_spacecp .exfm,
body.pg_spacecp .bm, body.pg_spacecp .bm_c,
body.pg_spacecp .bm_h, body.pg_spacecp .tbmu,
body.pg_spacecp .notice, body.pg_spacecp .emp { background: #12171a !important; color: #b8c2c6 !important; border-color: #262f34 !important; }

/* valid / invalid permission icons remain colored but readable */
body.pg_spacecp .fc-v { color: #4a9d7f !important; }
body.pg_spacecp .fc-i { color: #b8605f !important; }

/* ============================================================
   KN fix: post author card (.pls/.favatar) readability on dark
   The stock .pls card is light (#E5EDF2). Username links (.xw1/.xi2)
   were forced to a light color by the theme, so on the light card
   they were invisible. Make the whole card dark + names accent.
   ============================================================ */
body.pg_viewthread .pls,
body.pg_viewthread .pls.cl.favatar,
body.pg_viewthread #favatar,
body.pg_viewthread .pls .favatar {
  background: #12171a !important;
  border-color: #262f34 !important;
  color: #b8c2c6 !important;
}
body.pg_viewthread .pls .authi a,
body.pg_viewthread .pls .authi a.xw1,
body.pg_viewthread .pls strong a,
body.pg_viewthread .pls strong a.xi2,
body.pg_viewthread .pls .authi .xw1 {
  color: #63c39f !important;
  font-weight: 700 !important;
  display: inline !important;
  visibility: visible !important;
}
body.pg_viewthread .pls .avatar img { background: #0b0e10 !important; border: 1px solid #2f3a3f !important; }
body.pg_viewthread .pls p em,
body.pg_viewthread .pls dt em { color: #b8c2c6 !important; }
/* KN fix: level-up progress bar inside author card */
.pls .pbg, .pls .pbg2, .pls span[id^="upgradeprogress"] {
  background: #1a2226 !important;
  border: 1px solid #2f3a3f !important;
}
.pls .pbg2 img, .pls span[id^="upgradeprogress"] img { opacity: 0.85 !important; }
/* KN fix: progress fill pbr2 - keep track dark, fill accent */
.pls .pbr2, .pls .pbg2 .pbr2, .pls span[id^="upgradeprogress"] .pbr2 {
  background: #4a9d7f !important;
  height: 6px !important;
  display: block !important;
}
