/* online-php-protector.de — Editor-Theme (Catppuccin Mocha inspired) */

:root {
  --bg-0: #11111b;
  --bg-1: #181825;
  --bg-2: #1e1e2e;
  --bg-3: #313244;
  --bg-4: #45475a;
  --text:  #cdd6f4;
  --text-muted: #a6adc8;
  --text-dim:   #7f849c;
  --text-faint: #585b70;
  --accent:    #a6e3a1;
  --accent-2:  #94e2d5;
  --warn:      #f9e2af;
  --danger:    #f38ba8;
  --info:      #89b4fa;
  --purple:    #cba6f7;
  --orange:    #fab387;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Topbar === */
.topbar {
  background: var(--bg-1);
  border-bottom: 1px solid var(--bg-3);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 96px;
}
.brand {
  display: flex; align-items: center;
  text-decoration: none;
  height: 72px;
}
.brand-logo {
  display: block;
  height: 68px;
  width: auto;
}
.brand-logo-icon { display: none; }
@media (max-width: 720px) {
  .brand-logo-wide { display: none; }
  .brand-logo-icon { display: block; height: 56px; }
}
.mainnav { display: flex; gap: 4px; }
.mainnav a {
  text-decoration: none;
  color: var(--text-dim);
  padding: 7px 13px;
  border-radius: 6px;
  font-size: 13px;
  transition: background .15s, color .15s;
}
.mainnav a:hover { color: var(--text); background: var(--bg-3); }
.mainnav a.active { color: var(--text); background: var(--bg-3); }

/* === Main === */
main.container {
  padding-top: 24px;
  padding-bottom: 64px;
  min-height: calc(100vh - 56px - 120px);
}

h1, h2, h3 { color: var(--text); font-weight: 500; line-height: 1.3; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 28px 0 12px; }
h3 { font-size: 15px; margin: 20px 0 8px; }
p  { color: var(--text-muted); }
a  { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

.lead { color: var(--text-muted); font-size: 15px; margin: 0 0 24px; max-width: 700px; }

code, .code {
  font-family: var(--mono);
  font-size: 13px;
}
.muted { color: var(--text-dim); }

/* === Editor (Protector tool) === */
.editor {
  background: var(--bg-2);
  border: 1px solid var(--bg-3);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
}

.toolbar {
  background: var(--bg-1);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 1px solid var(--bg-3);
  font-size: 11px;
  flex-wrap: wrap;
}
.toolbar-label {
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.level-switch {
  display: flex; gap: 0;
  background: var(--bg-0);
  border-radius: 6px;
  padding: 2px;
}
.level-switch button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.level-switch button:hover { color: var(--text); }
.level-switch button.active {
  background: var(--bg-3);
  color: var(--warn);
  font-weight: 500;
}
.toolbar-spacer { flex: 1; }
.toolbar-status { color: var(--text-dim); font-size: 11px; }
.toolbar-status .dot { color: var(--accent); }

.editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 800px) {
  .editor-split { grid-template-columns: 1fr; }
  .editor-pane + .editor-pane { border-top: 1px solid var(--bg-3); }
}
.editor-pane { border-right: 1px solid var(--bg-3); }
.editor-pane:last-child { border-right: none; }
.pane-header {
  background: var(--bg-1);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-dim);
  display: flex; justify-content: space-between; align-items: center;
}
.pane-header .arrow { color: var(--warn); }
.pane-header .arrow.out { color: var(--accent-2); }

.code-area {
  width: 100%;
  min-height: 360px;
  background: var(--bg-2);
  color: var(--text);
  border: none;
  outline: none;
  resize: vertical;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre;
  word-wrap: normal;
  overflow: auto;
  tab-size: 2;
}
.code-area.output { background: var(--bg-2); }
.code-area:focus { outline: 1px solid var(--bg-4); }

.actionbar {
  background: var(--bg-1);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--bg-3);
  flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-3);
  color: var(--text);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--bg-4); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: var(--bg-0);
  font-weight: 500;
}
.btn-primary:hover { background: #93d68d; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.actionbar-spacer { flex: 1; }
.stats { color: var(--text-dim); font-size: 11px; font-family: var(--mono); }

.statusbar {
  background: var(--bg-0);
  padding: 7px 16px;
  font-size: 10px;
  color: var(--text-faint);
  display: flex; justify-content: space-between;
  font-family: var(--mono);
}
.statusbar .dot { color: var(--accent); }

/* === Cards & content sections === */
.card {
  background: var(--bg-1);
  border: 1px solid var(--bg-3);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.grid {
  display: grid;
  gap: 16px;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.level-card {
  background: var(--bg-1);
  border: 1px solid var(--bg-3);
  border-left: 3px solid var(--bg-4);
  border-radius: 6px;
  padding: 16px 18px;
}
.level-card.basic    { border-left-color: var(--info); }
.level-card.medium   { border-left-color: var(--accent); }
.level-card.advanced { border-left-color: var(--warn); }
.level-card.pro      { border-left-color: var(--danger); }
.level-card h3 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--warn);
  display: flex; justify-content: space-between; align-items: center;
}
.level-card.basic h3    { color: var(--info); }
.level-card.medium h3   { color: var(--accent); }
.level-card.advanced h3 { color: var(--warn); }
.level-card.pro h3      { color: var(--danger); }
.level-card .level-num {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: normal;
}
.level-card p { font-size: 13px; margin: 6px 0; }
.level-card ul { padding-left: 18px; margin: 8px 0; font-size: 13px; color: var(--text-muted); }
.level-card li { margin-bottom: 3px; }

pre.snippet {
  background: var(--bg-0);
  border: 1px solid var(--bg-3);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text);
  overflow-x: auto;
  margin: 10px 0;
}
pre.snippet .c-comment { color: var(--text-faint); }
pre.snippet .c-keyword { color: var(--purple); }
pre.snippet .c-string  { color: var(--accent); }
pre.snippet .c-var     { color: var(--orange); }
pre.snippet .c-fn      { color: var(--info); }

.callout {
  background: rgba(249, 226, 175, 0.08);
  border-left: 3px solid var(--warn);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  margin: 16px 0;
  color: var(--text-muted);
}

/* === FAQ === */
details.faq-item {
  background: var(--bg-1);
  border: 1px solid var(--bg-3);
  border-radius: 6px;
  padding: 0;
  margin-bottom: 8px;
}
details.faq-item summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  list-style: none;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::before {
  content: "▸ ";
  color: var(--text-dim);
  display: inline-block;
  transition: transform .15s;
  margin-right: 4px;
}
details.faq-item[open] summary::before { content: "▾ "; }
details.faq-item .faq-body {
  padding: 0 16px 14px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* === Footer === */
.footer {
  background: var(--bg-0);
  border-top: 1px solid var(--bg-3);
  padding: 20px 0 16px;
  margin-top: 32px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap; gap: 12px;
}
.footer-left {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text); font-family: var(--mono);
}
.footer-left img {
  height: 24px; width: auto;
  opacity: 0.8;
}
.footer-nav { display: flex; gap: 16px; }
.footer-nav a {
  color: var(--text-dim);
  font-size: 13px;
}
.footer-nav a:hover { color: var(--text); text-decoration: none; }
.disclaimer {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.5;
}
.disclaimer strong { color: var(--text-dim); }

/* === Toasts === */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-3);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 13px;
  border-left: 3px solid var(--accent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: var(--danger); }

/* === Cookie-Banner === */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  background: var(--bg-1);
  border: 1px solid var(--bg-3);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  z-index: 200;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s, transform .25s;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.cookie-banner.show { opacity: 1; transform: translateY(0); }
.cookie-banner-inner {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.cookie-banner-text { flex: 1 1 320px; min-width: 0; }
.cookie-banner-text strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}
.cookie-banner-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}
.cookie-banner-text a { color: var(--info); }
.cookie-banner .btn-primary { flex-shrink: 0; }
@media (max-width: 480px) {
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner .btn-primary { width: 100%; justify-content: center; }
}
