/* Gitignore Generator — Violet theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #8B5CF6;
  --primary-dim: rgba(139,92,246,0.12);
  --primary-glow: rgba(139,92,246,0.3);
  --secondary: #C4B5FD;
  --accent: #F5F3FF;
  --bg: #0F0A20;
  --bg-card: #1A1336;
  --bg-input: #0C0818;
  --bg-hover: #241C48;
  --border: rgba(139,92,246,0.15);
  --border-focus: rgba(139,92,246,0.5);
  --text: #E6E0F8;
  --text-dim: #9B8FBD;
  --text-muted: #584E78;
  --green: #34D399;
  --green-dim: rgba(52,211,153,0.12);
  --red: #F87171;
  --red-dim: rgba(248,113,113,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.5);
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at top, rgba(139,92,246,0.06), transparent 50%); pointer-events: none; }

.header { border-bottom: 1px solid var(--border); background: rgba(26,19,54,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }
.header-actions { display: flex; gap: 6px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-family: var(--font); font-size: 0.8rem; font-weight: 500; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #7C3AED); color: white; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); background: var(--primary-dim); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }

.main { max-width: 1200px; margin: 0 auto; padding: 20px; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; min-height: calc(100vh - 100px); }

.templates-panel, .output-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-label { font-size: 0.75rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.selected-count { font-size: 0.72rem; color: var(--text-muted); font-family: var(--mono); }

.search-box { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.search-field { width: 100%; padding: 7px 10px; font-family: var(--font); font-size: 0.82rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; outline: none; }
.search-field:focus { border-color: var(--border-focus); }
.search-field::placeholder { color: var(--text-muted); }

.template-list { flex: 1; overflow-y: auto; padding: 6px; }
.template-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 0.82rem; transition: all var(--transition); border: 1px solid transparent; margin-bottom: 2px; }
.template-item:hover { background: var(--bg-hover); }
.template-item.selected { background: var(--primary-dim); border-color: rgba(139,92,246,0.3); }
.template-item .emoji { width: 20px; text-align: center; }
.template-item .name { flex: 1; font-weight: 500; }
.template-item .check { color: var(--primary); font-weight: 700; opacity: 0; transition: opacity var(--transition); }
.template-item.selected .check { opacity: 1; }

.custom-area { padding: 10px 14px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.6; color: var(--text); background: var(--bg-input); border: none; border-bottom: 1px solid var(--border); outline: none; resize: none; }
.custom-area::placeholder { color: var(--text-muted); }

.output-code { flex: 1; padding: 14px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.7; color: var(--text-dim); overflow: auto; white-space: pre-wrap; margin: 0; background: var(--bg-input); }

.test-section { border-top: 1px solid var(--border); }
.test-row { display: flex; gap: 8px; align-items: center; padding: 8px 10px; }
.test-result { font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.test-result.ignored { color: var(--red); }
.test-result.tracked { color: var(--green); }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .templates-panel { max-height: 300px; }
  .header-inner { flex-wrap: wrap; gap: 8px; }
}
