/* Sitemap XML Generator — Styles — Indigo Deep */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6366F1;
  --primary-dim: rgba(99,102,241,0.12);
  --primary-glow: rgba(99,102,241,0.3);
  --secondary: #818CF8;
  --accent: #22D3EE;
  --accent-dim: rgba(34,211,238,0.12);
  --bg: #0C0C1E;
  --bg-card: #131331;
  --bg-input: #0A0A18;
  --bg-hover: #1A1A40;
  --border: rgba(99,102,241,0.15);
  --border-focus: rgba(99,102,241,0.5);
  --text: #E0E0F8;
  --text-dim: #8888B8;
  --text-muted: #4A4A78;
  --green: #34D399;
  --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(99,102,241,0.06), transparent 50%); pointer-events: none; }

.header { border-bottom: 1px solid var(--border); background: rgba(19,19,49,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), #4F46E5); 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: 1fr 1fr; gap: 16px; min-height: calc(100vh - 100px); }

.editor-panel, .output-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; }
.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; }
.url-count { font-size: 0.72rem; color: var(--text-muted); font-family: var(--mono); }
.output-actions { display: flex; gap: 6px; }

/* Bulk */
.bulk-area { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-end; }
.bulk-editor { flex: 1; padding: 8px 10px; font-family: var(--mono); font-size: 0.78rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; outline: none; resize: none; }
.bulk-editor:focus { border-color: var(--border-focus); }
.bulk-editor::placeholder { color: var(--text-muted); }

/* Add row */
.add-row { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.url-field { flex: 1; padding: 7px 10px; font-family: var(--mono); font-size: 0.8rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; outline: none; }
.url-field:focus { border-color: var(--border-focus); }
.url-field::placeholder { color: var(--text-muted); }
.sel { padding: 6px 24px 6px 8px; font-family: var(--font); font-size: 0.78rem; color: var(--accent); background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; outline: none; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238888B8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 6px center; }

/* URL List */
.url-list { flex: 1; overflow-y: auto; padding: 8px; }
.url-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); border: 1px solid rgba(99,102,241,0.08); border-radius: 6px; margin-bottom: 4px; font-size: 0.78rem; transition: all var(--transition); }
.url-item:hover { border-color: rgba(99,102,241,0.25); background: var(--bg-hover); }
.url-item-url { flex: 1; font-family: var(--mono); color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-item-meta { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; }
.url-item-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 1rem; padding: 2px 4px; border-radius: 4px; transition: background var(--transition); }
.url-item-remove:hover { background: var(--red-dim); }

/* XML Output */
.xml-output { 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; word-wrap: break-word; background: var(--bg-input); margin: 0; }

/* Toast */
.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; display: flex; align-items: center; gap: 8px; animation: toastIn 0.3s ease; }
.toast.success { border-color: rgba(52,211,153,0.4); }
.toast.error { border-color: rgba(248,113,113,0.4); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .add-row { flex-wrap: wrap; }
  .url-field { min-width: 100%; }
}
