/* Changelog browser (modpack and server) – the first screen like the other pages; below it a version list
   beside one update. The server shows its own mods' notes first, the modpack its mods as a table. */
:root {
  --bg: #07080d; --fg: #f4efe4; --muted: #9a958a; --line: rgba(255, 214, 120, .12);
  --card: #0f1017; --accent: #f6c453; --accent-fg: #1a1203; --head-bg: rgba(7, 8, 13, .72);
  --hover: rgba(246, 196, 83, .08);
  --add: #3ddc84; --upd: #f6c453; --rem: #ff6b6b;
}
::selection { background: rgba(246, 196, 83, .35); }

@keyframes spin { to { rotate: 360deg; } }
/* first screen: the same as the modpack changelog (copied from changelog.css) */
.cl-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 100px 16px 110px; text-align: center; }
.cl-bg { position: absolute; inset: 0; z-index: -1; }
.glow { position: absolute; inset: 0; background: radial-gradient(ellipse 50% 60% at 50% 42%, rgba(246, 180, 52, .16), transparent 70%); }
.cl-bg .circle { position: absolute; left: 50%; top: 45%; width: min(820px, 150vw); max-width: none; translate: calc(-50% + var(--mx, 0) * -24px) calc(-50% + var(--my, 0) * -24px); opacity: .14; filter: drop-shadow(0 0 12px rgba(255, 200, 90, .5)); animation: spin 150s linear infinite; transition: translate .6s ease-out; }
.cl-hero h1 { font-size: clamp(48px, 9vw, 112px); font-weight: 800; letter-spacing: -.035em; background: linear-gradient(180deg, #fff6dc 20%, #f2b134); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.lead { font: 400 clamp(17px, 2vw, 21px)/1.4 'Outfit', sans-serif; color: #e0d6c2; }

.switch { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 18, 14, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.switch a { padding: 8px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.switch a:hover { color: var(--fg); }
.switch a[aria-current="page"] { background: linear-gradient(180deg, #ffe08a, #f2b134); color: var(--accent-fg); }

.latest-card { display: flex; align-items: center; gap: 18px; margin-top: 10px; padding: 14px 14px 14px 18px; border-radius: 20px; border: 1px solid rgba(246, 196, 83, .35); background: rgba(20, 18, 14, .65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-align: left; transition: transform .2s, border-color .2s, box-shadow .2s; }
.latest-card[hidden] { display: none; }
.latest-card:hover { transform: translateY(-2px); border-color: rgba(246, 196, 83, .7); box-shadow: 0 14px 34px -12px rgba(246, 180, 52, .45); }
.lc-tag { padding: 4px 10px; border-radius: 999px; background: rgba(246, 196, 83, .14); color: var(--accent); font: 600 11px 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.lc-main { display: grid; line-height: 1.2; }
.lc-main b { font: 600 20px 'Outfit', sans-serif; }
.lc-main small { color: var(--muted); font-size: 13px; }
.lc-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.lc-go { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #ffe08a, #f2b134); color: var(--accent-fg); flex: none; }
.lc-go .i { width: 18px; height: 18px; }

.scroll { position: absolute; bottom: 26px; left: 50%; translate: -50%; width: 26px; height: 42px; border: 1.5px solid rgba(246, 196, 83, .4); border-radius: 14px; }
.scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* small counters used in the latest card and on every release */
.s-add, .s-upd, .s-rem { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.s-add { background: rgba(61, 220, 132, .12); color: var(--add); }
.s-upd { background: rgba(246, 196, 83, .12); color: var(--upd); }
.s-rem { background: rgba(255, 107, 107, .12); color: var(--rem); }

/* browser */
.sc-browser { width: min(1160px, 100% - 32px); margin: 0 auto; padding: 90px 0 110px; scroll-margin-top: 20px; }
.state { text-align: center; color: var(--muted); }
.sc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.sc-layout[hidden] { display: none; }
.sc-versions { position: sticky; top: 90px; display: grid; gap: 8px; }
.v-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); text-align: left; transition: border-color .2s, background .2s; }
.v-item:hover { border-color: rgba(246, 196, 83, .35); }
.v-item[aria-current="true"] { border-color: rgba(246, 196, 83, .6); background: linear-gradient(90deg, rgba(246, 196, 83, .14), transparent), var(--card); box-shadow: inset 3px 0 0 var(--accent); }
.v-num { font: 600 18px 'Outfit', sans-serif; }
.v-date { grid-column: 1; font-size: 13px; color: var(--muted); }
.v-count { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 12px; color: var(--muted); }
.v-item:first-child .v-count { padding: 3px 9px; border-radius: 999px; background: rgba(61, 220, 132, .12); color: var(--add); font-weight: 600; }
.v-test .v-num::after { content: 'Beta'; margin-left: 8px; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); font: 600 10px 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; vertical-align: 3px; }

.sc-panel { padding: 28px 30px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); display: grid; gap: 20px; min-width: 0; }
.p-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.p-head small { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.p-head h2 { font-size: 40px; font-weight: 700; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.p-head .tag { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); font: 600 11px 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.p-meta { display: grid; justify-items: end; gap: 2px; font-size: 14px; color: var(--muted); }
.p-meta b { color: var(--fg); font-size: 16px; }
.p-notes { color: #d9d1c0; }
.p-none { color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.chip span { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: 12px; }
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] { color: var(--accent-fg); background: linear-gradient(180deg, #ffe08a, #f2b134); border-color: transparent; }
.chip[aria-pressed="true"] span { background: rgba(0, 0, 0, .15); }

.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 16px; text-align: left; font: 600 12px 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .03); }
td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
tr[hidden] { display: none; }
tbody tr:hover td { background: rgba(246, 196, 83, .03); }
td.mod { font-weight: 500; }
td.ver { color: var(--muted); font: 12.5px ui-monospace, 'JetBrains Mono', Consolas, monospace; white-space: nowrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.b-add { background: rgba(61, 220, 132, .12); color: var(--add); }
.b-upd { background: rgba(246, 196, 83, .12); color: var(--upd); }
.b-rem { background: rgba(255, 107, 107, .12); color: var(--rem); }

@media (max-width: 860px) {
  .sc-layout { grid-template-columns: 1fr; }
  .sc-versions { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: thin; }
  .v-item { flex: none; min-width: 150px; }
  .sc-panel { padding: 20px; }
  .p-meta { justify-items: start; }
  .p-head h2 { font-size: 32px; }
}
@media (max-width: 560px) {
  td.ver { white-space: normal; word-break: break-all; }
  th:nth-child(3), td.ver { font-size: 11.5px; }
}
/* phones: no "Change" column; the row's colour edge says what happened */
@media (max-width: 560px) {
  th:first-child, td:first-child { display: none; }
  tbody tr td.mod { border-left: 3px solid transparent; }
  tr.row-add td.mod { border-left-color: var(--add); }
  tr.row-upd td.mod { border-left-color: var(--upd); }
  tr.row-rem td.mod { border-left-color: var(--rem); }
  td, th { padding: 10px 12px; }
}
/* the latest card on phones, as on the modpack changelog */
@media (max-width: 640px) {
  .latest-card { flex-wrap: wrap; justify-content: center; text-align: center; }
  .lc-main { width: 100%; }
  .lc-stats { justify-content: center; }
  .lc-go { display: none; }
}

/* what's new: one card per own mod with its release notes */
.p-section { font: 600 13px 'Inter', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: -6px; }
.own { padding: 20px 22px; border-radius: 18px; border: 1px solid rgba(246, 196, 83, .22); background: radial-gradient(ellipse 70% 60% at 0% 0%, rgba(246, 180, 52, .08), transparent 70%), rgba(255, 255, 255, .02); display: grid; gap: 12px; }
.own-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.own-head h3 { font-size: 22px; font-weight: 600; }
.own-ver { color: var(--muted); font: 12.5px ui-monospace, 'JetBrains Mono', Consolas, monospace; }
.own-note h4 { margin: 4px 0 8px; font: 600 13px 'Inter', sans-serif; color: var(--muted); letter-spacing: .04em; }
.own-note + .own-note { padding-top: 12px; border-top: 1px solid var(--line); }
.own-body { color: #d9d1c0; font-size: 14.5px; line-height: 1.65; }
.own-body p { margin: 0 0 8px; }
.own-body strong { color: var(--fg); }
.own-body ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 7px; }
.own-body ul ul { margin: 6px 0 0 18px; }
.own-body li { position: relative; padding-left: 18px; }
.own-body li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 1px; rotate: 45deg; background: var(--accent); }
.own-body code { padding: .1em .4em; border-radius: 6px; background: rgba(255, 255, 255, .07); font: .9em ui-monospace, Consolas, monospace; }
.own-also { color: var(--muted); font-size: 14px; }
.own-also b { color: var(--fg); font-weight: 600; }

/* the other mods, folded away */
.others { border-radius: 16px; border: 1px solid var(--line); padding: 4px 16px; }
.others[open] { padding-bottom: 16px; display: grid; gap: 14px; }
.others summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 10px; list-style: none; }
.others summary::-webkit-details-marker { display: none; }
.others summary::before { content: '›'; font-size: 20px; line-height: 1; color: var(--accent); transition: rotate .2s; }
.others[open] summary::before { rotate: 90deg; }
.others summary span { padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--muted); font-size: 12px; }

/* this version on Modrinth / CurseForge, with its downloads */
.rel-links { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-links:empty { display: none; }
.mpf { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-weight: 600; font-size: 13px; transition: border-color .2s, background .2s, transform .2s; }
.mpf .brand { width: 18px; height: 18px; fill: currentColor; }
.mpf-modrinth .brand { color: #1bd96a; }
.mpf-curseforge .brand { color: #f16436; }
.mpf-modrinth:hover { border-color: rgba(27, 217, 106, .5); background: rgba(27, 217, 106, .06); transform: translateY(-1px); }
.mpf-curseforge:hover { border-color: rgba(241, 100, 54, .5); background: rgba(241, 100, 54, .06); transform: translateY(-1px); }
.mpf-n { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--muted); font-size: 12px; }
.s-dl { padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: rgba(255, 255, 255, .07); color: var(--fg); }

/* the modpack's mod table, shown openly */
.mods-open { display: grid; gap: 14px; }
