/* ===== 蓝夹缬统一主题 ===== */
/* 靛蓝深底 + 蓝白纹样 + 雕版夹缬质感 */

:root {
  /* 靛蓝体系 */
  --bg-deep: #040c30;
  --ink-1: #071840;
  --ink-2: #0f2c5a;
  --ink-3: #1a3e78;
  --ink-4: #2555a0;

  /* 织物/宣纸暖白 */
  --cloth: rgba(244, 240, 230, 0.96);
  --cloth-2: rgba(248, 250, 252, 0.92);
  --paper: rgba(255, 255, 255, 0.94);

  /* 面板 */
  --panel-bg: rgba(255, 255, 255, 0.90);
  --panel-border: rgba(15, 35, 65, 0.10);

  /* 文字 */
  --text-main: rgba(15, 23, 42, 0.94);
  --text-soft: rgba(51, 65, 85, 0.88);
  --text-muted: rgba(100, 116, 139, 0.82);

  /* 木质点缀 */
  --wood: #77401a;
  --wood-soft: rgba(119, 64, 26, 0.14);

  /* 阴影 */
  --shadow-lg: 0 18px 54px rgba(2, 6, 23, 0.26);
  --shadow-md: 0 12px 34px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);

  /* 圆角 */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 22px;
  --radius-xl: 26px;

  /* 过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== 基础重置 ===== */
html { min-height: 100%; }

body {
  min-height: 100vh;
  color: var(--text-main);
  background: var(--bg-deep);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  margin: 0;
}

/* ===== 蓝夹缬全站背景纹样 ===== */
body.blue-jiaxie-theme,
body.mockup-theme {
  background-color: var(--bg-deep) !important;
  background-image:
    url("../../bgimg/上面花纹白色.png"),
    url("../../bgimg/下面花纹-28.png");
  background-repeat: no-repeat, no-repeat;
  background-position: top center, bottom center;
  background-size: 100% auto, 100% auto;
  background-attachment: fixed, fixed;
}

/* 靛蓝光晕氛围层 */
body.blue-jiaxie-theme::before,
body.mockup-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1100px 700px at 18% 10%, rgba(31, 67, 116, 0.22), transparent 50%),
    radial-gradient(900px 650px at 85% 20%, rgba(119, 64, 26, 0.08), transparent 55%),
    radial-gradient(1000px 800px at 65% 85%, rgba(31, 67, 116, 0.15), transparent 58%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* 布面颗粒感 */
body.blue-jiaxie-theme::after,
body.mockup-theme::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.025), rgba(255,255,255,0.025)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
  opacity: 0.5;
}

/* ===== 盒模型 ===== */
*, *::before, *::after { box-sizing: border-box; }

/* ===== 主容器 ===== */
.container.blue-jiaxie-pattern,
main.container,
.page-shell {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: transparent;
}

.container.blue-jiaxie-pattern {
  max-width: 1240px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 26px !important;
}

/* ===== 雕版边框面板 ===== */
.jiaxie-carved {
  position: relative;
  background: linear-gradient(180deg, var(--paper), rgba(246, 249, 253, 0.88));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.jiaxie-carved::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius) - 8px);
  pointer-events: none;
  border: 1px dashed rgba(31, 67, 116, 0.20);
}

.jiaxie-carved::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(31,67,116,0.10) 0 12px, transparent 12px calc(100% - 12px), rgba(31,67,116,0.10) calc(100% - 12px)),
    linear-gradient(0deg, rgba(31,67,116,0.08) 0 12px, transparent 12px calc(100% - 12px), rgba(31,67,116,0.08) calc(100% - 12px));
  opacity: 0.5;
}

.jiaxie-carved > * { position: relative; z-index: 1; }

/* ===== 展陈展板 ===== */
.exhibit-board {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 28px;
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(31,67,116,0.12), transparent 55%),
    radial-gradient(900px 520px at 86% 14%, rgba(119,64,26,0.08), transparent 58%),
    radial-gradient(1200px 600px at 50% 80%, rgba(31,67,116,0.06), transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(248,250,252,0.78));
  border: 1px solid rgba(255,255,255,0.38);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.exhibit-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 26px 26px, rgba(31,67,116,0.20) 0 1px, transparent 1px),
    radial-gradient(circle at 26px 26px, rgba(119,64,26,0.07) 0 2px, transparent 2px),
    linear-gradient(90deg, rgba(31,67,116,0.10) 0 14px, transparent 14px calc(100% - 14px), rgba(31,67,116,0.10) calc(100% - 14px)),
    linear-gradient(0deg, rgba(31,67,116,0.08) 0 14px, transparent 14px calc(100% - 14px), rgba(31,67,116,0.08) calc(100% - 14px)),
    url("../../bgimg/纹样-20.png"),
    url("../../bgimg/纹样-21.png");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: 0 0, 0 0, 0 0, 0 0, left -18px top -18px, right -18px top -18px;
  background-size: 32px 20px, 48px 32px, auto, auto, 180px 180px, 180px 180px;
  opacity: 0.78;
}

.exhibit-board::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 18px;
  pointer-events: none;
  border: 1px dashed rgba(31,67,116,0.20);
  opacity: 0.85;
}


.exhibit-board > * { position: relative; z-index: 1; }

/* ===== 展陈卡片 ===== */
.board-card {
  position: relative;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(31,67,116,0.12);
  box-shadow: var(--shadow-md);
  padding: 18px;
  overflow: hidden;
}

.board-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(31,67,116,0.16);
  pointer-events: none;
  opacity: 0.8;
}

.board-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16px 16px, rgba(31,67,116,0.14) 0 8px, transparent 8px),
    radial-gradient(circle at calc(100% - 16px) 16px, rgba(31,67,116,0.10) 0 8px, transparent 8px),
    radial-gradient(circle at 16px calc(100% - 16px), rgba(31,67,116,0.10) 0 8px, transparent 8px),
    radial-gradient(circle at calc(100% - 16px) calc(100% - 16px), rgba(31,67,116,0.14) 0 8px, transparent 8px),
    linear-gradient(90deg, rgba(31,67,116,0.08), rgba(31,67,116,0.02));
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-position: 0 0, 0 0, 0 0, 0 0, left top;
  background-size: auto, auto, auto, auto, 100% 10px;
  opacity: 0.5;
}

.board-card > * { position: relative; z-index: 1; }

/* ===== 按钮系统 ===== */
.btn, .primary-btn, .ghost-btn, .mini-btn, .mode-switch-btn,
button.btn, button[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), filter 0.15s ease,
              background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.02em;
  user-select: none;
}

.btn:active, .primary-btn:active, .ghost-btn:active,
.mini-btn:active, .mode-switch-btn:active {
  transform: scale(0.97);
}

/* 主要按钮：靛蓝 */
.btn, .primary-btn {
  background: linear-gradient(180deg, var(--ink-3) 0%, var(--ink-2) 100%);
  color: rgba(255,255,255,0.96);
  border: 1px solid rgba(8, 22, 48, 0.20);
  box-shadow: 0 8px 20px rgba(7, 21, 49, 0.16);
}

.btn:hover, .primary-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(7, 21, 49, 0.22);
}

.btn:disabled, .primary-btn:disabled {
  background: #8a9bb5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 次要/幽灵按钮 */
.btn-ghost, .ghost-btn {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid rgba(15, 23, 42, 0.20);
}

.btn-ghost:hover, .ghost-btn:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-main);
  border-color: rgba(31, 67, 116, 0.28);
}

/* 成功/木质按钮 */
.btn-success {
  background: linear-gradient(180deg, #8f5930, #6f3f19);
  border: 1px solid rgba(90, 40, 16, 0.22);
  color: rgba(255,255,255,0.96);
  box-shadow: 0 8px 20px rgba(119, 64, 26, 0.20);
}

/* 印章按钮 */
.stamp-btn {
  border-radius: 14px !important;
  letter-spacing: 0.08em;
  font-weight: 900 !important;
}

.stamp-btn:active { transform: translateY(1px); }

/* ===== 面板标题 ===== */
.panel-title {
  margin-bottom: 14px;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ===== 表单控件 ===== */
input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: var(--paper);
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  border-color: rgba(119, 64, 26, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(119, 64, 26, 0.12) !important;
  background: #fff !important;
}

textarea { min-height: 100px; resize: vertical; }

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-main);
  font-size: 14px;
}

/* ===== 蓝夹缬印章徽标 ===== */
.jiaxie-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31,67,116,0.22);
  background: linear-gradient(180deg, rgba(244,240,230,0.92), rgba(244,240,230,0.78));
  color: rgba(31,67,116,0.92);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.jiaxie-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(119,64,26,0.78);
  box-shadow: 0 0 0 4px rgba(119,64,26,0.12);
  flex-shrink: 0;
}

.jiaxie-badge.ok { color: #15803d; border-color: rgba(22,163,74,0.24); background: rgba(220,252,231,0.85); }
.jiaxie-badge.ok::before { background: rgba(22,163,74,0.78); box-shadow: 0 0 0 4px rgba(22,163,74,0.14); }
.jiaxie-badge.fail { color: #b91c1c; border-color: rgba(185,28,28,0.28); background: rgba(254,226,226,0.88); }
.jiaxie-badge.fail::before { background: rgba(220,38,38,0.78); box-shadow: 0 0 0 4px rgba(220,38,38,0.14); }

/* ===== 印章药丸 ===== */
.stamp-pill {
  border-radius: 14px !important;
  box-shadow: 0 14px 30px rgba(2,6,23,0.12);
}

/* ===== 顶部导航 ===== */
.top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  background: linear-gradient(180deg, rgba(15,44,90,0.94), rgba(10,30,64,0.96));
  border-radius: var(--radius);
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}

.top-nav-item {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 10px 18px;
  margin: 3px 4px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.top-nav-item:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-1px);
  color: #fff;
}

.top-nav-item.active {
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ===== 进度条 ===== */
.progress-shell {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8eef8, #f5f7fb);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(14,25,56,0.10);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ink-2), var(--ink-4), var(--ink-2));
  background-size: 200% 100%;
  animation: progressShimmer 2.2s linear infinite;
  transition: width 0.35s ease;
}

.progress-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: #516072;
}

.progress-eta {
  margin-top: 8px;
  font-size: 13px;
  color: #6b7888;
  text-align: right;
}

/* ===== 加载动画 ===== */
.spinner {
  border: 4px solid #eef3f9;
  border-top: 4px solid var(--wood);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 16px;
}

/* ===== 模态遮罩 ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5,12,34,0.28);
  backdrop-filter: blur(4px);
  z-index: 3000;
}

/* ===== 图片容器 ===== */
.image-container {
  width: 100%;
  min-height: 320px;
  background: rgba(255,255,255,0.90);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(15,23,42,0.18);
  overflow: hidden;
}

.image-wrapper {
  width: 100%;
  height: 320px;
  background: linear-gradient(180deg, #fbfcfe 0%, #eef2f8 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(31,67,116,0.10);
  overflow: hidden;
}

/* ===== 通用状态卡 ===== */
.state-card {
  background: #f4f7fb;
  border: 1px dashed #bfd0e5;
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: #5b6b82;
}

/* ===== 响应式 ===== */
@media (max-width: 1180px) {
  .container.blue-jiaxie-pattern {
    max-width: none;
    width: auto !important;
    padding: 18px !important;
  }
}

@media (max-width: 900px) {
  body, body.blue-jiaxie-theme, body.mockup-theme {
    padding: 12px !important;
  }
  .top-nav {
    overflow-x: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }
  .top-nav-item { white-space: nowrap; }
}

@media (max-width: 768px) {
  .exhibit-board { padding: 18px; }
}

/* ===== 关键帧 ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes progressShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
