:root{
    --primary-color: #5757BA;
    --text-color: #080808;
    --accent-color: #FFB6C1;
    --white: #FFFFFF;
}

html, body {
    overflow: hidden;
    height: 100%;
    margin: 0;
    padding: 0;
}


.logo1 {
    margin-top: 10vh; 
    font-family: 'Koulen', sans-serif;
    font-size: 4vw; 
    text-align: center; 
}

.logo2 {
    padding-left: 2em;
    font-family: 'Koulen', sans-serif;
    font-size: 24px;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000; 
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Kreon', sans-serif;
    text-align: center;
    gap: min(5vh, 60px);
    padding: 5vh 5vw;
    box-sizing: border-box;
    overflow: hidden;
}

.home{
    background-image: url('img/image-bg.png');
}

.instructions, .photobooth, .download{
    background-image: url('img/image-bg-1.png');
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
}

img {
    max-width: 80%;
    height: auto; 
    display: block; 
    margin: 0 auto; 
}


.star{
    margin-top: -70px;
}

button {
    display: flex;
    align-items: center;
    justify-content: center; 
    color: var(--white);
    font-family: 'Kreon', serif;
    font-size: clamp(16px, 2vw, 20px); 
    background-color: var(--primary-color);
    padding: 10px 20px; 
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 8px;
}


#ready-btn, #start-btn{
    position: fixed;
    bottom: calc(56px + 56px); 
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

a{
    text-decoration: none;
}

button:hover{
    color: var(--text-color);
    background-color: var(--accent-color);
}

.footer-text {
    position: fixed;
    bottom: 16px; 
    left: 50%;
    transform: translateX(-50%);
    font-family: 'League Spartan', serif;
    font-size: clamp(12px, 1.2vw, 14px); 
    font-weight: 500;
    text-align: center;
    max-width: 90%; 
}


/*PHOTOBOOTH*/

.photobooth {
    height: 100vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 90%;
    max-width: 960px;
    padding: 16px;
    height: 100vh; 
    justify-content: center; 
}

video {
    width: 100%;
    max-width: 600px;
    height: auto;
    border: 16px solid var(--white);
    background-color: var(--white);
    border-radius: 8px;
    transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    -moz-transform: scaleX(-1);
}

/* Countdown text */

#countdown {
    font-size: clamp(18px, 2vw, 24px); 
    font-weight: bold;
    color: var(--text-color);
    text-align: center;
}

#counter {
    font-size: clamp(16px, 1.8vw, 20px); 
}


/*DOWNLOAD*/

body .download {
    display: flex;
    justify-content: center; 
    align-items: center; 
    height: 100vh;
    margin: 0;
    flex-direction: column; 
}


.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px; 
}

#finalCanvas {
    max-width: 70vw;
    max-height: 70vh;
}

.right {
    margin-left: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    border-radius: 12px;
}


.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(2, auto); 
    gap: 10px;
    justify-content: center;
}

.color-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 5px solid white;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.color-btn:hover {
    transform: scale(1.1);
}

.button-last{
    display: flex;
    gap: 8px; 
    margin-top: 50px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    color: white;
}


@media (max-width: 768px) {

    .logo1 {
        font-size: 5vw;
        margin-top: 7vh; 
    }

    img {
        max-width: 300px; 
        padding-top: 20px;
        padding-bottom: 20px;
    }
    

    button {
        font-size: 20px;
        padding: 10px 16px;
    }

    .footer-text {
        position: fixed; 
        bottom: 10px; 
        left: 50%; 
        transform: translateX(-50%); 
        text-align: center;
        font-size: 14px;
        max-width: 90%;
        margin-top: 50px;
        padding: 5px 10px;
    }

    .main-container {
        flex-direction: row; 
        align-items: center;
        gap: 20px; 
        max-width: 100vw;
        flex-wrap: wrap; 
        overflow-x: auto; 
        white-space: nowrap; 
        padding: 10px; 
        margin-bottom: 50px;
    }

    .right {
        margin-left: 0;
        max-width: 100%;
        flex-shrink: 0;
    }

    #finalCanvas {
        width: 100%; 
        max-width: 40vw; 
        height: auto; 
        max-height: 60vh; 
        object-fit: contain; 
        flex-shrink: 0; 
    }

    body {
        overflow-x: auto;
    }

    .camera-container {
        max-width: 80%;
        display: flex;
        flex-direction: column; 
        justify-content: center; 
        align-items: center; 
        gap: 12px;
        height: 100vh; 
    }

    video {
        max-width: 100%;
        border-width: 12px;
    }
}

@media (max-width: 480px) {

    .logo1 {
        font-size: 32px;
        margin-bottom: 50px;
    }

    img {
        max-width: 200px;
        display: block; 
        padding-top: 10px; 
        margin-bottom: 50px;
    
    button {
        font-size: 20px;
        padding: 8px 14px;
        display: block; 
        margin-top: 50px;
    }

    .main-container {
        flex-direction: row; 
        align-items: center;
        gap: 10px; 
        max-width: 100vw;
        flex-wrap: wrap; 
        overflow-x: auto; 
        white-space: nowrap;  
        margin-bottom: 0; 
        padding-bottom: 25px; 
    }

    .footer-text {
        position: fixed; 
        bottom: 10px; 
        left: 50%; 
        transform: translateX(-50%); 
        text-align: center;
        font-size: 10px;
        max-width: 90%;
        background: rgba(255, 255, 255, 0.8); 
        padding: 5px 10px;
    }

    h2{
        font-size: 20px;
    }

    .color-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: 3px solid white;
        cursor: pointer;
        transition: transform 0.2s ease-in-out;
    }

    .camera-container {
        display: flex;
        flex-direction: column; 
        justify-content: center; 
        align-items: center; 
        gap: 12px;
        height: 100vh; 
    }

    video {
        border-width: 8px;
        border-radius: 6px;
    }

    #countdown {
        font-size: 18px;
    }

    #counter {
        font-size: 16px;
    }
}
}
