/* =============================================
   明日方舟风格设计变量
   参考：Diegetic Interface + Fluent Design 工业科幻风
   ============================================= */

:root {
  /* ——— 背景色层级 ——— */
  --bg-base: #0a0a12;        /* 最深背景 */
  --bg-surface: #0f0f1e;     /* 页面主背景 */
  --bg-card: rgba(15, 20, 35, 0.85);   /* 卡片背景（毛玻璃用）*/
  --bg-card-solid: #111827;  /* 实色卡片 */
  --bg-overlay: rgba(0, 0, 0, 0.65);   /* 遮罩层 */
  --bg-hover: rgba(255, 107, 0, 0.06); /* 悬停高亮 */
  --bg-active: rgba(255, 107, 0, 0.1); /* 激活状态 */

  /* ——— 主色（橙色警戒色）——— */
  --color-primary: #ff6b00;
  --color-primary-light: #ff8f3c;
  --color-primary-dim: rgba(255, 107, 0, 0.3);
  --color-primary-glow: 0 0 16px rgba(255, 107, 0, 0.5);

  /* ——— 辅助色（青色科技感）——— */
  --color-accent: #00d4ff;
  --color-accent-dim: rgba(0, 212, 255, 0.25);

  /* ——— 功能色 ——— */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* ——— 文字色 ——— */
  --text-primary: #e8eaf0;
  --text-secondary: #8892a4;
  --text-muted: #4a5568;
  --text-accent: #ff6b00;
  --text-code: #00d4ff;

  /* ——— 边框色 ——— */
  --border-base: rgba(255, 107, 0, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-bright: rgba(255, 107, 0, 0.6);

  /* ——— 尺寸 ——— */
  --header-height: 64px;
  --content-max-width: 1200px;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* ——— 字体 ——— */
  --font-mono: 'Courier New', 'Consolas', monospace;
  --font-sans: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;

  /* ——— 动效 ——— */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* ——— 全局重置 ——— */

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  /* 噪点纹理：工业感颗粒底图 */
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 0, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
}

#app { min-height: 100vh; }

/* ——— 滚动条 ——— */

::-webkit-scrollbar { width: 4px; height: 4px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb { background: var(--border-base); border-radius: 2px; }

::-webkit-scrollbar-thumb:hover { background: var(--color-primary-dim); }

/* ——— 选中文字 ——— */

::selection { background: var(--color-primary-dim); color: var(--text-primary); }

/* ——— 链接 ——— */

a { color: inherit; text-decoration: none; }

/* ============================================
   明日方舟风格核心组件样式
   ============================================ */

/* 毛玻璃卡片 */

.ark-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-base);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

/* 卡片左上角装饰切角 */

.ark-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 16px 16px 0 0;
  border-color: var(--color-primary) transparent transparent transparent;
}

/* 橙色警戒边框卡片 */

.ark-card-alert {
  border-left: 2px solid var(--color-primary);
  box-shadow: inset 2px 0 8px rgba(255, 107, 0, 0.1);
}

/* 科技感标题 */

.ark-title {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

/* 英文装饰副标题 */

.ark-subtitle-en {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* 橙色发光按钮 */

.ark-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--bg-base);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.ark-btn:hover {
  background: var(--color-primary-light);
  box-shadow: var(--color-primary-glow);
  transform: translateY(-1px);
}

.ark-btn:active { transform: translateY(0); }

.ark-btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--border-base);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.ark-btn-ghost:hover {
  background: var(--bg-active);
  border-color: var(--color-primary);
  color: var(--color-primary-light);
}

/* 输入框 */

.ark-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-base);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition-fast);
}

.ark-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-dim);
  background: rgba(255, 107, 0, 0.04);
}

.ark-input::placeholder { color: var(--text-muted); }

/* 覆盖浏览器自动填充强制改变背景/文字颜色的行为 */

.ark-input:-webkit-autofill,
.ark-input:-webkit-autofill:hover,
.ark-input:-webkit-autofill:focus,
.ark-input:-webkit-autofill:active {
  /* inset box-shadow 覆盖掉浏览器注入的白色背景，颜色匹配卡片暗色背景 */
  -webkit-box-shadow: 0 0 0 1000px #0f1322 inset !important;
  box-shadow: 0 0 0 1000px #0f1322 inset !important;
  /* 强制保持文字颜色 */
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary);
  /* 超长延迟让 background-color 过渡永远不触发 */
  transition: background-color 9999s ease-in-out 0s, border-color var(--transition-fast);
  border-color: var(--border-base);
}

/* 标签 Tag */

.ark-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  border-radius: var(--radius-sm);
  background: var(--color-primary-dim);
  color: var(--color-primary-light);
  border: 1px solid rgba(255, 107, 0, 0.3);
}

.ark-tag-cyan {
  background: var(--color-accent-dim);
  color: var(--color-accent);
  border-color: rgba(0, 212, 255, 0.3);
}

/* 文章卡片/标题中的 Boxicons 图标（来自 Trilium iconClass） */

.art-icon {
  font-size: 1.1em;
  vertical-align: middle;
  margin-right: 0.35em;
  color: var(--color-primary);
  opacity: 0.85;
  line-height: 1;
  position: relative;
  top: -0.05em;
}

/* 斜条纹警戒装饰 */

.ark-stripe {
  height: 3px;
  background: repeating-linear-gradient(
    -45deg,
    var(--color-primary) 0px,
    var(--color-primary) 4px,
    transparent 4px,
    transparent 8px
  );
  opacity: 0.6;
}

/* 分隔线 */

.ark-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  position: relative;
}

.ark-divider::after {
  content: '';
  position: absolute;
  left: 0; top: -1px;
  width: 60px; height: 1px;
  background: var(--color-primary);
}

/* 在线状态指示器 */

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
  animation: pulse-green 2s infinite;
}

.status-dot.offline {
  background: var(--color-error);
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--color-success); }
  50% { opacity: 0.6; box-shadow: 0 0 12px var(--color-success); }
}

/* 扫描线动画 */

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* 打字机光标 */

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.cursor-blink::after {
  content: '_';
  animation: blink 1s step-end infinite;
  color: var(--color-primary);
}

/* 页面容器 */

.page-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* 渐变文字 */

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* NProgress 进度条主题 */

#nprogress .bar { background: var(--color-primary) !important; height: 2px !important; }

#nprogress .peg { box-shadow: 0 0 10px var(--color-primary), 0 0 5px var(--color-primary) !important; }
/* Make clicks pass-through */
#nprogress {
  pointer-events: none;
}

#nprogress .bar {
  background: #29d;

  position: fixed;
  z-index: 1031;
  top: 0;
  left: 0;

  width: 100%;
  height: 2px;
}

/* Fancy blur effect */
#nprogress .peg {
  display: block;
  position: absolute;
  right: 0px;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 10px #29d, 0 0 5px #29d;
  opacity: 1.0;

  -webkit-transform: rotate(3deg) translate(0px, -4px);
      -ms-transform: rotate(3deg) translate(0px, -4px);
          transform: rotate(3deg) translate(0px, -4px);
}

/* Remove these to get rid of the spinner */
#nprogress .spinner {
  display: block;
  position: fixed;
  z-index: 1031;
  top: 15px;
  right: 15px;
}

#nprogress .spinner-icon {
  width: 18px;
  height: 18px;
  box-sizing: border-box;

  border: solid 2px transparent;
  border-top-color: #29d;
  border-left-color: #29d;
  border-radius: 50%;

  -webkit-animation: nprogress-spinner 400ms linear infinite;
          animation: nprogress-spinner 400ms linear infinite;
}

.nprogress-custom-parent {
  overflow: hidden;
  position: relative;
}

.nprogress-custom-parent #nprogress .spinner,
.nprogress-custom-parent #nprogress .bar {
  position: absolute;
}

@-webkit-keyframes nprogress-spinner {
  0%   { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}
@keyframes nprogress-spinner {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

