@font-face {
    font-family: 'MuseoSansRounded';
    src: url('../assets/fonts/MuseoSansRounded300.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'MuseoSansRounded';
    src: url('../assets/fonts/MuseoSansRounded500.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'MuseoSansRounded';
    src: url('../assets/fonts/MuseoSansRounded700.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'MuseoSansRounded';
    src: url('../assets/fonts/MuseoSansRounded900.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'MuseoSansRounded';
    src: url('../assets/fonts/MuseoSansRounded1000.otf') format('opentype');
    font-weight: 1000;
    font-style: normal;
}

* {
    font-family: 'MuseoSansRounded', sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    user-select: none;
}

:root {
    --primary-color: #2869b3;
    --active-button: #245EA1;
    --shadow-button: 0 4px 15px rgba(0, 0, 0, 0.2);
    --shadow-hover-button: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.5);
    --shadow-active-button: 0 2px 10px rgba(0, 0, 0, 0.2);
    --background-color: #cbe9f7;
    --word-div-one: #f89d39;
    --word-div-two: #8389c3;
    --word-div-three: #e32071;
    --word-div-four: #00ae95;
}

body {
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

.overlay {
    background-color: var(--background-color);
    background-size: cover;
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
    inset: 0;
}

.overlay.fade-out {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.4s, opacity 0.4s ease-out;
}

.subtitle {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    text-align: center;
    z-index: 1;
    color: var(--primary-color);
}

.subtitle h1 {
    font-weight: 900;
    margin-bottom: 10px;
    font-size: clamp(1.85rem, 1.75rem + 0.2vw, 2rem);
}

.subtitle h2 {
    font-size: clamp(1.45rem, 1.3167rem + 0.2667vw, 1.65rem);
}

.content {
    opacity: 0;
}

body.no-scroll {
    overflow: hidden;
}

.start-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#start-phrase {
    color: var(--primary-color);
    font-weight: 900;
    text-align: center;
    margin-bottom: 20px;
}

#start-button {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 25px;
    text-transform: uppercase;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: var(--shadow-button);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#start-button:hover {
    color: white;
    box-shadow: var(--shadow-hover-button);
    transform: translateY(-2px);
}

#start-button:active {
    background-color: var(--active-button);
    color: white;
    transform: translateY(2px);
    box-shadow: var(--shadow-active-button);
}

#start-button:focus {
    outline: none;
}

#start-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transform: scale(0);
    transition: transform 0.4s ease;
    z-index: 0;
}

#start-button:hover::after {
    transform: scale(1.1);
}

.start-image {
    position: absolute;
    width: 20vw;
    transition: transform 0.3s ease;
    transform: translateX(20px);
    cursor: pointer;
}

.start-image:hover {
    transform: scale(1.1) rotate(-20deg);
    filter: hue-rotate();
}

.cloud-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: auto;
    height: auto;
    flex-wrap: nowrap;
    z-index: 48;
}

#cloud-image {
    width: clamp(450px, 38vw, 650px);
    height: auto;
    pointer-events: none;
}

.no-margin {
    margin: 0;
}

.word-div {
    position: absolute;
    display: flex;
    min-width: 270px;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: clamp(0.85rem, 0.5rem + 0.6vw, 1.25rem);
    font-weight: 900;
    text-transform: uppercase;
}

.word-div.one {
    color: var(--word-div-one);
}

.word-div.two {
    color: var(--word-div-two);
}

.word-div.three {
    color: var(--word-div-three);
}

.word-div.four {
    color: var(--word-div-four);
}

.draggable-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    z-index: 49;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screen h2 {
    text-align: center;
}

#main-container {
    display: flex;
    align-items: center;
}

.draggable {
    min-width: fit-content;
    background-color: white;
    border: 3px solid var(--primary-color);
    line-height: 1.25em;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.draggable.small {
    height: 35px;
    padding: 2px 8px;
    margin: 5px 6px;
    font-size: small;
}

.draggable.normal {
    height: 45px;
    padding: 2px 12px;
    margin: 5px 8px;
    font-size: medium;
}

.draggable.big {
    height: 60px;
    padding: 2px 18px;
    margin: 5px 10px;
    font-size: large;
}

.dropzone {
    min-width: 180px !important;
    max-width: fit-content !important;
    height: 30px !important;
    background-color: white;
    border: 4px solid #fedcea;
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px;
    transition: background-color 0.3s ease, width 0.5s ease, height 0.5s ease;
    overflow: hidden;
    position: absolute;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#screen4>div>div>div {
    margin: 6px;
}

.next-button {
    background-color: var(--primary-color);
    z-index: 50;
    color: white;
    padding: 15px 30px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 25px;
    text-transform: uppercase;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: var(--shadow-button);
    overflow: hidden;
    transition: all 0.3s ease;
    position: fixed;
    bottom: 5%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.next-button:hover {
    color: white;
    box-shadow: var(--shadow-hover-button);
    transform: translate(-50%, -55%);
}

.next-button:active {
    background-color: var(--active-button);
    color: white;
    transform: translate(-50%, -45%);
    box-shadow: var(--shadow-active-button);
}

.next-button:focus {
    outline: none;
}

.next-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    transform: scale(0);
    transition: transform 0.4s ease;
    z-index: 0;
}

.next-button:hover::after {
    transform: scale(1.1);
}

#end-message {
    color: var(--primary-color);
    text-align: center;
    font-size: clamp(1.5rem, 1.3333rem + 0.3333vw, 1.75rem);
    line-height: 1.25em;
    padding: 40px;
}

.end-screen {
    display: flex;
    justify-content: center;
    align-items: center;
}

#retry {
    position: fixed;
    right: 5%;
    bottom: 5%;
    background-color: var(--primary-color);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 0;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    margin: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: all 0.3s ease;
}

#retry:hover {
    color: white;
    box-shadow: var(--shadow-hover-button);
    transform: translateY(-5%);
}

#retry:active {
    background-color: var(--active-button);
    color: white;
    transform: translateY(5%);
    box-shadow: var(--shadow-active-button);
}

#retry svg {
    width: 40px;
    color: white;
    fill: white;
}

#volume {
    position: fixed;
    left: 5%;
    bottom: 5%;
    background-color: var(--primary-color);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 0;
    border: 2px solid white;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    margin: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 50;
}

#volume:hover {
    color: white;
    box-shadow: var(--shadow-hover-button);
    transform: translateY(-5%);
}

#volume:active {
    background-color: var(--active-button);
    color: white;
    transform: translateY(5%);
    box-shadow: var(--shadow-active-button);
}

#volume svg {
    width: 40px;
    color: white;
    fill: white;
}

[data-swapy-item] {
    transition: border 0.5s ease, box-shadow 0.5s ease;
}

[data-swapy-slot].populated>[data-swapy-item] {
    border: none !important;
    box-shadow: none;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    border-radius: 50px;
    margin: 10px 0;
}

::-webkit-scrollbar-thumb {
    border-radius: 50px;
    background: var(--primary-color);
}

#print-footer {
    display: none;
    position: absolute;
    bottom: 0;
    left: 5%;
    gap: 50px;
}

#print-header {
    display: none;
    justify-content: center;
    margin: 120px auto 20px;
    color: var(--primary-color);
}

/* Stili reponsive */

@media screen and (min-width: 500px) and (max-width: 800px) {
    #main-container {
        flex-direction: column;
    }

    .draggable-container {
        position: fixed;
        inset: 60% 0 0 0;
        margin: 0;
        padding-bottom: 130px;
        overflow-y: auto;
    }
}

@media screen and (min-width: 801px) and (max-width: 900px) {
    #main-container {
        flex-direction: column;
    }

    .draggable-container {
        position: fixed;
        inset: 65% 0 0 0;
        margin: 0;
        padding-bottom: 130px;
        overflow-y: auto;
    }
}

@media screen and (max-width: 1200px) {
    #start-phrase {
        margin-bottom: 20px;
    }

    .next-button {
        padding: 10px 24px;
    }

    #print-button {
        font-size: 22.85px;
        padding: 11px 24px;
        transform: translate(-50%, -45%);
    }

    #volume, #retry {
        width: 55px;
        height: 55px;
        margin: 1.5rem;
    }
    .next-button,
    #volume,
    #retry {
        bottom: 0.2%;
    }

    .dropzone {
        min-width: 160px !important;
        height: 30px !important;
        padding: 2px;
    }
}