/* === CSS Variables (solarized-osaka-night) === */
:root {
  --bg-main: #0b1720;
  --bg-panel: #001f2a;
  --bg-panel-soft: #022737;
  --fg-primary: #e5f2f7;
  --fg-muted: #8fa1ad;
  --fg-accent: #b3ecff;
  --accent-cyan: #2aa198;
  --accent-blue: #268bd2;
  --accent-magenta: #d33682;
  --accent-yellow: #b58900;
  --accent-orange: #cb4b16;
  --accent-green: #859900;
  --border-subtle: #123345;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.55);
  --font-mono: "Fira Code", "Courier New", monospace;
  --font-sans: system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--fg-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 0;
}

.badge {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(
    135deg,
    var(--bg-panel) 0%,
    var(--bg-panel-soft) 100%
  );
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  z-index: 100;
  transform: rotate(3deg);
}
.badge-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-magenta);
}
.badge-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-orange);
  font-weight: 500;
}

.container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 24px 100px;
  z-index: 1;
}

/* === Top Toolbar Row === */
.top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 0;
  flex-wrap: wrap;
}
.top-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.penguin-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.top-toolbar-title {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.02em;
  margin: 0;
}
.top-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Mode Buttons (pill/toggle style) */
.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-primary);
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.mode-btn:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-panel);
}
.mode-btn.active {
  background: var(--accent-cyan);
  color: var(--bg-main);
  border-color: var(--accent-cyan);
}
.mode-btn .btn-icon {
  width: 16px;
  height: 16px;
}

/* === Search & Target Row === */
.search-target-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.target-wrapper {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  position: relative;
}
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--fg-muted);
  pointer-events: none;
}
.target-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--fg-primary);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.target-input::placeholder {
  color: var(--fg-muted);
}
.target-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(38, 139, 210, 0.2);
}

.search-wrapper {
  flex: 2;
  min-width: 200px;
  position: relative;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--fg-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--fg-primary);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-input::placeholder {
  color: var(--fg-muted);
}
.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(42, 161, 152, 0.2);
}

/* === Filter Dropdown === */
.filter-dropdown-wrapper {
  position: relative;
}
.filter-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-toggle-btn svg {
  width: 20px;
  height: 20px;
}
.filter-toggle-btn:hover,
.filter-toggle-btn[aria-expanded="true"] {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--bg-panel-soft);
}
.filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  z-index: 100;
  padding: 12px;
}
.filter-dropdown[hidden] {
  display: none;
}
.filter-dropdown-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--accent-cyan);
  color: var(--bg-main);
}
.btn-primary:hover {
  background: #35b5a8;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-panel-soft);
  color: var(--fg-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-panel);
  border-color: var(--accent-cyan);
}
.btn-danger {
  background: rgba(211, 54, 130, 0.15);
  color: var(--accent-magenta);
  border: 1px solid var(--accent-magenta);
}
.btn-danger:hover {
  background: var(--accent-magenta);
  color: var(--fg-primary);
}
.btn-small {
  padding: 6px 10px;
  font-size: 0.75rem;
}
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.btn-ghost:hover {
  color: var(--accent-cyan);
  background: var(--bg-panel-soft);
}

/* === Collapsible URLs Panel === */
.urls-panel {
  margin-bottom: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.urls-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.urls-toggle:hover {
  background: var(--bg-panel-soft);
}
.toggle-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-blue);
}
.urls-count {
  margin-left: auto;
  padding: 2px 10px;
  font-size: 0.8rem;
  background: var(--bg-panel-soft);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
}
.chevron-icon {
  width: 20px;
  height: 20px;
  color: var(--fg-muted);
  transition: transform var(--transition-fast);
}
.urls-toggle[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}
.urls-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border-subtle);
}
.urls-content[hidden] {
  display: none;
}
.url-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding-top: 16px;
}
.url-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: var(--bg-panel-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}
.url-item:hover {
  border-color: var(--border-subtle);
}
.url-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.url-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-primary);
}
.url-actions {
  display: flex;
  gap: 4px;
}
.url-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-blue);
  text-decoration: none;
  word-break: break-all;
  margin-bottom: 4px;
}
.url-link:hover {
  text-decoration: underline;
}
.url-desc {
  font-size: 0.75rem;
  color: var(--fg-muted);
}
.url-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

/* === Category Filters === */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.filter-btn {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.filter-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--fg-primary);
}
.filter-btn.active {
  background: var(--accent-cyan);
  color: var(--bg-main);
  border-color: var(--accent-cyan);
}

/* === Section Blocks === */
.section-block {
  margin-bottom: 40px;
}
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.section-header h2 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-cyan);
}
.section-count {
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
}
.section-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Add Dropdown */
.add-dropdown-wrapper {
  position: relative;
}
.btn-compact {
  padding: 8px 14px;
  font-size: 0.85rem;
}
.chevron-icon-small {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  transition: transform var(--transition-fast);
}
.btn[aria-expanded="true"] .chevron-icon-small {
  transform: rotate(180deg);
}
.add-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  z-index: 100;
  overflow: hidden;
}
.add-dropdown[hidden] {
  display: none;
}
.add-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--fg-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-align: left;
}
.add-dropdown-item:hover {
  background: var(--bg-panel-soft);
}
.add-dropdown-item .btn-icon {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

/* Icon-only button */
.btn-icon-only {
  padding: 10px;
  min-width: 44px;
  justify-content: center;
}
.btn-icon-only svg {
  width: 20px;
  height: 20px;
}

/* === Command Grid (Original Multi-Column) === */
.command-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1200px) {
  .command-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .command-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .command-grid {
    grid-template-columns: 1fr;
  }
}

.command-group {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.group-header {
  padding: 16px 20px;
  background: linear-gradient(
    135deg,
    var(--bg-panel-soft) 0%,
    var(--bg-panel) 100%
  );
  border-bottom: 1px solid var(--border-subtle);
}
.group-header h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}
.group-commands {
  padding: 8px 0;
}
.group-commands.collapsed .command-card:nth-child(n+6) {
  display: none;
}
.expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.expand-btn:hover {
  background: var(--bg-panel-soft);
  color: var(--accent-cyan);
}
.expand-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}
.expand-btn.expanded svg {
  transform: rotate(180deg);
}

.command-card {
  display: block;
  padding: 12px 20px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.command-card:hover {
  background: var(--bg-panel-soft);
}
.command-card:focus {
  outline: none;
  background: var(--bg-panel-soft);
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}
.command-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-yellow);
  margin-bottom: 4px;
}
.command-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.command-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.tag {
  padding: 2px 6px;
  font-size: 0.65rem;
  background: var(--bg-main);
  color: var(--fg-muted);
  border-radius: 3px;
  font-family: var(--font-mono);
}

/* === One-Liner Grid === */
.oneliner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .oneliner-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .oneliner-grid {
    grid-template-columns: 1fr;
  }
}

.oneliner-item {
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}
.oneliner-item:hover {
  border-color: var(--accent-cyan);
}
.oneliner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.oneliner-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg-primary);
}
.oneliner-actions {
  display: flex;
  gap: 4px;
}
.oneliner-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent-yellow);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  display: block;
}
.oneliner-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 10px;
}
.oneliner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

/* === Empty States === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-icon {
  width: 80px;
  height: 80px;
  color: var(--fg-muted);
  margin-bottom: 20px;
  opacity: 0.5;
}
.empty-state p {
  font-size: 1.1rem;
  color: var(--fg-primary);
  margin-bottom: 8px;
}
.empty-hint {
  font-size: 0.9rem;
  color: var(--fg-muted);
}
.empty-state-inline {
  padding: 30px;
  text-align: center;
}
.empty-state-inline p {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* === Modal === */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
}
.modal[hidden] {
  display: none;
}
.modal.active {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: transform var(--transition-normal);
}
.modal.active .modal-content {
  transform: scale(1) translateY(0);
}
.modal-small {
  max-width: 420px;
}
.modal-large {
  max-width: 700px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg-primary);
}
.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-close svg {
  width: 20px;
  height: 20px;
}
.modal-close:hover {
  background: var(--bg-panel-soft);
  color: var(--fg-primary);
}
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-panel-soft);
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* === View Mode === */
.command-name-display {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}
.command-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
}
.command-group-display {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.command-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.category-tag {
  padding: 3px 8px;
  font-size: 0.7rem;
  background: var(--accent-cyan);
  color: var(--bg-main);
  border-radius: 3px;
  font-family: var(--font-mono);
}
.command-section {
  margin-bottom: 24px;
}
.command-section:last-child {
  margin-bottom: 0;
}
.command-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.command-section p {
  color: var(--fg-primary);
  line-height: 1.7;
}

.examples-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.example-item-wrapper {
  position: relative;
}
.example-item {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 12px 44px 12px 14px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent-yellow);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  display: block;
  width: 100%;
}
.example-comment-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-subtle);
  color: var(--fg-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  opacity: 0.7;
}
.example-comment-btn:hover {
  opacity: 1;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.example-comment-btn.has-comment {
  opacity: 1;
  color: var(--accent-green);
  border-color: var(--accent-green);
  background: rgba(133, 153, 0, 0.1);
}
.example-comment-btn svg {
  width: 14px;
  height: 14px;
}
.example-comment {
  font-size: 0.85rem;
  color: var(--accent-green);
  padding: 10px 14px;
  background: rgba(133, 153, 0, 0.1);
  border: 1px solid rgba(133, 153, 0, 0.2);
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

/* Comment Modal */
.comment-example-display {
  padding: 14px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  overflow-x: auto;
}
.comment-example-display code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-yellow);
  white-space: pre-wrap;
  word-break: break-all;
}

/* === Form === */
.form-group {
  margin-bottom: 16px;
}
.form-group:last-child {
  margin-bottom: 0;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--fg-primary);
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}
.form-input::placeholder {
  color: var(--fg-muted);
  opacity: 0.6;
}
.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(42, 161, 152, 0.15);
}
.form-textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}
.form-textarea-tall {
  min-height: 120px;
}
select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238fa1ad' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
.form-row {
  display: flex;
  gap: 16px;
}
.form-group-wide {
  flex: 1;
}
.category-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 4px 10px;
  background: var(--bg-panel-soft);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}
.checkbox-label:hover {
  border-color: var(--border-subtle);
}
.checkbox-label:has(input:checked) {
  background: var(--accent-cyan);
  color: var(--bg-main);
}
.checkbox-label input {
  display: none;
}

/* Delete Modal */
.delete-warning {
  font-size: 1rem;
  color: var(--fg-primary);
  margin-bottom: 8px;
}
.delete-warning strong {
  color: var(--accent-cyan);
}
.delete-note {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* === Footer === */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(to top, var(--bg-main) 0%, transparent 100%);
  z-index: 50;
}
.footer-brand {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-cyan);
}
.footer-divider {
  color: var(--border-subtle);
}
.footer-text {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .top-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .top-toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }
  .search-target-row {
    flex-direction: column;
  }
  .target-wrapper,
  .search-wrapper {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .filter-dropdown {
    right: auto;
    left: 0;
    min-width: 280px;
  }
  .section-header {
    flex-wrap: wrap;
  }
  .section-header-actions {
    width: 100%;
    margin-left: 0;
    margin-top: 12px;
  }
}

@media (max-width: 600px) {
  .badge {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    transform: rotate(2deg);
  }
  .badge-text {
    font-size: 0.75rem;
  }
  .mode-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  .filter-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
  }
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
}

/* ... [All existing CSS variables and styles remain] ... */

/* === Data Management Modal Styles (Add these to the end) === */
.data-intro {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.data-actions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.data-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.data-action-item:hover {
  border-color: var(--accent-blue);
}

.data-info h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--fg-primary);
  margin-bottom: 4px;
}

.data-info p {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.danger-zone {
  border-color: rgba(211, 54, 130, 0.3);
  background: rgba(211, 54, 130, 0.05);
}

.danger-zone:hover {
  border-color: var(--accent-magenta);
}

/* Responsive adjustment for data modal */
@media (max-width: 500px) {
  .data-action-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .data-action-item .btn {
    width: 100%;
    justify-content: center;
  }
}
