* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.brand {
  font-size: 20px;
  font-weight: 600;
  color: #38bdf8;
}

#filterBox {
  flex: 1;
  max-width: 320px;
  min-width: 180px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
}

#filterBox:focus {
  border-color: #38bdf8;
}

/* fancyindex가 생성하는 테이블 스타일 */
table {
  width: 100%;
  border-collapse: collapse;
  background: #1e293b;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

th {
  text-align: left;
  padding: 12px 16px;
  background: #273549;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid #334155;
}

th a {
  color: #94a3b8;
  text-decoration: none;
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid #24314a;
  font-size: 14px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #24314a;
}

a {
  color: #7dd3fc;
  text-decoration: none;
}

a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* 폴더/파일 구분 아이콘 (파일명 앞에 자동 표시) */
td:first-child a[href$="/"]::before {
  content: "📁 ";
}

td:first-child a:not([href$="/"])::before {
  content: "📄 ";
}

.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

/* 모바일 대응 */
@media (max-width: 600px) {
  th:nth-child(2), td:nth-child(2) { display: none; } /* 수정일 숨김 */
  .wrap { padding: 16px 12px 40px; }
}
