/* Estilos generales */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    background-color: #F3F3F3;
}

/* Canvas que ocupa el 100% de la pantalla */
#main-content {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Barra lateral */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 98%;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    overflow-x: hidden;
    transition: transform 0.3s ease;
    z-index: 1000;
    margin: 10px;
    border-radius: 5px;
    font-size: 13px;
}

#sidebar.collapsed {
    transform: translateX(-270px);
}

/* Botón para contraer/expandir el menú */

.toggle-container {
    border-radius: 5px;
    padding: 10px;
}
#toggle-button {
    position: fixed;
    top: 20px;
    left: 25px;
    width: 30px;
    height: 30px;
    color: #fff;
    border: none;
    font-size: 34px;
    line-height: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* Menú dentro de la barra lateral */
#menu {
    margin-top: 70px; /* Deja espacio para el botón */
}

#menu ul {
    list-style-type: none;
    padding: 0;
}

#menu ul li {
    padding: 10px;
    margin-left: 20px;  
    margin-right: 20px;
}

#menu ul li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

#menu ul li a {
    color: #fff;
    text-decoration: none;
    display: block;
}

/* Estilos para el menú */
#menu ul li.active {
    background-color: rgba(255, 255, 255, 0.2); /* Background for active section */
    border-radius: 5px; /* Match hover effect */
}

/* Secciones */
.section {
    width: 100%;
    height: 100%;
    display: none;
}

.section.active {
    display: block;
}

/* Ajuste para que la gráfica no se estire */
canvas {
    width: 100%;
    height: 100%;
}


/* Estilo para el contenedor de controles */
#controls {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

/* Estilos generales para los botones de los pickers */
#background-color-button,
#animation-color-button {
    width: 30px;
    height: 30px;
    border: 3px solid white;
    border-radius: 50%;
    background-color: #333; /* Este color se actualizará dinámicamente */
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    outline: none;
    padding: 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#background-color-picker-container,
#animation-color-picker-container {
    position: absolute;
    top: 0; /* Ajusta según sea necesario */
    right: 35px;
    z-index: 1002;
    border-radius: 4px;
    display: none; /* Oculto por defecto */
}

#background-color-button:hover,
#animation-color-button:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#background-color-button:active,
#animation-color-button:active {
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
    transform: scale(0.98);
}

/* Ajustar el contenedor de controles */
#controls {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column; /* Para apilar los botones verticalmente */
    align-items: flex-end;
    gap: 10px;
    z-index: 1001;
}

/* logo */
#logo-container {
    position: absolute; /* Changed to absolute positioning */
    top: 30px; /* Adjust as needed */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center adjustment */
    z-index: 1002; /* Ensure it overlaps above other elements */
    text-align: center;

}

#logo {
    width: 100px; /* Responsive logo */
    height: auto; /* Maintain aspect ratio */
    color: #5C118F; 
}



/* Estilos para los controles de visualización */
#view-controls {
    position: fixed;
    top: 100px; /* Ajusta según la posición de los color pickers */
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 1001;
}

/*Estilos para los botones de vista */
.view-button {
    background: transparent;
    border: none;
    padding: 8px 5px 5px 5px;
    border-radius: 5px;
    width: 35px;
    cursor: pointer;
    color: inherit; /* El color se establecerá dinámicamente */
}

.view-button:hover {
    background: rgba(255, 255, 255, 0.4); /* Blanco con 40% de opacidad */
}

.view-button.active {
    background: white;
}

/* Opcional: Ajustar el contenedor de los controles de vista */
#view-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}







/* Estilos generales para el contenedor del dispositivo */
.device-container {
    position: relative;
    margin: 0 auto;
    display: none; /* Oculto por defecto */
}

.section.active .device-container {
    display: block; /* Mostrar solo en la sección activa */
}

/* Modo pantalla completa */
.device-container.fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Modo tablet */
.device-container.tablet {
    width: 768px; /* Ancho del iPad */
    height: 1024px; /* Alto del iPad */
    background-image: url('img/iphone-mockup.png'); /* Imagen del mockup de iPad */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-position-y: bottom;
    margin-top: 60px;
}

/* Modo teléfono */
.device-container.phone {
    width: 375px; /* Ancho del iPhone */
    height: 812px; /* Alto del iPhone */
    background-image: url('img/iphone-mockup.png'); /* Imagen del mockup de iPhone */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-position-y: bottom;
    margin-top: 60px;
}

/* Ajuste del canvas dentro del contenedor del dispositivo */
.device-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

}
/* Ajuste para el canvas dentro del tablet */
.device-container.tablet canvas {
    top: 60px; /* Ajusta según el mockup */
    left: 40px;
    width: calc(100% - 80px);
    height: calc(100% - 120px);
}

/* Ajuste para el canvas dentro del teléfono */
.device-container.phone canvas {
    top: 78px;
    left: 29px;
    width: calc(100% - 58px);
    height: calc(100% - 100px);
}