body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #0a1020 !important;
  position: relative;
  overflow-x: hidden;
  color: #1f2937;
  min-height: 100vh;
  font-size: 16px; /* Base font size */
}

/* 星空背景层 */
#star-bg-canvas {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0 0 0.5rem;
  padding: 1rem 0 0.5rem;
  border-bottom: 2px solid #d1d9e6;
  color: #e0e7ff;
  text-align: center;
}

.description {
  margin: 0 0 1.25rem;
  color: #4b5563;
  font-size: clamp(0.9rem, 2vw, 1rem);
  text-align: center;
}

#parentDirLinkBox {
  margin-bottom: 1rem;
  text-align: center;
}

.parent-link {
  display: inline-block;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  transition: color 0.3s ease;
}

.parent-link:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2.5px);
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin: 1rem 0;
  table-layout: fixed;
  thead {
    background: rgba(248, 250, 252, 0.1);
  }
}

/* FOLDER 1/6，IMAGES 5/6 宽度分配 */
table th:first-child,
table td:first-child {
  width: 16.6667%;
  min-width: 100px;
  max-width: 220px;
}

table th:last-child,
table td:last-child {
  width: 83.3333%;
  min-width: 200px;
}

th,
td {
  padding: clamp(0.5rem, 2vw, 1rem) clamp(0.5rem, 2vw, 1.2rem);
  font-size: 1.15rem;
  line-height: 2.2;
}

th {
  text-align: left;
  font-size: clamp(0.8rem, 2vw, 0.88rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.15);
}

td {
  position: relative;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
}

td.detailsColumn {
  text-align: right;
  color: #475569;
  white-space: nowrap;
}

td.detailsColumn details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

td.detailsColumn summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #2563eb;
  padding: 0.2em 0.5em;
  border-radius: 0.4em;
  transition: color 0.3s ease;
}

td.detailsColumn summary::-webkit-details-marker {
  display: none;
}

td.detailsColumn details[open] summary::before,
td.detailsColumn details summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 0.5rem;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

td.detailsColumn details[open] summary::before {
  transform: rotate(180deg);
}

td.detailsColumn ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1em;
  padding-left: 0.5em;
  max-height: none;
  overflow-y: visible;
}

td.detailsColumn li {
  margin: 0.2em 0;
  font-size: 1.08rem;
  line-height: 2.1;
  list-style: none;
  padding: 0;
}

td.detailsColumn a {
  display: block;
  padding: 0.3em 0.7em;
  border-radius: 0.4em;
  font-size: 1.08rem;
  transition: color 0.3s, background 0.2s;
}

td.detailsColumn a:hover {
  color: #fff;
  background: #2563eb;
}

a.icon {
  color: #1d4ed8;
  text-decoration: none;
  position: relative;
  padding-left: 1.75rem;
  display: block;
  width: 100%;
  font-size: 1.18rem;
  border-radius: 0.5em;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
  transition: color 0.3s, background 0.2s;
}

a.icon::before {
  content: "📁";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

a.icon:hover {
  text-decoration: underline;
  color: #1e40af;
}

/* 表格分隔线和悬停高亮效果增强 */

/* 表格行分隔线 */
tbody tr {
  border-bottom: 1.5px solid #e5e7eb;
  transition: background 0.2s;
}

tbody tr:last-child {
  border-bottom: none;
}

/* 悬停高亮整行 */
tbody tr:hover {
  background: #f0f6ff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.06);
}

tbody tr:hover td a.icon,
tbody tr:hover td.detailsColumn a {
  background: #e0e7ff;
  color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 1rem auto;
    padding: 0 0.5rem 1rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  .description {
    font-size: 0.9rem;
  }

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.5rem;
  }

  td.detailsColumn,
  th.detailsColumn {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .container {
    margin: 0.5rem auto;
    padding: 0 0.25rem 0.5rem;
    border-radius: 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
    padding: 0.5rem 0;
  }

  .description {
    font-size: 0.85rem;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.4rem 0.3rem;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }

  h1 {
    font-size: 3rem;
  }

  .description {
    font-size: 1.2rem;
  }
}

/* 优化表格和链接的可点击区域与美观性 */

td, th {
  font-size: 1.15rem;
  line-height: 2.2;
}

td {
  position: relative;
}

a.icon {
  display: block;
  width: 100%;
  font-size: 1.18rem;
  border-radius: 0.5em;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
  transition: color 0.3s, background 0.2s;
}

a.icon:hover {
  color: #fff;
  background: #2563eb;
}

td.detailsColumn a {
  display: block;
  padding: 0.3em 0.7em;
  border-radius: 0.4em;
  font-size: 1.08rem;
  transition: color 0.3s, background 0.2s;
}

td.detailsColumn a:hover {
  color: #fff;
  background: #2563eb;
}

td.detailsColumn li {
  font-size: 1.08rem;
  line-height: 2.1;
  list-style: none;
}

td.detailsColumn summary {
  font-size: 1.12rem;
  font-weight: 700;
  padding: 0.2em 0.5em;
  border-radius: 0.4em;
}

td.detailsColumn summary:hover {
  background: #e0e7ff;
  color: #1e40af;
}
