
* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --blue: #0874c9;
  --text: #171717;
  --muted: #666;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.app-page {
  width: 420px;
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 38px 20px 28px;
  background: #fff;
}

.app-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.app-icon {
  width: 90px;
  flex: 0 0 65px;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: 0 2px 4px #0002;
}

.app-heading {
  min-width: 0;
  padding-top: 1px;
}

h1 {
  margin: 0 0 5px;
  font-size: 26px;
  line-height: 1.12;
  font-weight: 530;
  letter-spacing: -.5px;
}

.tagline {
  color: #176eb5;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 3px;
}

.verified {
  color: #666;
  font-size: 12px;
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 30px 0 23px;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #555;
  font-size: 12px;
  white-space: nowrap;
}

.stat + .stat {
  border-left: 1px solid #ddd;
}

.stat strong {
  color: #171717;
  font-size: 15px;
}

.stars {
  letter-spacing: -1px;
  font-size: 14px;
  margin-left: 1px;
}

.download-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: background .2s;
}

.download-btn:hover {
  background: #0565b1;
}

.download-btn span {
  font-size: 18px;
  line-height: 1;
}

button.download-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.gallery-section {
  margin: 25px 0 19px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  overflow: hidden;
}

.gallery-card {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
  cursor: zoom-in;
  box-shadow: 0 2px 4px #0003;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 0.56;
  object-fit: cover;
}

h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 23px;
  letter-spacing: -.2px;
}

.about {
  padding: 0 3px;
}

.sub-heading {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 8px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #666;
  font-size: 17px;
  line-height: 1.55;
}

.feature-list li {
  margin: 0 0 1px;
}

.update-date {
  font-size: 15px;
  color: #777;
  margin-bottom: 18px;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 15px 0 25px;
}

.category-tags span {
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 6px 10px;
  font-size: 15px;
  color: #555;
}

.data-safety,
.reviews-section,
.whats-new,
.similar-games {
  margin-top: 28px;
  padding-top: 5px;
}

.data-safety h2,
.reviews-section h2,
.similar-games h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 14px;
}

.data-safety h2 span,
.reviews-section h2 span,
.similar-games h2 span {
  font-size: 23px;
  color: #666;
}

.section-description {
  color: #777;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 18px;
}

.safety-card {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 13px;
}

.safety-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 13px;
}

.safety-item p {
  margin: 0;
  font-size: 15px;
  color: #777;
  line-height: 1.5;
}

.safety-icon {
  flex-shrink: 0;
  font-size: 20px;
  color: #777;
}

.details-link {
  display: inline-block;
  color: #0874c9;
  text-decoration: none;
  font-size: 15px;
  margin-top: 8px;
}

.device-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.device-tab {
  border: 1px solid #ddd;
  background: white;
  border-radius: 20px;
  padding: 7px 13px;
  font-size: 15px;
  color: #555;
  cursor: pointer;
}

.device-tab.active {
  background: #e4f4ed;
  border-color: #e4f4ed;
  color: #23765d;
}

.rating-overview {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 22px 0;
}

.rating-number {
  display: flex;
  flex-direction: column;
  min-width: 100px;
}

.rating-number strong {
  font-size: 43px;
  font-weight: 400;
}

.rating-number small {
  color: #888;
  font-size: 12px;
  margin-top: 5px;
}

.rating-stars {
  color: #0874c9;
  letter-spacing: 1px;
  font-size: 15px;
}

.rating-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rating-bars div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rating-bars span {
  width: 10px;
  font-size: 10px;
  color: #777;
}

.rating-bars i {
  flex: 1;
  height: 6px;
  border-radius: 10px;
  background: #e5e5e5;
  overflow: hidden;
}

.rating-bars b {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: #0874c9;
}

.review {
  padding: 17px 0;
  border-bottom: 1px solid #eee;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
}

.avatar {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9c8ad;
  color: #67442c;
  font-weight: bold;
}

.avatar-two {
  background: #d5e4f5;
  color: #315b86;
}

.avatar-three {
  background: #e9d8e8;
  color: #744f73;
}

.avatar-four {
  background: #c9e4dc;
  color: #346a59;
}

.review-menu {
  margin-left: auto;
  border: none;
  background: transparent;
  font-size: 19px;
  cursor: pointer;
  color: #777;
}

.review-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.review-meta small {
  color: #999;
  font-size: 15px;
}

.review > p {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
  margin: 8px 0;
}

.review > small {
  color: #999;
  font-size: 15px;
}

.helpful {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.helpful span {
  font-size: 15px;
  color: #777;
  margin-right: auto;
}

.helpful button {
  border: 1px solid #ddd;
  background: white;
  border-radius: 15px;
  padding: 4px 13px;
  font-size: 15px;
  cursor: pointer;
}

.helpful button:hover {
  background: #edf5fc;
  border-color: #0874c9;
}

.whats-new h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 13px;
}

.whats-new p,
.whats-new li {
  font-size: 15px;
  color: #777;
  line-height: 1.6;
}

.whats-new ul {
  padding-left: 16px;
}

.similar-games h2 {
  margin-bottom: 16px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 10px;
}

.game-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.game-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
}

.game-purple { background: #e4d2ff; }
.game-blue { background: #d1e5ff; }
.game-yellow { background: #ffe8a8; }
.game-green { background: #c9f0d2; }
.game-orange { background: #ffd9b8; }
.game-red { background: #ffcaca; }

.game-card strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.game-card small {
  display: block;
  color: #777;
  font-size: 15px;
  margin-top: 3px;
}

.report-link {
  margin-top: 25px;
  font-size: 15px;
  color: #777;
}

.report-link a {
  color: #777;
  text-decoration: none;
  margin-left: 5px;
}

.bottom-download {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  background: #0874c9;
  color: white;
  border-radius: 7px;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
}

.bottom-download:hover {
  background: #0565b1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #000d;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(90vw, 420px);
  max-height: 85vh;
  border-radius: 10px;
  object-fit: contain;
}

.close-lightbox {
  position: absolute;
  top: 12px;
  right: 18px;
  color: white;
  background: transparent;
  border: 0;
  font-size: 36px;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 20px);
  width: max-content;
  max-width: calc(100vw - 30px);
  padding: 10px 14px;
  background: #222;
  color: #fff;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  font-size: 12px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 420px) {
  .app-page {
    width: 365px;
    max-width: 100%;
    padding: 38px 20px 26px;
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .gallery-card {
    border-radius: 9px;
  }

  .stats {
    margin-top: 30px;
    margin-bottom: 23px;
  }

  .stat {
    font-size: 11px;
  }

  .stat strong {
    font-size: 14px;
  }

  .stars {
    font-size: 13px;
  }
}


.install-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);

  width: 420px;
  max-width: 100%;
  height: 100vh;

  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.60);
  padding: 20px;
}

.install-overlay.show {
  display: flex;
}

.install-modal {
  position: relative;
  width: 100%;
  max-width: 350px;

  background: #fff;
  border-radius: 12px;

  padding: 30px 23px 25px;
  text-align: center;

  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.20);

  animation: installAppear 0.25s ease;
}

@keyframes installAppear {
  from {
    opacity: 0;
    transform: scale(0.90);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.install-modal h2 {
  font-size: 28px;
  font-weight: 400;
  color: #666;
  margin: 0 0 19px;
}

.install-close {
  position: absolute;
  top: 5px;
  right: 10px;

  border: none;
  background: transparent;
  color: #999;

  font-size: 23px;
  cursor: pointer;
  display: none;
}

.install-status {
  display: inline-block;

  background: #d2f9c9;
  color: #008b64;

  font-size: 15px;
  font-weight: bold;

  padding: 9px 25px;
  border-radius: 30px;

  margin-bottom: 24px;
}

.install-now {
  display: block;
  width: 100%;

  border: none;
  border-radius: 30px;

  background: #008d68;
  color: #fff;

  padding: 13px 10px;

  font-size: 15px;
  cursor: pointer;

  transition: background 0.2s;
}

.install-now:hover {
  background: #007755;
}

.install-now:active {
  transform: scale(0.98);
}

.progress-circle {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 20px auto 0;
}

.progress-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-circle circle {
  fill: none;
  stroke-width: 2;
}

.progress-bg {
  stroke: transparent;
}

.progress-bar {
  stroke: #009b76;
  stroke-dasharray: 239;
  stroke-dashoffset: 239;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.08s linear;
}

.progress-circle span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #009b76;
  font-size: 16px;
  font-weight: bold;
}

#installLoading,
#installReady {
  width: 100%;
}

#installReady[hidden],
#installLoading[hidden] {
  display: none;
}
