:root {
  --bg: #313338;
  --panel: #2b2d31;
  --muted: #b5bac1;
  --accent: #5865f2;
  --font-sans: "gg sans", "segoe ui", roboto, "helvetica neue", arial, sans-serif;
}

/* base */
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: #e0e0e0;
}

/* app layout */
.app {
  display: flex;
  gap: 16px;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* panels */
.main-panel {
  flex: 0 0 800px; /* fixed width */
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  overflow: hidden;
}

.side-panel {
  flex: 0 0 300px; /* fixed width */
  background: var(--panel);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  text-align: center;
  height: 570px;
}

/* table styling */
table {
  width: 100%;
  table-layout: fixed; /* important for ellipsis */
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #3c3f44;
  border-radius: 6px;
  background: var(--panel);
  overflow: hidden;
}

thead th:first-child { border-top-left-radius: 6px; }
thead th:last-child { border-top-right-radius: 6px; }
tbody tr:last-child td:first-child { border-bottom-left-radius: 6px; }
tbody tr:last-child td:last-child { border-bottom-right-radius: 6px; }

thead th {
  text-align: left;
  font-weight: 600;
  padding: 6px 12px;
  border-bottom: 1px solid #3c3f44;
  font-size: 13px;
  color: var(--muted);
}

/* first column: filenames */
td.filename, th:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

td.filename span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* last column: download */
td:last-child, th:last-child {
  width: 60px; /* enough for icon and header */
  text-align: right;
  white-space: nowrap;
}

tbody td {
  padding: 6px 12px;
  font-size: 14px;
  border-bottom: 1px solid #3c3f44;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.05); }

td.description { color: var(--muted); }

a.download {
  display: inline-block;
  width: 16px;
  height: 16px;
}

a.download img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  filter: invert(1);
}

.small {
  font-size: 13px;
  color: var(--muted);
}

a {
  color: #6893e4;
  text-decoration: underline;
}

a.download:hover img {
  filter: brightness(0.8) invert(1);
}

/* responsive: stack panels on smaller screens */
@media (max-width: 1120px) {
  .app {
    flex-direction: column;
  }
  .main-panel, .side-panel {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
