:root {
  --bg: #050505;
  --panel: rgba(17, 15, 14, .92);
  --line: rgba(255,255,255,.11);
  --line-hot: rgba(230,42,31,.5);
  --text: #f5efe5;
  --muted: #b9afa2;
  --red: #e62a1f;
  --red-dark: #650707;
  --gold: #d0aa66;
  --discord: #5865f2;
  --danger: #ff4c3f;
  --pve: #22c55e;
  --pvp: #ef4444;
  --shadow: 0 28px 76px rgba(0,0,0,.58);
  --radius: 26px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(230,42,31,.24), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(208,170,102,.12), transparent 32rem),
    linear-gradient(145deg, #020202 0%, #090706 52%, #110707 100%);
  font-family: Bahnschrift, "Segoe UI", Tahoma, sans-serif;
}
body::before, body::after, .noise { content: ""; position: fixed; inset: 0; pointer-events: none; }
body::before { z-index: -3; background: linear-gradient(90deg, transparent 0 7%, rgba(208,170,102,.08) 7.2%, transparent 7.5% 92.5%, rgba(208,170,102,.08) 92.8%, transparent 93.1%); }
body::after { z-index: -2; opacity: .45; background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255,255,255,.02) 19px 20px); }
.noise { z-index: -1; opacity: .14; background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(to bottom, #000 0%, transparent 82%); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { border: 0; }
.shell { width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: clamp(22px, 4vw, 52px) 0 34px; }
.hero, .template-option, .panel, .preview {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(24,18,15,.94), rgba(5,5,6,.9));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.035);
}
.hero::before, .panel::before, .preview::before, .template-option::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 88% 10%, rgba(230,42,31,.15), transparent 22rem), linear-gradient(135deg, rgba(208,170,102,.08), transparent 38%);
}
.hero { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: clamp(14px, 3vw, 26px); align-items: center; padding: clamp(16px, 3vw, 24px); }
.hero > *, .panel > *, .preview > *, .template-option > * { position: relative; z-index: 1; }
.hero-logo { width: min(132px, 34vw); height: auto; filter: drop-shadow(0 0 26px rgba(230,42,31,.35)); animation: floatLogo 4s ease-in-out infinite; }
.eyebrow { margin: 0 0 6px; color: var(--gold); font-size: 12px; font-weight: 950; letter-spacing: .17em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: Impact, Bahnschrift, sans-serif; line-height: .92; text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 0 30px rgba(230,42,31,.2), 0 18px 56px rgba(0,0,0,.65); }
h1 { font-size: clamp(44px, 8vw, 92px); }
h2 { font-size: clamp(26px, 3.5vw, 42px); }
.hero-copy p:not(.eyebrow) { max-width: 740px; margin: 12px 0 0; color: var(--muted); font-size: clamp(15px, 1.8vw, 18px); line-height: 1.5; }
.discord-link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 999px; padding: 0 18px; color: #fff; font-weight: 950; background: linear-gradient(135deg, var(--discord), #7d87ff); box-shadow: 0 16px 36px rgba(88,101,242,.22); }
.template-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.template-option { min-height: 112px; display: grid; gap: 5px; align-content: start; text-align: left; padding: 14px; color: var(--text); cursor: pointer; transition: transform .16s ease, border-color .16s ease, filter .16s ease; }
.template-option:hover { transform: translateY(-1px); filter: brightness(1.06); }
.template-option.is-active { border-color: rgba(208,170,102,.46); box-shadow: var(--shadow), 0 0 0 1px rgba(208,170,102,.16) inset, 0 0 34px rgba(230,42,31,.12); }
.template-option span { width: fit-content; border-radius: 999px; padding: 5px 9px; color: #fff; font-size: 11px; font-weight: 950; letter-spacing: .12em; background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.template-option[data-template*="pve"] span { background: linear-gradient(135deg, #15803d, var(--pve)); }
.template-option strong { font-size: 17px; line-height: 1.12; }
.template-option small { color: var(--muted); line-height: 1.25; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(370px, 510px); gap: 16px; align-items: start; }
.builder { display: grid; gap: 14px; }
.panel, .preview { padding: clamp(15px, 2.5vw, 22px); }
.panel-head, .preview-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head > div, .preview-head > div { min-width: 0; flex: 1; }
.with-actions { align-items: end; }
.step-mark { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 15px; border: 1px solid rgba(230,42,31,.55); color: #fff; background: linear-gradient(135deg, var(--red), var(--red-dark)); font-weight: 950; }
.field { display: grid; gap: 8px; margin-top: 12px; }
.field span, .row-card label span { color: var(--gold); font-size: 12px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.big-field input { min-height: 56px; font-size: 20px; font-weight: 900; text-transform: uppercase; }
input, textarea { width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 13px 14px; color: var(--text); outline: none; background: rgba(0,0,0,.34); }
textarea { resize: vertical; line-height: 1.48; }
input:focus, textarea:focus { border-color: var(--line-hot); box-shadow: 0 0 0 4px rgba(230,42,31,.13); }
.helper-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px; border: 1px solid rgba(208,170,102,.16); border-radius: 18px; background: rgba(0,0,0,.18); }
.helper-strip[hidden] { display: none; }
.helper-strip span { color: var(--muted); font-size: 13px; font-weight: 850; }
.helper-strip button { min-height: 34px; border-radius: 999px; padding: 0 12px; cursor: pointer; color: var(--text); background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.1); font-weight: 900; }
.rows-list { display: grid; gap: 10px; }
.row-card { display: grid; gap: 12px; padding: 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; background: rgba(0,0,0,.22); }
.row-card.is-complete { border-color: rgba(208,170,102,.35); box-shadow: inset 0 0 0 1px rgba(208,170,102,.06); }
.row-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.row-head strong { font-size: 17px; }
.row-head small { color: var(--muted); }
.remove-row { min-height: 34px; padding: 0 12px; color: #ffd8d3; background: rgba(255,76,63,.12); border: 1px solid rgba(255,76,63,.28); border-radius: 999px; cursor: pointer; font-weight: 850; }
.remove-row:disabled { opacity: .35; cursor: not-allowed; }
.row-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; }
.row-card label { display: grid; gap: 7px; }
.panel-actions, .preview-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.primary, .secondary, .quiet, .danger { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; cursor: pointer; font-weight: 950; color: #fff; transition: transform .16s ease, filter .16s ease, border-color .16s ease; }
.primary { border-color: rgba(230,42,31,.7); background: linear-gradient(135deg, var(--red), var(--red-dark)); box-shadow: 0 18px 40px rgba(230,42,31,.24); }
.secondary { border-color: rgba(208,170,102,.42); background: rgba(255,255,255,.07); }
.quiet { color: var(--muted); background: rgba(255,255,255,.035); }
.danger { border-color: rgba(255,76,63,.42); background: rgba(255,76,63,.12); color: #ffd8d3; }
.compact { min-height: 40px; padding: 0 14px; }
.primary:hover, .secondary:hover, .quiet:hover, .danger:hover, .discord-link:hover, .helper-strip button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.preview { position: sticky; top: 16px; }
.preview-head { align-items: end; }
.badge { display: inline-flex; min-height: 34px; align-items: center; border: 1px solid rgba(208,170,102,.28); border-radius: 999px; padding: 0 12px; color: var(--gold); background: rgba(0,0,0,.24); font-size: 12px; font-weight: 950; text-transform: uppercase; letter-spacing: .12em; }
.template-output { margin: 0; min-height: 500px; max-height: 66vh; overflow: auto; white-space: pre-wrap; border: 1px solid rgba(208,170,102,.22); border-radius: 20px; padding: clamp(15px, 2vw, 20px); color: #f5efe5; background: rgba(0,0,0,.44); box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); font: clamp(13px, 1.35vw, 15px)/1.6 Consolas, "Courier New", monospace; }
.status { min-height: 22px; margin: 0; color: var(--gold); font-size: 14px; font-weight: 850; }
.mobile-copy-bar { display: none; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 0 0 28px; color: var(--muted); font-size: 13px; }
@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (max-width: 1040px) { .template-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } .workspace { grid-template-columns: 1fr; } .preview { position: static; } .template-output { max-height: none; min-height: 380px; } }
@media (max-width: 760px) { .hero { grid-template-columns: 92px 1fr; } .discord-link { grid-column: 1 / -1; } .hero-logo { width: 92px; } .row-grid { grid-template-columns: 1fr; } .panel-head, .preview-head { align-items: flex-start; } .with-actions, .preview-head { flex-direction: column; } .with-actions .compact { width: 100%; } .panel-actions, .preview-actions { flex-direction: column; align-items: stretch; } .primary, .secondary, .quiet, .danger { width: 100%; } h1 { font-size: clamp(42px, 14vw, 72px); } }
@media (max-width: 540px) { .shell { width: min(100% - 18px, 1240px); padding-bottom: 86px; } .template-picker { grid-template-columns: 1fr; } .mobile-copy-bar { display: block; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 10px; background: rgba(5,5,6,.88); border-top: 1px solid rgba(230,42,31,.24); backdrop-filter: blur(14px); } .mobile-copy-bar .primary { width: 100%; } .template-output { min-height: 320px; } .footer { padding-bottom: 92px; } }
