a > div > p { color: var(--text, black); } html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; /* Prevent scrollbars */ } body { display: flex; justify-content: center; align-items: center; background: transparent; } div { max-width: min(100vw, 100vh * var(--svg-aspect-ratio)); max-height: min(100vh, 100vw / var(--svg-aspect-ratio)); display: flex; justify-content: center; align-items: center; } svg { width: 100%; height: 100%; object-fit: contain; overflow: hidden; } /* Floating button styles */ #floatingButton { position: fixed; bottom: 20px; right: 20px; background-color: #007bff; color: white; border: none; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; display: none; /* Initially hidden */ } /* Popup menu styles */ #popupMenu { position: fixed; bottom: 70px; right: 20px; background-color: var(--popup-bg, white); border: 1px solid var(--popup-border, #ccc); border-radius: 5px; padding: 10px; display: none; /* Initially hidden */ max-height: calc(100vh - 90px); /* Adjust based on window height */ overflow-y: auto; /* Add scroll if content overflows */ } #popupMenu button { display: block; margin: 5px 0; padding: 5px 10px; background-color: var(--button-bg, #f8f9fa); border: 1px solid var(--button-border, #ccc); border-radius: 3px; cursor: pointer; color: var(--button-text, black); } #popupMenu button:hover { background-color: var(--button-hover-bg, #e2e6ea); } /* Dark theme styles */ @media (prefers-color-scheme: dark) { :root { --text: white; --popup-bg: #333; --popup-border: #555; --button-bg: #444; --button-border: #666; --button-text: #fff; --button-hover-bg: #555; } }