/* Home page layout */
.home-main {
  padding: 24px 0 48px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 24px;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.hero p {
  color: var(--c-text-muted);
  margin: 0;
  font-size: 14px;
}

.hero-privacy-link {
  color: var(--c-success);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: #f0fdf4;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
  margin-left: 4px;
  transition: all 0.2s;
}

.hero-privacy-link:hover {
  background: #dcfce7;
  color: #15803d;
  text-decoration: none;
}

/* Quick Workspace - fmtany style */
.quick-workspace {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  margin-bottom: 32px;
  overflow: hidden;
}

.home-fmt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--c-border);
}

.home-fmt-left,
.home-fmt-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-fmt-format {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.btn-warning {
  color: #ea580c;
  border-color: #fdba74;
  background: #fff;
}

.btn-warning:hover {
  background: #fff7ed;
  border-color: #fb923c;
  color: #c2410c;
}

.home-fmt-icon-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid var(--c-border);
}

.home-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.home-icon-btn:hover {
  background: #f1f5f9;
  color: var(--c-text-main);
  border-color: #cbd5e1;
}

.home-view-toggle {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-left: 4px;
}

.home-view-btn {
  border: none;
  background: #fff;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--c-text-muted);
  cursor: pointer;
}

.home-view-btn.active {
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
}

.home-btn-example {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.home-auto-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text-muted);
  cursor: pointer;
  user-select: none;
}

.home-auto-toggle input {
  width: 14px;
  height: 14px;
  accent-color: var(--c-primary);
}

.home-fmt-sep {
  width: 1px;
  height: 20px;
  background: var(--c-border);
}

.home-indent-label {
  font-size: 12px;
  color: var(--c-text-muted);
}

.home-indent-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--c-text-muted);
  cursor: pointer;
}

.home-indent-btn.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.home-status-bar {
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--c-border);
}

.home-status-bar.success {
  background: #f0fdf4;
  color: #15803d;
}

.home-status-bar.error {
  background: #fef2f2;
  color: #dc2626;
}

.home-status-main {
  font-weight: 600;
}

.home-status-size {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.home-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
}

.home-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.home-panel + .home-panel {
  border-left: 1px solid var(--c-border);
}

.home-panel-head {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--c-border);
}

.home-panel textarea {
  flex: 1;
  width: 100%;
  min-height: 280px;
  border: none;
  resize: vertical;
  padding: 12px;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-text-main);
  background: transparent;
  outline: none;
  box-sizing: border-box;
}

.home-panel textarea::placeholder {
  color: #94a3b8;
}

.home-tree-view {
  display: none;
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  font-family: var(--font-code);
  font-size: 13px;
  min-height: 280px;
}

.home-tree-view.active {
  display: block;
}

.home-panel.tree-mode textarea {
  display: none;
}

/* JSON tree (与 tool 页一致) */
.home-tree-view .tree-node {
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.home-tree-view .tree-node-toggle {
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  cursor: pointer;
  color: var(--c-text-muted);
}

.home-tree-view .tree-key { color: #7c3aed; font-weight: 500; }
.home-tree-view .tree-val-string { color: #059669; }
.home-tree-view .tree-val-number { color: #d97706; }
.home-tree-view .tree-val-boolean { color: #2563eb; font-weight: bold; }
.home-tree-view .tree-val-null { color: #64748b; font-style: italic; }

@media (max-width: 900px) {
  .home-panels {
    grid-template-columns: 1fr;
  }
  .home-panel + .home-panel {
    border-left: none;
    border-top: 1px solid var(--c-border);
  }
}

@media (max-width: 640px) {
  .home-fmt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .home-fmt-left,
  .home-fmt-right {
    justify-content: flex-start;
  }
}

/* Section Titles */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

/* Tool Grids */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.tool-item {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
}

.tool-item:hover {
  border-color: var(--c-primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.tool-item-title {
  font-weight: 600;
  color: var(--c-text-main);
  font-size: 14px;
  margin-bottom: 4px;
}

.tool-item-desc {
  font-size: 12px;
  color: var(--c-text-muted);
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.category-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
}

.category-card h3 {
  font-size: 15px;
  margin: 0 0 16px 0;
  color: var(--c-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 8px;
}

.category-card ul li a {
  font-size: 13px;
  color: var(--c-text-muted);
  display: block;
  text-decoration: none;
}

.category-card ul li a:hover {
  color: var(--c-primary);
  text-decoration: underline;
}
