/* 已移动到 css/style.css */

body {
  font-family: sans-serif;
  margin: 20px 0 20px 60px; /* 整体右移 */
  position: relative;
}

/* 半透明遮罩层 */
body::before {
  content: "";
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  z-index: 0;
  background: rgba(135, 135, 135, 0.076);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}

/* 提升内容层级 */
body > * {
  position: relative;
  z-index: 1;
}

h1 {
  font-size: 24px;
}

ul#file-list {
  list-style: none;
  padding: 0;
  /* 让整个列表可横向滚动（防止超宽溢出） */
  overflow-x: auto;
  white-space: nowrap;
  margin-right: 40px; /* 让内容更靠右 */
}

ul#file-list li {
  margin: 5px 0;
  transition: background 0.2s;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  min-height: 32px;
  gap: 8px;
  /* 单行显示，超出滚动 */
  white-space: nowrap;
  overflow-x: auto;
}

ul#file-list li > span {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

ul#file-list li .file-name {
  flex: 2 1 200px;
  min-width: 120px;
  max-width: 320px;
}

ul#file-list li .file-size,
ul#file-list li .file-type,
ul#file-list li .file-mtime {
  flex: 0 0 140px;
  text-align: center;
  min-width: 90px;
  max-width: 180px;
}

ul#file-list li .file-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 180px;
  justify-content: flex-end;
}

/* 鼠标悬停高亮条 */
ul#file-list li:hover {
  background: rgba(0, 123, 255, 0.12);
}

/* 操作按钮容器靠右 */
.file-actions {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.file-actions a {
  color: #0077cc;
  text-decoration: none;
  padding: 0 4px;
}

.file-actions a:hover {
  text-decoration: underline;
}

a {
  text-decoration: none;
  color: #0077cc;
}

a:hover {
  text-decoration: underline;
}

/* 表头居中 */
ul#file-list li.header {
  font-weight: bold;
  background: rgba(0,0,0,0.05);
  text-align: center;
  justify-content: center;
}

ul#file-list li.header > span {
  text-align: center;
  justify-content: center;
}

/* 模态框预览样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  /* 移除内部白色内容框的背景、圆角、阴影、边框，仅保留居中和尺寸 */
  background: none;
  box-shadow: none;
  border-radius: 0;
  border: none;
  margin: auto;
  padding: 0;
  width: 92vw;
  height: 88vh;
  max-width: 900px;
  max-height: 700px;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#preview-frame {
  width: 100%;
  height: 100%;
}

#close-btn {
  position: absolute;
  top: 12px;
  right: 18px;
  cursor: pointer;
  font-size: 26px;
  z-index: 10;
  background: rgba(240,240,240,0.85);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  transition: background 0.2s;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: none;
}

#close-btn:hover {
  background: rgba(200,200,200,0.95);
}

/* 移动端适配：左右贴边，无空余 */
@media (max-width: 600px) {
  body {
    margin: 0 !important;
  }
  ul#file-list {
    margin: 0 !important;
    padding: 0 0 !important;
    width: 100vw;
    max-width: 100vw;
  }
  ul#file-list li {
    padding-left: 8px;
    padding-right: 8px;
    min-width: 0;
    gap: 4px;
  }
  ul#file-list li .file-name {
    min-width: 0;
    max-width: 70vw;
    flex: 1 1 0;
  }
  ul#file-list li .file-actions {
    min-width: 0;
    max-width: 24vw;
    justify-content: flex-end;
    gap: 4px;
  }
}