/* =============================================
   PasteLint — Main Stylesheet
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:              #eef2f7; /* was lighter — now slightly cooler + deeper */
  --color-surface:         #ffffff;
  --color-border:          #dde1e7;
  --color-primary:         #2563eb;
  --color-primary-hover:   #1d4ed8;
  --color-secondary:       #6b7280;
  --color-secondary-hover: #4b5563;
  --color-ghost:           #e5e7eb;
  --color-ghost-hover:     #d1d5db;
  --color-text:            #1f2937;
  --color-text-muted:      #6b7280;
  --color-success:         #16a34a;
  --color-danger:          #b91c1c;
  --radius:                10px;
  --shadow:                0 2px 8px rgba(0,0,0,0.08);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

background:
  radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.10), transparent 35rem),
  radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.08), transparent 30rem),
  linear-gradient(to bottom, #eef2f7 0%, #e6ebf2 100%);

  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 260px;

  background: linear-gradient(
    to bottom,
    rgba(37, 99, 235, 0.08),
    rgba(37, 99, 235, 0.03),
    transparent
  );

  pointer-events: none;
  z-index: 0;
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

/* --- Header --- */
header {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  color: #fff;
  text-align: center;
  position: relative;
  padding: 2rem 1rem 1.75rem;
}

.header-brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.5rem;
}

header h1 {
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 0.88rem;
  opacity: 0.82;
  max-width: 640px;
  margin: 0 auto;
}

/* --- Theme toggle --- */
/* Fix theme toggle placement */
.theme-toggle {
  position: relative; /* NOT absolute or fixed */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 16px auto 8px auto;
  z-index: 2;
}

/* Add breathing room to header */
.hero {
  padding-top: 24px;
}

.theme-toggle button {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: 0.15s ease;
}

.theme-toggle button:hover {
  background: rgba(255,255,255,0.9);
}
/* Active button */
.theme-toggle button.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* Dark theme */
body.theme-dark {
  --color-bg: #0f172a;
  --color-surface: #111827;
  --color-border: #334155;
  --color-primary: #60a5fa;
  --color-primary-hover: #3b82f6;
  --color-secondary: #475569;
  --color-secondary-hover: #64748b;
  --color-ghost: #1e293b;
  --color-ghost-hover: #334155;
  --color-text: #e5e7eb;
  --color-text-muted: #94a3b8;

  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.12), transparent 28rem),
    var(--color-bg);
}

/* Terminal theme */
body.theme-terminal {
  --color-bg: #020403;
  --color-surface: #06120b;
  --color-border: #14532d;
  --color-primary: #22c55e;
  --color-primary-hover: #16a34a;
  --color-secondary: #166534;
  --color-secondary-hover: #15803d;
  --color-ghost: #052e16;
  --color-ghost-hover: #14532d;
  --color-text: #86efac;
  --color-text-muted: #4ade80;

  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.14), transparent 30rem),
    linear-gradient(to bottom, #020403, #031007);
}

/* Adjust surfaces for dark/terminal */
body.theme-dark main,
body.theme-terminal main {
  background: rgba(17, 24, 39, 0.82);
}

body.theme-terminal main {
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.08);
}

/* Inputs + cards adapt */
body.theme-dark textarea,
body.theme-terminal textarea,
body.theme-dark .tool-card,
body.theme-terminal .tool-card {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

/* Terminal glow */
body.theme-terminal h1,
body.theme-terminal h2,
body.theme-terminal h3 {
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
}
/* Terminal mode enhancements */
body.theme-terminal {
  font-family: "Courier New", Consolas, Monaco, monospace;
}

/* subtle CRT scanline overlay */
body.theme-terminal::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    rgba(134, 239, 172, 0.12) 0px,
    rgba(134, 239, 172, 0.12) 1px,
    transparent 1px,
    transparent 4px
  );
}

/* terminal command prompt badge */
body.theme-terminal .tool-badge::before {
  content: "> ";
}

body.theme-terminal .tool-badge {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* glowing terminal panels */
body.theme-terminal .options-section,
body.theme-terminal .seo-text,
body.theme-terminal .tool-card,
body.theme-terminal .advanced-details,
body.theme-terminal .report-section,
body.theme-terminal .brief-section {
  background: rgba(2, 20, 10, 0.88);
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.06);
}

/* terminal textareas */
body.theme-terminal textarea {
  background: #010302;
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: inset 0 0 18px rgba(34, 197, 94, 0.06);
}

body.theme-terminal textarea::placeholder {
  color: rgba(134, 239, 172, 0.45);
}

/* terminal buttons */
body.theme-terminal .btn-primary {
  background: #16a34a;
  color: #020403;
}

body.theme-terminal .btn-secondary,
body.theme-terminal .btn-ghost {
  background: rgba(20, 83, 45, 0.7);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

body.theme-terminal .btn:hover,
body.theme-terminal .tool-card:hover {
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.14);
}

/* blinking cursor after main headline */
body.theme-terminal h1::after {
  content: "_";
  margin-left: 6px;
  animation: terminalBlink 1s steps(1) infinite;
}

@keyframes terminalBlink {
  50% {
    opacity: 0;
  }
}
/* Terminal header override */
body.theme-terminal header {
  background: linear-gradient(to bottom, #020403, #031007);
  border-bottom: 1px solid rgba(34, 197, 94, 0.25);
}
/* Fix all remaining light panels */
body.theme-terminal .advanced-summary,
body.theme-terminal .custom-rules-header,
body.theme-terminal .history-header,
body.theme-terminal .diff-header,
body.theme-terminal .lines-summary-bar {
  background: rgba(3, 12, 7, 0.85);
  border-color: rgba(34, 197, 94, 0.2);
}
body.theme-terminal * {
  scrollbar-color: #22c55e #020403;
}
/* --- Main Container --- */
main {
   flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 20px auto; /* was 0 auto */
  padding: 2rem 1.5rem;

  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(6px);

  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);

}
section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.04);
}

/* =============================================
   OPTIONS SECTION
   ============================================= */
.options-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.options-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0 -1.5rem;
}

/* Shared label style used in multiple rows */
.options-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* --- Presets Row --- */
.presets-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.presets-list {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
}

/* Individual preset pill */
.preset-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.preset-btn:hover {
  background: #eff6ff;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.preset-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.preset-btn .preset-delete {
  opacity: 0.5;
  font-size: 0.85rem;
  line-height: 1;
  transition: opacity 0.12s;
  margin-left: 2px;
}

.preset-btn .preset-delete:hover {
  opacity: 1;
}

/* --- Cleaning Modes Grid --- */
.options-modes-header {
  display: flex;
  align-items: center;
}

.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  flex: 1 1 200px;
  transition: border-color 0.15s, background 0.15s;
}

.option-label:hover {
  border-color: var(--color-primary);
  background: #eff6ff;
}

.option-label input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}

.option-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.option-text strong {
  font-size: 0.9rem;
  color: var(--color-text);
}

.option-text small {
  font-size: 0.77rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* --- View Mode Toggle --- */
.mode-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mode-toggle {
  display: inline-flex;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.mode-toggle-btn {
  background: none;
  border: none;
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mode-toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
}

.mode-toggle-btn:hover:not(.active) {
  background: var(--color-ghost);
  color: var(--color-text);
}

/* =============================================
   TEXTAREA SECTION
   ============================================= */
.textareas-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .textareas-section {
    grid-template-columns: 1fr;
  }
}

.textarea-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.textarea-wrapper label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-text);
}

.textarea-wrapper textarea {
  width: 100%;
  min-height: 210px;
  padding: 0.85rem 1rem;

  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius);

  font-family: inherit;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--color-text);

  background: #ffffff;
  resize: vertical;

  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: var(--shadow);
}

.textarea-wrapper textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.textarea-wrapper textarea[readonly] {
  background: #f9fafb;
  cursor: default;
}

.textarea-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.char-count {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

/* Line mode: single-column input, hide output textarea */
.textareas-section.line-mode {
  grid-template-columns: 1fr;
}

.textareas-section.line-mode .textarea-wrapper:last-child {
  display: none;
}

/* =============================================
   LINE-BY-LINE MODE
   ============================================= */
.lines-table-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lines-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.lines-table thead th {
  background: #f8fafc;
  padding: 0.5rem 0.85rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.lines-col-num { width: 36px; text-align: center; }
.lines-col-action { width: 50px; }

.lines-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
}

.lines-table tbody tr:last-child {
  border-bottom: none;
}

.lines-table tbody tr:hover {
  background: #f8fafc;
}

/* Highlight rows where the text actually changed */
.lines-table tbody tr.line-changed {
  background: #fffbeb;
}

.lines-table tbody tr.line-changed:hover {
  background: #fef3c7;
}

.lines-table td {
  padding: 0.55rem 0.85rem;
  vertical-align: top;
  color: var(--color-text);
  word-break: break-word;
}

.lines-table td.line-num {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-align: center;
  font-weight: 600;
}

.lines-table td.line-original {
  color: var(--color-text-muted);
  font-style: italic;
}

/* Empty line placeholder */
.line-empty-label {
  color: #d1d5db;
  font-size: 0.78rem;
  font-style: italic;
}

/* Per-line copy button */
.btn-copy-line {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
}

.btn-copy-line:hover {
  background: #eff6ff;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* =============================================
   BUTTONS SECTION
   ============================================= */
.buttons-section {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.35rem;

  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;

  transition: all 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active { transform: scale(0.97); }

.btn-primary         { background: var(--color-primary);   color: #fff; }
.btn-primary:hover   { background: var(--color-primary-hover); }
.btn-secondary       { background: var(--color-secondary); color: #fff; }
.btn-secondary:hover { background: var(--color-secondary-hover); }
.btn-ghost           { background: var(--color-ghost);     color: var(--color-text); }
.btn-ghost:hover     { background: var(--color-ghost-hover); }

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Plain link-style buttons --- */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--color-text-muted);
  transition: color 0.15s;
  flex-shrink: 0;
}

.btn-link:hover       { color: var(--color-text); }
.btn-link-danger:hover { color: var(--color-danger); }

/* --- Copy feedback --- */
.copy-feedback {
  font-size: 0.86rem;
  color: var(--color-success);
  font-weight: 500;
  min-height: 1.2em;
}

/* =============================================
   SMART DETECTION REPORT
   ============================================= */
.report-section {
  background: var(--color-surface);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.report-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.2rem;
  background: #eff6ff;
  border-bottom: 1px solid #bfdbfe;
}

.report-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-primary);
}

.report-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.report-list {
  list-style: none;
  padding: 0.75rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.report-list li {
  font-size: 0.88rem;
  color: var(--color-text);
  padding-left: 1.1rem;
  position: relative;
}

.report-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-size: 0.75rem;
  top: 2px;
}

.report-list li.report-warning::before {
  content: "⚠";
  color: #d97706;
}

.report-clean {
  font-size: 0.88rem;
  color: var(--color-success);
  font-weight: 600;
  padding: 0.75rem 1.2rem;
}

/* =============================================
   TEXT BRIEF / INSIGHT PANEL
   ============================================= */
.brief-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1.2rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}

.brief-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.brief-type-badge {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* Stat chips row */
.brief-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem 0.6rem;
}

.brief-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.45rem 0.9rem;
  min-width: 5.5rem;
  text-align: center;
}

.brief-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.brief-stat-label {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

/* Reference / context rows */
.brief-refs {
  padding: 0.1rem 1.2rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brief-ref-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.84rem;
}

.brief-ref-label {
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 7rem;
  flex-shrink: 0;
  padding-top: 0.05rem;
}

.brief-ref-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.brief-ref-tag {
  background: #f1f5f9;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-size: 0.78rem;
  color: var(--color-text);
  word-break: break-all;
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-ref-tag.is-link {
  color: var(--color-primary);
}

/* =============================================
   ADVANCED FEATURES COLLAPSIBLE
   ============================================= */
.advanced-details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* The clickable summary row */
.advanced-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #f8fafc;
  transition: background 0.15s;
}

/* Remove default marker in all browsers */
.advanced-summary::-webkit-details-marker { display: none; }
.advanced-summary::marker               { display: none; }

.advanced-summary:hover { background: #eff6ff; }

.advanced-summary-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text);
  flex-shrink: 0;
}

/* Small "tag" chips describing what's inside */
.advanced-summary-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
}

.adv-chip {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Rotating arrow indicator */
.advanced-summary-arrow {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.advanced-details[open] .advanced-summary-arrow {
  transform: rotate(90deg);
}

/* Body: stack panels with a gap */
.advanced-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--color-border);
}

/* Each panel inside advanced gets a separator */
.adv-panel {
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
}

.adv-panel:last-child { border-bottom: none; }

/* =============================================
   DIFF SECTION
   ============================================= */
.diff-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.diff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}

.diff-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.diff-legend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.legend-item { font-size: 0.8rem; }

mark.diff-removed {
  background: #fee2e2;
  color: #b91c1c;
  text-decoration: line-through;
  border-radius: 3px;
  padding: 0 2px;
}

mark.diff-added {
  background: #dcfce7;
  color: #15803d;
  border-radius: 3px;
  padding: 0 2px;
}

.diff-summary {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.diff-output {
  padding: 1rem 1.2rem;
  font-family: inherit;
  font-size: 0.93rem;
  line-height: 1.8;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  overflow-y: auto;
}

.diff-no-changes {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.88rem;
}

/* =============================================
   CUSTOM RULES
   ============================================= */
.custom-rules-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.custom-rules-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.2rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}

.custom-rules-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.custom-rules-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: 0.5rem;
  font-style: italic;
}

.rules-list {
  display: flex;
  flex-direction: column;
}

/* Empty state */
.rules-empty {
  padding: 1rem 1.2rem;
  font-size: 0.86rem;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

/* A single rule row */
.rule-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
}

.rule-row:last-child { border-bottom: none; }
.rule-row:hover      { background: #f8fafc; }

.rule-toggle {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.rule-input {
  flex: 1;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color 0.12s;
  min-width: 0;
}

.rule-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

.rule-arrow {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.rule-delete {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  transition: background 0.1s, color 0.1s;
  flex-shrink: 0;
}

.rule-delete:hover {
  background: #fee2e2;
  color: var(--color-danger);
}

/* =============================================
   HISTORY SECTION
   ============================================= */
.history-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.2rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}

.history-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.history-list { display: flex; flex-direction: column; }

.history-empty {
  padding: 1.1rem;
  font-size: 0.86rem;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

.history-entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
}

.history-entry:last-child { border-bottom: none; }
.history-entry:hover      { background: #f8fafc; }

.history-entry-info   { flex: 1; min-width: 0; }

.history-entry-preview {
  font-size: 0.88rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.history-entry-meta {
  font-size: 0.73rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.history-entry-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-restore {
  font-size: 0.78rem;
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
  background: #eff6ff;
  color: var(--color-primary);
  border: 1px solid #bfdbfe;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.btn-restore:hover { background: #dbeafe; border-color: var(--color-primary); }

.btn-delete-entry {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
}

.btn-delete-entry:hover {
  background: #fee2e2;
  color: var(--color-danger);
}

/* =============================================
   SEO TEXT
   ============================================= */
.seo-text {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.seo-text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--color-text);
}

.seo-text p {
  font-size: 0.93rem;
  color: var(--color-text-muted);
  margin-bottom: 0.9rem;
  line-height: 1.7;
}

.use-cases {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.use-cases li {
  font-size: 0.91rem;
  color: var(--color-text-muted);
  padding-left: 1.2rem;
  position: relative;
}

.use-cases li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* =============================================
   LANDING PAGE INTRO CALLOUT
   ============================================= */
.lp-intro {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.lp-intro-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.lp-intro-text {
  font-size: 0.9rem;
  color: #1e3a5f;
  line-height: 1.6;
}

.lp-intro-text strong { color: #1d4ed8; }

/* "Other tools" nav bar on landing pages */
.lp-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.lp-nav-label {
  color: var(--color-text-muted);
  font-weight: 600;
  margin-right: 0.25rem;
}

.lp-nav a {
  color: var(--color-primary);
  text-decoration: none;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-weight: 600;
  transition: background 0.15s;
}

.lp-nav a:hover { background: #dbeafe; }

/* =============================================
   FOOTER
   ============================================= */
footer {
  text-align: center;
  padding: 1.1rem 1rem 0.7rem;
  font-size: 0.81rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-copy {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  color: var(--color-text-muted);
  opacity: 0.7;
}
/* Hero section */
.hero {
  max-width: 900px;
  margin: 40px auto 20px auto;
  padding: 0 20px;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 0.95rem;
  color: #4b5563;
  max-width: 700px;
  margin: 0 auto 10px auto;
  line-height: 1.6;
  opacity: 0.85; 
}

.subtitle-small {
  font-size: 0.95rem;
  color: #6b7280;
}

/* Badge */
.tool-badge {
  display: inline-block;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Clean spacing for sections */

section {
  margin-top: 40px;
}

/* Links grid (tools section) */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tool-card {
  display: block;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  transition: 0.15s ease;
}

.tool-card:hover {
   transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.tool-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 0.9rem;
  color: #6b7280;
}
/* =========================================================
   PasteLint Theme + Visibility Polish
   Add this block to the bottom of style.css
   ========================================================= */

/* Center theme toggle above PasteLint brand */
.hero .theme-toggle,
.theme-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto 18px auto;
  text-align: center;
}

.theme-toggle button {
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Keep header brand centered under theme toggle */
.hero .header-brand,
.header-brand {
  text-align: center;
  width: 100%;
}

/* Make subtitle text pop by theme */
body.light .subtitle,
body.light .subtitle-small,
:root:not(.dark):not(.terminal) .subtitle,
:root:not(.dark):not(.terminal) .subtitle-small {
  color: #2563eb;
  font-weight: 600;
}

body.dark .subtitle,
body.dark .subtitle-small {
  color: #60a5fa;
  font-weight: 600;
}

body.terminal .subtitle,
body.terminal .subtitle-small {
  color: #22c55e;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.28);
}

/* If your JS applies theme class to html instead of body */
html.light .subtitle,
html.light .subtitle-small {
  color: #2563eb;
  font-weight: 600;
}

html.dark .subtitle,
html.dark .subtitle-small {
  color: #60a5fa;
  font-weight: 600;
}

html.terminal .subtitle,
html.terminal .subtitle-small {
  color: #22c55e;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.28);
}

/* Make all text fields readable in every theme */
textarea,
input[type="text"],
input[type="search"],
input[type="url"],
input[type="email"],
.rules-list input,
#input-text,
#output-text {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #94a3b8 !important;
  caret-color: #111827;
}

/* Light placeholders */
textarea::placeholder,
input::placeholder {
  color: #64748b !important;
  opacity: 1;
}

/* Dark theme text fields */
body.dark textarea,
body.dark input[type="text"],
body.dark input[type="search"],
body.dark input[type="url"],
body.dark input[type="email"],
body.dark .rules-list input,
body.dark #input-text,
body.dark #output-text,
html.dark textarea,
html.dark input[type="text"],
html.dark input[type="search"],
html.dark input[type="url"],
html.dark input[type="email"],
html.dark .rules-list input,
html.dark #input-text,
html.dark #output-text {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: #64748b !important;
  caret-color: #f8fafc;
}

body.dark textarea::placeholder,
body.dark input::placeholder,
html.dark textarea::placeholder,
html.dark input::placeholder {
  color: #cbd5e1 !important;
  opacity: 1;
}

/* Terminal theme text fields */
body.terminal textarea,
body.terminal input[type="text"],
body.terminal input[type="search"],
body.terminal input[type="url"],
body.terminal input[type="email"],
body.terminal .rules-list input,
body.terminal #input-text,
body.terminal #output-text,
html.terminal textarea,
html.terminal input[type="text"],
html.terminal input[type="search"],
html.terminal input[type="url"],
html.terminal input[type="email"],
html.terminal .rules-list input,
html.terminal #input-text,
html.terminal #output-text {
  background: #020617 !important;
  color: #22c55e !important;
  border-color: #22c55e !important;
  caret-color: #22c55e;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.18);
}

body.terminal textarea::placeholder,
body.terminal input::placeholder,
html.terminal textarea::placeholder,
html.terminal input::placeholder {
  color: #86efac !important;
  opacity: 0.85;
}

/* Cleaned text readonly box should still look intentional */
#output-text[readonly] {
  opacity: 1;
}

/* Make textarea labels readable across themes */
.textarea-wrapper label,
body.dark .textarea-wrapper label,
body.terminal .textarea-wrapper label,
html.dark .textarea-wrapper label,
html.terminal .textarea-wrapper label {
  font-weight: 700;
}

/* Small mobile cleanup */
@media (max-width: 700px) {
  .hero .theme-toggle,
  .theme-toggle {
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
}
/* Global header/toggle layout fix */
.hero {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: center !important;
  padding-top: 32px !important;
}

.theme-toggle {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  width: auto !important;
  margin: 0 auto 14px auto !important;
  z-index: 1 !important;
}

.header-brand {
  position: static !important;
  display: block !important;
  width: auto !important;
  margin: 0 auto 18px auto !important;
  text-align: center !important;
  z-index: 1 !important;
}

.header-brand a {
  display: inline-block !important;
}

/* Prevent header content from sliding upward into the toggle */
.hero h1,
.hero .subtitle,
.hero .subtitle-small {
  position: static !important;
  transform: none !important;
}
/* ========================================
   LIGHT THEME — Navajo Sand Makeover
   ======================================== */

body.light {
  background: #f4ecd8;
  color: #2b2b2b;
}

/* Main containers */
body.light main,
body.light .container {
  background: transparent;
}

/* Cards / panels */
body.light .rodan-panel,
body.light .tool-card,
body.light .featured-tool-card,
body.light .options-section,
body.light .textareas-section,
body.light .seo-text,
body.light .tools-grid-section {
  background: #fffaf0;
  border: 1px solid #e6d8b5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}

/* Textareas */
body.light textarea,
body.light input {
  background: #fffdf5;
  border: 1px solid #e6d8b5;
  color: #2b2b2b;
}

/* Placeholder text */
body.light textarea::placeholder {
  color: #9a8f74;
}

/* Chips / pills */
body.light .chip {
  background: #f1e6c8;
  border: 1px solid #e0d1a3;
  color: #5c5135;
}

/* Score card subtle tint */
body.light .score-card {
  background: rgba(255, 235, 180, 0.25);
}

/* Buttons (optional polish) */
body.light .btn-primary {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}
/* ========================================
   LIGHT THEME HERO REFINEMENT
   ======================================== */

body.light .hero {
  background: linear-gradient(
    135deg,
    #4f7df3 0%,
    #6b8cff 40%,
    #8fa8ff 100%
  );
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border-radius: 18px;
  max-width: 980px;
  margin: 24px auto 0 auto;
}
/* ========================================
   LIGHT THEME TEXTURE (VERY SUBTLE)
   ======================================== */

body.light {
  background: #f4ecd8;
  position: relative;
}

body.light::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;

  background-image:
    radial-gradient(circle at 1px 1px, rgba(0,0,0,0.15) 1px, transparent 0);

  background-size: 24px 24px;
}
/* ========================================
   CARD SYSTEM POLISH
   ======================================== */

body.light .rodan-panel,
body.light .tool-card,
body.light .featured-tool-card,
body.light .options-section,
body.light .textareas-section {
  border-radius: 20px;
  transition: all 0.18s ease;
}

/* subtle hover lift */
body.light .tool-card:hover,
body.light .featured-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.08);
}

/* featured card slight emphasis */
body.light .featured-tool-card {
  border: 1px solid #e2d4ad;
  background: #fff8e8;
}
/* Fix hero subtitle visibility on light theme */
body.light .hero .subtitle {
  color: #eef4ff !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

body.light .hero .subtitle-small {
  color: #dbeafe !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* Keep non-hero subtitle accents blue elsewhere */
body.light main .subtitle,
body.light main .subtitle-small {
  color: #2563eb !important;
  text-shadow: none !important;
}
/* Fix hero subtitle visibility on light theme */
body.light .hero .subtitle {
  color: #eef4ff !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

body.light .hero .subtitle-small {
  color: #dbeafe !important;
  font-weight: 600 !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* Keep non-hero subtitle accents blue elsewhere */
body.light main .subtitle,
body.light main .subtitle-small {
  color: #2563eb !important;
  text-shadow: none !important;
}
/* HARD FIX: hero subtitle visibility in light theme */
html.light header.hero p.subtitle,
html.light header.hero p.subtitle-small,
body.light header.hero p.subtitle,
body.light header.hero p.subtitle-small,
header.hero p.subtitle,
header.hero p.subtitle-small {
  color: #ffffff !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-weight: 700 !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.35) !important;
}

html.light header.hero p.subtitle-small,
body.light header.hero p.subtitle-small,
header.hero p.subtitle-small {
  color: #eaf2ff !important;
}
/* Retro CRT hero bezel */
header.hero {
  position: relative;
  max-width: 980px;
  margin: 32px auto 0 auto;
  padding: 34px 36px 44px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, #6b6257 0%, #2e2d2b 18%, #111827 48%, #3f3a33 100%);
  box-shadow:
    inset 0 0 0 10px #4b443b,
    inset 0 0 0 18px #171717,
    0 28px 70px rgba(0, 0, 0, 0.28);
}

/* CRT “screen” layer */
header.hero::before {
  content: "";
  position: absolute;
  inset: 24px 34px 34px;
  border-radius: 28px / 20px;
  background:
    radial-gradient(circle at center, rgba(82, 130, 255, 0.95), rgba(42, 72, 180, 0.92) 58%, rgba(12, 23, 64, 0.96) 100%);
  box-shadow:
    inset 0 0 38px rgba(255, 255, 255, 0.18),
    inset 0 0 70px rgba(0, 0, 0, 0.48);
  z-index: 0;
}

/* Subtle scanlines */
header.hero::after {
  content: "";
  position: absolute;
  inset: 24px 34px 34px;
  border-radius: 28px / 20px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.055) 0px,
    rgba(255,255,255,0.055) 1px,
    rgba(0,0,0,0.06) 2px,
    rgba(0,0,0,0.06) 4px
  );
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
}

/* Keep hero content above CRT screen */
header.hero > * {
  position: relative;
  z-index: 2;
}

/* Little faux power light */
header.hero .header-brand::after {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
}
/* =========================================================
   FULL CRT MODE — Terminal Theme
   ========================================================= */

body.terminal {
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.16), transparent 36rem),
    linear-gradient(180deg, #020403 0%, #030807 45%, #000000 100%) !important;
}

/* Global CRT scanlines */
body.terminal::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.035) 0px,
      rgba(255,255,255,0.035) 1px,
      rgba(0,0,0,0.08) 2px,
      rgba(0,0,0,0.08) 4px
    );
  opacity: 0.28;
  mix-blend-mode: screen;
}

/* Subtle CRT vignette */
body.terminal::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background:
    radial-gradient(circle at center, transparent 45%, rgba(0,0,0,0.46) 100%);
}

/* Terminal content glow */
body.terminal,
body.terminal p,
body.terminal li,
body.terminal label,
body.terminal small,
body.terminal span,
body.terminal h1,
body.terminal h2,
body.terminal h3,
body.terminal a {
  text-shadow:
    0 0 4px rgba(34, 197, 94, 0.35),
    0 0 12px rgba(34, 197, 94, 0.18);
}

/* CRT hero screen intensifier */
body.terminal header.hero::before {
  background:
    radial-gradient(
      circle at center,
      rgba(49, 96, 255, 0.95),
      rgba(20, 44, 145, 0.95) 58%,
      rgba(0, 12, 35, 0.98) 100%
    ) !important;
  filter: saturate(1.15) contrast(1.08);
}

/* Terminal cards as old phosphor panels */
body.terminal main,
body.terminal .rodan-panel,
body.terminal .tool-card,
body.terminal .featured-tool-card,
body.terminal .options-section,
body.terminal .textareas-section,
body.terminal .seo-text,
body.terminal .tools-grid-section,
body.terminal .advanced-details {
  background:
    linear-gradient(180deg, rgba(4, 20, 14, 0.94), rgba(0, 10, 6, 0.96)) !important;
  border: 1px solid rgba(34, 197, 94, 0.45) !important;
  box-shadow:
    inset 0 0 24px rgba(34, 197, 94, 0.06),
    0 0 24px rgba(34, 197, 94, 0.08) !important;
}

/* Terminal section headers */
body.terminal h2,
body.terminal h3 {
  color: #86efac !important;
}

/* Terminal buttons */
body.terminal button,
body.terminal .btn,
body.terminal .theme-toggle button {
  border: 1px solid rgba(34, 197, 94, 0.5) !important;
  box-shadow:
    inset 0 0 10px rgba(34, 197, 94, 0.08),
    0 0 10px rgba(34, 197, 94, 0.12);
}

/* Active terminal button */
body.terminal .theme-toggle button[data-theme="terminal"] {
  background: #22c55e !important;
  color: #021006 !important;
  text-shadow: none !important;
}

/* Terminal text fields */
body.terminal textarea,
body.terminal input,
body.terminal select {
  background: #010805 !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.72) !important;
  box-shadow:
    inset 0 0 18px rgba(34, 197, 94, 0.08),
    0 0 12px rgba(34, 197, 94, 0.08) !important;
}

/* Placeholder glow, but readable */
body.terminal textarea::placeholder,
body.terminal input::placeholder {
  color: rgba(134, 239, 172, 0.72) !important;
}

/* Tool cards hover */
body.terminal .tool-card:hover,
body.terminal .featured-tool-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 24px rgba(34, 197, 94, 0.09),
    0 0 28px rgba(34, 197, 94, 0.22) !important;
}

/* Optional cursor-style detail on links */
body.terminal a:hover::after {
  content: " ▌";
  color: #86efac;
}
