.mod-main {
  padding: 34px 0 50px;
}

.mod-hero {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 42px);
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-background);
}

.mod-logo-button {
  display: block;
  width: 100%;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--icon-border);
  border-radius: 16px;
  background: var(--icon-background);
  cursor: zoom-in;
  transition: border-color 160ms ease, transform 160ms ease;
}

.mod-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mod-logo-button:focus-visible,
.mod-tab:focus-visible,
.mod-action:focus-visible,
.mod-file-toggle:focus-visible,
.mod-modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.mod-eyebrow {
  margin: 0 0 8px;
  color: var(--mark-color, var(--accent));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mod-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
}

.mod-description {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.mod-actions {
  display: flex;
  width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.mod-downloads {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mod-downloads-label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.available-aternos {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.available-label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.aternos-link {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--icon-border);
  border-radius: 8px;
  background: var(--icon-background);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.aternos-logo {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.aternos-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.aternos-link::after {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  left: 50%;
  padding: 6px 9px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
  color: var(--text);
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.aternos-link:hover::after,
.aternos-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.mod-download-platform::after {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  left: 50%;
  padding: 6px 9px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
  color: var(--text);
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.mod-download-platform:hover::after,
.mod-download-platform:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.mod-download-options {
  display: flex;
  gap: 8px;
}

.mod-download-platform {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--icon-border);
  border-radius: 10px;
  background: var(--icon-background);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.mod-download-platform .svg-icon {
  width: 25px;
  height: 25px;
  opacity: 0.8;
}

.mod-download-platform:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mod-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 1px solid var(--icon-border);
  border-radius: 10px;
  background: var(--icon-background);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.mod-action-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--dark-background);
}

.mod-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mod-tab {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--icon-border);
  border-radius: 999px;
  background: var(--icon-background);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mod-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--surface-hover);
  color: var(--text);
}

.mod-panel[hidden] {
  display: none;
}

.mod-section-heading {
  margin: 0 0 18px;
}

#stats > .mod-section-heading {
  max-width: 720px;
  margin-inline: auto;
}

.mod-section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(21px, 3.5vw, 27px);
  line-height: 1.25;
}

.mod-section-heading h2 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.mod-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.mod-subheading {
  margin: 32px 0 16px;
}

.mod-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.mod-stat-card,
.mod-info-card,
.mod-dependency-card,
.mod-feature-card,
.mod-table-card,
.mod-file-explorer {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card-background);
}

.mod-stat-card {
  display: grid;
  min-height: 94px;
  align-content: center;
  gap: 8px;
  padding: 20px;
}

.mod-stat-card span,
.mod-info-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mod-stat-card strong {
  overflow-wrap: anywhere;
  font-size: clamp(18px, 3vw, 23px);
  line-height: 1.2;
}

.mod-download-stats {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mod-download-source {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 8px;
}

.mod-download-source > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mod-download-source > strong {
  font-size: clamp(16px, 2.5vw, 21px);
}

.mod-bstats {
  display: grid;
  justify-items: center;
  margin-top: 14px;
}

.mod-bstats-link {
  position: absolute;
  z-index: 1;
  top: 22px;
  right: 22px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.mod-bstats-link .svg-icon {
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.mod-bstats-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mod-bstats-chart-card {
  position: relative;
  width: min(100%, 720px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card-background);
}

.mod-bstats-chart {
  display: block;
  width: 100%;
  min-height: 120px;
  border-radius: 8px;
  object-fit: contain;
}

.mod-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.mod-info-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 100px;
  padding: 20px;
}

.mod-info-card > a,
.mod-inline-links a,
.mod-dependency-card a,
.mod-table-card a {
  color: var(--accent);
}

.mod-info-card strong,
.mod-info-card > a {
  font-size: 14px;
  font-weight: 700;
}

.mod-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
}

.mod-feedback-links {
  gap: 10px;
}

.mod-feedback-links a {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--icon-border);
  border-radius: 10px;
  background: var(--icon-background);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.mod-feedback-links .svg-icon {
  width: 23px;
  height: 23px;
  opacity: 0.78;
}

.mod-feedback-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mod-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mod-feature-card {
  display: flex;
  min-height: 58px;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.mod-feature-card::before {
  content: "✓";
  flex: 0 0 auto;
  color: var(--mark-color, var(--accent));
  font-weight: 700;
}

.mod-feature-card p {
  margin: 0;
}

.mod-feature-content {
  flex: 1;
  min-width: 0;
}

.mod-feature-card-group {
  grid-column: 1 / -1;
}

.mod-feature-content > h3,
.mod-feature-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.4;
}

.mod-feature-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.mod-feature-group {
  min-width: 0;
}

.mod-feature-group-block-entities {
  grid-column: span 3;
}

.mod-feature-group-block-entities .mod-feature-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mod-feature-group-entities {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.mod-feature-group-entities .mod-feature-list {
  grid-template-columns: 1fr;
}

.mod-feature-group h4 {
  font-size: 12px;
}

.mod-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  margin: 0;
  padding-left: 18px;
}

.mod-feature-card a {
  display: inline-block;
  color: var(--mark-color, var(--accent));
  text-decoration: none;
  transition: transform 160ms ease;
}

.mod-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.mod-legend span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.mod-legend .admin-type {
  color: var(--admin-color, #f5c84c);
}

.mod-legend .user-type {
  color: var(--user-color, #63b3ed);
}

.admin-type {
  color: var(--admin-color, #f5c84c);
}

.user-type {
  color: var(--user-color, #63b3ed);
}

:root[data-theme="light"] {
  --admin-color: #815b00;
  --user-color: #075a91;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --admin-color: #815b00;
    --user-color: #075a91;
  }
}

.mod-table-card {
  overflow: hidden;
}

.mod-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.mod-table-card table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.mod-table-card th,
.mod-table-card td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 12px;
  line-height: 1.55;
}

.mod-table-card th {
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mod-table-card tbody tr:last-child td {
  border-bottom: 0;
}

.mod-table-card td:first-child {
  min-width: 190px;
  color: var(--text);
  font-family: Consolas, "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
}

.mod-table-card td:nth-child(2) {
  min-width: 240px;
  color: var(--muted);
}

.mod-table-card td:last-child {
  white-space: nowrap;
}

.mod-table-card td.command-admin,
.mod-table-card td.permission-admin {
  color: var(--admin-color, #f5c84c);
}

.mod-table-card td.command-user,
.mod-table-card td.permission-user {
  color: var(--user-color, #63b3ed);
}

.mod-table-card .command-info {
  color: var(--muted);
}

.mod-console-yes {
  color: var(--accent);
}

.mod-console-no {
  color: var(--muted);
}

.mod-table-spaced {
  margin-bottom: 0;
}

.mod-dependency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mod-dependency-card {
  padding: 18px;
}

.mod-dependency-card h3 {
  margin: 0 0 13px;
  font-size: 15px;
}

.mod-dependency-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.mod-dependency-card a {
  display: inline-block;
  color: var(--mark-color, var(--accent));
  font-weight: 700;
  transition: transform 160ms ease;
}

.mod-dependency-platforms {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 14px;
}

.mod-dependency-platform {
  min-width: 0;
}

.mod-dependency-platform + .mod-dependency-platform {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.mod-dependency-platform h4 {
  margin: 0 0 8px;
  font-size: 12px;
}

.mod-dependency-platform p {
  margin: 0;
}

.mod-file-explorer {
  padding: 8px;
}

.mod-file-node + .mod-file-node {
  margin-top: 5px;
}

.mod-file-toggle {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.mod-file-toggle:hover {
  background: var(--surface-hover);
}

.mod-file-toggle::before {
  content: "▸";
  width: 12px;
  flex: 0 0 12px;
  color: var(--accent);
  text-align: center;
}

.mod-file-toggle[aria-expanded="true"]::before {
  content: "▾";
}

.mod-file-toggle[data-kind="file"]::before {
  content: "";
  width: 7px;
  height: 7px;
  flex-basis: 7px;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--muted);
}

.mod-file-children {
  margin: 3px 0 5px 16px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.mod-file-preview {
  max-height: 420px;
  margin: 0 0 8px 31px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font: 11px/1.6 Consolas, "SFMono-Regular", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mod-empty-state {
  margin: 0;
  padding: 13px;
  color: var(--muted);
  font-size: 13px;
}

.mod-image-modal[hidden] {
  display: none;
}

.mod-image-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.86);
}

.mod-image-modal img {
  display: block;
  max-width: min(90vw, 1100px);
  max-height: 84vh;
  border-radius: 12px;
  object-fit: contain;
}

.mod-modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .mod-action:hover,
  .mod-tab:hover {
    transform: translateY(-1px);
  }

  .mod-logo-button:hover {
    transform: scale(1.04);
    border-color: var(--mark-color, var(--accent));
  }

  .mod-action:hover {
    border-color: var(--accent);
    background: var(--surface-hover);
  }

  .mod-action-primary:hover {
    background: var(--surface-hover);
    color: var(--text);
  }

  .mod-download-platform:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--surface-hover);
  }

  .mod-download-platform:hover .svg-icon {
    opacity: 1;
  }

  .aternos-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--surface-hover);
  }

  .mod-tab:hover {
    color: var(--text);
  }

  .mod-feedback-links a:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--surface-hover);
  }

  .mod-feedback-links a:hover .svg-icon {
    opacity: 1;
  }

  .mod-feature-card a:hover,
  .mod-dependency-card a:hover {
    transform: scale(1.075);
    transform-origin: center;
  }

  .mod-bstats-link:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    background: var(--surface-hover);
  }

  .mod-bstats-link:hover .svg-icon {
    opacity: 1;
  }

}

@media (max-width: 760px) {
  .mod-hero {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .mod-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .mod-main {
    padding-top: 24px;
  }

  .mod-hero {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 18px;
    padding: 18px;
  }

  .mod-logo-button {
    width: 180px;
  }

  .mod-tabs {
    gap: 6px;
    margin: 16px 0;
    padding-bottom: 12px;
  }

  .mod-tab {
    min-height: 33px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .mod-stats-grid,
  .mod-info-grid,
  .mod-feature-grid,
  .mod-dependency-grid {
    grid-template-columns: 1fr;
  }

  .mod-feature-groups,
  .mod-feature-list {
    grid-template-columns: 1fr;
  }

  .mod-feature-group-block-entities {
    grid-column: auto;
  }

  .mod-feature-group-block-entities .mod-feature-list {
    grid-template-columns: 1fr;
  }

  .mod-feature-group-entities {
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .mod-stat-card {
    min-height: 78px;
  }

  .mod-bstats-chart {
    min-height: 90px;
  }

  .mod-table-card th,
  .mod-table-card td {
    padding: 10px;
  }

  .mod-image-modal {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mod-action,
  .mod-tab,
  .mod-logo-button,
  .mod-feature-card a,
  .mod-dependency-card a {
    transition: none;
  }
}

.mod-main .mod-hero-copy {
  min-width: 0;
}

.mod-main .mod-feature-grid:empty,
.mod-main .mod-file-explorer:empty {
  display: none;
}

.mod-dependencies .mod-dependency-card p:first-of-type {
  margin-top: 0;
}

