* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background-color: #eeeeee;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

.container {
  max-width: 640px;
  min-width: 320px;
  margin: 0 auto;
  overflow: hidden;
  background-color: #fff;
}

.section img,
.section-clickable img {
  display: block;
  width: 100%;
  height: auto;
}

.section-clickable {
  cursor: pointer;
  position: relative;
}

.section-install {
  position: relative;
}

.rapid-install-btn {
  position: absolute;
  top: 0;
  left: 4%;
  width: 92%;
  height: 48%;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

/* Screenshot gallery - based on 720px design spec */
.screenshots {
  --design-base: 720;
  --shot-gap: 8px;
  --shot-visible: 3.5;
  --shot-side-padding: calc(44 / var(--design-base) * min(100vw, 640px));
  --viewport-inner: calc(min(100vw, 640px) - 2 * var(--shot-side-padding));
  --shot-width: calc((var(--viewport-inner) - var(--shot-gap) * 3) / var(--shot-visible));
  padding: 0 var(--shot-side-padding) 16px var(--shot-side-padding);
  background: #fff;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.screenshots-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.screenshots-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--shot-gap);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  width: 100%;
  max-width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.screenshots-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-slide {
  flex: 0 0 var(--shot-width);
  width: var(--shot-width);
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 8px;
  pointer-events: auto;
  cursor: pointer;
}

.screenshot-item {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Download modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 85%;
  max-width: 360px;
}

.modal-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.modal-install-btn {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  height: 18%;
  cursor: pointer;
  background: transparent;
  border: none;
}

/* Image lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 48px 12px 24px;
}

.lightbox img {
  width: 700px;
  max-width: 96vw;
  max-height: 92vh;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox.active img {
  animation: lightboxZoomIn 0.28s ease forwards;
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.55);
    opacity: 0.4;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
}
