body {
  background: #09090b;
  color: #f4f4f5;
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* 并排容器 */
.app-wrapper {
  display: flex;
  flex-direction: row;
  gap: 30px;
  flex-wrap: wrap; /* 屏幕窄时自动换行 */
  justify-content: center;
  max-width: 1760px;
  width: 100%;
}

.container {
  flex: 1; /* 平分宽度 */
  min-width: 380px; /* 三列布局下也能保持统一卡片尺寸 */
  max-width: 520px;
  background: #18181b;
  padding: 30px;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid #27272a;
  display: flex;
  flex-direction: column;
}

.title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
  background: linear-gradient(to right, #6366f1, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 26px;
  font-weight: 800;
}

/* 编辑器特有样式 */
.editor-header {
  margin-bottom: 15px;
}

.save-btn {
  background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%) !important;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3) !important;
}

textarea {
  width: 100%;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 12px;
  color: #fff;
  padding: 15px;
  box-sizing: border-box;
  font-size: 14px;
  outline: none;
  resize: none; /* 禁用手动拉伸以保持卡片整齐 */
  line-height: 1.6;
}

.select-input,
.number-input {
  width: 100%;
  background: #27272a;
  border: 1px solid #3f3f46;
  border-radius: 12px;
  color: #fff;
  padding: 12px 14px;
  box-sizing: border-box;
  font-size: 14px;
  outline: none;
}

textarea:focus { border-color: #6366f1; }
.select-input:focus,
.number-input:focus { border-color: #6366f1; }

.input-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 8px; font-size: 13px; color: #a1a1aa; font-weight: 500; }

.options-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  background: #27272a;
  padding: 15px;
  border-radius: 12px;
}

.checkbox-item { display: flex; align-items: center; font-size: 12px; color: #d4d4d8; cursor: pointer; }
.checkbox-item input { margin-right: 6px; accent-color: #6366f1; }
.inline-input { width: 45px !important; padding: 4px !important; margin-left: 6px; text-align: center; }

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:active { transform: scale(0.98); }

.result-header { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; margin-bottom: 8px; }
.btn-secondary { padding: 6px 16px; border: none; border-radius: 8px; background: #3f3f46; color: #fff; font-size: 12px; cursor: pointer; }

#result { background: #0c0c0e; color: #10b981; border: 1px solid #27272a; font-family: 'Fira Code', monospace; }
#notepad { background: #111113; border-style: dashed; }

.name-library-info {
  margin-top: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #a1a1aa;
}

.name-result-list {
  background: #111113;
  border: 1px dashed #3f3f46;
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
  min-height: 430px;
  max-height: 560px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.name-item {
  background: #1b1b20;
  border: 1px solid #2f2f38;
  border-radius: 10px;
  padding: 10px 12px;
}

.name-copy-btn {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
  text-align: center;
  cursor: pointer;
}

.name-copy-btn:active {
  transform: scale(0.99);
}

.name-cn {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 800;
  color: #f4f4f5;
  letter-spacing: 1px;
  text-align: center;
}

.name-meta {
  margin-top: 5px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

.name-empty-tip {
  grid-column: 1 / -1;
  height: 100%;
  min-height: 404px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  font-size: 14px;
}

@media (max-width: 900px) {
  body {
    padding: 20px 12px;
  }

  .container {
    min-width: 100%;
    max-width: 100%;
    padding: 20px;
  }

  .name-result-list {
    min-height: 340px;
    grid-template-columns: 1fr;
  }
}
