@charset "UTF-8";
/* ===========================
   Layer 3: Sitemap 页面专属样式
   粉色 PCB 电路板 + 复古文件管理器
   =========================== */


/* ========== 全屏视口 ========== */
.sitemap-viewport {
  position: relative;
  margin-top: var(--nav-offset);
  width: 100%;
  min-height: calc(100vh - var(--nav-offset));
  background: #fdf6f9;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}


/* ========== PCB 背景层 ========== */
.pcb-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.pcb-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}


/* ========== 三栏主体 ========== */
.sitemap-main {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  padding: 24px 20px 60px;
  gap: 0;
  align-items: flex-start;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}


/* ============================
   ▌左侧: Win95 文件树面板
   ============================ */
.file-tree-panel {
  width: 30%;
  min-width: 240px;
  flex-shrink: 0;
  border: 2px solid #000;
  background: #fff;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

.panel-titlebar {
  background: linear-gradient(90deg, #f9bddd, #f5a5c4);
  padding: 3px 6px;
  font-family: "MS PGothic", "Unifont", "SimSun", sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 0 #c44569;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.titlebar-icon {
  font-size: 13px;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.2));
}

.titlebar-btns {
  margin-left: auto;
  display: flex;
  gap: 2px;
}

.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 14px;
  background: #dfdfdf;
  border: 1px solid #000;
  box-shadow: inset -1px -1px grey, inset 1px 1px #fff;
  font-size: 9px;
  line-height: 1;
  color: #000;
  cursor: url(../assets/items/select.png), pointer;
}

.file-tree {
  padding: 8px 6px;
  font-family: "MS PGothic", "Unifont", "SimSun", monospace;
  font-size: 12px;
  max-height: 480px;
  overflow-y: auto;
  background: #fff;
}

/* 文件树项目 */
.ft-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  cursor: url(../assets/items/select.png), pointer;
  border: 1px solid transparent;
  transition: background 0.15s;
  user-select: none;
  position: relative;
}

.ft-item:hover {
  background: #fff0f5;
}

.ft-item.active {
  background: #f9bddd;
  color: #fff;
  border-color: #c44569;
}

.ft-item.active .ft-name {
  color: #fff;
}

.ft-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.ft-name {
  color: #2a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ft-count {
  margin-left: auto;
  font-size: 10px;
  color: #bba3ad;
  flex-shrink: 0;
}

/* 缩进: 子文件 */
.ft-item.ft-child {
  padding-left: 28px;
}

/* 树线 */
.ft-item.ft-child::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 50%;
  width: 1px;
  border-left: 1px dotted #d4a0b8;
}

.ft-item.ft-child::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 8px;
  height: 1px;
  border-top: 1px dotted #d4a0b8;
}

/* 文件树分隔线 */
.ft-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8a0b4, transparent);
  margin: 4px 8px;
}


/* ============================
   ▌中间: 静态像素软盘
   ============================ */
.floppy-panel {
  width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 480px;
}

/* 电路导线 SVG */
.circuit-left,
.circuit-right {
  position: absolute;
  top: 0;
  height: 100%;
  width: 60px;
  z-index: 5;
  pointer-events: none;
}

.circuit-left {
  left: -10px;
}

.circuit-right {
  right: -10px;
}

/* 底层静态导线 */
.circuit-wire {
  stroke: #f0b0c8;
  stroke-width: 1.5;
  fill: none;
  opacity: 0.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* 激活导线: 光尾层 (半透明宽笔触，模拟荧光扩散) */
.circuit-wire-glow {
  stroke: #f9bddd;
  stroke-width: 6;
  fill: none;
  opacity: 0;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: url(#glowWire);
}

.circuit-wire-glow.animate {
  opacity: 0.45;
  animation: circuitFlowGlow 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes circuitFlowGlow {
  to { stroke-dashoffset: 0; }
}

/* 激活导线: 主电流层 */
.circuit-wire-active {
  stroke: #f9bddd;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: url(#glowWire);
}

.circuit-wire-active.animate {
  animation: circuitFlow 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes circuitFlow {
  to { stroke-dashoffset: 0; }
}

/* 光点头部: "亮头 + 暗尾" 滑行效果 */
.circuit-head {
  fill: #fff0f5;
  r: 4;
  opacity: 0;
  filter: url(#glowHead);
}

.circuit-head.animate {
  opacity: 1;
  animation: headSlide 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 光点到达终点后淡出 */
@keyframes headFade {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* 焊点 */
.circuit-dot {
  fill: #e8a0b4;
  opacity: 0.6;
}

.circuit-dot-active {
  fill: #fff0f5;
  opacity: 0;
  filter: url(#glowHead);
}

.circuit-dot-active.animate {
  animation: dotFlash 0.4s 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dotFlash {
  0%   { opacity: 0; r: 2; }
  60%  { opacity: 1; r: 5; }
  100% { opacity: 0.8; r: 3.5; }
}


/* ---- 纯 CSS 像素软盘 ---- */
.floppy-disk {
  width: 160px;
  height: 170px;
  cursor: url(../assets/items/select.png), pointer;
  position: relative;
  z-index: 10;
  /* 静态展示: 微斜固定角度，无旋转 */
  transform: rotate(-2deg);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.25s ease,
              box-shadow 0.25s ease;
  filter: drop-shadow(3px 4px 0 rgba(0,0,0,0.12));
}

/* 悬停缩放 + 抬起效果 */
.floppy-disk:hover {
  transform: rotate(-2deg) scale(1.06) translateY(-3px);
  filter: drop-shadow(4px 6px 2px rgba(0,0,0,0.15))
          brightness(1.04);
}

/* 像素风 Tooltip */
.floppy-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #2a1a2e;
  color: #fff0f5;
  font-family: "MS PGothic", "Unifont", "SimSun", monospace;
  font-size: 10px;
  padding: 3px 8px;
  white-space: nowrap;
  border: 1px solid #f9bddd;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
  image-rendering: pixelated;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.floppy-tooltip::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #2a1a2e;
}

.floppy-disk:hover .floppy-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* 播放中时切换提示文本 (JS 控制 data 属性) */

/* 状态 C: 数据读取 — 高频磁头震动 */
.floppy-disk.reading {
  animation: floppyVibrate 0.04s linear 18;
}

@keyframes floppyVibrate {
  0%   { transform: rotate(-2deg) translate(0, 0); }
  20%  { transform: rotate(-2deg) translate(-1.5px, 0.5px); }
  40%  { transform: rotate(-1.5deg) translate(1px, -0.5px); }
  60%  { transform: rotate(-2.5deg) translate(-0.5px, -1px); }
  80%  { transform: rotate(-2deg) translate(1.5px, 0.5px); }
  100% { transform: rotate(-2deg) translate(0, 0); }
}

.floppy-body {
  width: 100%;
  height: 100%;
  background: #f9bddd;
  border: 2px solid #c44569;
  border-radius: 6px 6px 2px 2px;
  position: relative;
  box-shadow:
    inset 2px 2px 0 #fdd8e8,
    inset -2px -2px 0 #d46493,
    3px 3px 0 rgba(0,0,0,0.15);
  image-rendering: pixelated;
}

/* 金属保护壳 */
.floppy-metal-guard {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 50px;
  background: #c0c0c0;
  border: 2px solid #808080;
  border-radius: 2px;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080;
}

/* 磁盘读取槽 */
.floppy-slot {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 8px;
  background: #2a1a2e;
  border-radius: 1px;
}

/* 写入保护缺口 */
.floppy-write-protect {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 16px;
  border: 2px solid #d46493;
  border-radius: 1px;
  background: transparent;
}

.floppy-write-protect::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #d46493;
}

/* 标签贴纸 */
.floppy-label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 55px;
  background: #fff8fb;
  border: 1.5px solid #e8a0b4;
  border-radius: 2px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.floppy-label-line {
  height: 2px;
  background: #e8a0b4;
  border-radius: 1px;
  width: 100%;
}

.floppy-label-line.short {
  width: 60%;
}

/* LED 指示灯 */
.floppy-led {
  position: absolute;
  top: 68px;
  left: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  /* 默认: 暗绿色熄灭态 */
  background: #2d5a30;
  box-shadow: inset 0 0 1px rgba(0,0,0,0.3);
  opacity: 0.6;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
}

/* 读盘中: 橙红色高频闪烁 */
.floppy-disk.reading .floppy-led {
  background: #ff5722;
  box-shadow: 0 0 4px #ff5722, 0 0 10px rgba(255,87,34,0.5);
  opacity: 1;
  animation: ledReadBlink 0.15s ease-in-out infinite;
}

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

/* 音乐播放: 绿色呼吸灯 (常亮 + 柔和脉动) */
.floppy-disk.playing .floppy-led {
  background: #4caf50;
  box-shadow: 0 0 4px #4caf50, 0 0 10px rgba(76,175,80,0.4);
  opacity: 1;
  animation: ledBreath 2s ease-in-out infinite;
}

@keyframes ledBreath {
  0%, 100% { opacity: 0.7; box-shadow: 0 0 4px #4caf50, 0 0 8px rgba(76,175,80,0.3); }
  50%      { opacity: 1;   box-shadow: 0 0 6px #4caf50, 0 0 14px rgba(76,175,80,0.5); }
}

/* 读盘优先级高于播放 (同时触发时显示读盘状态) */
.floppy-disk.reading.playing .floppy-led {
  background: #ff5722;
  box-shadow: 0 0 4px #ff5722, 0 0 10px rgba(255,87,34,0.5);
  animation: ledReadBlink 0.15s ease-in-out infinite;
}


/* ============================
   ▌右侧: 属性视窗
   ============================ */
.property-panel {
  width: 50%;
  position: relative;
  min-height: 400px;
}

.property-window {
  border: 2px solid #000;
  background: #dfdfdf;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #fff,
    inset -2px -2px grey,
    inset 2px 2px #dfdfdf,
    4px 4px 0 rgba(0,0,0,0.12);
  max-width: 440px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.property-window.visible {
  opacity: 1;
  transform: scale(1);
}

.prop-titlebar {
  background: linear-gradient(90deg, #f9bddd, #f5a5c4);
  padding: 3px 6px;
  font-family: "MS PGothic", "Unifont", "SimSun", sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 0 #c44569;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.prop-body {
  padding: 14px 16px;
  font-family: "MS PGothic", "Unifont", "SimSun", monospace;
  font-size: 12px;
  color: #2a1a2e;
  background: #dfdfdf;
}

.prop-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.prop-file-icon {
  font-size: 32px;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.1));
}

.prop-file-name {
  font-size: 14px;
  font-weight: bold;
  color: #2a1a2e;
}

.prop-divider {
  height: 1px;
  background: linear-gradient(90deg, #808080, #dfdfdf);
  margin: 8px 0;
  border-bottom: 1px solid #fff;
}

.prop-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
}

.prop-table td {
  padding: 3px 0;
  vertical-align: top;
}

.prop-key {
  color: #5a3e4b;
  width: 110px;
  font-weight: bold;
  white-space: nowrap;
}

.prop-val {
  color: #2a1a2e;
  word-break: break-all;
}

.status-ok {
  color: #4caf50;
  font-weight: bold;
}

.prop-desc {
  background: #fff;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #0a0a0a, inset -1px -1px 0 #dfdfdf;
  padding: 8px 10px;
  font-size: 11px;
  color: #5a3e4b;
  min-height: 48px;
  line-height: 1.5;
  margin: 8px 0;
}

.prop-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.prop-btn {
  font-family: "MS PGothic", "Unifont", "SimSun", sans-serif;
  font-size: 12px;
  padding: 4px 20px;
  background: #dfdfdf;
  border: 2px solid #000;
  box-shadow: inset -1px -1px grey, inset 1px 1px #fff;
  cursor: url(../assets/items/select.png), pointer;
  color: #2a1a2e;
}

.prop-btn:hover:not(:disabled) {
  background: #f0e0e8;
}

.prop-btn:active:not(:disabled) {
  box-shadow: inset 1px 1px grey, inset -1px -1px #fff;
}

.prop-btn:disabled {
  color: #808080;
  cursor: default;
}

/* 右侧电路装饰 */
.circuit-decor-right {
  position: absolute;
  right: 0;
  top: 40px;
  width: 200px;
  height: 400px;
  pointer-events: none;
  opacity: 0.5;
}

.circuit-decor-right svg {
  width: 100%;
  height: 100%;
}


/* ============================
   底部系统监控条
   ============================ */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: #dfdfdf;
  border-top: 2px solid #000;
  box-shadow: inset 0 1px 0 #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: "MS PGothic", "Unifont", "SimSun", monospace;
  font-size: 11px;
  color: #2a1a2e;
  z-index: 999;
  user-select: none;
}

.status-left,
.status-center,
.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-sep {
  color: #808080;
  margin: 0 2px;
}

.status-kernel {
  color: #c44569;
  font-weight: bold;
}

.cpu-label {
  font-weight: bold;
}

.cpu-bar {
  display: inline-block;
  width: 80px;
  height: 12px;
  background: #fff;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px 0 #0a0a0a, inset -1px -1px 0 #dfdfdf;
  position: relative;
  overflow: hidden;
}

.cpu-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #f9bddd);
  transition: width 0.5s ease;
  width: 0%;
}

.cpu-pct {
  min-width: 28px;
  text-align: right;
}


/* ============================
   电流脉冲动画（导线激活效果）
   ============================ */
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 2px #f9bddd) drop-shadow(0 0 4px rgba(249,189,221,0.3)); }
  50%      { filter: drop-shadow(0 0 8px #f9bddd) drop-shadow(0 0 14px rgba(249,189,221,0.4)); }
}

.wire-pulse {
  animation: pulseGlow 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}


/* ============================
   属性窗口打开动画
   ============================ */
@keyframes propSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.property-window.pop-in {
  animation: propSlideIn 0.35s ease forwards;
}


/* ============================
   响应式: < 768px
   ============================ */
@media (max-width: 768px) {
  .sitemap-viewport {
    margin-top: var(--nav-offset);
    padding-bottom: 36px;
  }

  .sitemap-main {
    flex-direction: column;
    padding: 12px 10px 50px;
    gap: 16px;
  }

  /* 隐藏电路和软盘 */
  .floppy-panel,
  .pcb-traces,
  .circuit-decor-right {
    display: none;
  }

  /* 文件树 → 卡片布局 */
  .file-tree-panel {
    width: 100%;
    min-width: 0;
  }

  .file-tree {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
    max-height: none;
    padding: 10px;
  }

  .ft-item {
    flex-direction: column;
    text-align: center;
    padding: 10px 6px;
    border: 1px solid #f0d0e0;
    border-radius: 6px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
  }

  .ft-item.ft-child {
    padding-left: 6px;
  }

  .ft-item.ft-child::before,
  .ft-item.ft-child::after {
    display: none;
  }

  .ft-icon {
    font-size: 24px;
    margin-bottom: 4px;
  }

  .ft-count {
    margin-left: 0;
    margin-top: 2px;
  }

  .ft-sep {
    display: none;
  }

  /* 属性面板 */
  .property-panel {
    width: 100%;
    min-height: auto;
  }

  .property-window {
    max-width: 100%;
    opacity: 1;
    transform: scale(1);
  }
}


/* ============================
   滚动条覆盖（文件树内部）
   ============================ */
.file-tree::-webkit-scrollbar {
  width: 14px;
}

.file-tree::-webkit-scrollbar-thumb {
  background: #f0d0e0;
  border: 1px solid #d46493;
}

.file-tree::-webkit-scrollbar-track {
  background: #fff0f5;
}
