/* ============================================================
   Theme — flat, no gradients
   ============================================================ */
:root {
  --bg: #0a0b0e;
  --panel: #121419;
  --panel-2: #171a21;
  --line: #262a33;
  --line-2: #343945;
  --text: #e8eaf0;
  --muted: #9aa2b1;
  --dim: #6b7280;
  --accent: #2f56e0;  /* Iconic Rig blue */
  --accent-dim: #3d4aa8;
  --ok: #4ade80;
  --warn: #fbbf24;

  --r-lg: 14px;
  --r-md: 10px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --max: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }

.ico { width: 1.05em; height: 1.05em; flex: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px;
  font-weight: 600; font-size: 14.5px; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: #7d8bf9; }

.btn-line {
  background: transparent; color: var(--text); border-color: var(--line-2);
}
.btn-line:hover { border-color: var(--muted); background: var(--panel-2); }

.btn-discord { background: #5865f2; color: #fff; }
.btn-discord:hover { background: #6a76f4; }

.btn-sm { padding: 8px 14px; font-size: 13.5px; }

/* ============================================================
   Header
   ============================================================ */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.head-inner {
  display: flex; align-items: center; gap: 28px; height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head);
  font-weight: 700; font-size: 17px; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; }
.brand { gap: 11px; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 14.5px; transition: color 0.15s; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }

.head-socials { margin-left: auto; display: flex; gap: 8px; }

.soc {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--muted); transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.soc svg { width: 17px; height: 17px; }
.soc:hover { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }

/* Mobile nav */
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; justify-content: center;
    width: 38px; height: 38px; margin-left: auto; padding: 0 9px;
    background: none; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer;
  }
  .nav-toggle span { width: 100%; height: 2px; background: var(--text); border-radius: 2px; display: block; }
  .head-socials { display: none; }
  .mobile-socials { display: flex; gap: 8px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 62px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 4px; font-size: 16px; }
  .head-inner { position: relative; flex-wrap: wrap; }
  .brand { margin-right: auto; }
}

.mobile-socials { display: none; }

.nav-socials { display: none; gap: 8px; margin-top: 8px; }
@media (max-width: 760px) {
  .nav-socials { display: flex; padding-top: 10px; border-top: 1px solid var(--line); }
}

/* ============================================================
   Page hero / headers
   ============================================================ */
.page-head { padding: 72px 0 48px; }
.page-head h1 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(34px, 6vw, 56px); letter-spacing: -0.02em; line-height: 1.05;
  margin-bottom: 14px;
}
.page-head p { color: var(--muted); max-width: 560px; font-size: 17px; }

.kicker {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}

/* ============================================================
   Home directory tiles
   ============================================================ */
.dir-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  padding-bottom: 88px;
}
.dir-tile {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 30px 28px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dir-tile:hover { border-color: var(--line-2); background: var(--panel-2); }
.dir-tile h2 {
  font-family: var(--font-head); font-size: 26px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.dir-tile h2 .ico { width: 22px; height: 22px; color: var(--accent); }
.dir-tile p { color: var(--muted); font-size: 15px; flex: 1; }
.dir-tile .go {
  color: var(--text); font-weight: 600; font-size: 14.5px;
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
}
.dir-tile .go .ico { transition: transform 0.15s ease; }
.dir-tile:hover .go .ico { transform: translateX(3px); }
.dir-meta { display: flex; gap: 6px; }

.tag {
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 3px 9px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg);
}

/* ============================================================
   Card grids (mods / packs pages)
   ============================================================ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 88px; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--line-2); }

/* "Most Popular" card highlight */
.card.hot-card { border-color: var(--accent); }
.card.hot-card .media-tag {
  color: #fff; background: var(--accent); border-color: var(--accent);
}

.card-media {
  aspect-ratio: 16 / 9; background: var(--panel-2); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

/* Zebra style: two-tone lines going down, soft light above, icon centered.
   Per-card colors come from --stripe-a / --stripe-b / --glow (set in main.js). */
.card-media.zebra {
  background: repeating-linear-gradient(105deg,
      var(--stripe-a, #0c1730) 0 16px,
      var(--stripe-b, #12234d) 16px 32px);
}
/* The light sits on its own layer so animated cards can breathe. */
.card-media.zebra::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(58% 48% at 50% 32%, var(--glow, rgba(47, 86, 224, 0.35)), transparent 72%);
}
.card-media.zebra img.mod-icon {
  width: 128px; height: 128px; object-fit: contain;
  /* icons are rendered with an anti-aliased edge now, so filter them
     smoothly rather than snapping them back to hard pixels */
  image-rendering: auto;
  filter: drop-shadow(0 0 26px var(--glow, rgba(47, 86, 224, 0.5)));
  z-index: 1;
}
.media-tag { z-index: 2; }

/* Per-card animation (set anim: "bob" or "shake" in main.js).
   Every icon shares the same timing with no delay, so they all start
   bobbing together the moment the page loads and stay in sync. */
.card-media.pulse::after { animation: light-breathe 4.5s ease-in-out infinite; }
.card-media.zebra img.mod-icon.anim-bob { animation: icon-bob 3.4s ease-in-out 0s infinite; }
.card-media.zebra img.mod-icon.anim-shake { animation: rig-shake 5s ease-in-out 0s infinite; }

@keyframes light-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
/* Symmetric bob: the icon rises and dips equally around the centre of the box,
   so it always reads as centred rather than sitting high in the frame. */
@keyframes icon-bob {
  0%, 100% { transform: translateY(6px); }
  50%      { transform: translateY(-6px); }
}
@keyframes rig-shake {
  0%, 74%, 100% { transform: rotate(0deg); }
  78%           { transform: rotate(-3deg); }
  82%           { transform: rotate(3deg); }
  86%           { transform: rotate(-1.8deg); }
  90%           { transform: rotate(1.8deg); }
  94%           { transform: rotate(0deg); }
}

/* Reduced-motion viewers get the same life, just slower and subtler — so the
   effect still reads everywhere (some webviews/OSes report reduce by default). */
@keyframes icon-bob-soft {
  0%, 100% { transform: translateY(4px); }
  50%      { transform: translateY(-4px); }
}
@keyframes rig-shake-soft {
  0%, 74%, 100% { transform: rotate(0deg); }
  82%           { transform: rotate(-1deg); }
  90%           { transform: rotate(1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .card-media.pulse::after { animation: light-breathe 6s ease-in-out infinite; }
  .card-media.zebra img.mod-icon.anim-bob { animation: icon-bob-soft 5s ease-in-out 0s infinite; }
  .card-media.zebra img.mod-icon.anim-shake { animation: rig-shake-soft 8s ease-in-out infinite; }
}
.media-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 6px;
}
.media-icon { width: 42px; height: 42px; color: var(--dim); }

.card-body { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-family: var(--font-head); font-size: 18.5px; font-weight: 700; }
.card-desc { color: var(--muted); font-size: 14px; flex: 1; }

.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-hot { color: var(--warn); border-color: #3f3413; }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel);
}

.free {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  letter-spacing: 0.08em; color: var(--ok);
}

.price-wrap { display: flex; flex-direction: column; line-height: 1.15; }
.price {
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  color: var(--text);
}
.price-note { font-size: 11px; color: var(--dim); }

.get-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--line-2);
  padding: 8px 14px; border-radius: 7px;
  transition: background 0.15s, border-color 0.15s;
}
.get-btn:hover { background: var(--panel); border-color: var(--muted); }
.get-btn .ico { width: 15px; height: 15px; }

/* ============================================================
   Texture pack cards
   ============================================================ */
.pack-card { padding: 20px 18px 14px; gap: 12px; }

.pack-top {
  display: flex; align-items: center; justify-content: center;
  min-height: 108px;
  border-radius: 12px;
  /* soft pool of light behind the icon, like the reference cards */
  background: radial-gradient(62% 58% at 50% 46%, rgba(255, 255, 255, 0.055), transparent 72%);
}
.pack-icon {
  width: 96px; height: 96px; object-fit: contain;
  /* the PNGs are already anti-aliased, so let the browser filter them
     smoothly instead of forcing hard pixel edges */
  image-rendering: auto;
}

.changes {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 9px 0; text-align: left;
}
.changes summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13.5px; color: var(--muted); transition: color 0.15s ease;
}
.changes summary:hover { color: var(--text); }
.changes summary::-webkit-details-marker { display: none; }
.changes .chev { width: 15px; height: 15px; flex: none; transition: transform 0.2s ease; }
.changes[open] summary { color: var(--text); }
.changes[open] .chev { transform: rotate(180deg); }
.changes ul {
  margin: 9px 0 3px; padding-left: 17px;
  display: flex; flex-direction: column; gap: 5px;
  color: var(--muted); font-size: 13px; line-height: 1.45;
}

.pack-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: auto;
}
.platform {
  font-size: 12px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--dim);
}

.dl-btn {
  display: inline-flex; align-items: center;
  background: #fff; color: #0a0b0e;
  font-size: 13.5px; font-weight: 600; line-height: 1;
  padding: 8px 18px; border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.dl-btn:hover { background: #e2e5ec; }
.dl-btn:active { transform: translateY(1px); }
.dl-btn.pending {
  background: transparent; color: var(--dim);
  border: 1px dashed var(--line-2); cursor: not-allowed;
}
.dl-btn.pending:hover { background: transparent; }

/* Download cooldown — the button dims and counts down for 10s after a
   download. The overlay sits on top so the label and icon stay put. */
.dl-btn.cooling,
.get-btn.cooling {
  pointer-events: none;
  opacity: 0.55;
  position: relative;
}
.dl-btn.cooling::after,
.get-btn.cooling::after {
  content: attr(data-cool);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ============================================================
   Footer
   ============================================================ */
.site-foot { border-top: 1px solid var(--line); padding: 26px 0 30px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: 13.5px; }
.foot-links a:hover { color: var(--text); }
.foot-note { width: 100%; color: var(--dim); font-size: 12.5px; margin-top: 4px; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { display: flex; flex-direction: column; gap: 10px; padding-bottom: 88px; }
.faq-item {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; user-select: none;
  padding: 15px 18px; font-weight: 600; font-size: 15.5px;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 18px; color: var(--muted); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 18px 16px; color: var(--muted); font-size: 14.5px; }
.faq-item code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
  background: var(--bg); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid, .dir-grid { grid-template-columns: 1fr; }
  .page-head { padding: 48px 0 36px; }
}
