/* =========================
   RESET & GLOBAL
   ========================= */

* {
  box-sizing: border-box;
}
:root {
  --bg: #060910;
  --panel: rgba(12, 17, 28, .78);
  --panel-solid: #0d1320;
  --panel-soft: #101827;
  --line: rgba(145, 164, 190, .14);
  --line-bright: rgba(70, 145, 255, .32);
  --text: #f4f7fb;
  --muted: #8793a7;
  --blue: #3f8cff;
  --blue-bright: #6aa8ff;
  --green: #43e19a;
  --radius: 22px;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
body.modal-open {
  overflow: hidden;
}
button, a {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
/* =========================
   BACKGROUND
   ========================= */

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image: linear-gradient(rgba(120,145,180,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(120,145,180,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.ambient {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: .14;
}
.ambient-one {
  background: #176fff;
  top: -250px;
  left: -180px;
}
.ambient-two {
  background: #2d5cff;
  right: -300px;
  top: 260px;
}
/* =========================
   LAYOUT & HEADER
   ========================= */

.page-shell {
  width: min(1080px, calc(100% - 34px));
  margin: 0 auto;
  padding: 24px 0 32px;
  position: relative;
}
.site-header {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 54px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7f8ca0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}
.header-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(67,225,154,.08);
}
/* =========================
   HERO
   ========================= */

.hero {
  min-height: 400px;
  display: flex;
  align-items: center;
  padding: 64px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 50%, rgba(35,117,255,.10), transparent 35%),
    linear-gradient(145deg, rgba(17,24,38,.92), rgba(7,11,19,.92));
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 29px;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.04), transparent 32%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-bright);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}

.hero-kicker i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px rgba(63,140,255,.8);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(48px, 7vw, 82px);
  line-height: .94;
  letter-spacing: -.065em;
}

.hero h1 span {
  color: #6daaff;
}

.hero-copy > p {
  max-width: 550px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 13px 17px 13px 19px;
  border: 1px solid rgba(106,168,255,.42);
  border-radius: 11px;
  background: #3282f7;
  box-shadow: 0 12px 30px rgba(45,123,245,.22);
  font-size: 11px;
  font-weight: 800;
  transition: .2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  background: #4790ff;
}

.primary-button span {
  font-size: 17px;
}

.hero-note {
  color: #66748a;
  font-size: 10px;
}
/* =========================
   STATS
   ========================= */

.stats {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px auto 82px;
}

.stat-card {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(12,18,30,.72);
  position: relative;
}

.stat-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(57,130,244,.1);
  border: 1px solid rgba(73,141,247,.13);
  color: #6ca8ff;
  font-size: 17px;
}

.stat-card div:nth-child(2) {
  display: grid;
  gap: 5px;
}

.stat-card span {
  color: #69778d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.stat-card strong {
  font-size: 20px;
  letter-spacing: -.04em;
}

.live-dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(67,225,154,.07), 0 0 14px rgba(67,225,154,.45);
}
/* =========================
   COLLECTION
   ========================= */

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 20px;
}
.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.055em;
}
.section-heading p {
  max-width: 310px;
  margin: 0 0 4px;
  color: #69778d;
  font-size: 10px;
  line-height: 1.6;
  text-align: right;
}
.modpack-list {
  width: 100%;
  max-width: 760px;

  margin: 45px auto 0;

  display: flex;
  flex-direction: column;
  gap: 22px;
}

.modpack-card {
  width: 100%;
  min-width: 0;
}

.modpack-card:hover {
  transform: translateY(-5px);
  border-color: rgba(70, 145, 255, .32);
  box-shadow: 0 22px 55px rgba(0, 0, 0, .35), 0 0 35px rgba(45, 126, 255, .06);
}

.card-image-wrap {
  width: 100%;
  height: 230px;
  position: relative;
  overflow: hidden;
  background: #101827;
}

.card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .35s ease;
}

.modpack-card:hover .card-image {
  transform: scale(1.035);
}

.card-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(5, 9, 16, .82);
  border: 1px solid rgba(105, 168, 255, .25);
  color: #9bc6ff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  backdrop-filter: blur(10px);
}

.card-number {
  position: absolute;
  top: 13px;
  right: 13px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(5, 9, 16, .72);
  color: #9aa8bb;
  font-size: 8px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-content {
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.card-type {
  display: block;
  margin-bottom: 7px;
  color: #53627a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.card-header h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.045em;
}

.card-size {
  flex-shrink: 0;
  color: #8290a5;
  font-size: 9px;
  font-weight: 700;
}

.card-description {
  margin: 11px 0 17px;
  color: #7d899d;
  font-size: 11px;
  line-height: 1.65;
}

.card-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid rgba(125, 150, 180, .1);
}

.card-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: #8a97aa;
  font-size: 9px;
  line-height: 1.5;
}

.info-label {
  color: #53627a;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
}

.card-downloads {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  color: #9aa8bb;
  font-size: 10px;
}

.download-count {
  color: #dce5f2;
  font-weight: 700;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 9px;
  margin-top: 18px;
}

.preview-button,
.card-download-button {
  min-height: 42px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}

.preview-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border: 1px solid rgba(125, 150, 180, .14);
  background: #101827;
  color: #91a0b5;
}

.preview-button:hover {
  border-color: rgba(105, 168, 255, .3);
  color: #b8d5ff;
  background: #121d2d;
}

.preview-button span:last-child {
  font-size: 15px;
}

.card-download-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border: 1px solid rgba(106, 168, 255, .3);
  background: #3282f7;
  color: white;
  box-shadow: 0 10px 25px rgba(45, 123, 245, .16);
}

.card-download-button:hover {
  background: #4790ff;
  transform: translateY(-1px);
}

.card-download-button > span:last-child {
  font-size: 16px;
}

.card-download-button.loading {
  opacity: .6;
  pointer-events: none;
}

/* =========================
   FOOTER
   ========================= */

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 70px;
  padding: 24px 2px 4px;
  border-top: 1px solid var(--line);
  color: #526078;
  font-size: 9px;
}
footer div {
  display: grid;
  gap: 4px;
}
footer strong {
  color: #9ba8bb;
  font-size: 10px;
}
/* =========================
   MODAL
   ========================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2,5,10,.72);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
  backdrop-filter: blur(8px);
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}
.modpack-modal {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 50%;
  width: min(760px, 100%);
  max-height: min(94vh, 900px);
  overflow-y: auto;
  background: #0a101b;
  border: 1px solid rgba(105,155,220,.18);
  border-top: 0;
  border-radius: 0 0 25px 25px;
  transform: translate(-50%, -105%);
  transition: transform .34s cubic-bezier(.22,.8,.25,1);
  box-shadow: 0 30px 100px rgba(0,0,0,.55);
}
.modpack-modal.open {
  transform: translate(-50%,0);
}
.modal-handle {
  width: 42px;
  height: 4px;
  margin: 9px auto 3px;
  border-radius: 99px;
  background: #2b384b;
}
.close-button {
  position: absolute;
  top: 17px;
  right: 18px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  background: rgba(9,14,23,.72);
  color: #a5b0c0;
  font-size: 22px;
  cursor: pointer;
}
.modal-content {
  padding: 18px 22px 26px;
}
.modal-visual-wrap {
  position: relative;
}
.modal-preview {
  display: block;
  width: 100%;
  height: min(42vh, 340px);
  object-fit: cover;
  border-radius: 18px;
  background: #101827;
  border: 1px solid var(--line);
}
.modal-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(5,9,16,.82);
  border: 1px solid rgba(105,168,255,.3);
  color: #9bc6ff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}
.modal-title-row {
  margin-top: 20px;
}
.modal-title-row h3 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -.05em;
}
.modal-description {
  margin: 9px 0 18px;
  color: #7f8da2;
  font-size: 12px;
  line-height: 1.7;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 10px;
}
.meta-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0d1522;
}
.meta-box span {
  display: block;
  margin-bottom: 6px;
  color: #59687e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}
.meta-box strong {
  font-size: 15px;
}
.feature-section {
  margin-top: 23px;
}
.modal-section-label {
  margin-bottom: 11px;
  color: #627188;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}
.feature-section ul {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature-section li {
  padding: 11px 12px 11px 29px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(14,22,34,.72);
  color: #9ba7b8;
  font-size: 10px;
  position: relative;
}
.feature-section li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  color: #58a0ff;
  font-weight: 800;
}
.notes {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(17,25,38,.7);
  border: 1px solid var(--line);
}
.notes-label {
  color: #59677c;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}
.notes p {
  margin: 7px 0 0;
  color: #7d8a9f;
  font-size: 10px;
  line-height: 1.6;
}
.download-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  background: #3384fa;
  color: white;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(51,132,250,.18);
  transition: .2s ease;
}
.download-button:hover {
  background: #4891ff;
  transform: translateY(-1px);
}
.download-button.loading {
  opacity: .65;
  pointer-events: none;
}
.arrow {
  font-size: 17px;
}
/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 820px) {
  .hero {
    padding: 48px 38px;
  }

  .stats {
    width: 100%;
  }

  .modpack-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 18px, 1080px);
    padding-top: 12px;
  }

  .site-header {
    margin-bottom: 25px;
  }

  .header-status {
    display: none;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .hero {
    min-height: auto;
    padding: 38px 23px 32px;
    border-radius: 23px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 55px;
  }

  .stat-card {
    min-height: 83px;
    padding: 13px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading p {
    text-align: left;
  }

  .card-image-wrap {
    height: 210px;
  }

  .card-content {
    padding: 17px;
  }

  .card-header h3 {
    font-size: 19px;
  }

  .card-description {
    font-size: 10px;
  }

  .card-info {
    grid-template-columns: 1fr;
  }

  .card-downloads {
    align-items: flex-start;
  }

  .card-actions {
    grid-template-columns: 1fr 1.3fr;
  }

  footer {
    margin-top: 52px;
  }

  .modal-content {
    padding: 14px 15px 20px;
  }

  .modal-preview {
    height: 220px;
  }

  .feature-section ul {
    grid-template-columns: 1fr;
  }
}
