@import "variables.css";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Remove blue tap highlight on mobile */
}

html {
  font-size: 14px; /* optimal base size for mobile app UI */
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  background: #cbd5e1;
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  height: 100dvh;
  width: 100%;
  margin: 0;
  overflow: hidden;
  position: fixed; /* Prevents pull-to-refresh and bounce scrolling on iOS/Android */
  top: 0;
  left: 0;
  background-image: radial-gradient(circle at 50% 0%, #cbd5e1 0%, #94a3b8 100%);
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

p {
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--primary);
}

.text-muted {
  color: var(--text-secondary);
}

.browser-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 2vh 10px;
  box-sizing: border-box;
}

.app-frame {
  width: 100%;
  max-width: var(--frame-width);
  height: 100%;
  max-height: var(--frame-height);
  background-color: var(--bg-main);
  border-radius: var(--frame-radius);
  box-shadow: var(--shadow-frame);
  overflow: hidden;
  position: relative;
  border: 4px solid #0f172a;
  display: flex;
  flex-direction: column;
}

/* Hide scrollbar for the frame */
.app-frame ::-webkit-scrollbar {
  display: none;
}
.app-frame {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--bg-main);
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.screen.active {
  display: flex;
  z-index: 10;
}

/* Utilities */
.flex-1 {
  flex: 1;
}

.text-center {
  text-align: center;
}

/* Responsive Frame adjustments */
@media (max-width: 480px), (max-height: 700px) {
  .browser-wrapper {
    padding: 0;
  }

  .app-frame {
    border: none;
    border-radius: 0;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
  }
}
