
/* ============================================================
   CSS VARIABLES & RESET
============================================================ */
:root {
  --bg: #f0f2f8;
  --bg2: #e3e8f4;
  --surface: #ffffff;
  --border: #d1d9ee;
  --text: #1a1f2e;
  --text2: #6b7280;
  --blue: #3b82f6;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --purple: #8b5cf6;
  --mono: 'Space Mono', monospace;
  --sans: 'Syne', sans-serif;
  --shadow: 0 2px 16px rgba(59,130,246,0.09),0 1px 3px rgba(0,0,0,0.05);
  --shadow-lg: 0 6px 32px rgba(59,130,246,0.13),0 2px 8px rgba(0,0,0,0.07);
  --sidebar-w: 260px;
}
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg2: #141414;
  --surface: #1c1c1c;
  --border: #2a2d3e;
  --text: #f0f0eb;
  --text2: #888888;
  --blue: #3b82f6;
  --blue-dark: #60a5fa;
  --blue-light: #1a2f50;
  --green: #4ade80;
  --red: #f87171;
  --shadow: 0 2px 16px rgba(59,130,246,0.20),0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 6px 32px rgba(59,130,246,0.25),0 2px 8px rgba(0,0,0,0.3);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  transition: background 0.25s, color 0.25s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   TOP NAV
============================================================ */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 56px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(59,130,246,0.07);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 700;
  color: var(--text); text-decoration: none; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.nav-logo em { color: var(--blue); font-style: normal; }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-badge {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
  background: linear-gradient(135deg,#22c55e,#16a34a); color: #fff; padding: 4px 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  white-space: nowrap; border-radius: 20px;
}
.theme-btn {
  width: 36px; height: 36px;
  background: var(--surface); border: 2px solid var(--border);
  cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s; flex-shrink: 0;
}
.theme-btn:hover { transform: translate(-2px,-2px); }
.hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 4px; flex-shrink: 0; }
.hamburger span { width: 22px; height: 2px; background: var(--text); display: block; transition: 0.3s; }

/* ============================================================
   LAYOUT: SIDEBAR + MAIN
============================================================ */
.app-shell {
  display: flex;
  margin-top: 56px;
  min-height: calc(100vh - 56px);
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 56px; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s;
}
.sidebar-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg2);
}
.sidebar-group-label {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--blue);
  padding: 0 1rem 0.5rem; display: block;
}
.sidebar-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 0.6rem 1rem;
  background: transparent; border: none;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
  color: var(--text2); cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-btn:hover { background: var(--bg2); color: var(--text); }
.sidebar-btn.active { background: linear-gradient(90deg,var(--blue-light) 0%,transparent 100%); color: var(--blue); border-left-color: var(--blue); border-radius: 0 8px 8px 0; }
.sidebar-btn .icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.sidebar-btn .tag {
  margin-left: auto; font-family: var(--mono); font-size: 0.55rem; font-weight: 700;
  background: var(--blue); color: white; padding: 1px 5px; text-transform: uppercase;
}

/* MAIN CONTENT */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 2rem;
  max-width: 100%;
}

/* ============================================================
   TOOL PANELS
============================================================ */
.tool-panel { display: none; }
.tool-panel.active { display: block; }

.panel-header { margin-bottom: 2rem; }
.panel-header h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.3rem; }
.panel-header p { font-size: 0.88rem; color: var(--text2); line-height: 1.6; }
.panel-header .pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 700;
  background: linear-gradient(135deg,var(--blue),var(--blue-dark)); color: white; padding: 4px 14px; margin-bottom: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.08em; border-radius: 20px;
}

/* IO GRID */
.io-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; border: 1px solid var(--border); box-shadow: var(--shadow);
  background: var(--surface); border-radius: 12px; overflow: hidden;
}
.io-pane { padding: 1.25rem; }
.io-pane:first-child { border-right: 2px solid var(--border); }
.io-label {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text2);
  margin-bottom: 0.6rem; display: flex; align-items: center; justify-content: space-between;
}
.io-textarea {
  width: 100%; height: 180px; resize: vertical;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px;
  padding: 0.75rem; font-family: var(--mono); font-size: 0.78rem;
  color: var(--text); line-height: 1.6; outline: none;
  transition: border-color 0.2s;
}
.io-textarea:focus { border-color: var(--blue); }
.io-output {
  min-height: 180px; background: var(--bg2);
  border: 1.5px solid var(--border); border-radius: 8px; padding: 0.75rem;
  font-family: var(--mono); font-size: 0.78rem; color: var(--text);
  line-height: 1.6; white-space: pre-wrap; word-break: break-all;
  overflow: auto;
}
.io-output.html-preview {
  font-family: var(--sans); font-size: 0.88rem; word-break: normal;
  background: white; color: #111;
}
[data-theme="dark"] .io-output.html-preview { background: #fff; color: #111; }

/* ACTION BAR */
.action-bar {
  background: var(--bg2); border: 2px solid var(--border); border-top: none;
  padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.btn {
  padding: 0.5rem 1.2rem; border: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  display: inline-flex; align-items: center; gap: 5px; border-radius: 8px;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-blue { background: linear-gradient(135deg,var(--blue),var(--blue-dark)); color: white; border-color: transparent; }
.btn-blue:hover { filter: brightness(1.08); }
.btn-green { background: var(--green); color: #000; border-color: #16a34a; }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-red { background: transparent; color: var(--red); border-color: var(--red); }
.btn-red:hover { box-shadow: 4px 4px 0 var(--red); }
.ml-auto { margin-left: auto; }

/* STATUS BAR */
.status-bar {
  background: var(--border); color: var(--bg);
  padding: 0.35rem 1rem; font-family: var(--mono); font-size: 0.65rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem;
}
[data-theme="dark"] .status-bar { background: var(--blue); color: white; }

/* DROP ZONE */
.drop-zone {
  border: 2px dashed var(--blue); padding: 1rem; text-align: center;
  margin-bottom: 0.75rem; transition: background 0.2s; cursor: pointer;
  font-family: var(--mono); font-size: 0.7rem; color: var(--text2);
}
.drop-zone.drag-over { background: var(--blue-light); }

/* ============================================================
   CARD GRID (single-pane tools)
============================================================ */
.single-pane {
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1rem; border-radius: 12px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ============================================================
   FORM ELEMENTS
============================================================ */
label { font-family: var(--mono); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; display: block; margin-bottom: 0.3rem; color: var(--text2); }
input[type="text"], input[type="number"], select, textarea {
  width: 100%; background: var(--bg); border: 2px solid var(--border);
  padding: 0.6rem 0.8rem; font-family: var(--mono); font-size: 0.8rem;
  color: var(--text); outline: none; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
.form-group { margin-bottom: 1rem; }
.inline-row { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-row .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ============================================================
   STAT CARDS (word counter etc)
============================================================ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 0; border: 2px solid var(--border); margin-top: 1rem; }
.stat-card { padding: 1.2rem; text-align: center; border-right: 2px solid var(--border); background: var(--surface); }
.stat-card:last-child { border-right: none; }
.stat-num { font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text2); margin-top: 3px; }

/* KEYWORD TABLE */
.kw-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.kw-table th { font-family: var(--mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); text-align: left; padding: 0.5rem; border-bottom: 2px solid var(--border); }
.kw-table td { font-family: var(--mono); font-size: 0.78rem; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--bg2); color: var(--text2); }
.kw-bar { height: 6px; background: var(--blue); display: inline-block; border-radius: 0; }

/* ============================================================
   JWT DEBUGGER
============================================================ */
.jwt-parts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; border: 2px solid var(--border); margin-top: 0.5rem; }
.jwt-part { padding: 1rem; border-right: 2px solid var(--border); }
.jwt-part:last-child { border-right: none; }
.jwt-part-label { font-family: var(--mono); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.jwt-part-label.header { color: var(--red); }
.jwt-part-label.payload { color: var(--purple); }
.jwt-part-label.signature { color: var(--green); }
.jwt-raw { font-family: var(--mono); font-size: 0.7rem; line-height: 1.5; color: var(--text2); word-break: break-all; }
.jwt-decoded { font-family: var(--mono); font-size: 0.72rem; line-height: 1.6; color: var(--text); white-space: pre-wrap; }

/* ============================================================
   COLOR PICKER
============================================================ */
.color-swatch { width: 100%; height: 120px; border: 2px solid var(--border); margin-bottom: 0.5rem; transition: background 0.2s; }
.color-formats { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--border); }
.color-format { padding: 0.8rem; border-right: 2px solid var(--border); }
.color-format:last-child { border-right: none; }
.color-format-label { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; color: var(--text2); margin-bottom: 0.3rem; }
.color-format-val { font-family: var(--mono); font-size: 0.9rem; font-weight: 700; }
input[type="color"] {
  width: 100%; height: 50px; border: 2px solid var(--border); cursor: pointer; padding: 2px;
  background: var(--bg);
}
.hue-strip { display: grid; grid-template-columns: repeat(12,1fr); gap: 2px; margin-top: 0.5rem; }
.hue-dot { height: 24px; cursor: pointer; border: 1px solid transparent; transition: border-color 0.15s; }
.hue-dot:hover { border-color: var(--border); transform: scaleY(1.2); }

/* ============================================================
   QR CODE
============================================================ */
#qrCanvas { display: block; border: 2px solid var(--border); box-shadow: var(--shadow); background: white; }

/* ============================================================
   HASH
============================================================ */
.hash-row { padding: 0.7rem; border-bottom: 1px solid var(--bg2); display: flex; gap: 1rem; align-items: flex-start; }
.hash-row:last-child { border-bottom: none; }
.hash-alg { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; color: var(--blue); width: 80px; flex-shrink: 0; padding-top: 2px; }
.hash-val { font-family: var(--mono); font-size: 0.72rem; color: var(--text); word-break: break-all; flex: 1; }
.hash-copy { background: transparent; border: 1px solid var(--border); padding: 2px 7px; font-family: var(--mono); font-size: 0.6rem; cursor: pointer; color: var(--text2); flex-shrink: 0; transition: 0.15s; white-space: nowrap; }
.hash-copy:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ============================================================
   MARKDOWN PREVIEW STYLES
============================================================ */
.md-preview h1,.md-preview h2,.md-preview h3 { font-family: var(--sans); font-weight: 700; margin: 0.8rem 0 0.4rem; color: #111; }
.md-preview h1 { font-size: 1.5rem; }
.md-preview h2 { font-size: 1.2rem; }
.md-preview h3 { font-size: 1rem; }
.md-preview p { font-size: 0.88rem; line-height: 1.7; margin: 0.4rem 0; color: #333; }
.md-preview code { background: #f0f0f0; padding: 1px 5px; font-family: monospace; font-size: 0.82rem; }
.md-preview pre { background: #f0f0f0; padding: 0.8rem; overflow: auto; margin: 0.5rem 0; }
.md-preview blockquote { border-left: 3px solid #3b82f6; padding-left: 1rem; color: #555; margin: 0.5rem 0; }
.md-preview ul,.md-preview ol { padding-left: 1.5rem; margin: 0.4rem 0; }
.md-preview li { font-size: 0.88rem; line-height: 1.6; color: #333; }
.md-preview strong { font-weight: 700; }
.md-preview em { font-style: italic; }
.md-preview a { color: #3b82f6; }
.md-preview hr { border: none; border-top: 2px solid #ccc; margin: 1rem 0; }
.md-preview table { border-collapse: collapse; width: 100%; margin: 0.5rem 0; }
.md-preview th,.md-preview td { border: 1px solid #ccc; padding: 0.4rem 0.7rem; font-size: 0.82rem; }
.md-preview th { background: #f0f0f0; font-weight: 700; }

/* ============================================================
   SLUG GENERATOR
============================================================ */
.slug-output-box {
  background: var(--bg2); border: 2px solid var(--border); padding: 1rem;
  font-family: var(--mono); font-size: 1rem; font-weight: 700; color: var(--blue);
  word-break: break-all; min-height: 54px;
}

/* ============================================================
   UUID / GUID
============================================================ */
.uuid-list { background: var(--bg2); border: 2px solid var(--border); padding: 1rem; font-family: var(--mono); font-size: 0.8rem; line-height: 2; }
.uuid-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--bg); padding: 2px 0; }
.uuid-item:last-child { border-bottom: none; }
.uuid-val { flex: 1; color: var(--text); }
.uuid-copy-btn { background: transparent; border: 1px solid var(--border); padding: 1px 6px; font-family: var(--mono); font-size: 0.6rem; cursor: pointer; color: var(--text2); transition: 0.15s; }
.uuid-copy-btn:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ============================================================
   HERO LANDING (home screen)
============================================================ */
.home-hero {
  border: 1px solid var(--border); background: linear-gradient(135deg,var(--surface) 0%,var(--bg2) 100%);
  padding: 3rem 2rem; margin-bottom: 2rem; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden; border-radius: 16px;
}
.home-hero::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: var(--blue); opacity: 0.05;
  border-radius: 50%;
}
.home-hero h1 { font-size: clamp(1.8rem,3.5vw,3rem); font-weight: 800; margin-bottom: 0.5rem; line-height: 1.1; }
.home-hero h1 em { color: var(--blue); font-style: normal; }
.home-hero p { font-size: 0.9rem; color: var(--text2); line-height: 1.7; max-width: 600px; margin-bottom: 1.5rem; }
.trust-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.trust-pill {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  border: 1px solid var(--border); padding: 5px 12px; background: var(--surface);
  border-radius: 20px; box-shadow: var(--shadow);
}
.tool-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tool-card {
  padding: 1.5rem; border-right: 2px solid var(--border); border-bottom: 2px solid var(--border);
  background: var(--surface); cursor: pointer; transition: background 0.15s;
}
.tool-card:hover { background: var(--blue-light); transform: translateY(-2px); box-shadow: var(--shadow); transition: transform 0.18s, box-shadow 0.18s, background 0.15s; }
.tool-card-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.tool-card-name { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; }
.tool-card-desc { font-size: 0.78rem; color: var(--text2); line-height: 1.5; }
.tool-card-tag { font-family: var(--mono); font-size: 0.55rem; font-weight: 700; background: var(--blue-light); color: var(--blue); padding: 3px 9px; display: inline-block; margin-bottom: 0.5rem; text-transform: uppercase; border-radius: 20px; border: 1px solid rgba(59,130,246,0.25); }

/* ============================================================
   TESTIMONIALS + OPINION (compact)
============================================================ */
.testimonials-strip { background: var(--border); padding: 1.5rem; margin-bottom: 1rem; }
[data-theme="dark"] .testimonials-strip { background: #111; border: 2px solid #333; }
.testimonial-mini { font-size: 0.82rem; color: #ccc; font-style: italic; margin-bottom: 0.4rem; }
.testimonial-mini-author { font-family: var(--mono); font-size: 0.65rem; color: var(--blue); }

/* ============================================================
   FOOTER
============================================================ */
footer {
  margin-left: var(--sidebar-w);
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer-logo { font-family: var(--mono); font-size: 0.8rem; font-weight: 700; }
.footer-logo em { color: var(--blue); font-style: normal; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.75rem; color: var(--text2); text-decoration: none; font-family: var(--mono); }
.footer-links a:hover { color: var(--blue); }
.footer-copy { font-family: var(--mono); font-size: 0.65rem; color: var(--text2); }

/* PAGE OVERLAYS */
.page-overlay { display: none; position: fixed; inset: 0; z-index: 300; background: var(--bg); overflow-y: auto; padding: 80px 2rem 4rem; }
.page-overlay.active { display: block; }
.overlay-close { position: fixed; top: 14px; right: 2rem; background: var(--blue); color: white; border: 2px solid var(--border); padding: 5px 14px; font-family: var(--mono); font-size: 0.72rem; font-weight: 700; cursor: pointer; z-index: 301; }
.overlay-content { max-width: 800px; margin: 0 auto; }
.overlay-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.3rem; }
.overlay-content h2 { font-size: 1.2rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.3rem; }
.overlay-content p { font-size: 0.88rem; color: var(--text2); line-height: 1.8; margin-bottom: 0.8rem; }
.overlay-date { font-family: var(--mono); font-size: 0.65rem; color: var(--text2); margin-bottom: 1.5rem; }

/* ============================================================
   OPINION FORM
============================================================ */
.opinion-form { background: var(--surface); border: 2px solid var(--border); padding: 1.5rem; box-shadow: var(--shadow); }
.form-input { width: 100%; background: var(--bg); border: 2px solid var(--border); padding: 0.65rem 0.9rem; font-family: var(--mono); font-size: 0.8rem; color: var(--text); outline: none; transition: border-color 0.2s; margin-top: 0.25rem; }
.form-input:focus { border-color: var(--blue); }
.form-field { margin-bottom: 1rem; }
.form-field label { font-family: var(--mono); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text2); }
.star { font-size: 1.4rem; cursor: pointer; color: #ccc; transition: color 0.15s; }
.star.lit { color: var(--yellow); }
.form-submit { width: 100%; background: var(--blue); color: white; border: 2px solid var(--border); padding: 0.75rem; font-family: var(--mono); font-size: 0.82rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.15s; }
.form-submit:hover { transform: translate(-2px,-2px); }
.form-success { display: none; background: var(--green); color: #000; padding: 0.75rem; font-family: var(--mono); font-size: 0.75rem; text-align: center; margin-top: 0.75rem; }

/* ============================================================
   TEXT TRANSFORMER
============================================================ */
.transform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 0; border: 2px solid var(--border); margin-top: 1rem; }
.transform-card { padding: 1.5rem; border-right: 2px solid var(--border); border-bottom: 2px solid var(--border); background: var(--surface); }
.transform-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; }
.transform-card p { font-size: 0.78rem; color: var(--text2); margin-bottom: 0.75rem; }
.transform-example { font-family: var(--mono); font-size: 0.72rem; background: var(--bg2); padding: 0.5rem; margin-bottom: 0.75rem; }
.transform-before { color: var(--red); }
.transform-after { color: var(--green); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,0.3); }
  .main-content { margin-left: 0; }
  footer { margin-left: 0; }
  .hamburger { display: flex; }
  .io-grid { grid-template-columns: 1fr; }
  .io-pane:first-child { border-right: none; border-bottom: 2px solid var(--border); }
  .jwt-parts { grid-template-columns: 1fr; }
  .jwt-part { border-right: none; border-bottom: 2px solid var(--border); }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .main-content { padding: 1rem; }
  .three-col { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .tool-cards-grid { grid-template-columns: 1fr 1fr; }
  .color-formats { grid-template-columns: 1fr; }
  .color-format { border-right: none; border-bottom: 2px solid var(--border); }
}

/* Animations */
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
.tool-panel.active { animation: fadeIn 0.25s ease both; }

/* Error / success inline */
.error-msg { font-family: var(--mono); font-size: 0.72rem; color: var(--red); padding: 0.5rem; background: rgba(239,68,68,0.1); border-left: 3px solid var(--red); margin-top: 0.5rem; }
.success-msg { font-family: var(--mono); font-size: 0.72rem; color: var(--green); padding: 0.5rem; background: rgba(34,197,94,0.1); border-left: 3px solid var(--green); margin-top: 0.5rem; }

/* ============================================================
   FONT CONSISTENCY — all readable prose uses Syne, all code uses Space Mono
============================================================ */
.panel-header h1, .panel-header p,
.tool-panel p, .tool-panel h2, .tool-panel h3,
.home-hero h1, .home-hero p,
.overlay-content h1, .overlay-content h2, .overlay-content p {
  font-family: var(--sans);
}
.panel-header h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 0.4rem; }
.panel-header p { font-size: 0.9rem; color: var(--text2); line-height: 1.7; max-width: 700px; }

/* Overlay for sidebar on mobile */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
.sidebar-overlay.show { display: block; }

/* ============================================================
   VISITOR COUNTER
============================================================ */
.visitor-counter {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border);
  padding: 4px 14px; white-space: nowrap; cursor: default;
  box-shadow: var(--shadow); border-radius: 20px;
}
.visitor-counter .vc-dot {
  width: 7px; height: 7px; background: var(--green);
  border-radius: 50%; flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.visitor-counter .vc-num {
  color: var(--blue); font-size: 0.75rem; min-width: 28px; text-align: right;
  transition: all 0.4s ease;
}
.visitor-counter .vc-label { color: var(--text2); }

/* Footer visitor strip */
.footer-visitor-strip {
  background: var(--bg2); border-top: 2px solid var(--border);
  padding: 0.6rem 2rem;
  display: flex; align-items: center; justify-content: center;
  gap: 2rem; flex-wrap: wrap;
  margin-left: var(--sidebar-w);
}
@media (max-width: 900px) { .footer-visitor-strip { margin-left: 0; } }
.fvs-item {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.65rem; font-weight: 700;
  color: var(--text2);
}
.fvs-num { color: var(--blue); font-size: 0.8rem; }

/* Contact page */
.contact-card {
  background: var(--surface); border: 2px solid var(--border);
  padding: 2rem; box-shadow: var(--shadow);
}
.contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.contact-card p { font-size: 0.88rem; color: var(--text2); line-height: 1.7; margin-bottom: 0.75rem; }
.contact-email-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.88rem; font-weight: 700;
  color: var(--blue); text-decoration: none;
  border: 2px solid var(--blue); padding: 0.5rem 1.2rem;
  box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s;
}
.contact-email-link:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-lg); }

/* ============================================================
   MODERNIZED HERO STATS ROW
============================================================ */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 0;
  border: 1px solid var(--border); margin-top: 1.5rem;
  background: var(--surface); box-shadow: var(--shadow);
  border-radius: 14px; overflow: hidden;
}
.hero-stat {
  padding: 1rem 1.5rem; border-right: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 120px;
}
.hero-stat:last-child { border-right: none; }
.hero-stat-num { font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.hero-stat-label { font-family: var(--mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text2); }

/* ============================================================
   MONTHLY UTILITY BANNER
============================================================ */
.monthly-banner {
  background: linear-gradient(135deg,#1e40af 0%,#2563eb 50%,#0891b2 100%);
  border-radius: 16px; padding: 1.5rem 2rem; margin-top: 1.5rem; margin-bottom: 1.5rem;
  color: white; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(37,99,235,0.35);
}
.monthly-banner::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px; background: rgba(255,255,255,0.06); border-radius: 50%;
}
.monthly-banner::after {
  content: ''; position: absolute; bottom: -60px; right: 80px;
  width: 130px; height: 130px; background: rgba(255,255,255,0.04); border-radius: 50%;
}
.mb-left { position: relative; z-index: 1; }
.mb-left .mb-eyebrow { font-family: var(--mono); font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.75; margin-bottom: 5px; }
.mb-left h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 5px; line-height: 1.2; }
.mb-left p { font-size: 0.82rem; opacity: 0.85; max-width: 400px; }
.mb-right { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mb-right .mb-label { font-family: var(--mono); font-size: 0.6rem; opacity: 0.75; }
.countdown-row { display: flex; gap: 6px; align-items: center; }
.cbox { background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); border-radius: 10px; padding: 10px 13px; text-align: center; min-width: 50px; border: 1px solid rgba(255,255,255,0.2); }
.cbox-num { font-family: var(--mono); font-size: 1.35rem; font-weight: 700; line-height: 1; display: block; }
.cbox-label { font-size: 0.5rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-top: 3px; display: block; }
.cbox-sep { font-size: 1.1rem; opacity: 0.45; padding-bottom: 14px; }

/* Coming-next teaser */
.coming-next {
  border: 1px dashed rgba(59,130,246,0.5); border-radius: 12px;
  padding: 1rem 1.5rem; background: var(--blue-light);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.cn-icon { font-size: 1.8rem; flex-shrink: 0; }
.cn-text h4 { font-size: 0.88rem; font-weight: 700; color: var(--blue); margin-bottom: 3px; }
.cn-text p { font-size: 0.78rem; color: var(--text2); }
.cn-text button { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 0.78rem; font-weight: 700; text-decoration: underline; padding: 0; }

/* Notify strip */
.notify-strip {
  background: linear-gradient(90deg,var(--blue-light),rgba(6,182,212,0.07));
  border: 1px solid rgba(59,130,246,0.22); border-radius: 12px;
  padding: 0.9rem 1.25rem; display: flex; align-items: center; gap: 0.75rem;
  flex-wrap: wrap; margin-bottom: 1.5rem;
}
.notify-strip p { font-size: 0.82rem; color: var(--text); flex: 1; min-width: 180px; }
.notify-strip strong { color: var(--blue); }
.notify-email { background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px; padding: 0.45rem 0.85rem; font-family: var(--mono); font-size: 0.74rem; color: var(--text); outline: none; min-width: 190px; }
.notify-email:focus { border-color: var(--blue); }
.notify-go { background: var(--blue); color: white; border: none; border-radius: 8px; padding: 0.45rem 1rem; font-family: var(--mono); font-size: 0.72rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: filter 0.15s; }
.notify-go:hover { filter: brightness(1.1); }

/* Category section headers on home */
.cat-header {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--blue);
  padding: 0.35rem 0; margin: 1.25rem 0 0.5rem; opacity: 0.7;
}

/* ============================================================
   TOOL REQUEST MODAL
============================================================ */
.req-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(10,10,30,0.55); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.req-modal-overlay.open { display: flex; }
.req-modal {
  background: var(--surface); border-radius: 20px; padding: 2.25rem;
  max-width: 460px; width: 92%; box-shadow: 0 24px 80px rgba(0,0,0,0.22);
  border: 1px solid var(--border); position: relative;
  animation: reqIn 0.22s ease both;
}
@keyframes reqIn { from { opacity:0; transform:translateY(18px) scale(0.97); } to { opacity:1; transform:none; } }
.req-modal-close { position: absolute; top: 1rem; right: 1rem; background: var(--bg2); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 0.9rem; color: var(--text2); display: flex; align-items: center; justify-content: center; }
.req-modal-close:hover { background: var(--border); color: var(--text); }
.req-modal h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.35rem; }
.req-modal .req-sub { font-size: 0.84rem; color: var(--text2); line-height: 1.6; margin-bottom: 1.25rem; }
.req-textarea { width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; padding: 0.75rem 1rem; font-family: var(--sans); font-size: 0.88rem; color: var(--text); outline: none; resize: vertical; min-height: 90px; transition: border-color 0.2s; }
.req-textarea:focus { border-color: var(--blue); }
.req-email { width: 100%; margin-top: 0.65rem; background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px; padding: 0.6rem 1rem; font-family: var(--sans); font-size: 0.85rem; color: var(--text); outline: none; transition: border-color 0.2s; }
.req-email:focus { border-color: var(--blue); }
.req-submit { width: 100%; margin-top: 0.85rem; background: linear-gradient(135deg,var(--blue),var(--blue-dark)); color: white; border: none; border-radius: 10px; padding: 0.8rem; font-family: var(--mono); font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: filter 0.15s, transform 0.15s; }
.req-submit:hover { filter: brightness(1.1); transform: translateY(-1px); }
.req-success { display: none; text-align: center; padding: 0.5rem 0; }
.req-success .rs-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.req-success h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; }
.req-success p { font-size: 0.8rem; color: var(--text2); line-height: 1.6; }

/* Floating request button */
.req-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  background: linear-gradient(135deg,var(--blue),var(--blue-dark)); color: white;
  border: none; border-radius: 50px; padding: 0.7rem 1.2rem;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 20px rgba(59,130,246,0.4);
  display: flex; align-items: center; gap: 7px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.req-fab:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(59,130,246,0.5); }
.req-fab-dot { width: 7px; height: 7px; background: #fff; border-radius: 50%; animation: pulse-dot 2s infinite; }

/* ============================================================
   FOOTER STRIP update
============================================================ */
