:root {
    --background-color: #fff;
    --text-color: #151515;
    --secondary-text-color: #b3b3b3;
    --border-color: #ebebeb;
    --primary-color: 111, 000, 255;
    --secondary-color: 229, 254, 040;
    --card-background-color: #f6f6f6;

    --header-height: 7rem;
    --button-height: 3rem;
    --button-width: 10rem;
    --button-font-size: 1.2rem;
    --border-radius: 0.8rem;
    --region-font-size: 1.5rem;
    --region-padding: 1rem;

    --font-family: Urbanist;
}

@font-face {
    font-family: Urbanist;
    font-style: italic;
    font-weight: normal;
    font-display: swap;
    src: url(fonts/Urbanist-Italic.ttf);
}

@font-face {
    font-family: Urbanist;
    font-display: swap;
    src: url(fonts/Urbanist-Regular.ttf);
}

@font-face {
    font-family: Urbanist;
    font-style: normal;
    font-weight: bold;
    font-display: swap;
    src: url(fonts/Urbanist-Bold.ttf);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
}

html {
    font-size: 16px;
    width: 100%;
    height: 100%;
}

header {
    z-index: 9999;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

header span {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    width: 20%;
}

header span .headerLogo {
    width: 100%;
}

header span .localName {
    color: var(--secondary-text-color);
    font-weight: bold;
    width: 100%;
    font-size: 0.99vw;
}

main {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
}

main > aside {
    width: 30%;
    overflow: auto;
    padding: 1rem;
    height: 95%;
    border: 1px solid var(--border-color);
    margin: 1rem;
}

main > section {
    width: 55%;
    padding: 1rem;
}

main > aside form {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
}

main > aside form .cardContainer {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
}

main > aside fieldset {
    display: flex;
    flex-flow: column nowrap;
    border: none;
    margin-top: 20px;
    width: 100%;
}

main > aside legend {
    font-size: 2rem;
    color: var(--text-color);
    margin: 1rem;
}

aside .cardContainer .card {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
    background-color: var(--card-background-color);
    width: 20%;
    height: 13rem;
    margin: 2rem 0 2rem 0;
    cursor: pointer;
    border-radius: var(--border-radius);
    border: 3px solid transparent;
    transition: all 0.3s ease-in-out;
}

aside .cardContainer .card:hover, aside .cardContainer .card.active {
    border-color: rgb(var(--secondary-color));
}

aside .deviceSelectContainer {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
}

aside .deviceSelectContainer .showSelection {
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.cardContainer .card img {
    object-fit: contain;
    max-height: 70%;
    max-width: 70%;
    margin: auto 1rem auto 1rem;
}

.cardContainer .card h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

main > aside form .buttonContainer {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    margin: 3rem 0;
}

form .softwareSelect button {
    background-color: var(--card-background-color);
    border: 2px solid var(--text-color);
    columns: var(--text-color);
    height: var(--button-height);
    width: var(--button-width);
    border-radius: var(--border-radius);
    font-size: var(--button-font-size);
    font-weight: bold;
    cursor: pointer;
}

main > aside form .softwareSelect button:hover, main > aside form .softwareSelect button.active {
    background-color: rgb(var(--secondary-color));
    border-color: transparent;
    transition: all 0.3s ease-in-out;
}

main > section {
    height: 70%;
}

aside .customSelectContainer {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
    margin: 3rem;
}

aside .customSelectContainer .customSelect {
    position: relative;
    width: 70%;
    color: var(--text-color);
}

aside .customSelectContainer .selectButton {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: var(--button-height);
    text-align: left;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    font-size: var(--button-font-size);
    background: var(--background-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

aside .customSelectContainer .selectButton:hover {
    box-shadow: 0 0 0 2px rgba(var(--secondary-color));
}  

.customSelectContainer .selectButton .selectButtonArrow::before {
    content: '▲';
    color: var(--text-color);
    display: inline-block;
    transition: transform 0.3s ease-in-out;
}

.customSelectContainer .selectButton.open .selectButtonArrow::before {
    transform: rotateX(180deg);
}

aside fieldset.regioSelect {
    display: none;
}

aside fieldset.regioSelect.active {
    display: flex;
}

.selectOptions {
    display: block;
    position: absolute;
    top: 100%;
    width: 100%;
    max-height: 24rem;
    overflow: auto;
    left: 0;
    right: 0;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 10;
}

.selectOptions li {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.selectOptions li:hover {
    background: linear-gradient(to left, rgb(var(--secondary-color)) 5px, rgba(var(--secondary-color), 0.3) 10px);
} 

section {
    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
    gap: 1rem;
    overflow: auto;
}

section article {
    display: flex;
    flex-flow: column nowrap;
    align-items: end;
    justify-content: space-between;
    background-color: var(--card-background-color);
    border-radius: var(--border-radius);
    width: 16rem;
    height: 22rem;
}

section article .region {
    width: 100%;
    padding: var(--region-padding) 0 0 var(--region-padding);
    font-size: var(--region-font-size);
}

section article .displayVersion {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    font-size: clamp(2.8rem, 1.8vw, 3.3rem);
    font-weight: bold;
}

section article .displayVersion.engine {
    font-size: 4rem;
}

section article .deviceInfo {
    display: flex;
    flex-flow: column nowrap;
    width: 100%;
    padding: 0 1rem 0 1rem;
}

.deviceInfo .deviceName {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: left;
}

section article .softwareInfo {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 1rem 0 1rem;
}

section article .softwareInfo div {
    display: flex;
    flex-flow: column nowrap;
    align-items: start;
}

section article .softwareInfo div:last-child {
    align-items: end;
}

section article .downloadButton {
    all: unset;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--card-background-color);
    border: 2px solid var(--text-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    width: 7rem;
    height: 2rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin: 1rem;
}

section article:hover .downloadButton {
    background-color: rgb(var(--secondary-color));
    border-color: transparent;
    transition: all 0.3s ease-in-out;
}




@media (max-width: 768px) {
    :root {
        --header-height: 90px;
    }

    html {
        font-size: 7px;
    }

    header {
        justify-content: flex-start;
        padding-left: 2rem;
    }

    header span  {
        width: 60%;
    }

    header span .localName {
        font-size: 2.8vw;
    }

    main {
        height: 100%;
        flex-flow: column nowrap;
    }

    main > aside {
        width: 90%;
    }

    main > aside fieldset {
        margin-top: 0;
    }

    main > section {
        width: 90%;
        height: 100%;
        justify-content: center;
        overflow: unset;
    }

    .selectOptions {
        height: 25vh;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 7px;
    }

    main aside {
        width: 40%;
    }
}

@media (min-width: 1366px) {
    header span {
        width: 30%;
    }

    header span .localName {
        font-size: 1.4vw;
    }

    html {
        font-size: 10px;
    }

    main aside {
        width: 30%;
    }
}

@media (min-width: 1920px) {
    header {
        justify-content: center;
    }

    header span {
        width: 20%;
    }

    header span .localName {
        font-size: 0.98vw;
    }

    html {
        font-size: 14px;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 3840px) {
    html {
        font-size: 16px;
    }
}
