body { margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; /* Full viewport height */ background-color: #f0f0f0; /* Example background color */ } .frame-container { position: relative; width: 90%; /* Adjust frame container width for responsiveness */ max-width: 45vw; /* Maximum width for larger screens */ height: auto; /* Adjust frame container height */ overflow: hidden; /* Clip iframe content inside frame */ } .frame-image { display: block; width: 100%; /* Ensure the picture frame covers the container */ height: auto; object-fit: contain; /* Preserve aspect ratio */ z-index: 2222; /* Ensure picture frame is above background color */ pointer-events: none; /* Ensure the frame image doesn't block clicks */ } .iframe-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; /* Ensure the iframe covers the container */ height: 80%; /* Initial height */ border: none; /* Remove iframe border */ z-index: 21; /* Ensure iframe content is above picture frame */ } .bg-color { z-index: 3333; border-radius: 70px; background-color: rgb(0, 0, 0); margin-top: 3px; height: 95%; width: 100%; position: absolute; left: 0%; top: 2.5%; z-index: -21; /* Ensure iframe content is above picture frame */ } .play-btn-div { z-index: 3333; border-radius: 70px; background-color: transparent; height: 100%; width: 95%; position: absolute; left: 2.5%; top: 0%; } .play-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; /* Ensure the play button is above other elements */ cursor: pointer; /* Change cursor to pointer on hover */ transition: height 0.3s ease; /* Smooth transition for opacity */ transition: width 0.3s ease; /* Smooth transition for opacity */ } .play-button:hover { content:url('https://i-play.webology.co.il/games_assets/play_btn_hover.png'); transition: height 0.3s ease; /* Smooth transition for opacity */ transition: width 0.3s ease; /* Smooth transition for opacity */ }