html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
    margin: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    color: #444;
    font-family: Arial, sans-serif;
}

.container {
    justify-content: center;
    text-align: center;
    padding: 20px;
    border-radius: 5px;
}

.logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.imagem {
    width: 70px;
    height: auto;
    margin-bottom: 20px;
}

.container h1 {
    margin: 0;
    font-size: 24px;
    color: aliceblue;
}

.container p {
    margin: 10px 0;
    color: #fff;
}

.retry-button {
    background-color: #0196f6;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.retry-button:hover {
    background-color: #0566f6;
}

#video, #canvas {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

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

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    letter-spacing: 1px;
    color: #fff;
}

/* ============================================
   DETECTAR PLATAFORMA: DESKTOP vs MOBILE
   ============================================ */

/* SE for DESKTOP (tela maior que 768px) */
@media (min-width: 769px) {
    body {
        background-image: url('../images/insta-backgroung.png');
    }
}

/* SE for MOBILE (tela menor ou igual a 768px) */
@media (max-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100vh;
        min-height: 100vh;
        width: 100vw;
        background-image: url('../images/insta-backgound-mobile.png');
        background-repeat: no-repeat;
        background-size: 100% 100%;
        background-position: center center;
        background-color: #000;
        overflow: hidden;
    }

    .container {
        align-items: center;
        text-align: center;
        padding: 30px;
        border-radius: 5px;
    }

    .logo {
        width: 350px;
        height: auto;
        margin-bottom: 10px;
    }

    .imagem {
        width: 80px;
        height: auto;
        margin-bottom: 20px;
    }

    .container h1 {
        margin: 0;
        font-size: 54px;
        color: aliceblue;
    }

    .container p {
        font-size: 30px;
        margin: 30px 0;
        color: #fff;
    }

    .retry-button {
        background-color: #0196f6;
        color: #fff;
        padding: 30px 40px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 26px;
    }

    .retry-button:hover {
        background-color: #0566f6;
    }

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

    .spinner {
        width: 80px;
        height: 80px;
        border: 6px solid rgba(255, 255, 255, 0.2);
        border-top: 6px solid #ffffff;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 20px;
    }

    .loading-text {
        font-size: 46px;
        letter-spacing: 1px;
        color: #fff;
    }
}