body, html {
    background-color: #f4f4f9;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0.2cm; /* Añade un espacio de 0.2 cm a todos los lados */
    width: calc(100% - 0.4cm); /* Resta 0.4 cm (0.2 cm por cada lado) del ancho total */
    height: calc(100% - 0.4cm); /* Resta 0.4 cm (0.2 cm por cada lado) de la altura total */
    overflow: hidden; /* Evitar el desplazamiento */
    overflow-x: hidden;
}



.frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.container {
    text-align: center;
    padding: 20px;
    margin: auto;
    max-width: 600px;
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#video, #canvas {
    border: 0px solid #000;
    border-radius: 15px; /* Bordes redondeados */
    width: 100%;
    height: auto;
    object-fit: contain; /* Mantener proporciones sin recortar */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra alrededor */
    background-color: #ffffff;
}

#canvas-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    overflow: hidden; /* Asegura que cualquier desbordamiento se oculte */
}

.button-group {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px; /* Tamaño un poco más grande */
    font-size: 16px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 8px; /* Bordes más redondeados */
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    margin: 5px;
}

button i {
    margin-right: 8px;
}

button:hover {
    background-color: #0056b3;
    transform: scale(1.05); /* Escala ligera al pasar el mouse */
}

button:disabled {
    background-color: #cccccc;
}

button.whatsapp {
    background-color: #25D366;
}

button.whatsapp:hover {
    background-color: #1DA851;
}

button.email {
    background-color: #D44638;
}

button.email:hover {
    background-color: #B23121;
}

input[type="email"], input[type="tel"] {
    padding: 10px;
    font-size: 16px;
    width: calc(100% - 22px);
    margin: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#countdown {
    font-size: 100px; /* Tamaño grande para los números */
    color: #007bff; /* Color azul */
    text-shadow: 2px 2px 8px #ffffff; /* Sombra para dar un efecto más moderno */
    font-family: 'Arial', sans-serif; /* Fuente moderna */
    text-align: center; /* Centrar el texto */
    animation: zoomInOut 1s ease-in-out; /* Animación entre números con zoom */
}

#countdown-container {
        z-index: 9999; /* Asegura que el contador esté por encima de todos los elementos */
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centra el contenedor */
    width: auto; /* Ajuste automático del ancho */
    height: auto; /* Ajuste automático de la altura */
    background-color: transparent; /* Elimina el fondo */
}

/* Animación para el contador */
@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(1.2); }
}


@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

#logo {
    cursor: move;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 100px;
    height: 100px;
    user-select: none; /* Evitar selección del logo */
}

#logo:hover {
    /* Puedes añadir efectos al logo aquí si lo deseas */
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}


.frame-thumbnail {
    width: 60px; /* Aumenta el tamaño */
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Añade una sombra suave */
}

.frame-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Sombra más pronunciada al pasar el mouse */
}


#video.hidden {
    visibility: hidden;
    opacity: 0;
}

#canvas.hidden {
    visibility: hidden;
    opacity: 0;
}

.emoticon-options, .figure-options, .frame-options {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.emoticon-thumbnail, .figure-thumbnail {
    width: 70px; /* Aumenta el tamaño */
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Añade una sombra suave */
}

.emoticon-thumbnail:hover, .figure-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Sombra más pronunciada al pasar el mouse */
}

.draggable-resizable {
    position: absolute;
    cursor: move;
    touch-action: none;
}

.delete-button {
    position: absolute;
    top: -10px; /* Asegura que el botón esté ligeramente fuera del contenido */
    right: -10px; /* Desplazamos ligeramente hacia la derecha */
    width: 20px;
    height: 20px;
    background-color: rgba(255, 0, 0, 0.7); /* Ajusta el color y opacidad */
    color: white;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    z-index: 100; /* Asegura que esté siempre por encima de la imagen */
    border-radius: 50%; /* Opcional: si deseas que sea circular */
    font-size: 12px; /* Reduce el tamaño de la fuente para que el icono sea más pequeño */
    transition: transform 0.2s;
}

.delete-button:hover {
    transform: scale(1.2); /* Aumenta el tamaño ligeramente al pasar el mouse */
}

.resize-handle {
    position: absolute;
    bottom: -10px; /* Desplazamos ligeramente hacia abajo para que quede fuera de la imagen */
    right: -10px; /* Desplazamos ligeramente hacia la derecha */
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: se-resize;
    z-index: 10;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.resize-handle::before {
    content: '\2194'; /* Icono de flecha bidireccional horizontal */
    color: white;
    font-size: 14px;
    transform: rotate(45deg); /* Rota la flecha 45 grados a la derecha */
}

.resize-handle:hover {
    transform: scale(1.2); /* Aumenta el tamaño ligeramente al pasar el mouse */
}

.options-area {
    margin-bottom: 10px;
    min-height: 80px; /* Ajusta esto según el tamaño de tus miniaturas */
    align-items: center; /* Alinea verticalmente los elementos en el centro */
}

.options-container {
     flex: 1 1 calc(100% / 5 - 20px); 
    display: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.options-container.active {
    display: flex;
}

.menu {
    display: flex;
    justify-content: space-between;
}

.menu-item {
    flex: 1;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background-color: #0056b3;
}

.menu-item.active {
    background-color: #0056b3;
}

.frame-thumbnail, .emoticon-thumbnail, .figure-thumbnail {
    
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
    object-fit: contain; /* cover: recorta; contain= ajuste completamente sin recortars*/
}

.frame-thumbnail:hover, .emoticon-thumbnail:hover, .figure-thumbnail:hover {
    transform: scale(1.1);
}

.btn-selfie {
    background-color: #28a745; /* Color verde */
    color: #ffffff; /* Color del texto blanco */
    border: none; /* Sin bordes */
    padding: 10px 20px; /* Espaciado interno */
    font-size: 18px; /* Tamaño de la fuente */
    border-radius: 5px; /* Bordes redondeados */
    cursor: pointer; /* Cambia el cursor cuando pasas sobre el botón */
    transition: background-color 0.3s ease; /* Transición suave al pasar el mouse */
    align-items: center; /* Centra verticalmente el contenido */
    justify-content: center; /* Centra horizontalmente el contenido */
}

.btn-selfie:hover {
    background-color: #218838; /* Un verde más oscuro al pasar el mouse */
}


.btn-recargar {
    background-color: #0a6ea3; /* Color verde */
    color: #ffffff; /* Color del texto blanco */
    border: none; /* Sin bordes */
    padding: 10px 5px; /* Espaciado interno */
    font-size: 18px; /* Tamaño de la fuente */
    border-radius: 5px; /* Bordes redondeados */
    cursor: pointer; /* Cambia el cursor cuando pasas sobre el botón */
    transition: background-color 0.3s ease; /* Transición suave al pasar el mouse */
      align-items: center; /* Centra verticalmente el contenido */
    justify-content: center; /* Centra horizontalmente el contenido */
}

.btn-recargar:hover {
    background-color: #064e75; /* Un verde más oscuro al pasar el mouse */
}


@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }

    button {
        padding: 8px 16px;
        font-size: 14px;
    }

    
}

#delete-frame {
    background-color: red; /* Color de fondo rojo */
    color: white; /* Color del icono blanco */
    border: none; /* Elimina el borde */
    border-radius: 50%; /* Hace que el botón sea circular */
    width: 40px; /* Ajusta el tamaño del botón según lo necesites */
    height: 40px; /* Ajusta el tamaño del botón según lo necesites */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer; /* Cambia el cursor al pasar sobre el botón */
    transition: transform 0.2s;
  
}

#delete-frame:hover {
    transform: scale(1.2); /* Aumenta ligeramente el tamaño al pasar el mouse */
}

#delete-frame i {
    font-size: 20px; /* Tamaño del icono */
}

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #84fab0, #8fd3f4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 1s ease-in-out;
}

.welcome-circle {
    background-color: #007bff;
    color: #fff;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
    transition: transform 0.3s ease;
}

.welcome-circle p {
    font-family: 'Courier New', Courier, monospace;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid;
    animation: typing 2s steps(20) infinite alternate;
}

.start-button {
    background-color: #ffffff;
    color: #007bff;
    border: none;
    border-radius: 50%;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.start-button:hover {
    background-color: #0056b3;
    color: #ffffff;
    transform: scale(1.1);
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}



@keyframes zoomInOut {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

