/* style.css — full file with dark themed scrollbars */

:root {
  --bg: #0e0e0e;
  --panel: #1a1a1a;
  --panel-2: #141414;
  --border: #2a2a2a;
  --primary: #ff6a00;
  --text: #f3f3f3;
  --muted: #a8a8a8;
  --code: #0f0f0f;
  --radius: 8px;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --max: 1060px;

  /* Scrollbar theme */
  --scrollbar-track: #121212;
  --scrollbar-thumb: #2b2b2b;
  --scrollbar-thumb-hover: #3a3a3a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg); /* no orange gradient */
  font: 14px/1.55 "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 18px; }

.site-header, .site-footer { background: var(--panel); border-bottom: 1px solid var(--border); }
.site-footer { border-top: 1px solid var(--border); border-bottom: none; }

.nav { height: 60px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.brand-name { color: var(--primary); letter-spacing: .3px; }

.logo {
  width: 22px; height: 22px; border-radius: 6px;
  background: conic-gradient(from 20deg,#ff6a00,#ffb86c,#ff6a00);
  box-shadow: 0 6px 14px rgba(255,106,0,.45);
}

.links a { color: var(--muted); text-decoration: none; margin-left: 14px; }

h1, h2 { color: var(--primary); margin: 0; }
.intro { padding: 22px 0 10px; }
.intro p { margin: 8px 0 0; color: var(--muted); }

.workbench { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0 28px; }
@media (max-width: 980px){ .workbench { grid-template-columns: 1fr; } }

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 14px; }
.panel .body { padding: 12px; }

.btn {
  appearance: none; border: 1px solid var(--border);
  background: #151515; color: var(--text);
  padding: 8px 12px; border-radius: 7px; cursor: pointer; font-weight: 700;
}
.btn.primary { background: linear-gradient(135deg,#ff6a00,#ff944d); border-color: transparent; color: #0e0e0e; }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn:hover { filter: brightness(1.03); }

/* Pill variant for View more */
.btn.pill { border-radius: 999px; padding: 8px 16px; }

.code-editor { position: relative; background: var(--code); border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }

.line-numbers {
  position: absolute; inset: 0 auto 0 0; width: 44px; background: #121212; color: #808080;
  text-align: right; padding: 10px 8px 10px 6px; white-space: pre; user-select: none; pointer-events: none;
  border-right: 1px solid var(--border); overflow: hidden; line-height: 1.55; font-size: 13px;
}

textarea#input {
  width: 100%; min-height: 320px; resize: vertical; border: none; outline: none;
  background: transparent; color: var(--text); font: 13px/1.55 inherit;
  padding: 10px 12px 10px 58px; caret-color: var(--primary); tab-size: 2;
}

/* Fixed-height output so it doesn't resize with content length */
.codeblock {
  height: 340px;
  min-height: 0;
  overflow: auto;
  background: var(--code);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 12px;
  white-space: pre;
  font: 13px/1.55 inherit;
}

.footer-row { margin-top: 10px; display: flex; gap: 10px; }

.report {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; padding: 10px 0 0;
  border-top: 1px dashed var(--border); color: var(--muted); font-size: 13px;
}
.badge { background: var(--primary); color: #0c0c0c; padding: 2px 8px; border-radius: 12px; font-weight: 900; }

.site-footer { padding: 14px 0 24px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }

/* ---------- Full Output Modal ---------- */
.modal { position: fixed; inset: 0; display: none; }
.modal[open] { display: block; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: absolute; top: 6%; left: 50%; transform: translateX(-50%);
  width: min(1200px, 92vw); height: 88vh;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}

.modal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}

.modal-code {
  flex: 1; margin: 0; padding: 12px;
  overflow: auto;
  background: var(--code);
  white-space: pre;
  font: 13px/1.55 inherit;
}

@media (max-width: 700px){
  .codeblock { height: 280px; }
  .modal-card { height: 92vh; top: 4%; }
}

/* ---------- Dark Scrollbars (textarea, code blocks, modal code, line numbers) ---------- */

/* Firefox */
textarea#input,
.codeblock,
.modal-code,
.line-numbers {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

/* WebKit (Chrome/Edge/Safari) */
textarea#input::-webkit-scrollbar,
.codeblock::-webkit-scrollbar,
.modal-code::-webkit-scrollbar,
.line-numbers::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

textarea#input::-webkit-scrollbar-track,
.codeblock::-webkit-scrollbar-track,
.modal-code::-webkit-scrollbar-track,
.line-numbers::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

textarea#input::-webkit-scrollbar-thumb,
.codeblock::-webkit-scrollbar-thumb,
.modal-code::-webkit-scrollbar-thumb,
.line-numbers::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 1px solid #1a1a1a; /* blends with panel/border */
}

textarea#input::-webkit-scrollbar-thumb:hover,
.codeblock::-webkit-scrollbar-thumb:hover,
.modal-code::-webkit-scrollbar-thumb:hover,
.line-numbers::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* Hide scrollbar corner fill on code areas (WebKit) */
.codeblock::-webkit-scrollbar-corner,
.modal-code::-webkit-scrollbar-corner {
  background: transparent;
}
