/* NORECOIL CS2 LAB — front-end styles (scoped under .nrcs2-root) */

.nrcs2-root {
	--nrcs2-bg: #080a0d;
	--nrcs2-panel: #101318;
	--nrcs2-line: #252a31;
	--nrcs2-text: #ffffff;
	--nrcs2-muted: #8d96a3;
	--nrcs2-accent: #ff6a00;
	background: var(--nrcs2-bg);
	color: var(--nrcs2-text);
	direction: rtl;
	font-family: Vazirmatn, IRANSans, "Segoe UI", Tahoma, sans-serif;
	font-size: 14px;
	line-height: 1.8;
	border-radius: 16px;
	padding: 14px;
	overflow-x: hidden;
	max-width: 100%;
}

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

.nrcs2-root h1, .nrcs2-root h2, .nrcs2-root h3 { color: #fff; margin: 0 0 8px; line-height: 1.5; }
.nrcs2-root h1 { font-size: 26px; font-weight: 900; }
.nrcs2-root h2 { font-size: 17px; font-weight: 800; }
.nrcs2-root h3 { font-size: 14px; font-weight: 700; }
.nrcs2-root p { margin: 0 0 8px; }
.nrcs2-accent { color: var(--nrcs2-accent); }
.nrcs2-muted { color: var(--nrcs2-muted); font-size: 12px; }

.nrcs2-panel {
	background: var(--nrcs2-panel);
	border: 1px solid var(--nrcs2-line);
	border-radius: 14px;
	padding: 14px;
	margin-bottom: 14px;
}
.nrcs2-panel > header {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	border-bottom: 1px solid var(--nrcs2-line); padding-bottom: 8px; margin-bottom: 10px;
}

/* layout */
.nrcs2-layout { display: flex; gap: 14px; align-items: flex-start; }
.nrcs2-sidebar { width: 230px; flex: 0 0 230px; }
.nrcs2-content { flex: 1 1 auto; min-width: 0; }
.nrcs2-grid { display: grid; gap: 12px; }
.nrcs2-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nrcs2-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nrcs2-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nrcs2-builder { display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }

/* nav */
.nrcs2-nav { display: flex; flex-direction: column; gap: 4px; }
.nrcs2-nav button {
	display: flex; align-items: center; gap: 8px; width: 100%;
	background: transparent; border: 0; color: #c7cdd6;
	padding: 9px 12px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; text-align: right;
}
.nrcs2-nav button:hover { background: #161a20; color: #fff; }
.nrcs2-nav button.is-active { background: var(--nrcs2-accent); color: #0b0b0b; font-weight: 700; }

/* buttons */
.nrcs2-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	border: 1px solid var(--nrcs2-line); background: #0b0e12; color: #fff;
	border-radius: 10px; padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 600;
	cursor: pointer; transition: border-color .15s ease, transform .15s ease, background .15s ease;
	text-decoration: none;
}
.nrcs2-btn:hover { border-color: var(--nrcs2-accent); color: #fff; }
.nrcs2-btn:active { transform: translateY(1px); }
.nrcs2-btn-accent { background: var(--nrcs2-accent); border-color: var(--nrcs2-accent); color: #0b0b0b; }
.nrcs2-btn-accent:hover { filter: brightness(1.08); color: #0b0b0b; }
.nrcs2-btn-sm { padding: 5px 9px; font-size: 11px; border-radius: 8px; }
.nrcs2-btn-block { width: 100%; }
.nrcs2-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* inputs */
.nrcs2-root input[type="text"], .nrcs2-root input[type="number"], .nrcs2-root input[type="url"],
.nrcs2-root input[type="file"], .nrcs2-root select, .nrcs2-root textarea {
	width: 100%; background: #0b0e12; border: 1px solid var(--nrcs2-line); border-radius: 10px;
	padding: 8px 10px; color: #fff; font: inherit; font-size: 13px; outline: none;
}
.nrcs2-root input:focus, .nrcs2-root select:focus, .nrcs2-root textarea:focus { border-color: var(--nrcs2-accent); }
.nrcs2-root input[type="range"] { width: 100%; accent-color: var(--nrcs2-accent); background: transparent; border: 0; padding: 0; }
.nrcs2-root input[type="color"] { width: 54px; height: 34px; padding: 2px; border: 1px solid var(--nrcs2-line); border-radius: 8px; background: #0b0e12; }
.nrcs2-root :focus-visible { outline: 2px solid var(--nrcs2-accent); outline-offset: 2px; }

.nrcs2-field { margin-bottom: 10px; }
.nrcs2-field > span { display: flex; justify-content: space-between; font-size: 11px; color: var(--nrcs2-muted); margin-bottom: 4px; }
.nrcs2-field input[type="number"].nrcs2-mini { width: 74px; padding: 3px 6px; text-align: center; font-size: 11px; }

.nrcs2-toggle {
	display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
	border: 1px solid var(--nrcs2-line); border-radius: 10px; padding: 7px 10px; margin-bottom: 6px;
	background: transparent; color: #c7cdd6; font: inherit; font-size: 12px; cursor: pointer;
}
.nrcs2-toggle:hover { border-color: var(--nrcs2-accent); }
.nrcs2-toggle i { width: 34px; height: 18px; border-radius: 999px; background: #2a3038; position: relative; display: inline-block; transition: background .15s ease; }
.nrcs2-toggle i::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.nrcs2-toggle[aria-pressed="true"] i { background: var(--nrcs2-accent); }
.nrcs2-toggle[aria-pressed="true"] i::after { transform: translateX(-16px); }

/* code */
.nrcs2-code {
	direction: ltr; text-align: left; background: #0b0e12; border: 1px solid var(--nrcs2-line);
	border-radius: 10px; padding: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px; line-height: 1.7; max-height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-word;
	color: #d5dbe3; margin: 0;
}
.nrcs2-code .c { color: #5d6672; }
.nrcs2-code .k { color: var(--nrcs2-accent); }
.nrcs2-inline-code { direction: ltr; display: block; overflow-x: auto; background: #0b0e12; border: 1px solid var(--nrcs2-line); border-radius: 10px; padding: 8px 10px; font-family: ui-monospace, monospace; font-size: 12px; }

/* tool cards */
.nrcs2-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nrcs2-tool {
	background: var(--nrcs2-panel); border: 1px solid var(--nrcs2-line); border-radius: 12px; padding: 14px;
	display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: right;
	transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; color: inherit; font: inherit;
}
.nrcs2-tool:hover { transform: translateY(-3px); border-color: var(--nrcs2-accent); box-shadow: 0 0 0 1px rgba(255,106,0,.25); }
.nrcs2-tool .ico { font-size: 22px; }
.nrcs2-tool b { font-size: 13px; }
.nrcs2-tool span { font-size: 11px; color: var(--nrcs2-muted); }
.nrcs2-tool .arw { color: var(--nrcs2-accent); margin-top: auto; }

/* hero */
.nrcs2-hero { position: relative; overflow: hidden; border-radius: 16px; padding: 28px; background: linear-gradient(270deg, #14181e 0%, #080a0d 70%); border: 1px solid var(--nrcs2-line); margin-bottom: 14px; }
.nrcs2-hero h1 { font-size: 40px; letter-spacing: 1px; }
.nrcs2-hero .tag { font-weight: 900; color: var(--nrcs2-accent); margin-top: 10px; }

/* stats */
.nrcs2-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.nrcs2-stat { border: 1px solid var(--nrcs2-line); background: #0b0e12; border-radius: 10px; padding: 8px 10px; }
.nrcs2-stat span { display: block; font-size: 11px; color: var(--nrcs2-muted); }
.nrcs2-stat b { font-size: 17px; color: var(--nrcs2-accent); }

/* keyboard */
.nrcs2-kb { display: flex; flex-direction: column; gap: 4px; }
.nrcs2-kb-row { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.nrcs2-key {
	height: 36px; flex: 0 0 auto; min-width: 38px; border-radius: 7px; border: 1px solid var(--nrcs2-line);
	background: #0b0e12; color: #c7cdd6; font: inherit; font-size: 11px; cursor: pointer; transition: all .12s ease;
}
.nrcs2-key:hover { border-color: var(--nrcs2-accent); color: #fff; }
.nrcs2-key.is-bound { border-color: var(--nrcs2-accent); background: #1a1208; color: #ff9c54; }
.nrcs2-key.is-active { background: var(--nrcs2-accent); border-color: var(--nrcs2-accent); color: #000; font-weight: 800; }
.nrcs2-selected-key { border: 1px solid var(--nrcs2-accent); color: var(--nrcs2-accent); border-radius: 10px; text-align: center; font-weight: 900; padding: 8px; }

/* bind list */
.nrcs2-bind-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid var(--nrcs2-line); border-radius: 10px; padding: 7px 9px; margin-bottom: 6px; }
.nrcs2-chip { background: var(--nrcs2-accent); color: #000; border-radius: 7px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
.nrcs2-cmd-item { display: flex; align-items: center; gap: 6px; border: 1px solid var(--nrcs2-line); background: #0b0e12; border-radius: 8px; padding: 4px 7px; margin-bottom: 4px; font-size: 11px; }
.nrcs2-cmd-item code { flex: 1 1 auto; direction: ltr; overflow-x: auto; }
.nrcs2-cmd-item .grab { cursor: grab; color: var(--nrcs2-muted); }
.nrcs2-cmd-item button { background: none; border: 0; color: var(--nrcs2-muted); cursor: pointer; font-size: 12px; }
.nrcs2-cmd-item button:hover { color: var(--nrcs2-accent); }
.nrcs2-cmd-item.is-drag { opacity: .4; }

/* previews */
.nrcs2-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--nrcs2-line); border-radius: 12px; overflow: hidden; background: #000; }
.nrcs2-preview .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nrcs2-preview .weapon-wrap { position: absolute; inset: 25% 0 0 0; transform-origin: bottom center; transition: transform .12s ease-out; will-change: transform; }
.nrcs2-preview .weapon { position: absolute; bottom: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom center; mix-blend-mode: screen; }
.nrcs2-preview .xhair { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.nrcs2-preview .hud { position: absolute; bottom: 6px; font-size: 11px; font-weight: 700; color: #cfd6de; }
.nrcs2-preview .hud.left { left: 10px; } .nrcs2-preview .hud.right { right: 10px; }
.nrcs2-preview .wm { position: absolute; top: 6px; right: 8px; font-size: 10px; color: var(--nrcs2-muted); background: rgba(0,0,0,.5); padding: 2px 6px; border-radius: 6px; }

/* warnings & checks */
.nrcs2-warn { color: var(--nrcs2-accent); font-size: 11px; margin: 2px 0; }
.nrcs2-ok { color: #7ddc8a; font-size: 11px; margin: 2px 0; }
.nrcs2-list { list-style: none; margin: 0; padding: 0; }

/* tables */
.nrcs2-table-wrap { overflow-x: auto; }
.nrcs2-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 12px; }
.nrcs2-table th { color: var(--nrcs2-muted); font-weight: 400; text-align: right; border-bottom: 1px solid var(--nrcs2-line); padding: 7px 6px; }
.nrcs2-table td { border-bottom: 1px solid #1a1e24; padding: 7px 6px; }

/* toast + modal */
.nrcs2-toast {
	position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 99999;
	background: #101318; border: 1px solid var(--nrcs2-accent); border-radius: 12px;
	padding: 10px 18px; font-size: 13px; font-weight: 700; color: #fff; animation: nrcs2-in .18s ease;
}
@keyframes nrcs2-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.nrcs2-modal { position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 99998; display: grid; place-items: center; padding: 16px; }
.nrcs2-modal .box { background: var(--nrcs2-panel); border: 1px solid var(--nrcs2-line); border-radius: 14px; padding: 18px; max-width: 420px; width: 100%; }

/* skeleton */
.nrcs2-skeleton { display: flex; align-items: center; gap: 10px; color: var(--nrcs2-muted); padding: 22px; font-size: 13px; }
.nrcs2-spinner { width: 16px; height: 16px; border: 2px solid var(--nrcs2-line); border-top-color: var(--nrcs2-accent); border-radius: 50%; animation: nrcs2-spin .7s linear infinite; }
@keyframes nrcs2-spin { to { transform: rotate(360deg); } }
.nrcs2-noscript { color: var(--nrcs2-accent); }

/* sticky mobile bar */
.nrcs2-sticky { display: none; }

@media (max-width: 1100px) {
	.nrcs2-builder { grid-template-columns: 1fr; }
	.nrcs2-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.nrcs2-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	.nrcs2-layout { flex-direction: column; }
	.nrcs2-sidebar { width: 100%; flex: 1 1 auto; }
	.nrcs2-nav { flex-direction: row; flex-wrap: wrap; }
	.nrcs2-nav button { width: auto; }
	.nrcs2-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nrcs2-grid-2, .nrcs2-grid-3, .nrcs2-grid-4 { grid-template-columns: 1fr; }
	.nrcs2-hero h1 { font-size: 30px; }
	.nrcs2-root { padding: 10px; border-radius: 12px; }
	.nrcs2-sticky {
		display: flex; gap: 6px; position: sticky; bottom: 0; z-index: 20;
		background: var(--nrcs2-bg); border-top: 1px solid var(--nrcs2-line); padding: 8px 0; margin-top: 10px;
	}
	.nrcs2-sticky .nrcs2-btn { flex: 1 1 0; }
	.nrcs2-accordion > .nrcs2-panel > header { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
	.nrcs2-root *, .nrcs2-root *::before, .nrcs2-root *::after { animation: none !important; transition: none !important; }
}
