/* ── Resource Pack Assembler ─────────────────────────────────────────────────── */

[hidden] { display: none !important; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */

.rp-main {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */

.rp-hero {
  text-align: center;
  padding: 22px 0 10px;
}

.rp-hero__img {
  width: min(700px, 92vw);
  max-width: 100%;
  display: block;
  margin: 0 auto 18px;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .65));
}

.rp-hero__sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Card ────────────────────────────────────────────────────────────────────── */

.rp-card {
  background: rgba(8, 10, 18, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 22px 24px;
  backdrop-filter: blur(14px);
}

.rp-card__label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── Version pills ───────────────────────────────────────────────────────────── */

.rp-version-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rp-pill {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}

.rp-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, .25);
}

.rp-pill.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ── Pack controls ───────────────────────────────────────────────────────────── */

.rp-pack-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.rp-text-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  transition: opacity .15s;
}

.rp-text-btn:hover { opacity: .75; }

.rp-pack-controls__sep {
  color: var(--muted);
  font-size: 12px;
}

/* ── Pack grid ───────────────────────────────────────────────────────────────── */

.rp-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.rp-pack-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(5, 7, 13, .32);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.rp-pack-card:not(.is-disabled):hover {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
}

.rp-pack-card.is-disabled {
  opacity: .42;
  cursor: not-allowed;
}

.rp-pack-card__cb {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: inherit;
}

.rp-pack-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rp-pack-card__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.rp-pack-card__badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 1px 7px;
  border-radius: 999px;
  align-self: flex-start;
}

.rp-pack-card__no-assets {
  font-size: 11px;
  color: var(--muted);
}

/* ── Download area ───────────────────────────────────────────────────────────── */

.rp-download-area {
  background: rgba(8, 10, 18, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(14px);
}

.rp-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 52%, transparent);
  background: color-mix(in srgb, var(--accent-2) 16%, rgba(10, 18, 40, .72));
  color: var(--accent-2);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s, transform .14s;
}

.rp-dl-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent-2) 28%, rgba(10, 18, 40, .80));
  transform: translateY(-1px);
}

.rp-dl-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

/* ── Progress ────────────────────────────────────────────────────────────────── */

.rp-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rp-progress__bar-wrap {
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 12%, rgba(255, 255, 255, .05));
  overflow: hidden;
}

.rp-progress__bar {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent-2) 55%, transparent);
  transition: width .25s ease;
}

.rp-progress__status {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* ── Conflict log ────────────────────────────────────────────────────────────── */

.rp-conflicts {
  width: 100%;
  background: rgba(8, 10, 18, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 12px;
  backdrop-filter: blur(14px);
}

.rp-conflicts summary {
  font-weight: 700;
  color: #f0b429;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rp-conflicts summary::-webkit-details-marker { display: none; }

.rp-conflicts__list {
  margin: 12px 0 0;
  padding: 0 0 0 18px;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rp-conflicts__list li {
  color: var(--muted);
  line-height: 1.5;
}

.rp-conflicts__list code {
  color: var(--text);
  font-size: 11px;
  background: rgba(255, 255, 255, .07);
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-all;
}

/* ── Misc ────────────────────────────────────────────────────────────────────── */

.rp-loading,
.rp-empty {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

.rp-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rp-spin .65s linear infinite;
}

@keyframes rp-spin { to { transform: rotate(360deg); } }
