/* ==========================================================
   SPS CHloE GeSHi Syntax Highlighter (ChatGPT/ELM)
   ----------------------------------------------------------
   Single Light Theme — clean, editor-friendly output.
   ========================================================== */

:root {
  /* MAIN COLOR PALETTE */
  --bg-body: #f8f9fa;
  --bg-container: #ffffff;
  --text-color: #333;
  --accent-color: #0077cc;
  --border-color: #ccc;
  --button-bg: var(--accent-color);
  --button-text: #fff;
  --button-hover-bg: #005fa3;

  /* Code block colors */
  --code-bg: #f7f7f9;
  --code-text: #111;
}

/* ==========================================================
   BASIC LAYOUT
   ========================================================== */
body {
  margin: 0;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-body);
  color: var(--text-color);
  line-height: 1.5;
}

.container {
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--bg-container);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ==========================================================
   HEADINGS & CONTROLS
   ========================================================== */
h1 {
  margin-top: 0;
  text-align: center;
  color: var(--accent-color);
}

.controls {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

select,
textarea,
button {
  font-family: inherit;
  font-size: 1rem;
}

select {
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--border-color);
}

textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem;
  resize: vertical;
  font-family: "Fira Code", Consolas, monospace;
  font-size: 0.95rem;
  background: var(--code-bg);
  color: var(--code-text);
}

/* ==========================================================
   BUTTONS
   ========================================================== */
button {
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background: var(--button-bg);
  color: var(--button-text);
  padding: 0.6rem 1rem;
  margin-top: 0.5rem;
  transition: background 0.2s ease;
}

button:hover {
  background: var(--button-hover-bg);
}

/* ==========================================================
   RESULTS & CODE DISPLAY
   ========================================================== */
.hidden {
  display: none;
}

#results {
  margin-top: 2rem;
}

.highlight-box {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  padding: 1em;
  overflow-x: auto;
  font-family: "Fira Code", Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ==========================================================
   GESHI INLINE SYNTAX COLORS
   Consistent palette across all supported languages.
   ========================================================== */

/* General text */
.hl-main,
pre,
code {
  font-family: "Fira Code", Consolas, monospace;
  font-size: 0.95rem;
  background: var(--code-bg);
  color: var(--code-text);
  line-height: 1.45;
}

/* Keywords */
.kw2,
.kw3 {
 color: #008000;
 font-weight: 400;
}


.kw1 {
 color: #008000;
 font-weight: 700;
}

/* Built-ins & Functions */
.me1,
.me2,
.kwb {
 color: #202020;
 font-weight: 400;
}

/* Variables & Regex */
.re0,
.re1 {
 color: #0000ff;
	font-weight: 400;
}

/* Strings */
.st0,
.st1 {
 color: #ba2121;
	font-weight: 400;
}

/* Numbers */
.nu0 {
 color: #008800;
}

/* Comments */
.co1,
.coMULTI {
 color: #408080;
 font-style: italic;
	font-weight: 300;
}

/* Symbols, Operators */
.sy0 {
 color: #7800c2;
font-weight: 600;
}

/* Brackets & Braces */
.br0 {
 color: #000;
font-weight: 400;
}

/* Escapes */
.es0 {
 color: #905;
}

/* HTML Tags & Attributes */
.kw1.html,
.kw1.xml {
  color: #d73a49;
}
.kw2.html,
.kw2.xml {
  color: #005cc5;
}
.st0.html,
.st0.xml {
  color: #032f62;
}

/* CSS Specific */
.kw1.css {
  color: #005cc5;
}
.st0.css {
  color: #d14;
}
.nu0.css {
  color: #099;
}
.re0.css {
  color: #22863a;
}

/* Bash Specific */
.re0.bash {
  color: #aa0d91;
}
.me1.bash {
  color: #22863a;
}
.kw1.bash {
  color: #0074d9;
}

/* Embedded / Script Sections */
.sc0,
.sc1 {
  background-color: rgba(0, 0, 0, 0.03);
  color: #555;
  border-radius: 3px;
  padding: 0 2px;
}

/* Line Numbers (if enabled) */
.ln {
  color: #bbb;
  user-select: none;
  padding-right: 1em;
}

/* ==========================================================
   TEXTAREA OUTPUT (HTML Output)
   ========================================================== */
#htmlOutput {
  background: #fff;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  height: 12rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.6rem;
  color: #444;
}

/* ==========================================================
   RESPONSIVE TWEAKS
   ========================================================== */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  button {
    width: 100%;
  }
}
