/* ===============================
   ROOT DEFAULTS
================================ */
:root {
  --bg: #0b1020;
  --sidebar: #0f172a;
  --card: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.08);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #8b5cf6;
  --glow: 0 0 16px rgba(139,92,246,0.6);
}

/* ===============================
   THEMES
================================ */
body.theme-default { }

body.theme-fairy {
  --bg: radial-gradient(circle at top, #fde2ff, #c7d2fe);
  --sidebar: rgba(255,255,255,0.6);
  --card: rgba(255,255,255,0.6);
  --border: rgba(0,0,0,0.08);
  --text: #3b0764;
  --muted: #6b21a8;
  --accent: #ec4899;
}

body.theme-galaxy {
  --bg: radial-gradient(circle at top, #1e1b4b, #020617);
  --sidebar: #020617;
  --card: rgba(99,102,241,0.12);
  --border: rgba(99,102,241,0.3);
  --text: #e0e7ff;
  --muted: #a5b4fc;
  --accent: #6366f1;
}

body.theme-pink {
  --bg: linear-gradient(135deg, #fdf2f8, #fbcfe8);
  --sidebar: #fff1f2;
  --card: #ffffff;
  --border: #f9a8d4;
  --text: #831843;
  --muted: #be185d;
  --accent: #db2777;
}

body.theme-dark {
  --bg: #020617;
  --sidebar: #020617;
  --card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.06);
  --text: #f9fafb;
  --muted: #9ca3af;
  --accent: #22d3ee;
}

/* ===============================
   BASE
================================ */
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  display: flex;
  height: 100vh;
}

/* ===============================
   SIDEBAR
================================ */
.sidebar {
  width: 220px;
  background: var(--sidebar);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
}

.logo {
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.nav-item {
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item:hover {
  background: var(--card);
  transform: translateX(4px);
}

.nav-item.active {
  background: var(--card);
  box-shadow: var(--glow);
  animation: pulse 1.8s infinite;
}

/* Glow pulse */
@keyframes pulse {
  0% { box-shadow: 0 0 8px var(--accent); }
  50% { box-shadow: 0 0 22px var(--accent); }
  100% { box-shadow: 0 0 8px var(--accent); }
}

/* ===============================
   MAIN
================================ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.panel-grid {
  padding: 16px;
  display: grid;
  gap: 16px;
}

/* ===============================
   LAYOUT MODES
================================ */
.layout-dashboard .panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.layout-focus .panel-grid {
  grid-template-columns: 1fr;
}

.layout-wide .panel-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ===============================
   PANELS
================================ */
.panel {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  overflow-y: auto;
  animation: fadeUp 0.4s ease both;
}

.panel h2 {
  margin-bottom: 16px;
  font-weight: 600;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===============================
   RESULT VISIBILITY FIX
================================ */
.panel pre {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255,255,255,0.04);
  padding: 16px;
  border-radius: 14px;
  margin-top: 16px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

pre:empty::before {
  content: "Waiting for output …";
  color: var(--muted);
}

/* ===============================
   BUTTONS
================================ */
button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

/* ===============================
   DROP ZONE
================================ */
.drop-zone {
  margin-top: 12px;
  padding: 24px;
  border-radius: 16px;
  border: 2px dashed var(--border);
  text-align: center;
  color: var(--muted);
     }
     
