/* Modern dark theme for Prominence server browser */
:root {
  --bg: #0b0f14;
  --panel: #121821;
  --panel-2: #0f141c;
  --text: #e6edf3;
  --muted: #a0a8b3;
  --brand: #fc9d03;   /* Prominence orange */
  --brand-2: #e28900; /* Deeper orange for gradient */
  --accent: #ffbc4d;  /* Soft orange accent */
  --danger: #ff6b6b;
  --ring: 0 0 0 2px rgba(252, 157, 3, 0.4);
  --scrollbar-track: rgba(255,255,255,0.03);
  --scrollbar-thumb: rgba(252, 157, 3, 0.45);
  --scrollbar-thumb-hover: rgba(252, 157, 3, 0.65);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(252, 157, 3, 0.10), transparent),
              radial-gradient(1000px 700px at 110% 10%, rgba(68, 61, 74, 0.10), transparent),
              var(--bg);
  background-repeat: no-repeat, no-repeat, no-repeat;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body::-webkit-scrollbar,
.add-server-modal__panel::-webkit-scrollbar {
  width: 12px;
}
body::-webkit-scrollbar-track,
.add-server-modal__panel::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), var(--scrollbar-track));
  border-radius: 999px;
}
body::-webkit-scrollbar-thumb,
.add-server-modal__panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(120deg, var(--scrollbar-thumb), rgba(255, 188, 77, 0.65));
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
body::-webkit-scrollbar-thumb:hover,
.add-server-modal__panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(120deg, var(--scrollbar-thumb-hover), rgba(255, 205, 120, 0.9));
  background-clip: padding-box;
}

.container {
  max-width: 1040px;
  padding: 0 20px;
  margin: 0 auto;
}

.site-header {
  padding: 32px 0 8px;
}
.logo {
  display: block;
  width: min(676px, 78vw);
  max-height: 182px;
  object-fit: contain;
  margin: 0 auto 8px;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.45));
}

.site-footer {
  color: var(--muted);
  font-size: 12px;
  padding: 32px 0 48px;
  text-align: center;
}

/* Layout */
#app { display: grid; gap: 16px; }

.hero {
  text-align: center;
  margin: 8px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.search-panel {
  display: grid;
  gap: 12px;
  width: min(100%, 640px);
}
.modpack-section {
  display: grid;
  gap: 12px;
  justify-items: center;
}
.modpack-heading {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.modpack-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.modpack-card {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background-color: rgba(255,255,255,0.05);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.modpack-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3,6,11,0.15) 0%, rgba(3,6,11,0.65) 85%);
  pointer-events: none;
}
.modpack-card:hover,
.modpack-card:focus-visible {
  outline: var(--ring);
  transform: translateY(-2px);
  border-color: rgba(252, 157, 3, 0.45);
  box-shadow: 0 14px 34px rgba(0,0,0,0.32);
}
.modpack-card.active {
  border-color: rgba(252, 157, 3, 0.6);
  box-shadow: 0 0 0 2px rgba(252, 157, 3, 0.25);
}
.modpack-name {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .28s ease-out, transform .28s ease-out;
}
.modpack-card:hover .modpack-name,
.modpack-card:focus-visible .modpack-name {
  opacity: 1;
  transform: translateY(0);
}
.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
}
.search-submit {
  width: 48px;
  min-width: 48px;
  padding: 0;
  justify-content: center;
}
.search-submit .icon {
  width: 18px;
  height: 18px;
}
.search-input {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0 16px;
  font-size: 15px;
  color: var(--text);
  background: rgba(8, 11, 17, 0.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.search-input::placeholder {
  color: rgba(230, 237, 243, 0.45);
}
.search-input:focus {
  outline: var(--ring);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.icon {
  display: inline-block;
}
.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.search-tags-wrapper {
  width: 100%;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s cubic-bezier(0.16, 1, 0.3, 1), opacity .32s ease, transform .32s ease;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.search-tags-wrapper[data-expanded="true"] {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.search-tags-wrapper > .search-tags {
  overflow: hidden;
  padding-top: 8px;
}
.search-tags-wrapper[data-expanded="false"] .tag-toggle {
  opacity: 0;
}
.search-tags-wrapper[data-expanded="true"] .tag-toggle {
  opacity: 0;
  animation: tagFade .36s ease forwards;
  animation-delay: calc(var(--tag-index, 0) * 0.05s);
}
.tag-disclosure {
  margin: 4px auto 0;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
  min-height: 42px;
  padding: 0 18px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tag-disclosure:hover,
.tag-disclosure:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(252, 157, 3, 0.45);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}
.tag-disclosure[aria-expanded="true"] {
  background: rgba(252, 157, 3, 0.16);
  border-color: rgba(252, 157, 3, 0.45);
  box-shadow: 0 0 0 1px rgba(252, 157, 3, 0.25);
}
.tag-disclosure-label {
  font-size: 13px;
  letter-spacing: 0.2px;
}
.tag-disclosure-icon {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s ease;
  margin-left: 4px;
}
.tag-disclosure[aria-expanded="true"] .tag-disclosure-icon {
  transform: rotate(225deg);
}
.tag-toggle {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tag-toggle:hover:not(.disabled),
.tag-toggle:focus-visible:not(.disabled) {
  outline: var(--ring);
}
.tag-toggle.active {
  background: rgba(252, 157, 3, 0.16);
  border-color: rgba(252, 157, 3, 0.45);
  box-shadow: 0 0 0 1px rgba(252, 157, 3, 0.25);
}
.tag-toggle.disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}
.active-tag-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-actions .btn {
  height: 38px;
  padding: 0 14px;
}

/* Horizontal row list: one line per server */
.list { display: grid; grid-template-columns: 1fr; gap: 16px; }

.list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(18, 24, 33, 0.92), rgba(15, 20, 28, 0.92));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.toolbar-sort {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar-label {
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.toolbar-dropdown {
  position: relative;
  min-width: 220px;
}
.toolbar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.toolbar-toggle:hover,
.toolbar-toggle:focus-visible {
  color: var(--brand);
  outline: none;
  text-shadow: 0 0 6px rgba(252, 157, 3, 0.4);
}
.toolbar-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform .25s ease;
}
.toolbar-dropdown[data-open="true"] .toolbar-toggle-icon {
  transform: rotate(180deg);
}
.toolbar-options {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(15, 20, 28, 0.98), rgba(12, 17, 24, 0.98));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 20;
}
.toolbar-dropdown[data-open="true"] .toolbar-options {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.toolbar-option {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.toolbar-option:hover,
.toolbar-option:focus-visible {
  background: rgba(255,255,255,0.06);
  outline: none;
}
.toolbar-option.is-active {
  background: rgba(252, 157, 3, 0.18);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(252,157,3,0.25);
}
.toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  z-index: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  appearance: none;
  transition: transform .18s ease;
}
.toolbar-link:hover,
.toolbar-link:focus-visible {
  outline: var(--ring);
}
.toolbar-link::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(
    120deg,
    rgba(255, 111, 0, 0.5),
    rgba(255, 204, 0, 0.85),
    rgba(255, 56, 92, 0.6),
    rgba(62, 143, 255, 0.65),
    rgba(255, 111, 0, 0.5)
  );
  background-size: 280% 280%;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: -1;
  filter: blur(0.6px);
}
.toolbar-link:hover::after,
.toolbar-link:focus-visible::after {
  opacity: 1;
  animation: featuredGlowWave 4s linear infinite;
}

body.modal-open {
  overflow: hidden;
}

.add-server-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 60px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s ease;
  z-index: 200;
}
.add-server-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.add-server-modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 20%, rgba(252, 157, 3, 0.25), rgba(5, 8, 12, 0.9)), rgba(5, 8, 12, 0.8);
  backdrop-filter: blur(16px);
  animation: modalGlowDrift 8s ease-in-out infinite;
}
.add-server-modal__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(98vh, 820px);
  overflow: auto;
  padding: 46px clamp(30px, 5vw, 50px) 40px;
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(15, 20, 28, 0.95), rgba(9, 13, 19, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform .45s cubic-bezier(0.16, 1, 0.3, 1), opacity .45s ease;
  isolation: isolate;
}
.add-server-modal__panel::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 188, 77, 0.09), rgba(252, 157, 3, 0.12));
  z-index: -1;
  opacity: 0.9;
}
.add-server-modal.is-visible .add-server-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.add-server-modal__title {
  margin: 0 40px 8px 0;
  font-size: clamp(24px, 4vw, 30px);
  letter-spacing: 0.3px;
}
.add-server-modal__subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.add-server-requirements {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.add-server-requirements-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  animation: requirementFloat 0.9s ease forwards;
  animation-delay: calc(var(--req-index, 0) * 0.08s);
}
.add-server-requirements-item:nth-child(odd) {
  background: rgba(15, 22, 32, 0.75);
}
.add-server-requirements-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--brand));
  box-shadow: 0 0 12px rgba(252, 157, 3, 0.6);
}
.add-server-requirements-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.add-server-modal__cta {
  margin-top: 26px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  text-decoration: none;
  color: #050709;
  background: linear-gradient(120deg, var(--accent), var(--brand), var(--brand-2));
  box-shadow: 0 12px 35px rgba(252, 157, 3, 0.35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.add-server-modal__cta:hover,
.add-server-modal__cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(252, 157, 3, 0.45);
  outline: none;
}
.add-server-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.add-server-modal__close:hover,
.add-server-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  outline: none;
}

@keyframes modalGlowDrift {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.95; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes requirementFloat {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .add-server-modal,
  .add-server-modal__panel,
  .add-server-requirements-item {
    transition: none;
    animation: none;
  }
}

.card, .row-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 22px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .2s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.03);
}
.card:hover, .row-card:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 157, 3, 0.45);
  box-shadow: 0 14px 34px rgba(0,0,0,0.32), 0 0 0 1px rgba(252, 157, 3, 0.20) inset;
}

/* Row card layout */
.row-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 150px;
  position: relative;
  isolation: isolate;
}
.row-card.is-featured {
  border-color: rgba(255, 188, 77, 0.7);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(255, 188, 77, 0.4),
    0 0 18px rgba(255, 188, 77, 0.35);
}
.row-card.is-featured::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    120deg,
    rgba(255, 111, 0, 0.5),
    rgba(255, 204, 0, 0.85),
    rgba(255, 56, 92, 0.6),
    rgba(62, 143, 255, 0.65),
    rgba(255, 111, 0, 0.5)
  );
  background-size: 280% 280%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: blur(0.6px);
  opacity: 0.95;
  pointer-events: none;
  animation: featuredGlowWave 4s linear infinite;
}
.row-top {
  display: flex;
  align-items: stretch;
  gap: 18px;
}
.row-card.spawn-in {
  opacity: 0;
  transform: translateY(14px);
  animation: rowEnter .5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--card-index, 0) * 0.07s);
}
.row-card[hidden],
.row-card[data-page-visible="false"] {
  display: none !important;
}
.row-media {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.row-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  box-sizing: border-box;
  display: block;
  padding: 6px;
  transition: transform .18s ease;
  will-change: transform;
}
.row-media:hover .row-logo,
.row-media:focus-within .row-logo {
  transform: scale(1.08);
}
.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row-title {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row-featured-badge {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #050709;
  background: linear-gradient(120deg, var(--accent), var(--brand));
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(252, 157, 3, 0.35);
}

@keyframes featuredGlowWave {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.row-title-button,
.row-title-label {
  font: inherit;
  color: inherit;
}
.row-title-button {
  border: none;
  background: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  cursor: pointer;
}
.row-title-button:hover,
.row-title-button:focus-visible {
  text-decoration: underline;
  outline: none;
}
.row-title-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.row-desc { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.45; }
.row-ip {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 6px 10px;
  width: fit-content;
  max-width: 100%;
}
.row-ip-label {
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}
.row-ip-value {
  font-size: 13px;
  letter-spacing: 0.4px;
  color: var(--text);
  flex: 0 1 auto;
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 88px;
  align-self: stretch;
}
.row-status-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  width: 100%;
}
.row-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.server-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.server-link:hover,
.server-link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.35);
  outline: none;
}
.server-link::before,
.server-link::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.server-link::before {
  content: "";
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 4px);
  border: 6px solid transparent;
  border-top-color: rgba(12, 17, 24, 0.92);
}
.server-link::after {
  content: attr(data-tooltip);
  bottom: calc(100% + 18px);
  left: 50%;
  transform: translate(-50%, 6px);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(12, 17, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.server-link:hover::before,
.server-link:hover::after,
.server-link:focus-visible::before,
.server-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.server-link-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.server-link-icon--discord {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.server-link--discord {
  background: linear-gradient(135deg, #5865f2, #4752c4);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8f9ff;
}
.server-link--website {
  background: linear-gradient(135deg, #4f8bff, #3a5ad9);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f6ff;
}
.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.icon-button .icon {
  width: 14px;
  height: 14px;
}
.icon-button:hover,
.icon-button:focus-visible {
  outline: var(--ring);
}
.icon-button:disabled,
.icon-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.copy-button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(12, 17, 24, 0.9);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
}
.copy-button[data-state="copied"]::after {
  content: "Copied!";
  opacity: 1;
  transform: translate(-50%, 0);
}
.copy-button[data-state="error"]::after {
  content: "Failed";
  opacity: 1;
  transform: translate(-50%, 0);
  background: rgba(255, 107, 107, 0.9);
}
.row-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(8, 11, 17, 0.65);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.24);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.38);
}
.status-dot.online {
  background: #3bb273;
  box-shadow: 0 0 0 2px rgba(59, 178, 115, 0.32);
}
.status-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.28);
}
.status-dot.pending {
  background: rgba(255,255,255,0.24);
}
.row-status[data-state="online"] .status-text {
  color: #c4f0d6;
}
.row-status[data-state="offline"] .status-text {
  color: rgba(255,255,255,0.55);
}
.row-toggle {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.row-toggle:hover,
.row-toggle:focus-visible {
  outline: var(--ring);
}
.row-toggle-label {
  font-size: 13px;
  font-weight: 600;
}
.row-toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform .32s cubic-bezier(0.16, 1, 0.3, 1);
}
.row-card[data-expanded="true"] .row-toggle-icon {
  transform: rotate(180deg);
}
.row-extra {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.04);
  padding: 0 16px;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height .45s cubic-bezier(0.16, 1, 0.3, 1), opacity .28s ease, transform .28s ease, padding .28s ease;
}
.row-card[data-expanded="true"] .row-extra {
  opacity: 1;
  transform: translateY(0);
  padding: 16px;
}
.row-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(10, 15, 22, 0.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
}
.carousel-slide.active {
  opacity: 1;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(10, 15, 22, 0.78);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease;
  padding: 0;
}
.carousel-nav:hover,
.carousel-nav:focus-visible {
  outline: var(--ring);
  background: rgba(252, 157, 3, 0.22);
  border-color: rgba(252, 157, 3, 0.45);
}
.carousel-nav:focus {
  outline: none;
}
.carousel-prev {
  left: 14px;
}
.carousel-next {
  right: 14px;
}
.carousel-nav-icon {
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.carousel-nav-icon-prev {
  transform: rotate(90deg);
}
.carousel-nav-icon-next {
  transform: rotate(-90deg);
}
.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 15, 22, 0.52);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 22px rgba(0,0,0,0.32);
  backdrop-filter: blur(8px);
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.4);
  opacity: 0.65;
  cursor: pointer;
  padding: 0;
  transition: opacity .2s ease, transform .2s ease, background .2s ease, border-color .2s ease;
}
.carousel-dot:hover,
.carousel-dot:focus-visible {
  outline: none;
  opacity: 1;
  transform: scale(1.1);
  border-color: rgba(252, 157, 3, 0.8);
}
.carousel-dot.is-active {
  opacity: 1;
  background: var(--brand);
  border-color: rgba(252, 157, 3, 0.9);
}

@supports not (aspect-ratio: 16 / 9) {
  .row-carousel {
    height: 0;
    padding-bottom: 56%;
  }
  .carousel-track {
    position: absolute;
    inset: 0;
  }
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0a0d12;
  background: var(--tag-color, rgba(255,255,255,0.12));
  border: 1px solid rgba(0,0,0,0.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
  text-decoration: none;
  cursor: pointer;
}
.tag:hover,
.tag:focus-visible {
  outline: var(--ring);
}
.tag-overflow {
  position: relative;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.tag-overflow::before,
.tag-overflow::after {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 10;
}
.tag-overflow::before {
  content: "";
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translate(-50%, 0);
  border: 6px solid transparent;
  border-top-color: rgba(12, 17, 24, 0.92);
}
.tag-overflow::after {
  content: attr(data-tooltip);
  left: 50%;
  bottom: calc(100% + 16px);
  transform: translate(-50%, 4px);
  min-width: 160px;
  max-width: 240px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(12, 17, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  white-space: pre-wrap;
}
.tag-overflow:hover::before,
.tag-overflow:hover::after,
.tag-overflow:focus-visible::before,
.tag-overflow:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -2px);
}

@media (max-width: 720px) {
  .row-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .row-media { width: 72px; height: 72px; }
  .row-actions {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    margin-left: 0;
    margin-top: 6px;
    align-self: auto;
  }
  .row-links {
    width: 100%;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
  .server-link {
    width: 36px;
    height: 36px;
  }
  .row-status-wrapper {
    width: 100%;
    justify-content: flex-start;
  }
  .row-status {
    width: 100%;
    justify-content: flex-start;
  }
  .row-toggle {
    width: 100%;
    justify-content: center;
  }
  .search-form { flex-direction: row; align-items: stretch; gap: 8px; }
  .search-input { width: 100%; }
  .search-form .btn { width: auto; }
  .modpack-grid { justify-content: center; }
  .list-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .toolbar-sort {
    width: 100%;
    justify-content: space-between;
  }
  .toolbar-dropdown {
    width: 100%;
  }
  .toolbar-toggle {
    width: 100%;
    justify-content: space-between;
  }
  .toolbar-options {
    left: 0;
    right: 0;
    min-width: unset;
  }
  .toolbar-link {
    width: 100%;
  }
}

.card-title {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.card-desc {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  min-height: 2.8em;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  height: 44px;
  padding: 0 16px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.btn:hover {
  outline: var(--ring);
}
.btn.primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  color: #1a1100;
  border-color: transparent;
}
.btn.primary:hover { filter: brightness(1.08); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.link:hover,
.link:focus-visible {
  text-decoration: underline;
}

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

/* Detail page */
.detail {
  display: grid;
  gap: 14px;
  margin: 10px auto 8px;
  padding: 20px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  max-width: 820px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.03);
}
.detail h1 { margin: 0; font-size: 32px; letter-spacing: 0.2px; }
.detail p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }

.ip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #0a1017;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 12px;
  border-radius: 10px;
}

/* Gallery */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gallery .row-carousel {
  width: 100%;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 0 4px;
}
.pagination-pages {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.page-nav,
.page-number {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(12, 18, 26, 0.8);
  color: var(--text);
  min-width: 44px;
  min-height: 36px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.page-number.active {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-color: transparent;
  color: #1a1100;
}
.page-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.page-nav:not(:disabled):hover,
.page-number:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.3);
}

.notice {
  color: var(--muted);
  text-align: center;
  padding: 8px 0 0;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 0 10px;
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

@keyframes tagFade {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rowEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .search-tags-wrapper { transition: none; }
  .tag-disclosure-icon { transition: none; }
  .tag-disclosure { transition: none; }
  .row-card.spawn-in { animation: none; opacity: 1; transform: none; }
  .search-tags-wrapper[data-expanded="true"] .tag-toggle { animation: none; opacity: 1; }
}
