/* ==========================================================
   JSON2Mermaid Lite - style.css
   Soft Border UI + Diffchecker Layout + NicheWorks Spec v2
========================================================== */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --sub: #666666;

  --border: #e5e5e5;
  --border-soft: #f1f3f5;

  --accent: #1a73e8;
  --accent-soft: #e8f0fe;

  --input-bg: #fafafa;

  --radius: 10px;
  --radius-lg: 14px;

  --font: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;

  --shadow-soft: 0 0 0 1px rgba(0,0,0,0.02), 0 2px 5px rgba(0,0,0,0.04);
}

/* ----------------------------
   Base Layout
---------------------------- */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

.nw-header {
  text-align: center;
  padding: 40px 20px 20px;
}

.tool-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
}

.tool-sub {
  margin: 8px 0 20px;
  font-size: 16px;
  color: var(--sub);
}

.nw-lang-switch {
  margin-top: 10px;
  font-size: 15px;
}

.nw-lang-switch button {
  background: none;
  border: none;
  color: var(--sub);
  cursor: pointer;
  font-size: 15px;
  padding: 2px 6px;
}

.nw-lang-switch button.active {
  color: var(--accent);
  font-weight: 600;
}

.nw-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px;
}

/* ----------------------------
   Ad Slot
---------------------------- */
.ad-slot {
  width: 100%;
  height: 120px;
  background: var(--input-bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  margin: 20px 0 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--sub);
  font-size: 15px;
}

/* ----------------------------
   Usage Link
---------------------------- */
.usage-link-top {
  text-align: center;
  margin-bottom: 40px;
}

.usage-link-top a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* ----------------------------
   FAQ（Diffchecker型）
---------------------------- */
.faq-section {
  margin: 40px 0 40px;
}

.faq-row {
  margin-bottom: 26px;
}

.faq-q {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.faq-a {
  font-size: 15px;
  color: var(--sub);
  margin-left: 12px;
  line-height: 1.5;
}

/* ----------------------------
   Input / Output Areas
---------------------------- */
.section-label {
  display: block;
  margin: 25px 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.code-input,
.code-output {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  font-family: "JetBrains Mono", "Menlo", monospace;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  resize: vertical;
  font-size: 14px;
  line-height: 1.5;
}

/* ----------------------------
   Buttons
---------------------------- */
.btn-area {
  display: flex;
  gap: 12px;
  margin: 16px 0 24px;
}

button {
  cursor: pointer;
  font-size: 14px;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--fg);
}

.btn-secondary:hover {
  background: var(--input-bg);
}

/* ----------------------------
   Progress Bar
---------------------------- */
.progress {
  width: 100%;
  height: 6px;
  background: var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.progress.hidden {
  display: none;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  animation: loading 1.2s linear infinite;
}

@keyframes loading {
  0% { width: 0%; }
  60% { width: 80%; }
  100% { width: 100%; }
}

/* ----------------------------
   Error Box
---------------------------- */
.error-box {
  color: #b00020;
  background: #fff0f0;
  border: 1px solid #f3b7b7;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.error-box.hidden {
  display: none;
}

/* ----------------------------
   Donate
---------------------------- */
.nw-donate {
  margin: 50px 0 40px;
  text-align: center;
}

.nw-donate-text {
  font-size: 14px;
  color: var(--sub);
  margin-bottom: 12px;
}

.nw-donate-links a {
  margin: 0 8px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* ----------------------------
   Internal Links
---------------------------- */
.nw-links {
  text-align: center;
  margin: 40px 0 50px;
  font-size: 14px;
}

.nw-links a {
  color: var(--accent);
  text-decoration: none;
}

/* ----------------------------
   Footer
---------------------------- */
.nw-footer {
  text-align: center;
  padding: 30px 20px 60px;
  font-size: 13px;
  color: var(--sub);
}

.nw-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ----------------------------
   Responsive
---------------------------- */
@media (max-width: 600px) {
  .btn-area {
    flex-direction: column;
  }
}
