/* Modpack-Seite: dieselbe Box- und Kettenposition wie die öffentliche Videoseite. */
@media (min-width: 1001px) {
  .profilseite:has(.profil-bereich) .hangende-platzhalter.modpacks-startbox {
    width: min(900px, calc(100% - 250px));
  }

  .profilseite .hangende-platzhalter.modpacks-startbox > .profil-fenster {
    box-sizing: border-box;
    width: min(1100px, calc(100vw - 64px));
    max-width: none;
    margin-left: 0;
    transform: translateX(-10px);
  }
}

.profilseite .hangende-platzhalter.modpacks-startbox .profil-grunddaten.modpacks-content {
  display: block;
  min-height: 250px;
  padding: 22px;
  text-align: left;
}

.modpacks-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 17px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(215, 164, 105, .48);
}

.modpacks-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 2px solid #a37347;
  border-radius: 4px;
  color: #fff5e7;
  background: linear-gradient(#62442e, #35271e);
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 2px 4px rgba(0,0,0,.35);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.modpacks-button:hover,
.modpacks-button:focus-visible {
  border-color: #f1c27d;
  background: linear-gradient(#765335, #423024);
}

.modpacks-button:focus-visible,
.modpack-card:focus-visible,
.modpack-detail-tabs button:focus-visible,
.modpacks-dialog-close:focus-visible {
  outline: 2px solid #ffe1a1;
  outline-offset: 3px;
}

.modpacks-button--quiet { background: #302a24; }

.modpacks-notice,
.modpacks-error {
  margin: 0 0 15px;
  padding: 11px 13px;
  border: 1px solid #a37347;
  background: rgba(25, 21, 18, .78);
  color: #ffe1a1;
}

.modpacks-error {
  border-color: #a94442;
  color: #ffd2ca;
}

.modpacks-empty {
  padding: 48px 18px;
  border: 1px solid rgba(163, 115, 71, .7);
  border-radius: 4px;
  background: rgba(25, 21, 18, .45);
  text-align: center;
}

.modpacks-empty h1 {
  width: auto;
  margin: 0 0 10px;
  color: #ffe1a1;
  font-size: 1.4rem;
  line-height: 1.3;
}

.modpacks-empty p { margin: 0; color: #e1d6c8; }

.modpack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.modpack-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  padding: 9px;
  border: 1px solid #a37347;
  border-radius: 4px;
  color: #ffe1a1;
  background: #191512;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}

.modpack-card::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 13, 11, .48), rgba(16, 13, 11, .84));
  content: "";
  pointer-events: none;
}

.modpack-card__background {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: .9;
  transition: opacity .15s ease;
  pointer-events: none;
}

.modpack-card > *:not(.modpack-card__background) {
  position: relative;
  z-index: 2;
}

.modpack-card:hover,
.modpack-card:focus-visible {
  border-color: #f1c27d;
  transform: translateY(-2px);
}

.modpack-card:hover .modpack-card__background,
.modpack-card:focus-visible .modpack-card__background {
  opacity: 1;
}

.modpack-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid #68472e;
  background: #171512;
}

.modpack-card__name {
  margin-top: 10px;
  color: #fff0d0;
  font-size: 1.05rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.modpack-card__description {
  margin-top: 7px;
  color: #e3d7c7;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.modpack-card__version {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(163, 115, 71, .5);
  color: #cfc2b2;
  font-size: .82rem;
}

.modpack-detail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  padding: 14px;
  border: 1px solid #a37347;
  border-radius: 4px;
  background: #191512;
}

.modpack-detail::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(115deg, rgba(16, 13, 11, .72), rgba(16, 13, 11, .84));
  content: "";
  pointer-events: none;
}

.modpack-detail__background {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: .9;
  pointer-events: none;
}

.modpack-detail > *:not(.modpack-detail__background) {
  position: relative;
  z-index: 2;
}

.modpack-detail__hero {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.modpack-detail__hero > img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid #a37347;
  background: #171512;
}

.modpack-detail__summary h1 {
  width: auto;
  margin: 0 0 8px;
  color: #fff0d0;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.modpack-detail__short {
  margin: 0 0 15px;
  color: #e5d7c4;
  font-weight: 700;
  line-height: 1.5;
}

.modpack-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.modpack-facts > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(163, 115, 71, .62);
  background: rgba(20, 17, 15, .55);
}

.modpack-facts dt {
  color: #d7b985;
  font-size: .78rem;
  font-weight: 800;
}

.modpack-facts dd {
  margin: 4px 0 0;
  color: #fff5e7;
  overflow-wrap: anywhere;
}

.modpack-detail-tabs {
  display: flex;
  gap: 7px;
  margin-top: 18px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(215, 164, 105, .48);
}

.modpack-detail-tabs button {
  padding: 8px 12px;
  border: 1px solid #8f613b;
  border-radius: 3px;
  color: #f5dfbd;
  background: #34281f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.modpack-detail-tabs button[aria-selected="true"] {
  color: #fff4db;
  background: linear-gradient(#6a4a31, #3b2c21);
  border-color: #d29a5e;
}

.modpack-detail-panel {
  padding: 17px 3px 4px;
}

.modpack-detail-panel h2 {
  margin: 0 0 10px;
  color: #ffe1a1;
  font-size: 1.08rem;
}

.modpack-description {
  color: #eee4d7;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.modpack-mod-list {
  columns: 2;
  column-gap: 30px;
  margin: 0;
  padding-left: 21px;
  color: #eee4d7;
}

.modpack-mod-list li {
  margin: 0 0 6px;
  break-inside: avoid;
  overflow-wrap: anywhere;
}

.modpacks-dialog {
  width: min(700px, calc(100vw - 28px));
  max-width: none;
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 0;
  border: 4px solid #21140d;
  border-radius: 6px;
  color: #f7ecdc;
  background: linear-gradient(145deg, #3b342d, #242321 70%);
  box-shadow: inset 0 0 0 3px #8a5b36, 0 14px 45px rgba(0,0,0,.78);
}

.modpacks-dialog::backdrop { background: rgba(0, 0, 0, .72); }

.modpacks-form {
  display: grid;
  gap: 13px;
  padding: 20px;
}

.modpacks-form > header,
.modpacks-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modpacks-form > header {
  margin: -20px -20px 3px;
  padding: 13px 18px;
  border-bottom: 2px solid #8a5b36;
  background: linear-gradient(#604128, #3f2a1b);
}

.modpacks-form h2 {
  margin: 0;
  color: #fff0d0;
  font-size: 1.18rem;
}

.modpacks-dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid #c18b56;
  border-radius: 4px;
  color: #fff4e1;
  background: #39271c;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.modpacks-form label {
  display: grid;
  gap: 6px;
  color: #f5dcae;
  font-weight: 800;
}

.modpacks-form :is(input:not([type="file"]), select, textarea) {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #a37347;
  border-radius: 3px;
  color: #fff8ed;
  background: #211d19;
  font: inherit;
}

.modpacks-form textarea {
  min-height: 130px;
  resize: vertical;
}

.modpacks-form input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #8a5b36;
  border-radius: 3px;
  color: #e7d8c6;
  background: rgba(20, 17, 15, .7);
}

.modpacks-form :is(input, select, textarea, button):focus-visible {
  outline: 2px solid #ffe1a1;
  outline-offset: 2px;
}

.modpacks-form__split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modpacks-form__hint {
  margin: 0;
  color: #d7c8b6;
  font-size: .87rem;
  line-height: 1.5;
}

.modpacks-form > footer {
  justify-content: flex-end;
  margin-top: 4px;
}

@media (max-width: 820px) {
  .modpack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profilseite .hangende-platzhalter.modpacks-startbox .profil-grunddaten.modpacks-content { padding: 16px; }
}

@media (max-width: 620px) {
  .modpack-detail__hero { grid-template-columns: minmax(0, 1fr); }
  .modpack-detail__hero > img { width: min(240px, 100%); }
  .modpack-facts { grid-template-columns: minmax(0, 1fr); }
  .modpacks-form__split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 500px) {
  .modpack-grid { grid-template-columns: minmax(0, 1fr); }
  .modpack-mod-list { columns: 1; }
  .modpacks-toolbar { align-items: stretch; flex-direction: column; }
  .modpacks-toolbar .modpacks-button,
  .modpacks-toolbar .modpacks-back { width: 100%; }
  .modpacks-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .modpacks-form { padding: 14px; }
  .modpacks-form > header { margin: -14px -14px 2px; }
}


.modpack-archive-manager {
  margin: 0 20px 20px;
  padding: 16px;
  border: 1px solid #9a7048;
  border-radius: 4px;
  color: #f5dcae;
  background: rgba(34, 29, 24, .78);
}

.modpack-archive-manager > h2 {
  margin: 0 0 10px;
  color: #ffe5b3;
}

.modpack-archive-manager > p {
  margin: 8px 0;
  line-height: 1.5;
}

.modpack-archive-manager__path {
  display: block;
  padding: 9px 11px;
  border: 1px solid #63462f;
  border-radius: 3px;
  color: #fff0d0;
  background: #211d19;
  overflow-wrap: anywhere;
}

.modpack-archive-manager__targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.modpack-archive-target {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #725137;
  border-radius: 3px;
  color: #f5dcae;
  background: rgba(20, 17, 15, .5);
}

.modpack-archive-target select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #8a5b36;
  border-radius: 3px;
  color: #fff8ed;
  background: #211d19;
  font: inherit;
}

.modpack-archive-manager__form > footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 620px) {
  .modpack-archive-manager { margin: 0 14px 14px; padding: 14px; }
  .modpack-archive-manager__targets { grid-template-columns: minmax(0, 1fr); }
}


.modpack-download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.modpack-download-actions .modpacks-form__hint {
  flex-basis: 100%;
}

.modpack-download-actions .modpacks-button:disabled {
  border-color: #74624f;
  color: #c2b6a7;
  background: #38332d;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .72;
}

.modpacks-button--danger {
  border-color: #c25a4d;
  color: #ffe4dd;
  background: linear-gradient(#7c3028, #4a1d19);
}

.modpacks-button--danger:hover,
.modpacks-button--danger:focus-visible {
  border-color: #ff9b8d;
  background: linear-gradient(#963d32, #5b211c);
}

.modpack-danger-zone {
  margin: 0 20px 20px;
  padding: 16px;
  border: 1px solid #a94442;
  border-radius: 4px;
  color: #ffd8d1;
  background: rgba(67, 22, 19, .72);
}

.modpack-danger-zone h2 {
  margin: 0 0 10px;
  color: #ffb3a8;
}

.modpack-danger-zone p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.modpack-delete-form {
  display: grid;
  gap: 12px;
}

.modpack-delete-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.modpack-delete-form input {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #c25a4d;
  border-radius: 3px;
  color: #fff8ed;
  background: #211817;
  font: inherit;
}

.modpack-delete-form input:focus-visible {
  outline: 2px solid #ffb3a8;
  outline-offset: 2px;
}

.modpack-delete-form footer {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 620px) {
  .modpack-danger-zone { margin: 0 14px 14px; padding: 14px; }
}
