:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4f;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #3fb950;
  --accent-hover: #56d364;
  --danger: #f85149;
  --danger-hover: #ff7b72;
  --radius: 8px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
}

.header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.header h1 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 600; }

.subtitle { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.subtitle code {
  background: var(--surface);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  word-break: break-all;
}

.main { display: flex; flex-direction: column; gap: 32px; }

.section h2 { margin: 0 0 16px; font-size: 1.1rem; font-weight: 600; }

.form { display: flex; flex-direction: column; gap: 16px; }

.form-row { display: flex; flex-direction: column; gap: 6px; }

.form-row label { font-size: 0.875rem; color: var(--text-muted); }

.form-row input[type="text"],
.form-row input[type="url"] {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}

.form-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
}

.form-row-check input { width: 18px; height: 18px; }

.form-actions { display: flex; gap: 8px; margin-top: 8px; }

.btn {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { background: #252d3d; }

.btn-small { padding: 6px 10px; font-size: 0.85rem; margin-left: 6px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: rgba(248, 81, 73, 0.15);
  color: var(--danger-hover);
}

.muted { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.destinations-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.destinations-list li {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.destinations-list .info { flex: 1; min-width: 0; }

.destinations-list .name { font-weight: 600; margin-bottom: 4px; }

.destinations-list .name .badge {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

.destinations-list .name .badge-active {
  background: rgba(63, 185, 80, 0.2);
  color: var(--accent);
}

.destinations-list .name .badge-inactive {
  background: rgba(139, 148, 158, 0.2);
  color: var(--text-muted);
}

.destinations-list .url {
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
}

.destinations-list .description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.destinations-list .actions { display: flex; gap: 8px; flex-shrink: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
  z-index: 1000;
  max-width: 90vw;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { border-color: var(--accent); }
.toast.error { border-color: var(--danger); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 { margin: 0 0 20px; font-size: 1.1rem; }
