/* 核心重置：确保元素可点击+样式统一 */
.flat-download-box,
.flat-download-box * {
  pointer-events: auto !important;
  box-sizing: border-box !important;
}

/* 下载面板容器 */
.flat-download-box {
  margin: 30px 0;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
html.dark-mode .flat-download-box {
  border-color: #333;
  background: #222;
}
/* 标题栏（极致紧凑版） */
.flat-download-header {
  padding: 13px 20px !important; /* 上下仅4px内边距 */
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
  line-height: 1.2 !important;
}
html.dark-mode .flat-download-header {
  border-bottom-color: #333;
  background: #2a2a2a;
}

.flat-title {
  margin: 0;
  font-size: 14px !important; /* 标题文字14px */
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2 !important;
}
html.dark-mode .flat-title {
  color: #fff;
}
/* 下载列表 */
.flat-download-list {
  padding: 10px 20px;
}

/* 单个下载项 */
.flat-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #eee;
}
html.dark-mode .flat-download-item {
  border-bottom-color: #333;
}
.flat-download-item:last-child {
  border-bottom: none;
}

/* 左侧图标+名称 */
.flat-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  flex-shrink: 0;
  min-width: 120px;
}
html.dark-mode .flat-item-left {
  color: #ddd;
}

/* 右侧提取码+按钮 一体化容器（核心） */
.flat-item-right {
  display: flex;
  align-items: stretch;
  width: 280px;
  position: relative;
  border-radius: 6px;
  border: 1px solid #c2c2c2;
  overflow: hidden;
  height: 36px;
}

/* 提取码包装器 - 提示词悬浮显示在提取码后面 */
.flat-pwd-wrapper {
  position: relative;
  width: calc(100% - 70px); /* 留出按钮宽度 */
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 6px; /* 提取码和提示词的间距 */
}

/* 提取码文本 - 仅显示提取码内容 */
.flat-item-pwd {
  color: #333;
  cursor: pointer;
  font-size: 14px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  white-space: nowrap;
}
html.dark-mode .flat-item-pwd {
  color: #fff;
}

/* 核心：提示词修改为「点击自动复制」+ 深黄色 + 悬浮显示 */
.flat-pwd-tip {
  font-size: 11px !important; /* 字号不变 */
  color: #cc9900 !important; /* 深黄色 */
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: none !important; /* 平时隐藏 */
  white-space: nowrap;
  margin: 0 !important;
  content: "点击自动复制" !important; /* 提示词修改 */
}
/* 仅鼠标悬浮时显示提示词（在提取码后面） */
.flat-pwd-wrapper:hover .flat-pwd-tip {
  display: inline-block !important;
}
/* 暗模式下深黄色适配 */
html.dark-mode .flat-pwd-tip {
  color: #ddaa22 !important;
}

/* 核心：无提取码时显示「无需提取码」（修复全角空格问题） */
.flat-item-right:not(:has(.flat-pwd-wrapper))::before {
  content: "无需提取码"; /* 重点：这里要确保是「半角空格」或无空格，你之前的全角空格导致解析失败 */
  display: flex;
  align-items: center;
  padding-left: 12px;
  width: calc(100% - 70px);
  height: 100%;
  font-size: 14px;
  color: #999;
}
html.dark-mode .flat-item-right:not(:has(.flat-pwd-wrapper))::before {
  color: #777;
}

/* 下载按钮：右侧内嵌，样式统一 */
.flat-item-btn {
  width: 70px;                  /* 按钮宽度（无需修改） */
  height: 100%;                 /* 按钮高度，和容器一致（无需修改） */
  background: #e0e3e3;          /* 按钮默认背景色【重点修改】：当前是浅灰色 */
  color: #333 !important;       /* 修复：浅灰色背景配白色文字看不见，改为深灰色文字 */
  border-radius: 0 !important;  /* 按钮圆角：0为直角，和一体化框匹配（无需修改） */
  text-decoration: none !important; /* 去除按钮文字下划线（无需修改） */
  font-size: 14px;              /* 按钮文字大小（无需修改） */
  transition: background 0.2s;  /* 背景色过渡动画：悬浮时颜色变化更丝滑（无需修改） */
  border: none !important;      /* 去除按钮边框（无需修改） */
  display: flex;                /* 文字居中布局（无需修改） */
  align-items: center;          /* 垂直居中（无需修改） */
  justify-content: center;      /* 水平居中（无需修改） */
  position: relative;           /* 层级定位（无需修改） */
  z-index: 1;                   /* 按钮层级，确保不被遮挡（无需修改） */
}
/* 按钮悬浮样式：鼠标移上去的效果 */
.flat-item-btn:hover {
  background: #d6d6d6;          /* 按钮悬浮背景色【重点修改】：比默认浅灰色深一点 */
}
/* 底部提示 */
.flat-download-footer {
  padding: 10px 20px;
  font-size: 13px;
  color: #999;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}
html.dark-mode .flat-download-footer {
  border-top-color: #333;
  background: #2a2a2a;
  color: #777;
}

/* 复制提示框 */
.copy-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: #333;
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  z-index: 9999;
  display: none;
}
.copy-toast.show {
  display: block;
}

/* 移动端适配 */
@media (max-width:768px){
  .flat-item-right {
    width: 100%;
    height: 40px;
  }
  .flat-pwd-wrapper {
    width: calc(100% - 80px);
    padding: 0 12px;
  }
  .flat-item-btn {
    width: 80px;
  }
  .flat-item-right:not(:has(.flat-pwd-wrapper))::before {
    width: calc(100% - 80px);
    line-height: 40px;
  }
}