*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: #fff;
    display: flex;
    justify-content: center;
  }
  .page {
    width: 514px;
    min-height: 100vh;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    position: relative;
    padding-bottom: 20px;
  }
 
  /* Top bar */
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 10px;
  }
  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .logo-icon {
    width: 200px;
    height: 50px;
    position: relative;
  }
  .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center; /* anchors the image to the left instead of centering it */
}
  .logo-text {
    font-size: 20px;
    color: #5f6368;
    font-weight: 400;
  }
  .top-actions {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  .top-actions .icon-btn {
    width: 22px;
    height: 22px;
    color: #5f6368;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .top-actions .icon-btn img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
  .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ddd;
  }
 
 
 
  /* App header */
  .app-header {
    display: flex;
    gap: 22px;
    padding: 28px 20px 0;
  }
  .app-icon {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    background: #070e24;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .app-icon img { width: 90%; height: 100%; object-fit: contain; }
  .app-info h1 {
    font-size: 22px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 4px;
  }
  .app-info .dev {
    color: #01875f;
    font-size: 14px;
    margin-bottom: 4px;
  }
  .app-info .meta {
    color: #5f6368;
    font-size: 13px;
  }
 
  /* Stats row */
  .stats {
    display: flex;
    padding: 22px 20px 0;
    gap: 20px;
  }
  .stat {
    flex: 1;
    text-align: center;
    padding: 0 10px;
    border-right: 1px solid #eee;
  }
  .stat:last-child { border-right: none; }
  .stat .top-val {
    font-size: 14px;
    color: #202124;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .stat .star { color: #202124; }
  .stat .sub {
    font-size: 12px;
    color: #5f6368;
    margin-top: 4px;
  }
  .rating-icon {
    width: 20px;
    height: 20px;
    border: 1.5px solid #5f6368;
    border-radius: 4px;
    font-size: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
  }
 
  /* Install button */
  .install-wrap { padding: 22px 20px 0; }
  .install-btn {
    width: 100%;
    background: #01875f;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }
  .install-btn:hover { background: #0f6b2c; }
 
  .sub-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 16px 20px 0;
  }
  .sub-actions button {
    background: none;
    border: none;
    color: #01875f;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }
  .sub-actions button img {
  width: 20px;
  height: 20px;
  filter: brightness(0) saturate(100%) invert(37%) sepia(78%) saturate(1000%) hue-rotate(120deg);
}
 
  /* Screenshots */
  .screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  padding: 34px 20px 0;
  position: relative;
}
  .shot {
  width: 100%;       /* was a fixed 108px, now fills its grid column */
  height: auto;      /* height adjusts based on content */
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  padding: 0px;
  /* flex-shrink: 0; <-- remove this, it was for the old flex layout */
}
  .shot1 { background: transparent; }
  .shot1 .badge {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 1;
    height: 100%;
  
  }
  
  .shot2 { background: transparent; }
  .shot2 .badge { display: flex;
    align-items: center;
    gap: 4px;
    opacity: 1;
    height: 100%;
   }
  
  .shot3 { background: transparent; }
  .shot3 .badge { display: flex;
    align-items: center;
    gap: 4px;
    opacity: 1;
    height: 100%;
   }
  .badge img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    margin: 0;
  }
 
  .app-info {
  padding: 20px 20px;
  border-bottom: 1px solid #eee;
}
  .info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0;
}
  .info-icon {
  width: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
}

.info-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}
.info-text {
  font-size: 12px;
  color: #444;
  line-height: 2;
}

.info-link {
  color: #1a73e8;
  text-decoration: none;
}
  
 
  /* About */
  .about {
    padding: 40px 20px 0;
  }
  .about-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
  }
  .about-header h2 {
    font-size: 17px;
    font-weight: 600;
    color: #202124;
  }
  .about p {
    font-size: 14px;
    line-height: 1.6;
    color: #75787d;
  }
  .about p .more { color: #444; }

  /* Tags row */
.tags-row {
  display: flex;
  gap: 8px;
  padding: 20px 20px 0;
  flex-wrap: wrap;
}
.tag {
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #444;
}

/* Section header shared */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.section-header h2 {
  font-size: 17px;
  font-weight: 500;
  color: #202124;
}
.arrow { color: #444; font-size: 16px; }

/* Data safety */
.data-safety { padding: 30px 20px 0; }
.ds-desc {
  font-size: 13px;
  color: #5f6368;
  line-height: 1.6;
  margin-bottom: 18px;
}
.ds-card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 18px;
}
.ds-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #333;
}
.ds-item img{
  height: 15px;
  width: 15px;
  object-fit: contain;
}
.ds-icon { width: 18px; text-align: center; flex-shrink: 0; }
.ds-sub { color: #888; font-size: 12px; margin-top: 2px; }
.ds-details-link {
  color: #01875f;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
}

/* Ratings */
.ratings-section { padding: 34px 20px 0; }
.ratings-verified {
  font-size: 12px;
  color: #5f6368;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.device-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.pill {
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pill.active {
  border-color: #01875f;
  color: #01875f;
  background: #e6f4ee;
}
.pill.active img {
  filter: brightness(0) saturate(100%) invert(37%) sepia(90%) saturate(1352%) hue-rotate(122deg) brightness(94%) contrast(101%);
}
.pill img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.rating-summary {
  display: flex;
  align-items: center;
  gap: 20px;
}
.rating-score {
  font-size: 48px;
  font-weight: 400;
  color: #202124;
  flex-shrink: 0;
}
.rating-bars { flex: 1; }
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: #5f6368;
}
.bar {
  flex: 1;
  height: 6px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}
.fill {
  height: 100%;
  background: #01875f;
  border-radius: 4px;
}

/* Bottom nav */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid #eee;
  padding: 10px 0;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 514px;
  background: #fff;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  color: #5f6368;
  font-weight: 600;
  gap: 4px;
}
.nav-item.active { color: #01875f; }
.nav-icon { font-size: 18px; }
.nav-icon img {
  width: 23px;
  height: 23px;
  object-fit: contain;
  display: block;
}
.nav-item.active .apps-icon {
  filter: brightness(0) saturate(100%) invert(37%) sepia(90%) saturate(1352%) hue-rotate(122deg) brightness(94%) contrast(101%);
}
/* ================= Mobile Responsive Overrides ================= */
@media (max-width: 560px) {
  .page {
    width: 100%;
    border-left: none;
    border-right: none;
  }

  .bottom-nav {
    width: 100%;
    left: 0;
    transform: none;
  }

  .topbar {
    padding: 14px 16px 8px;
  }

  .logo-icon {
    width: 140px;
    height: 40px;
  }

  .top-actions {
    gap: 10px;
  }

  .app-header {
    padding: 22px 16px 0;
    gap: 16px;
  }

  .app-icon {
    width: 72px;
    height: 72px;
  }

  .app-info h1 {
    font-size: 18px;
  }

  .stats {
    padding: 18px 16px 0;
    gap: 10px;
  }

  .install-wrap {
    padding: 18px 16px 0;
  }

  .sub-actions {
    padding: 14px 16px 0;
    gap: 24px;
  }

  .screenshots {
    padding: 24px 16px 0;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }

  .app-info {
    padding: 16px;
  }

  .about {
    padding: 28px 16px 0;
  }

  .tags-row {
    padding: 16px 16px 0;
  }

  .data-safety {
    padding: 24px 16px 0;
  }

  .ds-card {
    padding: 14px;
  }

  .ratings-section {
    padding: 26px 16px 0;
  }

  .rating-score {
    font-size: 36px;
  }
}

@media (max-width: 360px) {
  .app-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .device-pills {
    flex-wrap: wrap;
  }

  .tags-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  #loading-overlay.visible {
    display: flex;
    opacity: 1;
  }

  .brand-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #111;
  }
  .brand-logo img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
  background: #010c34;
  padding: 0 10px;
  border-radius: 20%;
}

  .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top: 3px solid #111;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }
