
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap);

:root{
--rail:#1e1f22;
--side:#2b2d31;
--chat:#313338;
--hover:rgba(78,80,88,.35);
--active:rgba(78,80,88,.6);
--card:#2b2d31;
--float:#111214;
--input:#383a40;
--panel:#232428;
--line:rgba(255,255,255,.06);
--text:#f2f3f5;
--text1:#dbdee1;
--text2:#b5bac1;
--text3:#949ba4;
--link:#00a8fc;
--blurple:#5865f2;
--blurple-h:#4752c4;
--green:#23a55a;
--yellow:#f0b232;
--red:#f23f43;
--rail-w:72px;
--side-w:240px;
--top-h:48px;
}
html.light{
--rail:#e3e5e8;
--side:#f2f3f5;
--chat:#ffffff;
--hover:rgba(6,6,7,.06);
--active:rgba(6,6,7,.1);
--card:#ffffff;
--float:#ffffff;
--input:#ebedef;
--panel:#ebedef;
--line:rgba(6,6,7,.08);
--text:#060607;
--text1:#313338;
--text2:#4e5058;
--text3:#5c5e66;
--link:#006ce7;
--green:#1a6334;
--yellow:#a35200;
--red:#d83c3e;
}

*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--chat);color:var(--text1);font:16px/1.45 "gg sans","Inter",-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;transition:background-color .2s ease,color .2s ease}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;border:0}
svg{flex:none}
h1,h2,h3,h4{margin:0;color:var(--text)}
::selection{background:rgba(88,101,242,.4)}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:var(--float);border-radius:4px}
html.light ::-webkit-scrollbar-thumb{background:#c4c9ce}
::-webkit-scrollbar-track{background:transparent}
table{border-collapse:collapse}
#container{width:auto;max-width:none;margin:0;padding:0;background:transparent;border:none}

/* ================= APP SHELL ================= */
#app{display:flex;height:100vh;overflow:hidden}
#sb-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:70;opacity:0;pointer-events:none;transition:opacity .2s}
body.sb-open #sb-overlay{opacity:1;pointer-events:auto}

/* ---- Rail ---- */
#rail{flex:0 0 var(--rail-w);width:var(--rail-w);background:var(--rail);padding:12px 0;display:flex;flex-direction:column;align-items:center;gap:8px;overflow-y:auto;scrollbar-width:none}
#rail::-webkit-scrollbar{display:none}
.rail-item{position:relative;width:48px;height:48px;border-radius:50%;background:var(--side);color:var(--text1);display:flex;align-items:center;justify-content:center;transition:border-radius .15s,background .15s,color .15s;flex:none}
.rail-item svg{width:24px;height:24px}
.rail-item:hover{border-radius:16px;background:var(--blurple);color:#fff;text-decoration:none}
.rail-item.active{border-radius:16px;background:var(--blurple);color:#fff}
.rail-item.active::before,.rail-item:hover::before{content:"";position:absolute;left:-12px;top:50%;transform:translateY(-50%);width:4px;height:20px;background:#fff;border-radius:0 4px 4px 0;transition:height .15s}
.rail-item:hover::before{height:32px}
.rail-sep{width:32px;height:2px;background:var(--line);border-radius:1px;flex:none}
.rail-add{color:var(--green)}
.rail-add:hover{background:var(--green);color:#fff}
.rail-help{color:var(--text3);margin-top:auto}
.rail-help:hover{background:var(--green);color:#fff}
.rail-item::after{content:attr(data-tip);position:absolute;left:calc(100% + 14px);top:50%;transform:translateY(-50%) scale(.9);background:var(--float);color:var(--text);padding:8px 12px;border-radius:8px;font-size:14px;font-weight:600;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .1s,transform .1s;z-index:90;box-shadow:0 8px 16px rgba(0,0,0,.35)}
.rail-item:hover::after{opacity:1;transform:translateY(-50%) scale(1)}

/* ---- Sidebar ---- */
#sidebar{flex:0 0 var(--side-w);width:var(--side-w);background:var(--side);display:flex;flex-direction:column;min-height:0;z-index:80}
#server-header{height:var(--top-h);display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px 0 16px;font-weight:700;font-size:16px;color:var(--text);box-shadow:0 1px 0 rgba(0,0,0,.2);cursor:pointer;flex:none;white-space:nowrap;overflow:hidden}
#server-header:hover{background:var(--hover)}
#server-header svg{width:18px;height:18px;color:var(--text3);flex:none}
#sidebar-scroll{flex:1;overflow-y:auto;padding:8px;min-height:0}
.sb-section{margin-bottom:16px}
.sb-title{display:flex;align-items:center;font-size:12px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--text3);padding:0 8px 4px;margin:0}
.sb-plus{margin-left:auto;font-weight:400;font-size:16px;color:var(--text3);cursor:pointer}
.chan{display:flex;align-items:center;gap:8px;padding:6px 8px;margin:1px 0;border-radius:4px;color:var(--text3);font-weight:500;font-size:16px;position:relative}
.chan:hover{background:var(--hover);color:var(--text2);text-decoration:none}
.chan.active{background:var(--active);color:var(--text)}
.chan.active::before{content:"";position:absolute;left:-8px;top:50%;transform:translateY(-50%);width:4px;height:24px;background:#fff;border-radius:0 4px 4px 0}
.cico{width:20px;height:20px;flex:none;display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:var(--text3);font-size:18px}
.chan:hover .cico,.chan.active .cico{color:var(--text2)}
.cico svg{width:18px;height:18px}
.vc-count{margin-left:auto;font-size:12px;font-weight:600;color:var(--text3)}
.vc-members{margin:0 0 4px 28px;display:flex;flex-direction:column;gap:1px}
.vc-member{display:flex;align-items:center;gap:8px;padding:2px 8px;color:var(--text3);font-size:14px;font-weight:500;border-radius:4px}
.vc-member:hover{background:var(--hover);color:var(--text2)}
.dot{width:8px;height:8px;border-radius:50%;flex:none}
.dot.g{background:var(--green)}
.dot.y{background:var(--yellow)}
.dot.r{background:var(--red)}
.member-row{display:flex;align-items:center;gap:8px;padding:4px 8px;border-radius:4px;color:var(--text3);font-weight:500;font-size:14px}
.member-row:hover{background:var(--hover);color:var(--text2);text-decoration:none}
.m-av{width:24px;height:24px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:#fff}
.m-av.b{background:var(--blurple)}
.m-av.gr{background:var(--green)}
.m-av.y{background:var(--yellow)}
.m-av.rd{background:var(--red)}
.offline-sep{height:1px;background:var(--line);margin:12px 8px}

/* ---- User panel ---- */
#user-panel{height:52px;background:var(--panel);display:flex;align-items:center;padding:0 8px;gap:8px;flex:none}
.up-av{width:32px;height:32px;border-radius:50%;background:var(--blurple);color:#fff;display:flex;align-items:center;justify-content:center;flex:none;overflow:hidden}
.up-av svg{width:20px;height:20px}
.up-meta{flex:1;min-width:0;line-height:1.25}
.up-meta strong{display:block;font-size:14px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.up-meta span{font-size:12px;color:var(--text3)}
.up-icons{display:flex;gap:2px}
.up-icons a{width:28px;height:28px;border-radius:4px;display:flex;align-items:center;justify-content:center;color:var(--text2)}
.up-icons a:hover{background:var(--hover);color:var(--text1);text-decoration:none}
.up-icons svg{width:18px;height:18px}
#theme-toggle{background:transparent;border:none;color:var(--text2);width:28px;height:28px;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
#theme-toggle:hover{background:var(--hover);color:var(--text1)}
#theme-toggle svg{width:18px;height:18px}

/* ---- Main ---- */
#main{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--chat);min-height:0}
#channel-top{height:var(--top-h);flex:none;display:flex;align-items:center;gap:8px;padding:0 16px;box-shadow:0 1px 0 rgba(0,0,0,.2);z-index:5}
#burger{display:none;width:32px;height:32px;border:none;background:transparent;color:var(--text3);align-items:center;justify-content:center;cursor:pointer;border-radius:4px;padding:0}
#burger:hover{background:var(--hover)}
#burger svg{width:22px;height:22px}
.ct-hash{color:var(--text3);font-size:20px;font-weight:700}
.ct-name{font-weight:700;color:var(--text);font-size:16px}
.ct-desc{margin-left:8px;padding-left:12px;border-left:1px solid var(--line);color:var(--text3);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-tools{margin-left:auto;display:flex;align-items:center;gap:14px}
.ct-tools a{color:var(--text3);display:flex}
.ct-tools a:hover{color:var(--text2);text-decoration:none}
.ct-tools svg{width:22px;height:22px}
.ct-search{display:flex;align-items:center;gap:6px;background:var(--input);border-radius:4px;padding:0 8px;height:26px}
.ct-search input{background:transparent;border:none;outline:none;color:var(--text1);font-size:13px;width:110px}
.ct-search input::placeholder{color:var(--text3)}
.ct-search svg{width:14px;height:14px;color:var(--text3)}
#main-scroll{flex:1;overflow-y:auto;padding:16px;min-height:0}
.navigation{padding:0 0 8px;font-size:12px;color:var(--text3)}
.navigation a{color:var(--text3)}
.navigation a:hover{color:var(--text2)}
.navigation .active{color:var(--text2)}

/* ---- Alerts ---- */
.pm_alert,.red_alert,.banned_warning{background:var(--card);border-radius:8px;padding:12px 16px;margin-bottom:16px;color:var(--text1);border-left:4px solid var(--blurple)}
.red_alert{border-left-color:var(--red)}

/* ---- Hero ---- */
.hero{background:linear-gradient(135deg,var(--blurple),#8066f0);border-radius:8px;padding:32px;color:#fff;margin-bottom:24px}
.hero h2{color:#fff;font-size:26px;font-weight:800;margin-bottom:8px}
.hero p{margin:0 0 18px;color:rgba(255,255,255,.85);max-width:560px}
.btn-white{background:#fff;color:var(--blurple);font-weight:600;font-size:14px;padding:10px 16px;border-radius:4px;display:inline-flex;align-items:center;gap:8px;transition:box-shadow .15s}
.btn-white:hover{text-decoration:none;box-shadow:0 8px 16px rgba(0,0,0,.2);color:var(--blurple)}
.btn-ghost{background:rgba(255,255,255,.15);color:#fff;font-weight:600;font-size:14px;padding:10px 16px;border-radius:4px;display:inline-flex;align-items:center;gap:8px;margin-left:8px}
.btn-ghost:hover{background:rgba(255,255,255,.25);text-decoration:none;color:#fff}

/* ---- Categories ---- */
.dcat{margin-bottom:24px}
.dcat-h{display:flex;align-items:center;gap:8px;padding:8px 4px;color:var(--text);font-weight:700;font-size:16px}
.dcat-h .dhash{color:var(--text3);display:flex}
.dcat-h .dhash svg{width:22px;height:22px}
.dcat-h small{color:var(--text3);font-weight:500;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.expcolimage{margin-left:auto;flex:none}
.expcolimage img{filter:invert(.7);cursor:pointer}
html.light .expcolimage img{filter:none}
.dcat-body{display:flex;flex-direction:column;gap:8px}

/* ---- Forum rows ---- */
.frow{display:flex;align-items:center;gap:12px;background:var(--card);border-radius:8px;padding:12px 16px;transition:background .1s,box-shadow .1s}
.frow:hover{background:var(--hover);box-shadow:0 4px 12px rgba(0,0,0,.15)}
html.light .frow{box-shadow:0 1px 0 rgba(6,6,7,.04)}
html.light .frow:hover{box-shadow:0 4px 12px rgba(6,6,7,.1)}
.frow-icon{width:48px;height:48px;border-radius:50%;background:var(--input);display:flex;align-items:center;justify-content:center;color:var(--text2);flex:none;transition:border-radius .15s,background .15s,color .15s}
.frow:hover .frow-icon{background:var(--blurple);color:#fff;border-radius:16px}
.frow-icon svg{width:22px;height:22px}
.frow-main{flex:1;min-width:0}
.frow-name{font-weight:600;color:var(--text);font-size:16px}
.frow-name:hover{color:var(--link)}
.frow-desc{color:var(--text3);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.frow-desc .smalltext{display:block;white-space:normal;margin-top:2px}
.frow-last{width:220px;flex:none;color:var(--text3);font-size:13px;line-height:1.4;overflow:hidden}
.frow-last a{color:var(--text2);font-weight:600;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.frow-last a:hover{color:var(--text)}
.frow-stat{width:90px;flex:none;text-align:right;font-size:13px;color:var(--text3)}
.frow-stat b{display:block;color:var(--text);font-size:15px}

/* ---- Board stats ---- */
.bstats{background:var(--card);border-radius:8px;padding:16px;margin-bottom:24px}
.bstats-h{font-size:12px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--text3);margin-bottom:12px}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin-bottom:12px}
.stat{background:var(--chat);padding:12px;border-radius:6px}
.stat b{font-size:20px;color:var(--text)}
.stat b a{color:var(--text)}
.stat span{display:block;font-size:12px;color:var(--text3);text-transform:uppercase;letter-spacing:.03em;margin-top:2px}
.wol{background:var(--chat);border-radius:6px;padding:12px;color:var(--text3);font-size:14px}
.wol-row{padding:8px 0;border-bottom:1px solid var(--line);color:var(--text3);font-size:14px}
.wol-row:last-child{border-bottom:none;padding-bottom:0}
.wol-row a{color:var(--text2)}
.wol-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.wol-head strong{color:var(--text)}
.wol-note{display:block;margin-top:2px}
.wol-foot{display:flex;gap:12px}
.wol-foot:empty{display:none}
.wol-body:empty{display:none}

/* ================= GENERIC MYBB RESTYLE ================= */
.tborder{background:transparent;border:none;box-shadow:none}
table.tborder{width:100%}
.thead{background:transparent;color:var(--text);font-weight:700;font-size:15px;padding:12px 16px;border-bottom:1px solid var(--line)}
.thead a{color:var(--text)}
.tcat{background:transparent;color:var(--text3);font-size:12px;text-transform:uppercase;letter-spacing:.04em;font-weight:700;padding:10px 16px;border-bottom:1px solid var(--line)}
.tcat a{color:var(--text3)}
.trow1,.trow2{background:var(--card);border-bottom:1px solid var(--line);color:var(--text1)}
.trow_shaded{background:rgba(242,63,67,.08)}
.trow_selected td{background:rgba(88,101,242,.15)}
.trow_sep{background:var(--side);color:var(--text3);font-size:12px;text-transform:uppercase;letter-spacing:.04em;padding:8px 16px}
.tfoot{background:transparent;border-top:1px solid var(--line);padding:10px 16px}
.tfoot a{color:var(--text2)}
.smalltext{font-size:13px;color:var(--text3)}
#posts .tborder{background:var(--card);border-radius:8px;margin-bottom:12px;overflow:hidden}
.postbit_buttons a{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:4px;color:var(--text3);background:transparent;font-size:12px;margin-left:2px}
.postbit_buttons a:hover{background:var(--hover);color:var(--text);text-decoration:none}
blockquote{background:var(--float);border-left:4px solid #4e5058;margin:8px 0;padding:8px 12px;border-radius:4px;color:var(--text2)}
html.light blockquote{background:#f2f3f5}
.codeblock{background:var(--float);border:none;border-radius:4px;padding:8px 12px;color:var(--text1);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;overflow:auto}
html.light .codeblock{background:#f2f3f5;color:#313338}
input.button,button.button,a.button{background:var(--blurple);color:#fff;border:none;border-radius:4px;padding:8px 16px;font:600 14px "Inter",-apple-system,sans-serif;cursor:pointer;transition:background .15s}
input.button:hover,button.button:hover,a.button:hover{background:var(--blurple-h);text-decoration:none;color:#fff}
input.textbox,textarea,select{background:var(--input);border:1px solid transparent;border-radius:4px;color:var(--text1);padding:8px 10px;font:inherit;font-size:14px;outline:none}
input.textbox:focus,textarea:focus{border-color:var(--blurple)}
input.checkbox,input.radio{accent-color:var(--blurple)}
.pagination{display:flex;gap:4px;justify-content:center;flex-wrap:wrap;padding:16px 0}
.pagination a,.pagination .pagination_current{min-width:28px;height:28px;padding:4px 10px;border-radius:6px;color:var(--text2);font-size:14px;display:inline-flex;align-items:center;justify-content:center;background:transparent}
.pagination .pagination_current{background:var(--blurple);color:#fff;font-weight:600}
.pagination a:hover{background:var(--hover);text-decoration:none}
.popup_menu{background:var(--float);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 16px rgba(0,0,0,.3);padding:6px}
.popup_menu .popup_item{background:transparent;color:var(--text2);border-radius:4px;padding:8px 12px;font-size:14px}
.popup_menu .popup_item:hover{background:var(--blurple);color:#fff}
.modal{background:var(--card);border-radius:8px;color:var(--text1);border:1px solid var(--line)}
.footer-note{text-align:center;color:var(--text3);font-size:12px;padding:12px 0 0}
.footer-note a{color:var(--text3)}
.scaleimages img{border-radius:4px}

/* ================= RESPONSIVE ================= */
@media (max-width:1150px){
.frow-last{display:none}
}
@media (max-width:1024px){
#rail{display:none}
#sidebar{position:fixed;left:0;top:0;bottom:0;z-index:80;transform:translateX(-100%);transition:transform .2s;box-shadow:0 0 32px rgba(0,0,0,.5)}
body.sb-open #sidebar{transform:none}
#burger{display:flex}
.ct-desc{display:none}
}
@media (max-width:640px){
#main-scroll{padding:12px}
.frow{padding:10px 12px;gap:10px}
.frow-icon{width:40px;height:40px}
.frow-stat{display:none}
.hero{padding:20px}
.hero h2{font-size:20px}
.stat-grid{grid-template-columns:repeat(2,1fr)}
.ct-search{display:none}
}

