:root {
    --switch-red: hsla(6, 100%, 58%, 1);
    --switch-red-background: hsla(6, 100%, 72%, 1);
    --switch-blue: #0AB9E6;
    --background-color: hsla(192, 19%, 95%, 1);
    --card-corner-radius: 12px;
    --yellow: hsla(52, 100%, 47%, 1);
    --card-background: white;

    --label: hsla(0, 0%, 4%, 1);
    --secondaryLabel: hsla(0, 0%, 50%, 1);
    --tertiaryLabel: hsla(240, 0%, 74%, 1);
    --quaternaryLabel: hsla(0, 0%, 90%, 1);

    --placeholderText: hsla(240, 0%, 74%, 1);

    --systemBackground: hsla(0, 0%, 99%, 1);
    --secondarySystemBackground: hsla(300, 0%, 93%, 1);
    --tertiarySystemBackground: hsla(0, 0%, 84%, 1);

    --systemFill: hsla(240, 2%, 90%, 1);
    --secondarySystemFill: hsla(240, 5%, 92%, 1);
    --tertiarySystemFill: hsla(240, 4%, 94%, 1);
    --quaternarySystemFill: hsla(240, 5%, 96%, 1);

    --separator: hsla(0, 0%, 90%, 1);
    --opaqueSeparator: hsla(240, 2%, 78%, 1);

    --systemRed: hsla(3, 100%, 59%, 1);
    --systemOrange: hsla(35, 100%, 50%, 1);
    --systemYellow: hsla(48, 100%, 50%, 1);
    --systemGreen: hsla(135, 59%, 49%, 1);
    --systemMint: hsla(177, 100%, 39%, 1);
    --systemTeal: hsla(189, 61%, 48%, 1);
    --systemCyan: hsla(199, 84%, 64%, 1);
    --systemBlue: hsla(211, 100%, 50%, 1);
    --systemIndigo: hsla(241, 61%, 59%, 1);
    --systemPurple: hsla(280, 68%, 60%, 1);
    --systemPink: hsla(348, 100%, 59%, 1);
    --systemBrown: hsla(34, 27%, 50%, 1);

    --eshopBackground: hsla(35, 100%, 50%, 0.2);
    --saleHeaderBackground: hsla(35, 100%, 50%, 0.4);

    --game-widgets-light: hsl(265deg 99% 72%);
    --game-widgets-dark: hsl(249deg 100% 72%);

    --switchbuddy-gradient: linear-gradient(to right, #ff3c28, #ff2d6c, #ff47a7, #dd6bd8, #aa89f6, #6d9fff, #28aff9, #0ab9e6);
}

html, body {
    font-size: 18px;
}

*, *::after, *::before {
    box-sizing: border-box;
    margin: 0;
    /*outline: 1px solid #f00 !important;*/
}

html {
    background-color: var(--background-color);
}

body {
    background-color: var(--background-color);
    font-family: sans-serif;
    margin: 0;
    padding-bottom: 50px;
    color: var(--label);
    min-height: 100vh;
}

button {
    border: none;
    cursor: pointer;
    color: white;
}

a {
    color: black;
    text-decoration: none;
}

a:hover {
    color: var(--switch-blue);
    text-decoration-thickness: 3px;
    text-decoration: underline;
}

.mb-md {
    margin-bottom: 10px;
}

.mt-md {
    margin-top: 15px;
}

.mt-lg {
    margin-top: 30px;
}

.mx-auto {
    margin-inline: auto;
}

.d-block {
    display: block;
}

h2 {
    font-size: 1.7rem;
}

h3 {
    font-weight: normal;
    letter-spacing: 0.02rem;
}

.position-relative {
    position: relative;
}

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

.grid-center {
    display: grid;
    place-content: center;
}

.gradient-text {
    --gradient: linear-gradient(to right, var(--game-widgets-dark), var(--game-widgets-light));
    background: var(--gradient);
    background-clip: border-box;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
}

.switchbuddy-gradient-text {
    --gradient: var(--switchbuddy-gradient);
}

.game-detail-container {
    max-width: 650px;
    background-color: var(--systemBackground);
    margin-inline: auto;
    position: relative;
    padding-bottom: 30px;
}

.game-detail-header {
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--opaqueSeparator);
}

.game-cover-image {
    max-width: min(180px, 30vw);
    aspect-ratio: 3/4;
    height: auto;
    z-index: 10;
    border-radius: 4px;
    margin-top: 30px;
    background-color: var(--tertiarySystemFill);
}

.bg-image {
    position: absolute;
    inset: -30px;
    filter: blur(30px) brightness(60%);
    object-fit: cover;
    overflow: hidden;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
}

.event-image {
    width: 100%;
    height: auto;
}

.game-detail-container > * {
    margin-bottom: 20px;
}

.game-detail-container > *:not(.game-detail-header) {
    margin-inline: 20px;
}

.game-detail-screenshots {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 10px;
}

.game-detail-chips {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 5px
}

.game-detail-title {
    margin-bottom: 15px;
    font-size: 1.7rem;
}

.game-detail-releases {
    border-bottom: 1px solid var(--opaqueSeparator);
    padding: 10px;
    background: var(--tertiarySystemFill);
    margin-inline: 0 !important;
}

.game-detail-screenshots img {
    max-height: 210px;
    border-radius: 5px;
}

.game-detail-summary {
    line-height: 1.6;
    font-size: 0.9rem;
}

.view-details-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 15px;
}

.game-detail-video-embed {
    aspect-ratio: 16/9;
    width: 530px;
    border: none;
}

.section-header {
    margin-bottom: 5px;
}

.chip {
    font-size: 0.7rem;
    background-color: var(--systemFill);
    padding: 6px 10px;
    border-radius: 5px;
    letter-spacing: 0.04rem;
    display: grid;
    place-content: center;
    white-space: nowrap;
}

.links-container {
    max-width: 300px;
    margin-inline: auto;
    background: var(--tertiarySystemFill);
    list-style: none;
    padding: 15px;
    border-radius: 15px;
    margin-top: 50px;
}

.links-container > li {
    margin-bottom: 8px;
    border-bottom: 1px solid var(--separator);
}

.links-container a {
    text-decoration: none;
    display: flex;
}

.links-container a svg {
    margin-left: auto;
}

.links-container > li:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.storyline-container {
    padding: 20px 20px 10px;
    font-size: 0.7rem;
    line-height: 1.5;
    background-color: var(--secondarySystemFill);
    border-radius: 15px;
    position: relative;
}

.storyline-content {
    max-height: 120px;
    overflow-y: scroll;
}

.main-game-card {
    background-color: var(--tertiarySystemFill);
    padding: 15px;
    display: flex;
    gap: 15px;
    border-radius: 16px;
    text-decoration: none;
}

.main-game-card .game-cover-image {
    margin-top: 0;
    max-width: 80px;
}

.main-game-card h2 {
    margin-top: 10px;
}

#open-critic-card {
    background-color: var(--tertiarySystemFill);
    border-radius: 12px;
    display: flex;
    max-width: 450px;
    gap: 10px;
    padding: 10px;
    padding-top: 15px;
    margin-inline: auto;
    justify-content: space-evenly;
    align-items: center;
    position: relative;
}

#open-critic-card::after {
    position: absolute;
    top: 8px;
    left: 10px;
    content: "OpenCritic";
    font-size: 0.8rem;
    font-weight: bolder;
    opacity: 0.5;
}

#open-critic-card img {
    max-width: 120px;
    height: auto;
}

#open-critic-card small {
    font-size: 0.7rem;
    display: block;
    text-align: center;
}

#open-critic-card p {
    font-size: 3rem;
    display: block;
    text-align: center;
    margin: 0;
    font-weight: bolder;
}

.compact-get-app-box {
    padding: 15px;
    border: 2px solid var(--game-widgets-light);
    border-radius: 5px;
}

.company-logo-image {
    max-width: 80%;
    max-height: 80%;
    height: auto;
    z-index: 10;
}

.company-bg-image {
    position: absolute;
    inset: -30px;
    filter: blur(50px) brightness(60%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
}

@media only screen and (max-width: 440px) {
    #open-critic-card {
        border-radius: 0;
    }

    #open-critic-card p {
        font-size: 2rem;
    }

    #open-critic-card small {
        font-size: 0.5rem;
    }

    #open-critic-card img {
        max-width: 100px;
        height: auto;
    }
}

/* Gallery styles */
#galleryContainer {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;

    background-color: rgba(0 0 0 / 0.90);
    display: none;
    overflow: hidden;
}

#galleryContent {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#galleryContainer #mainImage {
    display: block;
    max-width: 90%;
    max-height: 85%;
    margin-inline: auto;
    z-index: 10;
}

#galleryCloseButton {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background-color: rgba(0 0 0 / 0.95);
    color: white;
}

#currentTotalSummaryLabel {
    font-size: 0.9rem;
    color: lightgrey;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: monospace, monospace;
}

#mainImage {
    border-radius: 5px;
}

.paging-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: black;
    padding: 5px;
    background-color: var(--switch-blue);
}

.paging-button > svg {
    width: 50px;
    height: 50px;
}

#leftButton {
    left: 0px;
}

#rightButton {
    right: 0px;
}

.django-badge {
    display: grid;
    place-content: center;
    margin-top: 20px;
}

.django-badge img {
    width: 80px;
    height: auto;
}

.app-icon {
    border-radius: 25%;
    --size: 60px;
    width: var(--size);
    height: var(--size);
}

.horizontal-flex {
    display: flex;
}

.centered-flex {
    justify-content: center;
}

.standard-flex-gap {
    gap: 10px;
}

.game-promo p {
    font-size: 0.8rem;
    line-height: 1.1;
}

.game-promo h4 {
    font-weight: bolder;
}

.download-badge {
    max-width: 90px;
    height: auto;
}

.readable-content {
    max-width: 840px;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: auto;
    margin-right: auto;
}