@font-face {
    font-family: Nunito;
    src: url('/fonts/Nunito-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito Strong';
    src: url('/fonts/Nunito-Bold.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root,
:root[data-theme="light"] {
    --text: rgb(20, 20, 20);
    --sky: rgb(160, 236, 255);
    --ground: rgb(93, 206, 78);
    --nav-link: rgb(20, 20, 20);
    --hamburger: #000;
    --footer-text: rgb(20, 20, 20);
    --modal-bg: #fff;
    --logo: url('/images/logo_scuro_1000x600.png');
    --menu-x: url('/images/menu-x-light.svg');
    --note: url('/images/note_scure_500x500.png');
    --nuvola-piccola: url('/images/nuvola_piccola_chiara_1000x630.png');
    --nuvola-media: url('/images/nuvola_media_chiara_1000x630.png');
    --nuvola-grande: url('/images/nuvola_grande_chiara_1000x630.png');
    --fiore-rosso: url('/images/fiore_rosso_chiaro_1000x1000.png');
    --fiore-blu: url('/images/fiore_blu_chiaro_1000x1000.png');
}

:root[data-theme="dark"] {
    --text: rgb(235, 235, 235);
    --sky: rgb(0, 8, 47);
    --ground: rgb(0, 10, 60);
    --nav-link: #fff;
    --hamburger: #fff;
    --footer-text: #fff;
    --modal-bg: rgb(52, 58, 64);
    --logo: url('/images/logo_chiaro_1000x600.png');
    --menu-x: url('/images/menu-x-dark.svg');
    --note: url('/images/note_chiare_500x500.png');
    --nuvola-piccola: url('/images/nuvola_piccola_scura_1000x630.png');
    --nuvola-media: url('/images/nuvola_media_scura_1000x630.png');
    --nuvola-grande: url('/images/nuvola_grande_scura_1000x630.png');
    --fiore-rosso: url('/images/fiore_rosso_scuro_1000x1000.png');
    --fiore-blu: url('/images/fiore_blu_scuro_1000x1000.png');
}

html, body {
    position: relative;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    width: 100vw;
    height: 100%;
    max-width: 100vw;
    font-family: Nunito, sans-serif;
    font-style: normal;
    font-weight: normal;
}

body {
    color: var(--text);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

/* Links */

a:link,
a:visited {
    color: rgb(35, 115, 250);
    text-decoration: none;
    cursor: pointer;
}

a:hover,
a:active {
    color: rgb(35, 115, 250);
    text-decoration: underline;
    cursor: pointer;
}

a.plain:link,
a.plain:visited,
a.plain:hover,
a.plain:active {
    color: var(--text);
    text-decoration: none;
}

a.image-link:hover,
a.image-link:active {
    text-decoration: none;
}

/* Loader */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background-color: var(--sky);
}

.spinner-container {
    position: relative;
    width: 110px;
    height: 110px;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 8px solid rgba(0, 0, 0, 0.1);
    border-top: 8px solid rgba(255, 0, 0, 1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: url('/images/favicon.png') no-repeat center center;
    background-size: contain;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Layout */

.contenitore {
    position: absolute;
    top: 100px;
    width: 100vw;
    margin-top: 50px;
}

.contenitore.with-subnav {
    margin-top: 100px;
}

.page-container {
    margin-bottom: 100px;
}

.center {
    position: relative;
    display: block;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: 100px;
}

.intro {
    max-width: 600px;
    margin-top: 50px;
}

.small-print {
    font-size: 12px;
    line-height: 16px;
}

.section {
    margin-top: 200px;
}

.logo {
    position: relative;
    left: 50%;
    margin-left: -150px;
    width: 300px;
    height: 300px;
    background-image: var(--logo);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 300px 180px;
}

.logo-small {
    position: relative;
    width: 150px;
    height: 150px;
    background-image: var(--logo);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 150px 90px;
}

.button {
    display: block;
    width: 130px;
    height: 50px;
    border-radius: 6px;
    border: solid 1px rgb(170, 170, 170);
    background-color: black;
    padding-top: 14px;
    cursor: pointer;
}

a.button:link,
a.button:visited,
a.button:hover,
a.button:active {
    color: white;
    text-decoration: none;
}

/* Store badges */

.store-badge {
    display: block;
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
}

.app-store {
    background-image: url('/images/app_store_badge.svg');
}

.google-play {
    background-image: url('/images/google_play_badge.png');
}

/* Team up */

#join {
    display: block;
    width: 200px;
    height: 200px;
    border-radius: 100px;
    background-color: rgb(235, 39, 37);
    text-align: center;
    font-weight: bold;
    font-size: 30px;
    padding-top: 55px;
    transform: rotate(-10deg);
    margin: 0 auto;
    cursor: pointer;
}

#join:link,
#join:visited,
#join:hover,
#join:active {
    color: white;
    text-decoration: none;
}

.join-text {
    text-align: left;
    font-size: 20px;
}

/* Site map */

.sitemap > div {
    z-index: 1000;
}

.sitemap-spacer {
    height: 150px;
}

.sitemap-pages {
    table-layout: fixed;
    width: 100%;
}

.sitemap-pages td {
    width: 50%;
}

.sitemap-pages td + td {
    white-space: nowrap;
}

.octocat {
    height: 50px;
}

.stackoverflow {
    height: 60px;
}

#studioMarguareis {
    display: block;
    position: absolute;
    top: 180px;
    left: 150px;
    width: 80px;
    height: 80px;
    background-image: url('/images/studiomarguareis_badge.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80px 40px;
    cursor: pointer;
}

/* Modal */

.modal-dialog-native {
    width: calc(100% - 1rem);
    max-width: 500px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}

.modal-dialog-native::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    border: 0;
    background-color: var(--modal-bg);
}

.modal-header,
.modal-footer {
    border: 0;
}

/* Privacy notice */

.privacy-notice {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px;
    background-color: var(--modal-bg);
    color: var(--text);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.privacy-notice strong,
.legal strong {
    font-family: 'Nunito Strong', Nunito, sans-serif;
    font-weight: normal;
}

.privacy-notice[hidden] {
    display: none;
}

.privacy-notice p {
    flex: 0 1 auto;
    margin: 0;
}

.privacy-notice .btn {
    flex-shrink: 0;
    min-width: 60px;
    background-color: var(--text);
    color: var(--modal-bg);
}
