/* =========================================
   ET Config Generator – Merged! theme
   Mirrors merged.best/style.css (dark, orange #f97316)
   ========================================= */

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

:root {
  --bg:        #050505;
  --bg-card:   #09090b;
  --bg-card2:  rgba(9,9,11,0.80);
  --border:    #27272a;
  --border-hi: rgba(249,115,22,0.30);
  --accent:    #f97316;
  --accent-lo: rgba(249,115,22,0.10);
  --text:      #ffffff;
  --text-muted:#a1a1aa;
  --text-dim:  #71717a;
  --radius-xl: 1.5rem;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --ok: #86efac; --bad: #fca5a5;
  color-scheme: dark;
}

html, body { min-height: 100vh; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
body { line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
code, pre, textarea.preview { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
code { background: #18181b; border-radius: 4px; padding: 0.1em 0.4em; font-size: .875em; color: #fdba74; }
.accent { color: var(--accent); }
.muted { color: var(--text-muted); }

/* ---- Header (same as merged.best) ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(249,115,22,0.15);
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 80rem; margin: 0 auto; padding: 1rem 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo {
  width: 2.5rem; height: 2.5rem; border-radius: 0.75rem;
  border: 1px solid rgba(249,115,22,0.35); background: var(--accent-lo);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-size: 1.25rem; font-weight: 900; letter-spacing: 0.05em; line-height: 1.1; }
.brand-sub  { font-size: 0.6rem; letter-spacing: 0.35em; color: rgba(249,115,22,0.80); text-transform: uppercase; }

.main-nav { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 768px) { .main-nav { display: flex; } }
.nav-link {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: #d4d4d8; transition: color 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.btn-discord {
  border: 1px solid rgba(249,115,22,0.40); border-radius: 999px;
  padding: 0.5rem 1rem; font-size: 0.75rem; font-weight: 700;
  color: #fdba74; transition: background 0.15s, color 0.15s;
}
.btn-discord:hover { background: var(--accent); color: #000; }

.mobile-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 2.75rem; height: 2.75rem; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--bg-card); color: var(--accent);
}
@media (min-width: 768px) { .mobile-toggle { display: none; } }
.mobile-toggle span { display: block; height: 2px; width: 1.25rem; background: currentColor; margin: 0 auto; }

.mobile-nav {
  display: none; flex-direction: column; gap: 0.5rem;
  padding: 1.25rem; border-top: 1px solid #18181b; background: rgba(0,0,0,0.97);
}
.menu-open .mobile-nav { display: flex; }
@media (min-width: 768px) { .menu-open .mobile-nav { display: none; } }
.mobile-link {
  display: block; padding: 0.75rem 1rem; border-radius: var(--radius-lg);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: #d4d4d8; background: var(--bg-card); transition: color 0.15s;
}
.mobile-link.active { background: var(--accent); color: #000; }
.mobile-link.discord { border: 1px solid rgba(249,115,22,0.30); color: #fdba74; }
.mobile-link:hover:not(.active) { color: var(--accent); }

/* ---- Page layout ---- */
.page-wrap { max-width: 80rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-eyebrow { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3em; color: var(--accent); }
.page-title { font-size: 1.75rem; font-weight: 900; margin-top: 0.35rem; }
@media (min-width: 768px) { .page-title { font-size: 2.25rem; } }
.head-tools { display: flex; align-items: center; gap: 0.75rem; }
.lang { display: flex; align-items: center; gap: 0.6rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); }

/* ---- Tabs (pill buttons like the site's pagination) ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tab {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0.55rem 1rem; font-size: 0.7rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.08em; color: #d4d4d8;
  background: transparent; transition: all 0.15s;
}
.tab:hover { border-color: rgba(249,115,22,0.40); color: #fdba74; }
.tab.active { border-color: var(--accent); background: var(--accent); color: #000; }

/* ---- Panels ---- */
main { min-width: 0; }
.panel { display: none; border: 1px solid var(--border); border-radius: 2rem; background: var(--bg-card2); padding: 1.5rem; }
@media (min-width: 768px) { .panel { padding: 2rem; } }
.panel.active { display: block; }
.panel h2 { font-size: 1.2rem; font-weight: 900; color: var(--accent); letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.panel h3 { font-size: 1rem; font-weight: 900; margin: 1.5rem 0 0.6rem; }
.panel h3.group { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3em; color: var(--accent); margin-top: 2rem; }
.panel > p.muted { line-height: 1.6; margin-bottom: 0.5rem; }
.desc { margin-top: 0.3rem; color: var(--text-muted); font-size: .88rem; line-height: 1.55; }

/* ---- Form controls (site style: black fields, orange focus) ---- */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=number], input[type=search], select, textarea {
  background: #000; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 0.5rem 0.85rem; color: var(--text); outline: none; transition: border-color 0.2s;
}
input[type=text]:focus, input[type=number]:focus, input[type=search]:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: #000; }
input[type=number] { width: 7rem; }
input[type=search] { min-width: 16rem; border-radius: 999px; padding: 0.55rem 1.1rem; }
input[type=range] { width: 13rem; accent-color: var(--accent); }
button:focus-visible, .tab:focus-visible, .swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
output { display: inline-block; min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; color: #fdba74; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: var(--radius-lg); font-size: 0.7rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 0.65rem 1.1rem;
  border: 1px solid transparent; background: var(--accent); color: #000;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: #fb923c; }
.btn.ghost, .btn-ghost { background: transparent; border-color: var(--border); color: #d4d4d8; }
.btn.ghost:hover, .btn-ghost:hover { border-color: rgba(249,115,22,0.40); color: #fdba74; background: transparent; }
.btn.active { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- CVAR rows ---- */
.row {
  padding: 0.9rem 1.1rem; margin: 0.6rem 0; background: #000;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color 0.2s;
}
.row:hover { border-color: rgba(249,115,22,0.30); }
.row.changed { border-color: rgba(249,115,22,0.50); background: linear-gradient(90deg, rgba(255,122,0,0.08), #000 40%); }
.row.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; }
.ctl { display: flex; align-items: center; gap: 0.5rem; }

/* ---- Cards ---- */
.card { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg-card2); padding: 1.1rem 1.25rem; margin: 0.9rem 0; }
.card h3 { margin-top: 0; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3em; color: var(--accent); }
.script { background: #000; border-radius: var(--radius-lg); }
.script:has(input[data-script-enable]:checked) { border-color: rgba(249,115,22,0.50); }
.big { font-size: 1.5rem; font-weight: 900; color: var(--accent); margin: 0 0.75rem; }
.inline { display: inline-flex; align-items: center; gap: 0.5rem; margin-right: 1rem; color: var(--text-muted); font-size: .9rem; }
.field { display: block; margin: 1.1rem 0; }
.field > span { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-dim); margin-bottom: 0.4rem; }
.field input[type=text] { width: 100%; max-width: 34rem; font-size: 1.05rem; padding: 0.8rem 1.1rem; border-radius: var(--radius-lg); }

/* ---- Toggle switch ---- */
.switch { position: relative; display: inline-block; width: 2.6rem; height: 1.5rem; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #27272a; border-radius: 999px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 1.1rem; height: 1.1rem; left: 0.2rem; top: 0.2rem; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(1.1rem); background: #000; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-line { display: flex; align-items: center; gap: 0.8rem; cursor: pointer; }
.script .opts { margin-top: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.5rem 0.25rem; }

/* ---- Player name ---- */
.name-preview { background: #000; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.9rem 1.1rem; font: 700 1.4rem/1.2 ui-monospace, Consolas, monospace; min-height: 3.4rem; word-break: break-all; }
.codeline { display: block; padding: 0.6rem 0.8rem; border-radius: var(--radius-md); background: #000; border: 1px solid var(--border); min-height: 2.4rem; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); gap: 0.4rem; max-width: 42rem; }
.swatch { border: 1px solid rgba(255,255,255,0.12); border-radius: 0.5rem; padding: 0.55rem 0; font: 700 .85rem ui-monospace, Consolas, monospace; transition: transform .12s, border-color .12s; }
.swatch:hover { transform: translateY(-2px); border-color: var(--accent); }

/* ---- Toolbars, status, preview ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }
.inline-form { display: inline-flex; gap: 0.5rem; align-items: center; }
.status { min-height: 1.4em; font-size: .875rem; }
.status.ok { color: var(--ok); } .status.bad { color: var(--bad); }
textarea.preview { width: 100%; height: 22rem; resize: vertical; font-size: .85rem; line-height: 1.5; border-radius: var(--radius-lg); padding: 1rem; }
.changes { background: #000; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.8rem 1rem; max-height: 16rem; overflow: auto; white-space: pre-wrap; font-size: .85rem; color: #d4d4d8; }
.pill { display: inline-block; border: 1px solid rgba(249,115,22,0.30); background: var(--accent-lo); color: #fdba74; border-radius: 999px; padding: 0 0.65rem; font-size: .7rem; font-weight: 700; margin: 0 0.4rem; }

/* ---- Search results ---- */
.hit { display: flex; gap: 0.6rem 0.8rem; align-items: baseline; flex-wrap: wrap; width: 100%; text-align: left; background: #000; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.7rem 1rem; margin: 0.4rem 0; transition: border-color .15s; }
.hit:hover { border-color: rgba(249,115,22,0.50); }
.hit .muted { flex: 1 1 100%; font-size: .85rem; }

/* ---- Canvases ---- */
canvas { max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-lg); display: block; }
#aim { cursor: crosshair; width: 100%; height: auto; }
.stats { margin-top: 0.75rem; font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: .9rem; }

/* ---- Footer (same as merged.best) ---- */
.site-footer { border-top: 1px solid #18181b; background: #000; padding: 2rem 1.25rem; }
.footer-inner {
  max-width: 80rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem;
  justify-content: space-between; font-size: 0.8rem; color: var(--text-dim);
}
@media (min-width: 768px) { .footer-inner { flex-direction: row; align-items: center; } }
.footer-links { display: flex; gap: 1.25rem; }
.footer-link { transition: color 0.15s; }
.footer-link:hover { color: var(--accent); }

@media (max-width: 640px) {
  .page-wrap { padding-top: 1.5rem; }
  input[type=range] { width: 8.5rem; }
  input[type=search] { min-width: 0; width: 100%; }
}
