/* CodeBeautify.net visual system — intentionally loaded after the legacy theme. */
:root {
  --cb-ink: #13213c;
  --cb-muted: #64748b;
  --cb-primary: #5b5ce2;
  --cb-primary-strong: #4547c7;
  --cb-accent: #0f9f8f;
  --cb-surface: #ffffff;
  --cb-surface-soft: #f5f7fb;
  --cb-border: #dfe5ef;
  --cb-radius: 14px;
  --cb-shadow: 0 12px 34px rgba(30, 41, 59, 0.09);
}

html { scroll-behavior: smooth; }

body {
  color: var(--cb-ink);
  background: var(--cb-surface-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: #4f51cf; text-underline-offset: 0.18em; }
a:hover { color: #3537a8; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(91, 92, 226, 0.3) !important;
  outline-offset: 2px;
}

.hero-head .navbar,
body > .navbar,
#app > .hero:first-child .navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--cb-border);
  box-shadow: 0 6px 24px rgba(30, 41, 59, 0.06);
  backdrop-filter: blur(12px);
}

.navbar-item,
.navbar-link { border-radius: 10px; font-weight: 600; }
.navbar-item:hover,
.navbar-link:hover { background: #eef0ff !important; color: var(--cb-primary-strong) !important; }
.navbar-item img#logoInHeader { max-height: 44px; object-fit: contain; }

.title,
.subtitle,
.content h1,
.content h2,
.content h3 { color: var(--cb-ink); letter-spacing: -0.018em; }

h1.title,
#mainTitle { font-weight: 750; }

.box,
.card,
.message,
.notification,
.panel,
.menu,
.modal-card,
.dropdown-content {
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow);
}

.card { overflow: hidden; background: var(--cb-surface); }
.card-header { box-shadow: inset 0 -1px 0 var(--cb-border); }
.card-header-title { color: var(--cb-ink); }

.button {
  border-radius: 11px;
  font-weight: 650;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(30, 41, 59, 0.12); }
.button.is-primary,
.button.is-link { background-color: var(--cb-primary); border-color: transparent; }
.button.is-primary:hover,
.button.is-link:hover { background-color: var(--cb-primary-strong); }
.button.is-info { background-color: #087ea4; }
.button.is-success { background-color: var(--cb-accent); }

.input,
.textarea,
.select select,
textarea,
input[type="text"],
input[type="url"],
input[type="search"],
input[type="number"] {
  border-color: #cfd7e5;
  border-radius: 11px;
  box-shadow: none;
}
.input:focus,
.textarea:focus,
.select select:focus,
textarea:focus,
input:focus { border-color: var(--cb-primary); box-shadow: 0 0 0 3px rgba(91, 92, 226, 0.13); }

.tabs ul { border-bottom-color: var(--cb-border); }
.tabs li.is-active a { border-bottom-color: var(--cb-primary); color: var(--cb-primary-strong); }
.tag:not(body) { border-radius: 999px; }
.progress::-webkit-progress-value { background-color: var(--cb-primary); }

.CodeMirror,
.ace_editor,
.monaco-editor,
[class*="editor-container"] {
  border-radius: 12px;
  border-color: var(--cb-border) !important;
}

#jumptofooter.footer {
  background: #edf1f8;
  border-top: 1px solid var(--cb-border);
  padding-top: 3.25rem;
}
#jumptofooter .title { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.055em; }
#jumptofooter li { margin-bottom: 0.35rem; }
#jumptofooter a { color: #40516e; }
#jumptofooter a:hover { color: var(--cb-primary-strong); text-decoration: underline; }

.hero.is-light:has(+ .cb-site-footer),
.hero.is-light:has(+ footer.has-background-dark) { background: #e7ebf4 !important; }

.cb-site-footer,
footer.has-background-dark {
  background: linear-gradient(135deg, #101a32 0%, #20265b 100%) !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.cb-footer-signature {
  padding: 1.1rem 1rem;
  text-align: center;
}
.cb-footer-brand { color: #fff; font-size: 1.05rem; font-weight: 750; letter-spacing: 0.01em; }
.cb-footer-note { color: #bfc9dd; margin-top: 0.3rem; font-size: 0.93rem; }

body.bg-dmode {
  --cb-ink: #eef2ff;
  --cb-muted: #a9b6cc;
  --cb-surface: #172033;
  --cb-surface-soft: #0f1728;
  --cb-border: #33415a;
  --cb-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
  color: var(--cb-ink);
  background: var(--cb-surface-soft) !important;
}
body.bg-dmode .hero-head .navbar,
body.bg-dmode #app > .hero:first-child .navbar { background: rgba(20, 29, 48, 0.97) !important; }
body.bg-dmode .box,
body.bg-dmode .card,
body.bg-dmode .message,
body.bg-dmode .notification,
body.bg-dmode .panel,
body.bg-dmode .menu,
body.bg-dmode .dropdown-content { background-color: var(--cb-surface) !important; color: var(--cb-ink); }
body.bg-dmode .navbar-item:hover,
body.bg-dmode .navbar-link:hover { background: #252f4a !important; color: #c8cbff !important; }
body.bg-dmode .input,
body.bg-dmode .textarea,
body.bg-dmode .select select,
body.bg-dmode textarea,
body.bg-dmode input { background: #101827; border-color: var(--cb-border); color: #eef2ff; }
body.bg-dmode #jumptofooter.footer { background: #151f32; }
body.bg-dmode #jumptofooter a { color: #bdc8dc; }

@media (max-width: 768px) {
  :root { --cb-radius: 12px; }
  .navbar-menu { padding: 0.75rem; border-top: 1px solid var(--cb-border); }
  .section { padding-left: 1rem; padding-right: 1rem; }
  #jumptofooter.footer { padding: 2rem 1rem; }
  .cb-footer-signature { padding: 0.9rem 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
