/* ─── Fonts ─────────────────────────────────────────────────────────────── */

@font-face {
    font-family: 'Minecraft Ten';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/MinecraftTen.woff2) format('woff2');
}

@font-face {
    font-family: minecraftia;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/Minecraftia.woff2) format('woff2');
}

@font-face {
    font-family: 'Noto Sans';
    src: url('/fonts/NotoSans.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ─── Design tokens ─────────────────────────────────────────────────────── */

:root {
    /* surfaces */
    --bg:           #131313;
    --panel:        #1e1e1e;
    --hover:        #282828;
    
    --ml-card:     #171615;
    --ml-card-2:   #131313;
    --ml-line:     #3c3d40;

    /* text */
    --text:         #e8e8ea;
    --text-dim:     #c9c9c9;

    /* accents */
    --accent:       #0dd166;
    --green:        #008b45;
    --green-hover:  #0a964f;
    --bevel-light:  #27ce40;
    --bevel-dark:   #0c6e3d; 
    --bevel-darker: #064d2a;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
    touch-action: manipulation;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #464646;
}

::-webkit-scrollbar-thumb:hover {
    background: #727272;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
    background: var(--panel);
}

@supports not selector(::-webkit-scrollbar) {
    html {
        scrollbar-width: thin;
        scrollbar-color: #464646 var(--panel);
    }
}

/* ─── Base ──────────────────────────────────────────────────────────────── */

html {
    margin: 0;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
}

button {
    cursor: pointer;
}

h1,
h2 {
    font-family: 'Minecraft Ten', sans-serif;
    font-weight: 300;
}

img,
video {
    -webkit-user-select: none;
    user-select: none;
}

video {
    pointer-events: none;
}

li {
    list-style-type: square;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:where(a, button):focus-visible {
    outline: 2px solid #fff;
}

::selection {
    background: var(--green);
    color: #fff;
}

/* ─── Pack-header video background ───────────────────────────────────────── */

#video-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

#video-container video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blur {
    position: absolute;
    inset: 0;
    z-index: 1;
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(2px);
}

#video-toggle {
    display: none;
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    background: #514d4c;
    border: 1px solid #d0c5c0;
    border-bottom: 1px solid #baafab;
    box-shadow: 4px 4px 0 #00000070;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

#video-toggle img {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

#video-toggle:hover {
    border: 1px solid #d0c5c0;
    background: #baafab;
}

#video-toggle:active {
    box-shadow: none;
}

/* ─── Layout — Nav ──────────────────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    padding: 0 calc(50% - 39.5rem);
    background: var(--panel);
}

.nav-bar {
    min-width: 0;
}

.nav a {
    text-decoration: none;
}

.header {
    padding: 20px 17px 0;
    -webkit-user-select: none;
    user-select: none;
}

.header a {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 25px;
    width: 100%;
    max-width: 78rem;
    margin: 0 auto;
    padding: 0 10px;
}

.nav-download {
    position: absolute;
    top: 50%;
    right: max(17px, calc(50% - 39rem));
    transform: translateY(-50%);
    padding: 8px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    background: var(--green);
    opacity: 0;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

.nav-download.visible {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

.nav-download:hover {
    background: var(--green-hover);
}

/* ─── Layout — Container ────────────────────────────────────────────────── */

.container {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.pack-content {
    flex: 1;
    width: 100%;
}

.privacy-text {
    flex: 1;
    max-width: 79rem;
    margin: 40px auto 200px auto;
    padding: 0 10px;
}

.privacy-text h2 {
    margin-top: 30px;
}

.date {
    color: var(--text-dim);
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
}

.back-link:hover {
    text-decoration: none;
}

/* ─── Layout — Footer ───────────────────────────────────────────────────── */

footer {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    background: #000;
}

.footer-left {
    flex: 1;
    padding: 12px 0;
}

.footer-copy {
    flex: 1;
    text-align: center;
}

.footer-images {
    flex: 1;
    text-align: end;
}

.footer-images a {
    margin: 0 5px 0 0;
}

footer a {
    margin: 0 15px;
    color: var(--text);
    transition: color 0.2s;
}

footer a:hover {
    color: #fff;
}

footer img {
    width: 40px;
    height: 40px;
}

/* ─── Pack tabs ─────────────────────────────────────────────────────────── */

.tabs {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.tab-list {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.tab {
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    margin-right: 15px;
    padding: 10px;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
    -webkit-user-select: none;
    user-select: none;
}

.tab:hover {
    color: #fff;
}

.tabs .tab.active {
    position: relative;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    cursor: default;
    pointer-events: none;
}

.tabs .tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 1px;
    height: 3px;
    margin-left: 1px;
    background: var(--green);
    transform: translateX(-50%);
    animation: grow-underline 0.2s forwards;
}

.tab-scroll-prev,
.tab-scroll-next {
    flex: 0 0 auto;
    font-family: 'Minecraftia', sans-serif;
    color: var(--text-dim);
    background: none;
    border: none;
    transition: color 0.2s;
    -webkit-user-select: none;
    user-select: none;
}

.tab-scroll-prev {
    margin-right: 10px;
}

.tab-scroll-next {
    margin-left: 10px;
}

.tab-scroll-prev:hover,
.tab-scroll-next:hover {
    color: #fff;
}

.tab-scroll-prev:active,
.tab-scroll-next:active {
    color: var(--accent);
}

.tab-scroll-prev:disabled,
.tab-scroll-next:disabled {
    pointer-events: none;
}

/* ─── Download button ───────────────────────────────────────────────────── */

.download {
    margin-top: -36px;
}

footer .download,
.download-bar .download {
    position: relative;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 300px;
    height: 60px;
    margin: 0;
    padding-bottom: 10px;
    font-family: 'Minecraft Ten', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: #fff;
    text-decoration: none !important;
    text-shadow: 0 2px #00000070;
    background: var(--green);
    border-left: 4px solid var(--bevel-dark);
    border-top: 4px solid var(--bevel-light);
    border-right: 4px solid var(--bevel-dark);
    border-bottom: 4px solid var(--bevel-darker);
    -webkit-user-select: none;
    user-select: none;
}

.download-btn:hover {
    font-size: 1.55rem;
    background: var(--green-hover);
}

.download-btn:active {
    font-size: 1.5rem;
}


/* ─── Download bar (between hero and description) ───────────────────────── */

.download-bar {
    position: relative;
    display: grid;
    grid-template-columns: 30% 40% 30%;
    padding: 6px;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    background: var(--panel);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.6);
}

.download-bar-center {
    display: flex;
    justify-content: center;
}

.download-bar-right {
    text-align: end;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

/* ─── Platform picker (download-bar left) ───────────────────────────────── */

.download-bar-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    -webkit-user-select: none;
    user-select: none;
}

.platform-picker {
    position: relative;
    width: 300px;
    cursor: pointer;
}

.platform-dropdown {
    position: absolute;
    bottom: 114%;
    left: 0;
    right: 0;
    padding: 4px;
    overflow: hidden;
    background: #1b1b1b;
    border: 1px solid var(--green);
    cursor: default;
}

.platform-option {
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 5px 10px;
    text-align: left;
    background: transparent;
    border: none;
    transition: background 0.1s;
}

.platform-option img,
.platform-icon {
    width: 36px;
    height: 36px;
    pointer-events: none;
}

.platform-option:hover,
.platform-split:hover {
    background: var(--hover);
}

.platform-split {
    display: flex;
    background: #232323;
    border: 1px solid var(--green);
}

.platform-btn {
    display: flex;
    flex: 1;
    gap: 10px;
    padding: 8px 8px 8px 14px;
    text-align: left;
    background: transparent;
    border: none;
    transition: background 0.1s;
}

.platform-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.25;
}

.platform-sub {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-name {
    font-size: 0.75rem;
    color: var(--text);
    text-transform: uppercase;
}

.platform-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-family: 'Minecraftia', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    background: transparent;
    border: none;
    transform: rotate(-90deg);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.platform-chevron.open {
    transform: rotate(-270deg);
}

/* ─── Box lines (Minecraft border) ─────────────────────────────────────── */

.box_line {
    position: absolute;
    background: #000;
}

.box_line-top,
.box_line-bottom,
.box_line-top::before,
.box_line-top::after,
.box_line-bottom::before,
.box_line-bottom::after {
    height: 2px;
}

.box_line-top::before,
.box_line-top::after,
.box_line-bottom::before,
.box_line-bottom::after {
    content: "";
    position: absolute;
    width: 2px;
    background: #000;
}

.box_line-top,
.box_line-bottom {
    width: 100%;
}

.box_line-left,
.box_line-right {
    width: 2.2px;
    height: 100%;
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.2);
}

.box_line-top {
    top: -2px;
}

.box_line-top::before {
    bottom: -2px;
    left: 0;
}

.box_line-top::after {
    bottom: -2px;
    right: 0;
}

.box_line-bottom {
    bottom: -2px;
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.2);
}

.box_line-bottom::before {
    top: -2px;
    left: 0;
}

.box_line-bottom::after {
    top: -2px;
    right: 0;
}

.box_line-left {
    left: -2px;
}

.box_line-right {
    right: -2px;
}

/* ─── Scroll-to-top button ──────────────────────────────────────────────── */

.scroll-top-btn,
.gallery-prev,
.gallery-next {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
    width: 30px;
    height: 30px;
    padding: 0;
    overflow: hidden;
    font-size: 1.5rem;
    color: #fff;
    background: var(--green);
    border-left: 3px solid var(--bevel-dark);
    border-top: 3px solid var(--bevel-light);
    border-right: 3px solid var(--bevel-dark);
    border-bottom: 3px solid var(--bevel-darker);
}

.scroll-top-btn span {
    font-family: 'Minecraftia', sans-serif;
    transform: rotate(-90deg);
    margin: -3px 0 0 -3px;
}

.scroll-top-btn {
    display: none;
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 50;
    text-shadow: -3px 0 #00000070;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.gallery-prev,
.gallery-next {
    font-family: 'Minecraftia', sans-serif;
    text-shadow: 0px 3px 0 #00000070;
}

.scroll-top-btn:hover,
.gallery-prev:hover,
.gallery-next:hover {
    font-size: 1.55rem;
    background: var(--green-hover);
}

.scroll-top-btn:active,
.gallery-prev:active,
.gallery-next:active {
    font-size: 1.5rem;
    outline: 2px solid #fff;
}

/* ─── Animations ────────────────────────────────────────────────────────── */

@keyframes grow-underline {
    from { width: 1px; }
    to   { width: 20px; }
}

/* ─── Pack header ───────────────────────────────────────────────────────── */

.pack-header {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    padding: clamp(80px, 20vh, 250px) max(26px, calc(50% - 39.5rem));
}

.pack-header-icon,
.pack-header-title {
    position: relative;
    z-index: 2;
}

.pack-header-icon {
    width: 250px;
    height: 250px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
}

.pack-header-title {
    margin: 0;
    font-size: 4rem;
    color: #fff;
    text-shadow: 0px 0 12px rgba(0, 0, 0, 0.8);
}

.pack-header-desc {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ─── Pack — Gallery ────────────────────────────────────────────────────── */

.pack-loading {
    padding: 80px max(26px, calc(50% - 39.5rem));
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.gallery-block {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.gallery-wrap {
    --per-page: 3;
    --gallery-gap: 25px;
    flex: 1;
    overflow: hidden;
}

.gallery-track {
    display: flex;
    width: 100%;
    gap: var(--gallery-gap);
    transition: transform 0.32s ease;
    will-change: transform;
}

.gallery-track img {
    display: block;
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    cursor: pointer;
}

.gallery-prev,
.gallery-next {
    flex: 0 0 auto;
    -webkit-user-select: none;
    user-select: none;
}

.gallery-prev:disabled,
.gallery-next:disabled {
    filter: grayscale(100%);
    pointer-events: none;
}

/* ─── description section ───────────────────────────────────────────────── */

.description {
    font-size: 1rem;
    line-height: 1.7;
}

.description p {
    margin: 0 0 10px;
}

.description p > img:only-child {
    display: block;
    max-width: 100%;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.description .desc-heading {
    margin: 0 0 18px;
    font-size: 2.5rem;
    line-height: 1.2;
    color: #fff;
}

.description em {
    font-style: normal;
}

.description ul {
    margin: 0 0 10px;
    padding-left: 22px;
}

.description li {
    margin-bottom: 4px;
}

.description li::marker {
    color: var(--green);
}

.description table {
    width: 100%;
    font-size: 0.9rem;
    border-collapse: separate;
    border-spacing: 6px;
}

.description th {
    padding: 11px 13px;
    font-weight: 400;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ml-line);
}

.description th:empty {
    background: none;
    border: none;
}

.description th img {
    width: 20px;
    height: auto;
    margin-right: 6px;
    margin-top: -6px;
    vertical-align: middle;
    image-rendering: pixelated;
}

.description .desc-body.spoiler {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.description .spoiler > strong {
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ml-line);
}

.description .spoiler ul {
    margin: 8px 0 14px;
}

.description .desc-block {
    padding: 80px max(26px, calc(50% - 39.5rem));
    background: var(--ml-card);
}

.description .desc-block:nth-child(even) {
    background: var(--ml-card-2);
}

/* ─── Languages layout ──────────────────────────────────────────────────── */

.languages-block {
    text-align: center;
}

.languages-block .desc-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ─── FAQ layout ─────────────────────────────────────────────────────────── */

.faq-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.faq-block .desc-heading {
    padding: 24px 26px 20px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    max-width: 60rem;
}

.faq-item {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 26px 26px;
    border-top: 1px solid var(--ml-line);
}

.faq-item:first-child {
    border-top: none;
}

.faq-item:nth-child(even) {
    flex-direction: row-reverse;
}

.faq-text {
    flex: 1;
}

.faq-text > strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.faq-text p {
    margin: 0;
    font-size: 0.9rem;
}

.faq-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    pointer-events: none;
}

/* ─── Additionally Recommend layout ─────────────────────────────────────── */

.recommend-block {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.recommend-left {
    flex: 0 0 220px;
}

.recommend-left .desc-heading {
    margin-top: 0;
}

.recommend-carousel {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.recommend-wrap {
    --per-page: 4;
    --recommend-gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.recommend-track {
    display: flex;
    gap: var(--recommend-gap);
    transition: transform 0.3s ease;
}

.recommend-prev,
.recommend-next {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    box-sizing: content-box;
    width: 30px;
    height: 30px;
    padding: 0;
    overflow: hidden;
    font-family: 'Minecraftia', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0px 3px 0 #00000070;
    background: var(--green);
    border-left: 3px solid var(--bevel-dark);
    border-top: 3px solid var(--bevel-light);
    border-right: 3px solid var(--bevel-dark);
    border-bottom: 3px solid var(--bevel-darker);
    -webkit-user-select: none;
    user-select: none;
}

.recommend-prev:hover,
.recommend-next:hover {
    font-size: 1.55rem;
    background: var(--green-hover);
}

.recommend-prev:active,
.recommend-next:active {
    font-size: 1.5rem;
    outline: 2px solid #fff;
}

.recommend-prev:disabled,
.recommend-next:disabled {
    filter: grayscale(100%);
    pointer-events: none;
}

.recommend-card {
    display: flex;
    flex: 0 0 250px;
    flex-direction: column;
    width: 250px;
    height: 220px;
    color: inherit;
    text-decoration: none;
    background: #000;
    transition: background 0.15s;
}

.recommend-card:hover {
    background: var(--hover);
    text-decoration: none !important;
}

.recommend-card-art {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--rc-bg, #333);
}

.recommend-card-art img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    pointer-events: none;
}

.recommend-card-wrapper {
    display: flex;
    align-items: center;
    padding: 14px;
    justify-content: space-between;
}

.recommend-card-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.recommend-card-author {
    min-height: 1em;
    font-family: 'Minecraftia', sans-serif;
    font-size: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-card-name {
    position: relative;
    padding-right: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-ext {
    width: 20px;
    height: 20px;
}

/* ─── Credits layout ────────────────────────────────────────────────────── */

.credits-list {
    margin-top: 16px;
}

.credits-entry {
    display: flex;
    gap: 24px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--ml-line);
}

.credits-entry:last-child {
    border-bottom: none;
}

.credits-author {
    flex: 0 0 140px;
    font-weight: 700;
    transition: opacity 0.15s;
}

.credits-entry ul {
    flex: 1;
    margin: 0;
    padding-left: 14px;
    font-size: 0.8rem;
    color: var(--text-dim);
    columns: 180px;
    column-gap: 50px;
}

.credits-entry em {
    opacity: 0.65;
    white-space: nowrap;
}

/* ─── Lightbox ───────────────────────────────────────────────────────────── */

#lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

#lightbox[hidden] {
    display: none;
}

#lightbox-img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

#lightbox-close {
    position: fixed;
    top: 12px;
    right: 16px;
    padding: 4px;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    background: none;
    border: none;
    opacity: 0.7;
    cursor: pointer;
}

#lightbox-close:hover {
    opacity: 1;
}