/* ====== Variables ====== */
:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --border: rgba(255,255,255,0.08);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 25px rgba(0,0,0,0.35);
  font-family: "Inter", system-ui, sans-serif;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); }

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nav-brand { font-size: 20px; font-weight: 700; }
.nav-sub { font-size: 14px; color: var(--muted); }

/* Layout */
.container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: auto;
}

/* Panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel h2 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }

/* Composer */
.chem-composer {
  flex: 1;
  min-height: 520px;
  background: #fff; /* needed for Kekule */
  border-radius: var(--radius);
  overflow: hidden;
}

/* Buttons */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { opacity: 0.9; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Outputs */
.output label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}
textarea {
  width: 100%;
  min-height: 80px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  padding: 10px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
}

/* Status */
.status {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  transition: color 0.3s ease;
}
.status.active { color: var(--accent); }

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
