/* style.css */

/* Reset margin and padding for body and html */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #1a1a1a;
  overflow: hidden;
}

/* Ensure the body uses flexbox to center content */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* The Flutter host container */
#flutter_host {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
  background-color: white;
}

/* Ensure the Flutter canvas fills the host */
#flutter_host > flt-glass-pane,
#flutter_host > canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Mobile and device inspection view */
@media (max-width: 768px),
  (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2),
  (orientation: portrait) and (min-resolution: 192dpi) {
  body {
    padding: 0;
    margin: 0;
    background-color: white;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
  }

  #flutter_host {
    width: 100vw !important;
    /* height: 100vh !important; */
    height: 100dvh !important; /* Dynamic viewport height for mobile Safari */
    max-width: 100%;
    /* max-height: 100vh; */
    max-height: 100dvh !important; /* Dynamic viewport height */
    border-radius: 0;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    background-color: white;
    /* Safe area padding for mobile browsers */
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Desktop view only - not for device inspection */
@media (min-width: 769px) and (orientation: landscape) and (hover: hover) {
  body {
    background-color: #1a1a1a;
    padding: 10px;
  }

  #flutter_host {
    width: min(400px, calc((100vh - 40px) * 9 / 16));
    height: min(calc(400px * 16 / 9), calc(100vh - 40px));
    border-radius: 47px;
    box-shadow: 0 0 0 11px #1a1a1a, 0 0 0 13px #000000,
      4px 28px 35px rgba(0, 0, 0, 0.25);
    position: relative;
  }

  /* iPhone button */
  #flutter_host::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background-color: #000000;
    border-radius: 100px;
    z-index: 1000;
  }
}
