/*
  种子地图查看器 - GitHub 风格主样式
  说明：
  - 参考 GitHub 设计语言：简洁、现代、高对比
  - 布局采用两栏：左侧控制区，右侧 canvas 主视图
  - 保持高对比与简洁留白；中文 UI 友好字体
*/

:root {
  --bg: #ffffff6e;
  --bg-canvas: #f8fffc;
  /* GitHub 浅灰背景 */
  --fg: #24292f;
  /* GitHub 主文本色 */
  --fg-muted: #57606a;
  /* GitHub 次要文本色 */
  --border: #d0d7de;
  /* GitHub 边框色 */
  --border-muted: #d8dee4;
  --accent: #0969da;
  /* GitHub 蓝色 */
  --accent-hover: #0550ae;
  --accent-weak: #ddf4ff;
  /* GitHub 浅蓝背景 */
  --success: #1a7f37;
  /* GitHub 绿色 */
  --warning: #9a6700;
  /* GitHub 警告色 */
  --warning-bg: #fff8c5;
  --shadow-sm: 0 1px 0 rgba(27, 31, 36, 0.04);
  --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15);
  --radius-sm: 6px;
  --radius-md: 8px;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 动态条纹背景 - GitHub 风格 */
body {
  background: #f8f9fa;
  background: linear-gradient(135deg,
      #f8f9fa 25%,
      #ffffff 25%,
      #ffffff 50%,
      #f8f9fa 50%,
      #f8f9fa 75%,
      #ffffff 75%,
      #ffffff);
  background-size: 40px 40px;
  background-attachment: fixed;
  animation: moveBackground 4s linear infinite;
}

@keyframes moveBackground {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 40px 40px;
  }
}

/* 确保容器不遮挡背景 */
.main-wrapper {
  background: transparent;
}

#content {
  background: transparent;
}

#main-content {
  background: transparent;
}

/* GitHub 风格顶部导航栏 */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.brand-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 12px;
  color: var(--fg-muted);
  padding-left: 12px;
  border-left: 1px solid var(--border-muted);
}

/* GitHub 风格按钮组 */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-actions .gh-button {
  height: 32px;
  line-height: 20px;
  padding: 5px 16px;
  font-weight: 500;
}

/* GitHub 风格两栏布局 */
.ui-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  min-height: calc(100vh - 65px);
  background: transparent;
}

/* GitHub 风格侧边栏 */
.side-panel {
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
}

/* 侧边栏滚动条样式 */
.side-panel::-webkit-scrollbar {
  width: 8px;
}

.side-panel::-webkit-scrollbar-track {
  background: transparent;
}

.side-panel::-webkit-scrollbar-thumb {
  background: var(--border-muted);
  border-radius: 4px;
}

.side-panel::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

.canvas-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.canvas-wrap {
  position: relative;
  min-height: 400px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* 使 canvas 填满主视图区域 */
#map-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* GitHub 风格侧栏区块 */
.fancy-box {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.fancy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.fancy-row:first-child {
  margin-top: 0;
}

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

.fancy-size {
  min-width: 43px;
  font-size: 14px;
  color: var(--fg);
}

.poi-tooltip {
  font-family: "Microsoft YaHei", sans-serif;
  background: rgba(30, 30, 30, 0.9);
  color: #eee;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 240px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}

.poi-title {
  font-size: 16px;
  margin: 0 0 4px;
  color: #fff;
  font-weight: 600;
}

.poi-info {
  display: block;
  color: #aaa;
  font-size: 12px;
  margin-bottom: 6px;
}

.poi-coords {
  font-size: 13px;
  margin: 4px 0 8px;
  color: #ddd;
}

.poi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.poi-btn {
  background: #2e2e2e;
  color: #ccc;
  border: none;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.poi-btn:hover {
  background: #444;
  color: #fff;
}

.poi-btn.copied {
  background: #3aa757;
  color: white;
}

.poi-complete {
  font-size: 13px;
  color: #ccc;
}

.icon-share::before { content: "🔗"; margin-right: 4px; }
.icon-link::before  { content: "🌐"; margin-right: 4px; }
.icon-copy::before  { content: "📋"; margin-right: 4px; }
.icon-check::before { content: "✅"; margin-right: 4px; }
/* 🌈 主体样式 */
.poi-tooltip {
  position: relative;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: rgba(20, 20, 20, 0.75);
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 260px;
  color: #eee;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px) saturate(120%);
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  animation: poiFadeIn 0.35s ease-out forwards;
}


/* 🪞 棱彩描边 */
.poi-tooltip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(120deg, #ff6ec4, #7873f5, #3acfd5, #6e8efb, #ff6ec4);
  background-size: 400% 400%;
  animation: prismShift 5s linear infinite;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
  /* ✅ 允许内部元素点击 */
}
/* 🎬 渐入动画 */
@keyframes poiFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🌈 棱彩动态流动 */
@keyframes prismShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* 📍 标题 */
.poi-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  background: linear-gradient(90deg, #6e8efb, #a777e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

/* 💬 附加说明 */
.poi-info {
  display: block;
  font-size: 12px;
  color: #bcbcbc;
  margin-bottom: 8px;
  font-style: italic;
}

/* 🧭 坐标信息 */
.poi-coords {
  font-size: 13px;
  margin: 6px 0 10px;
  color: #ddd;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 8px;
  border-radius: 8px;
  font-family: "Consolas", monospace;
}

/* 🔘 动作区布局 */
.poi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 8px;
}

/* 🌐 按钮样式 */
.poi-btn {
  background: linear-gradient(145deg, #262626, #1b1b1b);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.poi-btn:hover {
  background: linear-gradient(145deg, #333, #222);
  color: #fff;
  box-shadow: 0 0 10px rgba(150, 120, 255, 0.3);
}

/* ✅ 已复制状态 */
.poi-btn.copied {
  background: linear-gradient(145deg, #46c26f, #3aa757);
  color: #fff;
  box-shadow: 0 0 12px rgba(72, 255, 145, 0.4);
}

/* 🗹 “已探索”区域 */
.poi-complete {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #ccc;
  gap: 4px;
  margin-left: 4px;
}

/* ✨ 图标统一风格 */
.icon-share::before {
  content: "🔗";
}

.icon-link::before {
  content: "🌐";
}

.icon-copy::before {
  content: "📋";
}

.icon-check::before {
  content: "✅";
}
.poi-share-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 9999;
  pointer-events: none;
}

.poi-share-popup.visible {
  opacity: 1;
  pointer-events: auto;
}

.poi-popup-inner {
  background: rgba(25, 25, 25, 0.85);
  border-radius: 14px;
  padding: 20px;
  width: 400px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  background-image: linear-gradient(120deg, #1b1b1b, #2b2b2b),
    linear-gradient(120deg, #ff6ec4, #7873f5, #3acfd5);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: prismShift 5s linear infinite;
}

.poi-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
  color: #fff;
}

.poi-popup-close {
  background: none;
  border: none;
  color: #bbb;
  font-size: 18px;
  cursor: pointer;
}

.poi-popup-close:hover {
  color: #fff;
}

.poi-share-item {
  margin-bottom: 14px;
}

.poi-share-item label {
  font-size: 13px;
  color: #ccc;
  display: block;
  margin-bottom: 4px;
}

.poi-share-item pre {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 8px;
  color: #eee;
  font-family: Consolas, monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: nowrap;
}

.poi-share-item .copy-btn {
  margin-top: 4px;
  background: linear-gradient(145deg, #2e2e2e, #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.poi-share-item .copy-btn:hover {
  color: #fff;
  box-shadow: 0 0 8px rgba(150, 120, 255, 0.4);
}

.poi-share-item .copy-btn.copied {
  background: #4CAF50;
  color: #fff;
}
/* GitHub 风格表单控件 */
select,
input[type="text"],
input[type="number"] {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 32px;
  padding: 5px 12px;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:hover,
input[type="text"]:hover,
input[type="number"]:hover {
  border-color: var(--fg-muted);
}

.fancy-inputs {
  flex: 1 1 auto;
  min-width: 0;
}

.fancy-inputs>input[type="text"],
.fancy-inputs>select {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

.fancy-inputs-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* 迷你输入：坐标等 */
input.mini {
  width: 90px !important;
  padding: 5px 8px !important;
}

/* GitHub 风格图层列表 */
.seedmap-layers-wrapper {
  padding: 16px;
  background: var(--bg);
}

.seedmap-layers-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
  display: block;
}

.seedmap-layers-warning {
  font-size: 12px;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid #f0e68c;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.seedmap-layers-warning::before {
  content: "⚠";
  font-size: 14px;
}

#seedmap-layers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

/* GitHub 风格复选按钮 */
#seedmap-layers button[role="checkbox"] {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
  color: var(--fg);
  text-align: left;
}

#seedmap-layers button[role="checkbox"]:hover {
  background: var(--bg-canvas);
  border-color: var(--fg-muted);
}

#seedmap-layers button[role="checkbox"][aria-checked="true"] {
  background: var(--accent-weak);
  border-color: var(--accent);
  font-weight: 500;
}

.layer-emoji {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.seedmap-layers-name {
  flex: 1;
}

.seedmap-checkall {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.seedmap-checkall .unstyled {
  flex: 1;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: 13px;
  color: var(--fg);
  transition: all 0.15s ease;
}

.seedmap-checkall .unstyled:hover {
  background: var(--bg-canvas);
  border-color: var(--fg-muted);
}

/* GitHub 风格按钮 */
.gh-button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 5px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gh-button:hover,
button:hover {
  background: var(--bg-canvas);
  border-color: var(--fg-muted);
}

.gh-button:active,
button:active {
  background: var(--border-muted);
}

/* GitHub 主要按钮样式 */
.gh-button.primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.gh-button.primary:hover,
button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* 焦点样式 */
.gh-button:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.3);
  border-color: var(--accent);
}

/* GitHub 风格底部控制栏 */
#map-controls-wrap {
  border-top: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 -1px 3px rgba(27, 31, 36, 0.04);
}

#map-controls {
  padding: 16px;
}

.map-controls-flex {
  display: flex;
  gap: 12px;
  flex-direction: row;
}

#map-controls-bar {}

/* 缩放滑块样式 */
#map-zoom {
  padding: 12px 0;
  margin-bottom: 12px;
  display: none;
}

#map-goto {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px !important;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

#map-goto .fancy-row {
  margin: 0;
  gap: 8px;
}

#map-goto label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  margin: 0;
}

#map-misc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px !important;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

#map-misc label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg);
  cursor: pointer;
  margin: 0;
}

#map-misc input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

/* GitHub 风格分割线 */
.hr,
.hr.slim,
.hr.nomargin {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 16px 0;
}

.hr.slim {
  margin: 8px 0;
}

.hr.nomargin {
  margin: 0;
}

/* GitHub 风格加载器 */
.app-loader-container {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--bg);
}

.loader {
  width: 48px;
  height: 48px;
  opacity: 0.6;
}

/* 隐藏类与清除浮动 */
.hidden {
  display: none !important;
}

.hidden-invisible {
  visibility: hidden !important;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 图层面板滚动区域 */
[data-simplebar] {
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
}

[data-simplebar]::-webkit-scrollbar {
  width: 8px;
}

[data-simplebar]::-webkit-scrollbar-track {
  background: transparent;
}

[data-simplebar]::-webkit-scrollbar-thumb {
  background: var(--border-muted);
  border-radius: 4px;
}

[data-simplebar]::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* 种子控制区域样式 */
#seed-controls {
  background: var(--bg);
}

#seed-footer {
  padding: 12px 16px;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border);
}

.fancy-description {
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
}

/* 左侧群系选择区域 */
#biome-selection {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

#biome-selection label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 10px;
  cursor: pointer;
}

#biome-selection input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

#biome-selection-select-wrap {
  margin-top: 8px;
}

/* 左侧群系高度选择 */


#biome-height-select-box label {
  display: block;
  font-size: 14px;

  color: var(--fg);
  margin-bottom: 8px;
}

#biome-height-select-box select {
  width: 100%;
  box-sizing: border-box;
}

/* 图层切换按钮 */
#seedmap-layers-toggle-hor {
  display: none;
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  background: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-size: 12px;
  cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .ui-layout {
    grid-template-columns: 280px 1fr;
  }

  #seedmap-layers {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ui-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 60vh;
  }

  .canvas-wrap {
    margin: 8px;
  }

  #map-controls {
    padding: 12px;
  }

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

  #seedmap-layers-toggle-hor {
    display: block;
  }
}

/* 教程区域样式 - 详细版 */
.tutorial-section {
  margin: 20px 12px 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 6px;
  border: 1px solid #e1e4e8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tutorial-title {
  font-size: 17px;
  color: #24292e;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #0366d6;
  font-weight: 600;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tutorial-item {
  padding: 14px;
  background: #f6f8fa;
  border-radius: 5px;
  border-left: 3px solid #0366d6;
  transition: all 0.2s ease;
}

.tutorial-item:hover {
  background: #e8f0f8;
  box-shadow: 0 2px 8px rgba(3, 102, 214, 0.15);
  transform: translateY(-2px);
}

.tutorial-item > strong {
  display: block;
  color: #0366d6;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d1d5da;
}

.tutorial-content {
  font-size: 13px;
  line-height: 1.6;
  color: #24292e;
}

.tutorial-content p {
  margin: 0 0 8px 0;
  padding: 0;
}

.tutorial-content p:last-child {
  margin-bottom: 0;
}

.tutorial-content .label {
  display: inline-block;
  color: #0366d6;
  font-weight: 600;
  margin-right: 4px;
  white-space: nowrap;
}

.tutorial-content code {
  background: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: #e36209;
  border: 1px solid #e1e4e8;
  white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .tutorial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tutorial-section {
    margin: 15px 8px 8px;
    padding: 14px;
  }

  .tutorial-title {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .tutorial-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tutorial-item {
    padding: 12px;
  }

  .tutorial-item > strong {
    font-size: 13px;
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .tutorial-content {
    font-size: 12px;
  }

  .tutorial-content code {
    font-size: 11px;
    padding: 1px 4px;
  }
}

/* 页脚样式 */
#pagefooter {
  background: #24292e;
  color: #e1e4e8;
  padding: 24px 0;
  margin-top: 40px;
  border-top: 3px solid #0366d6;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #d1d5da;
}

.footer-text strong {
  color: #58a6ff;
  font-weight: 600;
  font-size: 15px;
}

/* 页脚响应式 */
@media (max-width: 768px) {
  #pagefooter {
    padding: 18px 0;
    margin-top: 30px;
  }

  .footer-content {
    padding: 0 15px;
  }

  .footer-text {
    font-size: 12px;
    line-height: 1.6;
  }

  .footer-text strong {
    font-size: 13px;
  }
}

/* 弹窗样式 - GitHub 风格 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-container {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  max-height: 85vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-canvas);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 28px;
  color: var(--fg-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  background: var(--border-muted);
  color: var(--fg);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--border-muted);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* 帮助弹窗内容样式 */
.help-content {
  color: var(--fg);
}

.help-section {
  margin-bottom: 28px;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid var(--accent-weak);
  padding-bottom: 8px;
}

.help-section ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.help-section li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
  color: var(--fg);
}

.help-section li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 16px;
}

.help-section li:last-child {
  margin-bottom: 0;
}

.help-section strong {
  color: var(--accent);
  font-weight: 600;
}

.help-section code {
  background: var(--bg-canvas);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: #e36209;
  border: 1px solid var(--border);
}

/* 关于弹窗内容样式 */
.about-content {
  color: var(--fg);
}

.about-logo {
  text-align: center;
  padding: 20px 0;
  border-bottom: 2px solid var(--accent-weak);
  margin-bottom: 28px;
}

.about-logo h2 {
  margin: 0 0 8px 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
}

.about-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--fg-muted);
  font-style: italic;
}

.about-section {
  margin-bottom: 24px;
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-section h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.about-section p {
  margin: 0 0 10px 0;
  line-height: 1.7;
  color: var(--fg);
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-section ul {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}

.about-section li {
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
  color: var(--fg);
}

.about-section li::before {
  content: "▪";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.about-section li:last-child {
  margin-bottom: 0;
}

.about-section strong {
  color: var(--accent);
  font-weight: 600;
}

.about-footer {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg-muted);
  font-style: italic;
}

/* 弹窗响应式设计 */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 10px;
  }

  .modal-container {
    max-height: 90vh;
  }

  .modal-header {
    padding: 16px 18px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-body {
    padding: 18px;
  }

  .help-section h3,
  .about-section h3 {
    font-size: 15px;
  }

  .help-section li,
  .about-section li {
    font-size: 13px;
  }

  .about-logo h2 {
    font-size: 22px;
  }
}

/* 复制成功提示 - 右上角绿色对号 */
.copy-success-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

.copy-success-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  font-size: 18px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.3);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-text {
  font-size: 14px;
  letter-spacing: 0.3px;
}

/* 复制成功提示响应式 */
@media (max-width: 768px) {
  .copy-success-toast {
    top: 10px;
    right: 10px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .toast-icon {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .toast-text {
    font-size: 13px;
  }
}

/* 登录提示弹窗样式 */
.login-alert-container {
  max-width: 480px;
}

.login-alert-content {
  text-align: center;
  padding: 20px 10px;
}

.login-alert-message {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.5;
}

.login-alert-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
}

.login-alert-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.login-alert-btn {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.login-alert-btn.login-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.login-alert-btn.login-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3d91 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
}

.login-alert-btn.cancel-btn {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.login-alert-btn.cancel-btn:hover {
  background: #e8e8e8;
  border-color: #ccc;
}

/* 登录弹窗响应式 */
@media (max-width: 600px) {
  .login-alert-container {
    max-width: 90%;
    margin: 0 auto;
  }

  .login-alert-message {
    font-size: 16px;
  }

  .login-alert-description {
    font-size: 13px;
  }

  .login-alert-actions {
    flex-direction: column;
    gap: 10px;
  }

  .login-alert-btn {
    width: 100%;
    padding: 12px 20px;
  }
}