/* ============================================================
   base.css — 全站共享组件层（shadcn 风格）
   覆盖：仪表盘 + 六个工具的所有公共类。
   各工具仅保留打印规则与页面特有样式（在各自 css 中）。
   ============================================================ */

/* ---------- 全局基础 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  min-height: 100vh;
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
  color: hsl(var(--foreground));
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color var(--transition), border-color var(--transition),
    color var(--transition), box-shadow var(--transition), transform var(--transition);
  user-select: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background-color: hsl(var(--primary-hover));
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: hsl(var(--border));
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background-color: hsl(var(--accent));
}

.btn-outline {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  border-color: hsl(var(--input));
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover:not(:disabled) {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-ghost {
  background: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover:not(:disabled) {
  background-color: hsl(var(--accent));
}

.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  height: 42px;
  padding: 0 24px;
  font-size: 15px;
}

/* 打印/导出主按钮（多工具共用） */
.print-btn,
.generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-md);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition);
}

.print-btn:hover:not(:disabled),
.generate-btn:hover:not(:disabled) {
  background-color: hsl(var(--primary-hover));
}

.print-btn:disabled,
.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 打印/导出主按钮（多工具共用） */
.print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-md);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition);
}

.print-btn:hover:not(:disabled) {
  background-color: hsl(var(--primary-hover));
}

.print-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   仪表盘
   ============================================================ */
.header-content-wrapper {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  align-items: stretch;
}

.header-content-wrapper .header {
  flex: 1;
}

.header-content-wrapper .knowledge-banner {
  flex: 1;
}

.header {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-info h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-info p {
  color: hsl(var(--muted-foreground));
  font-size: 15px;
}

.quick-access {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-md);
  padding: 9px 16px;
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all var(--transition);
}

.quick-link:hover {
  border-color: hsl(var(--ring));
  color: hsl(var(--primary));
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.quick-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.knowledge-banner {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.knowledge-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.knowledge-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease;
  background-color: hsl(var(--muted));
}

.knowledge-image:hover {
  transform: scale(1.02);
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

.nav-item:hover {
  border-color: hsl(var(--ring));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.nav-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.nav-item p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.nav-item .status-tag {
  align-self: flex-start;
}

.nav-item.developing {
  opacity: 0.7;
  cursor: not-allowed;
}

.nav-item.developing:hover {
  transform: none;
  border-color: hsl(var(--border));
  box-shadow: var(--shadow-sm);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.status-tag.dev {
  background-color: hsl(var(--warning-100));
  color: hsl(var(--warning));
}

.status-tag.external {
  background-color: hsl(221 83% 53.3% / 0.1);
  color: hsl(var(--primary));
}

.status-tag.internal {
  background-color: hsl(var(--success-100));
  color: hsl(var(--success));
}

.footer {
  text-align: center;
  padding: 24px 16px;
  border-top: 1px solid hsl(var(--border));
  margin-top: 40px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

/* ---------- 弹窗（通用） ---------- */
.modal,
.tutorial-modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active,
.tutorial-modal.active {
  display: flex;
}

.modal-content,
.tutorial-content {
  background-color: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 440px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.modal-content h3,
.tutorial-header h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.modal-content p,
.tutorial-body {
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  line-height: 1.6;
}

.modal-content button {
  margin-top: 8px;
}

.tutorial-modal .tutorial-content {
  text-align: left;
}

.tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid hsl(var(--border));
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.tutorial-header h3 {
  margin: 0;
}

.close-tutorial {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.close-tutorial:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--foreground));
}

.tutorial-section {
  margin-bottom: 14px;
}

.tutorial-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: hsl(var(--foreground));
}

.tutorial-section p,
.tutorial-section li {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

.tutorial-section ul,
.tutorial-section ol {
  padding-left: 20px;
  display: grid;
  gap: 3px;
}

.video-link {
  display: block;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
  background-color: hsl(var(--secondary));
  transition: border-color var(--transition);
}

.video-link:hover {
  border-color: hsl(var(--ring));
  text-decoration: none;
}

.video-link-content h4 {
  font-size: 14px;
  color: hsl(var(--primary));
  margin-bottom: 2px;
}

.video-link-content p {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

/* ============================================================
   工具公共：头部 / 表单 / 预览 / 上传
   ============================================================ */
.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 20px;
}

.form-header h2 {
  font-size: 19px;
  font-weight: 600;
}

.form-desc {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  margin-top: 2px;
}

.form-header-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.back-home,
.help-btn,
.back-home-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.back-home:hover,
.help-btn:hover,
.back-home-btn:hover {
  background-color: hsl(var(--accent));
  text-decoration: none;
}

.form-section,
.preview-section {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 6px;
}

.input-group label a {
  font-weight: 400;
  margin-left: 4px;
}

input[type='text'],
input[type='number'],
input[type='date'],
input[type='password'],
input[type='email'],
input[type='tel'],
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-md);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea {
  min-height: 64px;
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}

.form-input {
  text-align: center;
}

/* 文件上传区 */
.file-upload {
  border: 1.5px dashed hsl(var(--input));
  border-radius: var(--radius-md);
  padding: 14px;
  background-color: hsl(var(--muted) / 0.5);
  display: grid;
  gap: 10px;
}

.file-name {
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  word-break: break-all;
}

.upload-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-sm);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.upload-btn:hover:not(:disabled) {
  background-color: hsl(var(--accent));
}

.upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.data-status {
  font-size: 13px;
  min-height: 18px;
  color: hsl(var(--muted-foreground));
}

/* 年级设置 / 显示设置 */
.grade-settings {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.grade-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.grade-item label {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2px;
}

.display-settings {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: hsl(var(--foreground));
  cursor: pointer;
  user-select: none;
}

.switch-wrapper input[type='checkbox'],
.check-label input[type='checkbox'] {
  width: 15px;
  height: 15px;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}

/* 预览区 */
.preview-section {
  margin-top: 20px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 16px;
}

.preview-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.preview-tip {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  display: block;
  margin-top: 2px;
}

.preview-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.zoom-level {
  min-width: 44px;
  text-align: center;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  font-variant-numeric: tabular-nums;
}

.zoom-btn,
.rows-btn,
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-sm);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.zoom-btn:hover:not(:disabled),
.rows-btn:hover:not(:disabled),
.page-btn:hover:not(:disabled) {
  background-color: hsl(var(--accent));
}

.zoom-btn:disabled,
.rows-btn:disabled,
.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.arrow {
  display: inline-block;
}

/* 分页控制 */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border));
}

.page-info {
  font-size: 13px;
  color: hsl(var(--foreground));
}

.rows-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

.rows-input-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rows-input-group input[type='number'] {
  width: 60px;
  min-height: 30px;
  text-align: center;
  font-size: 13px;
}

.page-buttons {
  display: inline-flex;
  gap: 8px;
}

/* 预览表格（tf/tj） */
.preview-table {
  overflow-x: auto;
}

.preview-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}

.preview-table th,
.preview-table td {
  border: 1px solid hsl(var(--border));
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

.preview-table th {
  background-color: hsl(var(--muted));
  font-weight: 600;
  color: hsl(var(--foreground));
}

.preview-table tr[style*='background-color'] td {
  /* 年级色块由内联 style 控制，这里保证边框可见 */
  border-color: hsl(var(--border));
}

/* 通用表格 */
table.base-table th {
  background-color: hsl(var(--muted));
}

/* ============================================================
   移动端提示
   ============================================================ */
.mobile-warning {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 0.45);
  z-index: 1001;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mobile-warning-content {
  background-color: hsl(var(--popover));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.warning-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.mobile-warning-content h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.mobile-warning-content p {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.browser-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.browser-icon span {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
}

.warning-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-md);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background-color var(--transition);
}

.warning-btn:hover {
  background-color: hsl(var(--primary-hover));
}

/* loading 遮罩（tf/tj PDF 导出） */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgb(255 255 255 / 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-box {
  padding: 16px 24px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  color: hsl(var(--foreground));
}

/* 页脚 */
.page-footer {
  text-align: center;
  padding: 24px 16px;
  margin-top: 32px;
  border-top: 1px solid hsl(var(--border));
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}

/* 加载占位 */
.loading-indicator {
  text-align: center;
  padding: 48px 0;
  color: hsl(var(--muted-foreground));
}

.empty-state {
  text-align: center;
  padding: 48px 0;
  color: hsl(var(--muted-foreground));
}

/* ============================================================
   微信接龙对比工具专有
   ============================================================ */
.header-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.header-container h1 {
  font-size: 24px;
  font-weight: 700;
}

.main-tip {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.back-home-container {
  margin-top: 10px;
}

.input-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.input-container .input-group {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.input-container .input-group h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.input-container textarea {
  min-height: 260px;
  font-size: 13px;
}

.preset-list-container {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.preset-list-container select {
  flex: 1;
  min-width: 140px;
}

.button-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.result-container {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 12px;
}

.result-header h2 {
  font-size: 16px;
  font-weight: 600;
}

#resultList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-item {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background-color: hsl(var(--destructive) / 0.08);
  color: hsl(var(--destructive));
  font-size: 13px;
}

/* 弹窗输入类（long） */
.modal-label {
  display: block;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  text-align: left;
  margin: 12px 0 6px;
}

.modal-input {
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid hsl(var(--input));
  border-radius: var(--radius-md);
  background-color: hsl(var(--background));
  font-size: 14px;
  font-family: inherit;
}

.modal-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}

.modal-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.modal-tip {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  text-align: left;
  margin-top: 8px;
}

.modal-btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.modal-msg-text {
  font-size: 14px;
  color: hsl(var(--foreground));
  margin-bottom: 16px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
  .container {
    padding: 16px 12px 40px;
  }

  .header-content-wrapper {
    flex-direction: column;
  }

  .header,
  .knowledge-banner {
    flex: none;
    width: 100%;
  }

  .header {
    padding: 24px 20px;
  }

  .site-info h1 {
    font-size: 21px;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .form-section,
  .preview-section {
    padding: 18px;
  }

  .input-container {
    grid-template-columns: 1fr;
  }

  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .page-buttons {
    justify-content: center;
  }
}
