/*
 * PUBG 物理测距尺 Web 样式设计规范
 * 风格：Apple 极简专业设计语言，严肃严谨，克制精准
 */

:root {
  --bg-primary: #0a0b0d;
  --bg-secondary: #131519;
  --bg-card: #181a20;
  --bg-card-hover: #1f222a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.25);
  --border-active: #3b82f6;
  
  --text-main: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-amber: #d97706;
  --accent-green: #059669;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* 顶部导航与标头 */
.app-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(19, 21, 25, 0.75);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: block;
  flex-shrink: 0;
}

.brand-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Apple 风格步骤指示器 */
.stepper-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.stepper-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.step-indicator-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  background: transparent;
}

.step-indicator-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.step-indicator-item.active {
  background: rgba(59, 130, 246, 0.06);
  border-left-color: var(--accent-blue);
}

.step-indicator-item.completed {
  border-left-color: var(--accent-green);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-focus);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: all 0.2s;
}

.step-indicator-item.active .step-num {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.step-indicator-item.completed .step-num {
  background: rgba(5, 150, 105, 0.2);
  border-color: var(--accent-green);
  color: #10b981;
}

.step-info {
  display: flex;
  flex-direction: column;
}

.step-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.step-indicator-item.active .step-name {
  color: #ffffff;
}

/* 主内容布局: 左侧表单与引导 + 右侧实时物理预览 */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
}

/* 面板卡片 */
.glass-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

/* 步骤内容区域 */
.step-section {
  display: none;
}

.step-section.active {
  display: block;
}

.step-headline {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.step-subtext {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* 卡片网格选项 */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

#screenPresetContainer {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

#screenPresetContainer::-webkit-scrollbar {
  width: 6px;
}

#screenPresetContainer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.option-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.option-card.active {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue);
}

.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.option-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.option-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}

.option-desc {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.badge-stretched {
  background: rgba(217, 119, 6, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-standard {
  background: rgba(5, 150, 105, 0.15);
  color: #10b981;
  border: 1px solid rgba(5, 150, 105, 0.3);
}

/* 表单与输入框 */
.form-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-input, .form-select {
  width: 100%;
  background: #0d0f12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue);
}

.input-unit {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* 状态框 */
.status-box {
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}

.status-info {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

.status-warning {
  background: rgba(217, 119, 6, 0.08);
  border-color: rgba(217, 119, 6, 0.2);
  color: #fcd34d;
}

.status-success {
  background: rgba(5, 150, 105, 0.08);
  border-color: rgba(5, 150, 105, 0.2);
  color: #6ee7b7;
}

.status-danger {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.text-warning {
  color: #f59e0b;
}

/* 测量指引说明卡 */
.guide-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-focus);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.guide-step-list {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.guide-step-list li {
  margin-bottom: 0.35rem;
}

.guide-step-list code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: #e5e7eb;
  font-family: var(--font-mono);
}

/* 按钮组 */
.btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

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

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

/* 右侧预览容器 */
.preview-sticky {
  position: sticky;
  top: 5rem;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.preview-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.preview-badge {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.preview-canvas-wrapper {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-canvas-wrapper svg {
  width: 100%;
  height: auto;
  display: block;
}

.preview-meta {
  margin-top: 0.75rem;
}

.preview-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.preview-meta-item {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.45;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-meta-item .meta-label {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  white-space: nowrap;
  margin-right: 0.5rem;
}

.preview-meta-item .meta-val {
  color: #f1f5f9;
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

/* 单选组风格 */
.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Apple 风格 Tab 分段控制器 */
.tab-pill-group {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  gap: 0.2rem;
  width: 100%;
}

.tab-pill {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.tab-pill:hover {
  color: #ffffff;
}

.tab-pill.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 显示器数据库卡片列表 */
.monitor-db-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.monitor-db-list::-webkit-scrollbar {
  width: 6px;
}

.monitor-db-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.monitor-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.monitor-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.monitor-item-card.active {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px var(--accent-blue);
}

.monitor-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.monitor-item-brand {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.monitor-item-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.monitor-item-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.monitor-item-specs {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
}

.spec-pill-group {
  display: flex;
  gap: 0.35rem;
}

.spec-pill {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
}

.spec-dim {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}


/* 打印模式 (@media print) */
@media print {
  @page {
    size: portrait;
    margin: 0;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0;
    padding: 0;
  }

  .app-header,
  .stepper-nav,
  .glass-panel:first-child,
  .preview-header,
  .preview-meta,
  .btn-row,
  .toast-container,
  .app-footer {
    display: none !important;
  }

  .main-wrapper {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .preview-sticky {
    position: static !important;
  }

  .preview-canvas-wrapper {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
}

/* 折叠面板 (Collapsible) */
.collapsible-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s;
}

.collapsible-box:hover {
  border-color: var(--border-focus);
}

.collapsible-header {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.collapsible-arrow {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
  display: inline-block;
}

.collapsible-box.open .collapsible-arrow {
  transform: rotate(90deg);
}

.collapsible-action-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.collapsible-body {
  padding: 0 1rem 0.85rem 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

/* 自定义极简 Toast 提示弹窗 (替代原生 alert) */
.toast-container {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: rgba(19, 21, 25, 0.96);
  border: 1px solid var(--border-focus);
  backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  animation: toastFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 90vw;
}

.toast-item.toast-success {
  border-color: rgba(5, 150, 105, 0.5);
}

.toast-item.toast-warning {
  border-color: rgba(217, 119, 6, 0.5);
}

.toast-item.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
}

@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
}

/* 自定义下拉菜单组件 (彻底解决 Linux Wayland 系统级 popup 闪退) */
.custom-dropdown {
  position: relative;
  user-select: none;
}

.custom-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d0f12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #ffffff;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}

.custom-dropdown-btn:hover,
.custom-dropdown-btn:focus {
  border-color: var(--accent-blue);
  outline: none;
}

.custom-dropdown-btn.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-arrow {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  transition: transform 0.2s ease;
  margin-left: 0.5rem;
  display: inline-block;
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 200px;
  max-height: 280px;
  overflow-y: auto;
  background: #131519;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  padding: 0.35rem 0;
}

.custom-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.custom-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.12s ease;
}

.custom-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.custom-dropdown-item.active {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  font-weight: 600;
}

.custom-dropdown-badge {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* 现代暗黑复选框 */
.form-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--border-focus);
  border-radius: 4px;
  background: #0d0f12;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s ease;
  margin: 0;
  vertical-align: middle;
}

.form-checkbox:checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.form-checkbox:checked::before {
  content: "";
  width: 0.45rem;
  height: 0.25rem;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(0.5px, -1px);
}

/* 模态弹窗组件 (Apple 极简暗黑毛玻璃风格) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-dialog {
  background: #131519;
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.85);
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#mapGuideModal .modal-dialog,
#printNoticeModal .modal-dialog,
#calibGuideModal .modal-dialog {
  max-width: 680px;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-main);
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
}

.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.modal-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent-blue);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* 预览区顶栏操作按钮 */
.preview-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-family: inherit;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: var(--border-focus);
}

/* 矢量预览放大全屏查看 Lightbox */
.preview-zoom-container {
  width: 92vw;
  max-width: 1280px;
  height: 90vh;
  background: #111318;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

.preview-zoom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: #16181f;
}

.preview-zoom-body {
  flex: 1;
  overflow: auto;
  padding: 2.5rem;
  display: flex;
  background: #08090b;
  position: relative;
  user-select: none;
}

.zoom-stage {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease-out;
  transform-origin: center center;
  flex-shrink: 0;
}

#svgZoomPreview {
  width: 500px;
  height: 707px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
  display: block;
}

.modal-step-tag {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 0.65rem;
  display: inline-block;
}

.modal-highlight-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 0.85rem 0;
}

.theory-box.active-recommend {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 1px var(--accent-blue);
  background: rgba(37, 99, 235, 0.06) !important;
}

/* 页脚版权与链接 */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 1.5rem 0;
  margin-top: 1.5rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.footer-copyright a,
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-copyright a:hover,
.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-divider {
  color: var(--border-focus);
  font-size: 0.75rem;
}

/* 说明文本 (位于 main 内部最后一个 div，全宽通栏，紧接 footer 顶部) */
.main-disclaimer {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  margin-top: 1.5rem;
  padding: 1.25rem 1rem 0.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  position: relative;
  z-index: 10;
}




