:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e9ef;
  background: #101216;
  font-synthesis: none;
  --line: #242a33;
  --muted: #949eac;
  --blue: #8bb9ff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
.page-shell {
  width: min(920px, calc(100% - 64px));
  margin: 48px auto;
}
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}
.list-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
#mod-count { white-space: nowrap; }
h1 { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 600; }
#mod-count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
#search {
  width: 240px;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #303743;
  border-radius: 5px;
  background: #181c23;
  color: inherit;
  font-size: 13px;
}
#search::placeholder { color: var(--muted); opacity: 1; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.modpack-banner {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  margin-bottom: 26px;
  border-top: 1px solid #34445b;
  border-bottom: 1px solid #34445b;
}
.modpack-logo { width: 32px; height: 32px; }
.server-modpack {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  padding: 28px 24px;
  border: 1px solid #8bb9ff;
  border-radius: 8px;
  background: #192f4a;
  animation: server-pack-pulse 3s ease-in-out infinite;
}
.server-modpack .modpack-logo { width: 44px; height: 44px; margin-top: 5px; }
.server-modpack .modpack-copy h2 { font-size: 22px; line-height: 1.4; }
.server-modpack .modpack-copy p { color: #d1dff0; font-size: 14px; }
.server-modpack .modpack-copy .server-pack-label {
  margin: 0 0 8px;
  color: #b9d9ff;
  font-size: 12px;
  font-weight: 600;
}
.server-modpack .modpack-download {
  grid-column: 2;
  justify-self: start;
  min-height: 52px;
  padding: 0 24px;
  border-color: #99c8ff;
  background: #2365b8;
  color: #fff;
  font-size: 15px;
  font-weight: 650;
}
.server-modpack .modpack-download:hover { background: #3179ce; }
.server-modpack:hover,
.server-modpack:focus-within { animation-play-state: paused; }
.personal-modpack { border-top: 0; padding-top: 0; }
.personal-modpack .modpack-download { background: transparent; border-color: #353e4a; color: #b2bdcc; font-size: 12px; }
.personal-modpack .modpack-download:hover { background: #1b222c; border-color: #6a7d98; }
@keyframes server-pack-pulse {
  0%, 100% { border-color: #648fc8; background-color: #182b43; box-shadow: 0 0 20px rgba(75, 143, 230, 0.10); }
  50% { border-color: #b1d6ff; background-color: #203c5c; box-shadow: 0 0 28px rgba(75, 143, 230, 0.25); }
}
.modpack-copy { min-width: 0; }
.modpack-copy h2 { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 600; }
.modpack-copy p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.modpack-copy p span { padding: 0 3px; }
.modpack-download {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #466c9e;
  border-radius: 5px;
  color: #d8e8ff;
  background: #203651;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.modpack-download:hover { background: #2a4668; border-color: #83abdf; }
.modpack-download img { width: 16px; height: 16px; }
.filters { display: flex; gap: 20px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.filters button {
  flex-shrink: 0;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.filters button span { margin-left: 5px; font-size: 11px; color: #8d98a9; font-variant-numeric: tabular-nums; }
.filters button[aria-pressed="true"] { color: var(--blue); border-bottom-color: var(--blue); }
.filters button:hover { color: #e5e9ef; }
.mod-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.mod-art {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #20252d;
  display: grid;
  place-items: center;
}
.mod-art img { width: 100%; height: 100%; object-fit: contain; }
.mod-fallback { color: var(--muted); font-size: 13px; font-weight: 500; }
.mod-copy { min-width: 0; }
.mod-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.requested-tag { padding: 2px 6px; border: 1px solid #665333; border-radius: 3px; background: #2a2419; color: #e9c478; font-size: 10px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.server-voice-tag { border-color: #456b9c; background: #1a2b40; color: #a9ceff; }
.status { color: #b5bcc6; font-size: 11px; line-height: 1.5; }
.status::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 5px 2px 0; border-radius: 50%; background: #88909b; }
.inactive .mod-art { filter: grayscale(1); opacity: 0.65; }
.inactive h2 { color: #aab2bd; }
.mod-copy h2 { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.mod-description { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.button-row { display: flex; gap: 8px; }
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #34445b;
  border-radius: 5px;
  color: #b8d1f5;
  background: #191f29;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.download-button:hover { background: #24334a; border-color: #678cc2; }
.download-button.unavailable { border-color: #282e37; background: transparent; color: #929cab; cursor: default; }
.download-button.unavailable img { filter: grayscale(1); opacity: 0.45; }
.download-button img { width: 16px; height: 16px; }
.empty-state { margin: 0; padding: 32px 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 640px) {
  .page-shell { width: calc(100% - 40px); margin: 32px auto; }
  .list-header { gap: 16px; padding-bottom: 20px; }
  #search { width: 180px; }
  .mod-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px 14px; padding: 18px 0; }
  .button-row { grid-column: 2; flex-wrap: wrap; }
  .download-button { height: 36px; }
  .filters { gap: 16px; }
  .filters button { font-size: 12px; }
  .modpack-banner { grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 20px 0; margin-bottom: 22px; }
  .modpack-download { grid-column: 2; justify-self: start; }
  .server-modpack { grid-template-columns: 1fr; gap: 16px; padding: 24px 18px; }
  .server-modpack .modpack-logo { width: 36px; height: 36px; margin: 0; }
  .server-modpack .modpack-copy h2 { font-size: 20px; }
  .server-modpack .modpack-download { grid-column: 1; justify-self: stretch; padding: 0 12px; }
  .personal-modpack { padding-top: 0; }
}
@media (max-width: 760px) {
  .list-header { flex-direction: column; align-items: stretch; gap: 18px; }
  #search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .download-button { transition: none; }
  .server-modpack { animation: none; }
}

