/*
 * Northfire modern theme
 * Built by Kyle Bargman
 * Keeps the original look (black, flame logo centered in a split menu,
 * dark red accents) with a responsive, readable layout.
 */

:root{
	--bg:            #0d0d0d;
	--bg-band:       #151515;
	--surface:       #141414;
	--surface-2:     #1b1b1b;
	--border:        #262626;
	--border-strong: #333333;
	--text:          #d6d6d6;
	--text-strong:   #f2f2f2;
	--muted:         #8a8a8a;
	--accent:        #5a0000;	/* original Northfire red */
	--accent-2:      #8f1010;
	--accent-hot:    #c0281c;
	--flame:         linear-gradient(90deg, transparent, #8f1010 15%, #e0461c 40%, #ffae2b 50%, #e0461c 60%, #8f1010 85%, transparent);
	--radius:        8px;
	--shadow:        0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35);
	--max:           1080px;
}

*,*::before,*::after{ box-sizing:border-box; }

html{ -webkit-text-size-adjust:100%; }

body{
	margin:0;
	background:
		radial-gradient(1200px 400px at 50% -120px, rgba(143,16,16,.18), transparent 70%),
		var(--bg);
	color:var(--text);
	font:15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Verdana, sans-serif;
	min-height:100vh;
}

a, a:link, a:visited{ color:#c9c9c9; text-decoration:none; }
a:hover, a:active{ color:#fff; }
.content a, .content a:link, .content a:visited{ color:#e8a87c; }
.content a:hover{ color:#ffd0a8; text-decoration:underline; }
a.light, a.light:link, a.light:visited{ color:var(--text-strong); }
a.light:hover{ color:var(--muted); }

img{ max-width:100%; height:auto; }

/* ---------- Header ---------- */
/* The logo image has the original menu band and red breadcrumb bar baked in,
   so the header uses the original stripe1.gif and keeps the 135px geometry. */

.site-header{
	position:relative;
	background:#181818 url('/images/stripe1.gif') repeat-x top;
}
.site-header::after{
	content:"";
	position:absolute; left:0; right:0; bottom:-1px;
	height:2px;
	background:var(--flame);
	opacity:.85;
}

.header-inner{
	max-width:var(--max);
	margin:0 auto;
	padding:0 20px;
	display:grid;
	grid-template-columns:1fr 203px 1fr;
	align-items:start;
	column-gap:12px;
	height:135px;
}

.logo{ display:block; line-height:0; }
.logo img{ display:block; width:203px; height:135px; }

.nav{
	display:flex;
	gap:2px;
	margin-top:88px;
	height:26px;
	align-items:center;
}
.nav-left { justify-content:flex-end; }
.nav-right{ justify-content:flex-start; }

.nav a, .nav a:link, .nav a:visited{
	position:relative;
	padding:4px 14px;
	border-radius:5px;
	color:#cfcfcf;
	font-size:14px;
	font-weight:600;
	letter-spacing:.02em;
	transition:background .15s;
}
.nav a:hover{ background:#2a2a2a; color:#fff; }
.nav a.active, .nav a:hover{ color:#fff; }
.nav a.active::after{
	content:"";
	position:absolute; left:14px; right:14px; bottom:-1px;
	height:2px; border-radius:2px;
	background:var(--accent-hot);
}

/* sits on the red bar in the logo image (y 119-135) */
.breadcrumb{
	position:absolute;
	top:119px; left:50%;
	transform:translateX(-50%);
	min-width:156px;
	height:16px;
	padding:0 10px;
	background:var(--accent);
	font-size:11px;
	line-height:16px;
	color:#f0d6d6;
	text-align:center;
	white-space:nowrap;
}
.breadcrumb .sep{ opacity:.6; margin:0 6px; }

/* ---------- Layout ---------- */

.container{
	max-width:var(--max);
	margin:0 auto;
	padding:0 20px;
}

main.container{ padding-top:28px; padding-bottom:40px; }

.notice{
	background:linear-gradient(180deg, var(--surface-2), var(--surface));
	border:1px solid var(--border);
	border-left:3px solid var(--accent-hot);
	border-radius:var(--radius);
	padding:14px 18px;
	font-size:16px;
	color:var(--text-strong);
	text-align:center;
	box-shadow:var(--shadow);
}
.notice strong{ color:#ffb38a; font-weight:600; }

.banner{ text-align:center; margin:22px 0 6px; }
.banner img{ border-radius:6px; box-shadow:0 6px 20px rgba(0,0,0,.5); }

/* Page content: the .inc pages use fixed-width .column blocks; make them fluid */
.content{
	display:flex;
	flex-wrap:wrap;
	gap:24px;
	margin-top:24px;
	align-items:flex-start;
}
.content > .column,
.content > .code,
.content > div:not(.barrier){
	flex:1 1 380px;
	min-width:0;
	width:auto !important;
	float:none;
	padding:22px 24px;
	background:var(--surface);
	border:1px solid var(--border);
	border-radius:var(--radius);
	box-shadow:var(--shadow);
}
.content > .column:only-of-type,
.content > [style*="765"]{ flex-basis:100%; }
.content > p, .content > h4, .content > br{ flex-basis:100%; margin:0; }
.content > br{ display:none; }
.content .column .column{ width:auto !important; float:none; padding:0; }
.content div[style*="width"]{ width:auto !important; max-width:100%; }
.content .barrier{ display:none; }

/* Text styles used throughout the .inc pages */
.column_header, .head{
	font-size:20px;
	font-weight:700;
	color:var(--text-strong);
	margin:0 0 2px;
	letter-spacing:.01em;
}
.column_subheader{
	font-size:12px;
	color:var(--muted);
	margin:0 0 12px;
}
.large{ font-size:17px; font-weight:600; color:var(--text-strong); }
.dark{ color:var(--muted); }
.seperator{ height:1px; background:var(--border); margin:20px 0; border:0; }

dl{ margin:0 0 18px; }
dt{ font-weight:600; color:var(--text-strong); margin-bottom:4px; }
dd{ margin:0 0 4px 0; padding-left:14px; border-left:2px solid var(--border-strong); }
ul{ padding-left:20px; }
li{ margin:3px 0; }

pre, .code pre{
	background:#0a0a0a;
	border:1px solid var(--border);
	border-radius:6px;
	padding:16px;
	overflow-x:auto;
	font:13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color:#e7c7a0;
	text-align:left;
}

/* News items (from forums/news.php) */
.content .column .large{ margin-bottom:2px; }
.content .column .large + .column_subheader{ margin-bottom:8px; }

/* ---------- Screenshots ---------- */

.box_column{ width:100% !important; float:none; }
.box{
	background:var(--surface-2);
	border:1px solid var(--border);
	border-radius:6px;
	padding:6px 10px;
	text-align:center;
	margin:0;
}
#ss_box{
	height:auto !important;
	aspect-ratio:16/10;   /* Built by Kyle Bargman: matches the Northfire 1.0 screenshots */
	padding:0;
	overflow:hidden;
	background:#0a0a0a url('/images/loading.gif') center no-repeat;
}
#ss_img{
	width:100%; height:100%;
	background-size:cover;
	background-position:center top;
	cursor:zoom-in;
	transition:opacity .2s;
}
.ss_buttons{ display:flex; gap:6px; margin-top:10px; }
.ss_button{
	flex:1;
	padding:5px 0;
	text-align:center;
	border-radius:5px;
	background:var(--surface-2);
	border:1px solid var(--border);
	cursor:pointer;
	font-size:13px;
	transition:background .15s, border-color .15s;
}
.ss_button:hover{ background:#262626; }
.ss_button.active{ background:var(--accent); border-color:var(--accent-2); color:#fff; }

/* ---------- Lower band: contact + staff ---------- */

.lower{
	background:var(--bg-band);
	border-top:1px solid var(--border);
	padding:40px 0;
}
.lower .container{
	display:grid;
	grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);
	gap:24px;
}
.card{
	background:var(--surface);
	border:1px solid var(--border);
	border-radius:var(--radius);
	padding:22px 24px;
	box-shadow:var(--shadow);
}

.field{ margin-bottom:14px; }
.field label{ display:block; font-size:13px; font-weight:600; margin-bottom:5px; color:#bdbdbd; }
.field input, .field textarea{
	width:100%;
	padding:10px 12px;
	background:#0b0b0b;
	border:1px solid var(--border-strong);
	border-radius:6px;
	color:var(--text-strong);
	font:inherit;
	font-size:14px;
	transition:border-color .15s, box-shadow .15s;
}
.field textarea{ resize:vertical; min-height:110px; }
.field input:focus, .field textarea:focus{
	outline:none;
	border-color:var(--accent-hot);
	box-shadow:0 0 0 3px rgba(192,40,28,.25);
}

.btn{
	display:inline-block;
	padding:10px 22px;
	border:1px solid var(--accent-2);
	border-radius:6px;
	background:linear-gradient(180deg, var(--accent-2), var(--accent));
	color:#fff;
	font:inherit; font-weight:600; font-size:14px;
	cursor:pointer;
	transition:filter .15s, opacity .15s;
}
.btn:hover:not(:disabled){ filter:brightness(1.2); }
.btn:disabled{ opacity:.45; cursor:not-allowed; }

#contact_status{ min-height:1.2em; margin:10px 0 0; font-size:13px; color:#e8b4a0; }
.g-recaptcha{ margin:4px 0 14px; }

.staff-grid{
	display:grid;
	grid-template-columns:repeat(2, minmax(0,1fr));
	gap:12px;
	margin:6px 0 16px;
}
.staff{
	display:flex; flex-direction:column;
	padding:12px 14px;
	background:var(--surface-2);
	border:1px solid var(--border);
	border-radius:6px;
	transition:border-color .15s;
}
.staff:hover{ border-color:var(--accent-2); }
.staff a, .staff a:visited{ font-weight:700; color:var(--text-strong); font-size:15px; }
.staff a:hover{ color:#ffb38a; }
.staff span{ font-size:12px; color:var(--muted); }

.site-footer{
	text-align:center;
	padding:24px 20px 40px;
	font-size:13px;
	color:var(--muted);
	border-top:1px solid var(--border);
}
.site-footer a{ color:#b0b0b0; }
.site-footer a:hover{ color:#fff; }
.site-footer .links{ margin-top:6px; display:flex; gap:16px; justify-content:center; }

/* ---------- Responsive ---------- */

@media (max-width: 760px){
	.header-inner{
		height:auto;
		grid-template-columns:auto auto;   /* Built by Kyle Bargman: centre the whole menu row on phones */
		justify-content:center;
		grid-template-areas:"logo logo" "left right";
		padding:0 8px;
	}
	.logo{ grid-area:logo; justify-self:center; }
	.nav-left{ grid-area:left; }
	.nav-right{ grid-area:right; }
	.header-inner{ column-gap:4px; }
	.nav{ margin:8px 0 10px; height:auto; gap:0; }
	.nav a, .nav a:link, .nav a:visited{ padding:6px 6px; font-size:12.5px; letter-spacing:0; }
	.nav a.active::after{ left:6px; right:6px; }
	.notice{ font-size:15px; }
	.lower .container{ grid-template-columns:1fr; }
	.content > .column, .content > div:not(.barrier){ padding:18px; }
}

@media (max-width: 420px){
	.staff-grid{ grid-template-columns:1fr; }
	.nav a, .nav a:link, .nav a:visited{ padding:6px 4px; font-size:12px; }
	.nav a.active::after{ left:4px; right:4px; }
}

/* ---------- Web chat (Built by Kyle Bargman) ---------- */
.content > #webchat{ flex-basis:100%; }
.wc-hidden{ display:none !important; }
.wc-login{ max-width:420px; margin-top:14px; }
.wc-app{ margin-top:14px; display:flex; flex-direction:column; height:min(72vh, 680px); min-height:420px;
	border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:#0b0b0b; }
.wc-bar{ display:flex; align-items:center; gap:10px; padding:6px 8px; background:var(--surface-2); border-bottom:1px solid var(--border); }
.wc-tabs{ display:flex; gap:4px; overflow-x:auto; flex:1; scrollbar-width:thin; }
.wc-tab{ flex:0 0 auto; padding:5px 12px; border-radius:6px; border:1px solid var(--border); background:#151515;
	color:#cfcfcf; font:inherit; font-size:13px; cursor:pointer; }
.wc-tab:hover{ background:#232323; }
.wc-tab.active{ background:var(--accent); border-color:var(--accent-2); color:#fff; }
.wc-tab.unread{ color:#ffb38a; border-color:#7a3a1a; }
.wc-status{ font-size:12px; white-space:nowrap; color:var(--muted); }
.wc-status-ok{ color:#7fd88f; } .wc-status-error{ color:#ff8a7a; }
.wc-topic{ padding:6px 12px; font-size:13px; color:var(--muted); border-bottom:1px solid var(--border);
	white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wc-main{ flex:1; display:flex; min-height:0; }
.wc-logs{ flex:1; min-width:0; display:flex; }
.wc-log{ flex:1; overflow-y:auto; padding:8px 12px; font:13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wc-line{ word-wrap:break-word; overflow-wrap:anywhere; }
.wc-time{ color:#5f5f5f; margin-right:8px; font-size:12px; }
.wc-nick{ font-weight:700; margin-right:8px; }
.wc-msg .wc-nick::after{ content:":"; }
.wc-action{ font-style:italic; }
.wc-info{ color:#8a8a8a; } .wc-info .wc-text{ font-size:12.5px; }
.wc-error{ color:#ff8a7a; }
.wc-notice .wc-nick{ color:#e8a87c !important; }
.wc-highlight{ background:rgba(192,40,28,.18); border-left:3px solid var(--accent-hot); padding-left:6px; }
.wc-line a{ color:#e8a87c; text-decoration:underline; }
.wc-userbox{ width:170px; border-left:1px solid var(--border); background:#101010; overflow-y:auto; }
.wc-count{ padding:6px 10px; font-size:12px; color:var(--muted); border-bottom:1px solid var(--border); }
.wc-users{ list-style:none; margin:0; padding:4px 0; font-size:13px; }
.wc-users li{ padding:2px 10px; cursor:default; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wc-users li:hover{ background:#1c1c1c; }
.wc-prefix{ display:inline-block; width:12px; color:#e8a87c; font-weight:700; }
.wc-form{ display:flex; gap:6px; padding:8px; border-top:1px solid var(--border); background:var(--surface-2); }
.wc-form input{ flex:1; min-width:0; padding:9px 12px; background:#0b0b0b; border:1px solid var(--border-strong);
	border-radius:6px; color:var(--text-strong); font:inherit; font-size:14px; }
.wc-form input:focus{ outline:none; border-color:var(--accent-hot); box-shadow:0 0 0 3px rgba(192,40,28,.25); }
.wc-form .btn{ padding:8px 16px; }
.wc-toggle-users{ display:none; background:#151515; border:1px solid var(--border); color:#cfcfcf; border-radius:6px; padding:0 10px; cursor:pointer; }
@media (max-width: 760px){
	.wc-app{ height:75vh; }
	.wc-userbox{ display:none; position:absolute; right:0; top:0; bottom:0; width:60%; z-index:5; box-shadow:-8px 0 24px rgba(0,0,0,.6); }
	.wc-main{ position:relative; }
	.wc-userbox.wc-open{ display:block; }
	.wc-toggle-users{ display:block; }
	.wc-log{ font-size:13px; padding:6px 8px; }
}

/* Web chat right-click menu (Built by Kyle Bargman) */
.wc-nick[data-nick], .wc-users li{ cursor:context-menu; }
.wc-menu{ position:fixed; z-index:1000; min-width:200px; padding:4px; background:#161616; border:1px solid var(--border-strong);
	border-radius:8px; box-shadow:0 14px 34px rgba(0,0,0,.65); font-size:13px; }
.wc-menu-head{ padding:6px 10px 4px; font-weight:700; color:var(--text-strong); }
.wc-menu-sep{ margin:4px 0 2px; padding:6px 10px 2px; border-top:1px solid var(--border); font-size:11px;
	text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.wc-menu-item{ display:block; width:100%; text-align:left; padding:6px 10px; border:0; border-radius:5px; background:none;
	color:#d6d6d6; font:inherit; cursor:pointer; }
.wc-menu-item:hover, .wc-menu-item:focus{ background:#262626; color:#fff; outline:none; }
.wc-menu-item.wc-danger{ color:#ff9a8a; }
.wc-menu-item.wc-danger:hover, .wc-menu-item.wc-danger:focus{ background:var(--accent); color:#fff; }

/* Downloads page (Built by Kyle Bargman) */
.dl-row{ display:flex; gap:16px; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.dl-btn{ flex:0 0 230px; text-align:center; }
.dl-meta{ font-size:13.5px; line-height:1.5; min-width:0; }
.dl-sum{ font:11.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color:#6f6f6f; overflow-wrap:anywhere; }
@media (max-width: 760px){ .dl-row{ flex-direction:column; align-items:stretch; } .dl-btn{ flex-basis:auto; } }

/* Built by Kyle Bargman: wide (765px) sections always span the full row */
.content > div[style*="765"]{ flex-basis:100% !important; }

/* Built by Kyle Bargman: downloads page - your-OS highlight and "coming shortly" placeholder */
.dl-os{ border-radius:8px; padding:2px 12px 6px; margin:0 -12px; }
.dl-mine{ background:rgba(192,40,28,.08); border:1px solid #4a1612; }
.dl-tag{ margin-left:10px; font-size:11px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:#ffb38a; background:#3a120e; border:1px solid #6b2a1c; border-radius:999px; padding:2px 8px; vertical-align:middle; }
.dl-soon{ opacity:.55; cursor:default; filter:grayscale(.6); }

/* Built by Kyle Bargman: release notes on the downloads page */
.dl-changes{ margin:10px 0 4px; }
.dl-changes ul{ margin:6px 0 10px; padding-left:20px; }
.dl-changes li{ margin:3px 0; }
.dl-older{ opacity:.8; }

/* Built by Kyle Bargman: command-line install instructions on the download page */
.dl-cli p{ margin:14px 0 4px; }
.dl-cli pre{ margin:0 0 6px; padding:10px 14px; white-space:pre; }

/* Built by Kyle Bargman: status page */
.st-banner{ margin:12px 0 16px; padding:12px 16px; border-radius:8px; font-weight:600; }
.st-good{ background:rgba(40,160,80,.14); border:1px solid rgba(40,160,80,.45); color:#9fe0b0; }
.st-bad{ background:rgba(192,40,28,.16); border:1px solid rgba(192,40,28,.55); color:#ffb4a8; }
.st-warn{ background:rgba(255,174,43,.12); border:1px solid rgba(255,174,43,.45); color:#ffd89a; }
.st-list{ border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.st-row{ display:flex; align-items:center; gap:14px; padding:12px 16px; border-bottom:1px solid var(--border); }
.st-row:last-child{ border-bottom:0; }
.st-name{ flex:1; } .st-up{ width:90px; text-align:right; font-size:13px; }
.st-dot{ width:12px; height:12px; border-radius:50%; flex:none; }
.st-dot.up{ background:#3ecf6e; box-shadow:0 0 8px rgba(62,207,110,.6); } .st-dot.down{ background:#ff4d3d; box-shadow:0 0 8px rgba(255,77,61,.7); }
.st-inc{ padding:8px 0; border-bottom:1px solid var(--border); } .st-open{ margin-left:6px; color:#ff8a6a; font-weight:700; }

/* Built by Kyle Bargman: live stats widget and channel directory */
.live-stats{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin:14px 0; padding:12px 16px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.live-dot{ width:10px; height:10px; border-radius:50%; background:#3ecf6e; box-shadow:0 0 8px rgba(62,207,110,.7); animation:livepulse 2s infinite; }
@keyframes livepulse{ 50%{ opacity:.45; } }
.live-stats .live-top{ color:var(--muted); } .live-stats a{ color:#e8a87c; }
.ch-list{ border:1px solid var(--border); border-radius:8px; overflow:hidden; margin-top:10px; }
.ch-row{ display:flex; align-items:center; gap:14px; padding:12px 16px; border-bottom:1px solid var(--border); }
.ch-row:last-child{ border-bottom:0; } .ch-name{ flex:1; min-width:0; overflow-wrap:anywhere; }
.ch-users{ width:56px; text-align:center; font-size:13px; } .ch-join{ white-space:nowrap; }
