@font-face {
    font-family: 'Minecraft';
    src: url('./assets/fonts/MinecraftBold-nMK1.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Minecraft';
    src: url('./assets/fonts/MinecraftBoldItalic-1y1e.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Minecraft';
    src: url('./assets/fonts/MinecraftItalic-R8Mo.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Minecraft';
    src: url('./assets/fonts/MinecraftRegular-Bmg3.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

h1 {
    text-align: center;
}

.subtitle {
    text-align: center;
}

.subtitle-flex {
    display: flex;
    text-align: center;
    justify-content: center;
    gap: 8px;
    padding-bottom: 8px;
}

main, body {
    font-family: 'Minecraft', sans-serif;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

p {
    font-weight: 400;
}

strong {
    font-weight: 700;
}

em {
    font-style: italic;
}

strong em {
    font-weight: 700;
    font-style: italic;
}

.header-icon {
    image-rendering: pixelated;
    width:14px;
    height:14px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.info-button {
    display: flex;
    margin-top: 2px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.info-button img {
    cursor: pointer;
    image-rendering: pixelated;
    width:14px;
    height:14px;
}

.info-button:hover .info-message {
    opacity: 1;
    visibility: visible;
}

.info-message {
    position: absolute;
    padding: 2px;
    margin-left: 20px;
    background-color: red;
    max-width: 200px;
    width: max-content;
    z-index: 2;
    text-wrap: wrap;
    white-space: normal;
    overflow-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page {
    color: #f5f9fa;
    background-image: url('assets/backgrounds/polished_oak_planks.png');
    background-size: 44px 44px;
    image-rendering: pixelated;
    background-color: #070e0f;
    position: relative;
}

.page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 0;
}

.page > *:not(.header-bar):not(.footer-bar) {
    position: relative;
    z-index: 1;
}

.page-content {
    margin-top: 4%;
}

.logo {
    display: block;
    align-items: center;
}

.logo img {
    width: 50px;
    height: 50px;
    transition: filter 0.15s ease;
}

.logo img:hover {
    filter: brightness(0.8);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 98%;
    position: fixed;
    top: 0;
    z-index: 1000;
    image-rendering: pixelated;
    background-color: #30525c;
    padding-right: 2%;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: 0;
    z-index: 1000;
    margin-top: auto;
    image-rendering: pixelated;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links li {
    list-style: none;
    text-decoration: none;
    align-items: center;
}

.rounded-rect {
    background-color: #000000aa;
    border-radius: 8px;
    padding: 8px 8px 6px;
    color: #f5f9fa;
    display: inline-block;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.rounded-rect:hover {
    background-color: #000000cc;
}

.nav-links a,
.footer-bar a {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.section-header {
    text-align: left;
    padding-left: 10%;
}

.submods-grid {
    display: grid;
    grid-template-columns: repeat(4, 2fr);
    gap: 20px;
    padding-left: 10%;
    padding-right: 10%;
}

@media screen and (max-width: 767px) {
    .section-header {
        padding-left: 5%;
    }

    .submods-grid {
        grid-template-columns: repeat(3, 2fr);
        gap: 12px;
        padding-left: 5%;
        padding-right: 5%;
    }
}

@media screen and (max-width: 412px) {
    .section-header {
        padding-left: 2%;
    }

    .submods-grid {
        grid-template-columns: repeat(2, 2fr);
        gap: 8px;
        padding-left: 2%;
        padding-right: 2%;
    }
}

.card {
    display: block;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    transition: transform 0.3s ease, filter 0.15s ease;
    -webkit-user-drag: none;
}

.card:hover {
    transform: scale(1.05);
    filter: brightness(1.25);
}

.card img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
    pointer-events: none;
}

.card-content {
    position: absolute;
    bottom: 2%;
    width: 98%;
    color: #f5f9fa;
    background-color: #000000aa;
    padding-left: 2%;
    overflow: hidden;
}

.card-title {
    margin: 0;
}

.card-description {
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.6s ease;
    font-size: 45%;
    padding-top: 2%;
}

.card:hover .card-description {
    max-height: 100px;
    opacity: 1;
}

.version-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 5% 0;
    margin-bottom: 10px;
    background-color: #00000099;
    transition: background-color 0.3s ease;
    max-height: 50px;
}

.version-entry:hover {
    background-color: #000000cc;
}

.version-title, .version-number, .version-url {
    display: inline-block;
    text-decoration: none;
}

.version-url {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.great-big-world-title, .version-download-count {
    display: inline-block;
}

.version-type {
    flex: 1;
}

.version-download-count {
    text-decoration: none;
    color: #f5f9fa;
}

.download-icon {
    image-rendering: pixelated;
    width: 24px;
    height: 24px;
}

.modrinth-url:link {
    color: #1bd96a;
}

.modrinth-url:visited {
    color: #10c0e7;
}

.modrinth-url:active {
    color: #96ffc2;
}

.version-type-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    line-height: 1;
    text-transform: uppercase;
}

@media screen and (max-width: 855px) {
    .great-big-world-title, .version-download-count {
        display: none;
    }

    .version-number, .version-url {
        font-size: 130%;
    }

    .version-type-label {
        font-size: 60%;
    }

    .download-icon {
        width: 20px;
        height: 20px;
    }
}

.mod-groups {
    display: flex;
    align-items: center;
    font-size: 150%;
    gap: 16px;
}

.mod-group:hover {
    background-color: #000000aa;
}

.mod-group {
    display: flex;
    align-items: center;
    cursor: pointer;
    background-color: #00000077;
    text-decoration-color: transparent;
    text-underline-offset: 6px;
    padding: 8px;
    transition: background-color 0.2s ease, text-decoration-color 0.2s ease;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.mod-group.selected {
    background-color: black;
    text-decoration: underline white;
}

.mod-feature-carousel {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    width: 98em;
    max-width: 100%;
    margin-inline: auto;
    margin: 0 auto;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-marker-group: after;
}

.mod-feature-carousel::after {
    content: '';
    flex: 0 0 calc(100% - 30em);
}

.mod-feature-carousel::-webkit-scrollbar {
    display: none;
}

.mod-feature-carousel::scroll-button(right) {
    content: '>';
}

.mod-feature-carousel::scroll-button(left) {
    content: '<';
}

.mod-feature-carousel::scroll-marker-group {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.feature-carousel-card {
    box-sizing: border-box;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex: 0 0 30em;
    height: 300px;
    max-height: 315px;
    text-align: center;
    background-color: white;
    padding: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.feature-carousel-card::scroll-marker {
    content: '';
    height: 1.5em;
    width: 1.5em;
    background-color: #00000088;
}

.feature-carousel-card::scroll-marker:target-current {
    background-color: black;
}

@media(max-width: 500px) {
    .feature-carousel-card {
        flex: 0 0 100%;
    }
}

.feature-carousel-card-title {
    font-size: 125%;
    background-color: #000000cc;
}
