/* Project ATLAS - Site #12: JSON Formatierer (German) */
:root {
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #1e293b;
  --border-subtle: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-blue: #38bdf8;
  --accent-blue-hover: #0284c7;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  color: var(--accent-blue);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

nav a:hover {
  color: var(--accent-blue);
}

/* Tool Hero Section */
.tool-section {
  padding: 2.5rem 0;
  background: radial-gradient(circle at 50% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 55%);
}

.tool-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 2rem;
}

.badge-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.tool-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.tool-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Workspace Layout */
.workspace-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: #0b1120;
  border-bottom: 1px solid var(--border-subtle);
}

.tool-actions-left, .tool-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-blue);
  color: #090d16;
}

.btn-primary:hover {
  background: #7dd3fc;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: #334155;
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
}

.select-indent {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
}

/* Editors Grid */
.editors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

@media (max-width: 860px) {
  .editors-grid {
    grid-template-columns: 1fr;
  }
}

.editor-pane {
  display: flex;
  flex-direction: column;
  position: relative;
}

.editor-pane:first-child {
  border-right: 1px solid var(--border-subtle);
}

@media (max-width: 860px) {
  .editor-pane:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: rgba(11, 17, 32, 0.6);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.json-textarea {
  width: 100%;
  flex: 1;
  min-height: 420px;
  background: #090e1a;
  border: none;
  padding: 1rem 1.25rem;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.json-textarea::placeholder {
  color: #475569;
}

/* Status & Notification Bar */
.status-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: #080c16;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  gap: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.75rem;
}

.status-valid {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-invalid {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.status-idle {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.stats-group {
  display: flex;
  gap: 1.25rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.error-banner {
  display: none;
  padding: 0.75rem 1.25rem;
  background: rgba(244, 63, 94, 0.1);
  border-top: 1px solid rgba(244, 63, 94, 0.25);
  color: #fda4af;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

/* Tree Viewer / Syntax Output */
.tree-view-container {
  display: none;
  background: #090e1a;
  padding: 1rem 1.25rem;
  overflow: auto;
  min-height: 420px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #cbd5e1;
}

.tree-node {
  margin-left: 1.25rem;
}

.tree-key {
  color: #38bdf8;
}

.tree-string {
  color: #34d399;
}

.tree-number {
  color: #fb923c;
}

.tree-boolean {
  color: #c084fc;
}

.tree-null {
  color: #94a3b8;
  font-style: italic;
}

/* Editorial & Guides */
.editorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 3rem;
  margin-top: 3.5rem;
}

.editorial-card h2 {
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 1.25rem;
}

.editorial-card h3 {
  font-size: 1.3rem;
  color: var(--accent-blue);
  margin: 2rem 0 0.75rem;
}

.editorial-card p, .editorial-card li {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.editorial-card ul, .editorial-card ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.feature-box h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 3rem 0;
  margin-top: auto;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-blue);
}
