/* HTML Table to CSV/JSON — styles.css — Emerald Pulse */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #10B981;
  --secondary: #34D399;
  --accent: #6366F1;
  --bg: #0A1A14;
  --bg-card: rgba(12, 28, 22, 0.9);
  --surface: rgba(20, 50, 38, 0.5);
  --border: rgba(16, 185, 129, 0.1);
  --text: #E4F0EA;
  --text-dim: #7CA895;
  --text-muted: #4A7A68;
  --radius: 12px;
  --radius-sm: 8px;
  --glass: rgba(10, 26, 20, 0.85);
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--glass); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo { width: 34px; height: 34px; background: linear-gradient(135deg, var(--primary), var(--secondary)); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.header h1 { font-size: 15px; font-weight: 600; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-right { display: flex; gap: 8px; }

.btn {
  padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500; cursor: pointer; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--primary); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #059669); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-sm { padding: 5px 10px; font-size: 11px; }

.app-container { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; height: calc(100vh - 61px); }

.panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.panel-header h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-dim); }
.panel-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-top: 1px solid var(--border);
}
.hint { font-size: 11px; color: var(--text-muted); margin-left: auto; }

.code-editor {
  flex: 1; width: 100%; padding: 14px; background: transparent; border: none; outline: none;
  color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.6;
  resize: none;
}
.code-editor::placeholder { color: var(--text-muted); }

.format-tabs { display: flex; gap: 2px; }
.format-tab {
  padding: 5px 10px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: transparent; color: var(--text-muted); font-size: 11px; font-weight: 500;
  cursor: pointer; transition: var(--transition); font-family: 'Inter', sans-serif;
}
.format-tab:hover { color: var(--text); }
.format-tab.active { background: rgba(16, 185, 129, 0.12); border-color: var(--primary); color: var(--primary); }

.output-preview {
  flex: 1; padding: 14px; overflow: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; color: var(--text);
}

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: 13px; color: var(--text);
  opacity: 0; transition: all 0.3s ease; z-index: 200; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }

@media (max-width: 768px) { .app-container { grid-template-columns: 1fr; height: auto; } .panel { min-height: 40vh; } }
