/* Réplica visual da tela de detalhes do app na Play Store (celular, pt-BR). */

:root {
  --ps-text: #202124;
  --ps-sub: #5f6368;
  --ps-sub-light: #80868b;
  --ps-green: #01875f;
  --ps-border: #dadce0;
  --ps-track: #e8eaed;
  --ps-star-off: #dadce0;
  --ps-chip-sel-bg: #d3e3fd;
  --ps-chip-sel-text: #041e49;
  --ps-font: 'Google Sans', 'Product Sans', Roboto, Arial, sans-serif;
  --ps-body-font: Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
}

body {
  font-family: var(--ps-body-font);
  color: var(--ps-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ps-root {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  overflow-x: clip;
}

button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

img { display: block; }

/* ---------- barra de status (opcional) ---------- */
.ps-statusbar {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 28px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .2px;
}

.ps-statusbar-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---------- barra superior ---------- */
.ps-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 4px;
  transition: box-shadow .15s ease;
}

.has-statusbar .ps-topbar { top: 28px; }

.ps-topbar.is-scrolled {
  box-shadow: 0 1px 2px rgba(60, 64, 67, .15), 0 1px 3px 1px rgba(60, 64, 67, .08);
}

.ps-iconbtn {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ps-text);
  position: relative;
  overflow: hidden;
}

.ps-iconbtn.small { width: 40px; height: 40px; }

.ps-play-logo {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  color: var(--ps-text);
  text-decoration: none;
}

.ps-play-logo svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.ps-play-logo span {
  font-family: var(--ps-font);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.3px;
  white-space: nowrap;
}

.ps-topbar.show-mini .ps-play-logo { display: none; }

.ps-topbar-mini {
  flex: 1;
  min-width: 0;
  display: none;
  align-items: center;
  gap: 14px;
  padding-left: 8px;
}

.ps-topbar.show-mini .ps-topbar-mini { display: flex; }

.ps-topbar-mini img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.ps-topbar-mini span {
  font-family: var(--ps-font);
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-topbar-actions {
  margin-left: auto;
  display: flex;
  flex: 0 0 auto;
}

/* ---------- cabeçalho do app ---------- */
.ps-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px 12px;
}

.ps-appicon {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .05);
  object-fit: cover;
}

.ps-headinfo { min-width: 0; }

.ps-headinfo h1 {
  margin: 0;
  font-family: var(--ps-font);
  font-size: 24px;
  font-weight: 500;
  line-height: 30px;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.ps-dev {
  margin-top: 5px;
  font-family: var(--ps-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ps-green);
}

.ps-adsline {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ps-sub);
}

/* ---------- faixa de métricas ---------- */
.ps-stats {
  display: flex;
  align-items: center;
  padding: 18px 12px 14px;
}

.ps-stat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
}

.ps-stat-value {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-family: var(--ps-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ps-text);
  white-space: nowrap;
}

.ps-stat-label {
  font-size: 12px;
  color: var(--ps-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ps-vdivider {
  width: 1px;
  height: 20px;
  flex: 0 0 auto;
  background: var(--ps-track);
}

.ps-classind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 3px;
  border-radius: 4px;
  color: #fff;
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- botão instalar + ações ---------- */
.ps-install-wrap { padding: 14px 24px 4px; }

.ps-install-area {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.ps-install {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border-radius: 100px;
  background: var(--ps-green);
  color: #fff;
  font-family: var(--ps-font);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: width .26s cubic-bezier(.4, 0, .2, 1), background-color .2s ease;
}

.ps-install-label {
  white-space: nowrap;
  transition: opacity .12s ease;
}

.ps-install.collapsing { width: 44px; }
.ps-install.collapsing .ps-install-label { opacity: 0; }

.ps-install.progress {
  width: 44px;
  background: transparent;
  overflow: visible;
}

/* progresso circular */
.ps-progress {
  width: 44px;
  height: 44px;
  display: block;
}

.ps-progress .track {
  fill: none;
  stroke: rgba(1, 135, 95, .22);
  stroke-width: 3.5;
}

.ps-progress .bar {
  fill: none;
  stroke: var(--ps-green);
  stroke-width: 3.5;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}

.ps-progress.indeterminate { animation: ps-spin 1s linear infinite; }
.ps-progress.indeterminate .bar { transform: none; }

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

.ps-stop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--ps-green);
  transform: translate(-50%, -50%);
}

/* estado final: aviso que orienta o usuário ao popup de download do próprio celular */
.ps-dlnotice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8faf9;
  border: 1px solid #e0e3e1;
  text-align: left;
  animation: ps-fadein .25s ease;
}

.ps-dlnotice-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(1, 135, 95, .12);
  color: var(--ps-green);
}

.ps-dlnotice-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.ps-dlnotice-body {
  flex: 1;
  min-width: 0;
}

.ps-dlnotice-title {
  font-family: var(--ps-font);
  font-size: 14px;
  font-weight: 500;
  color: var(--ps-text);
}

.ps-dlnotice-text {
  font-family: var(--ps-font);
  font-size: 13px;
  line-height: 1.4;
  color: #5f6368;
  margin-top: 2px;
}

.ps-dlnotice-text b {
  font-weight: 600;
  color: var(--ps-text);
}

.ps-dlnotice-retry {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 100px;
  font-family: var(--ps-font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ps-green);
  position: relative;
  overflow: hidden;
}

@keyframes ps-fadein {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: none; }
}

.ps-actions {
  display: flex;
  justify-content: space-evenly;
  padding: 8px 16px 0;
}

.ps-action {
  flex: 0 1 auto;
  min-width: 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ps-green);
  font-family: var(--ps-font);
  font-size: 13px;
  font-weight: 500;
  border-radius: 23px;
  position: relative;
  overflow: hidden;
  padding: 0 10px;
}

.ps-action svg { flex: 0 0 auto; }

.ps-action span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- capturas de tela ---------- */
.ps-shots { padding-top: 10px; }

.ps-shots-scroll {
  display: flex;
  gap: 12px;
  padding: 4px 24px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ps-shots-scroll::-webkit-scrollbar { display: none; }

.ps-shot {
  height: 204px;
  width: auto;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .05);
}

/* ---------- seções ---------- */
.ps-section {
  padding: 0 24px;
  margin-top: 24px;
}

.ps-section-head {
  display: flex;
  align-items: center;
  margin-right: -12px;
}

.ps-section-head h2 {
  flex: 1;
  margin: 0;
  font-family: var(--ps-font);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-section-head .ps-infoicon { color: var(--ps-sub); display: inline-flex; }

.ps-body {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ps-sub);
}

.ps-desc {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ps-sub);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ps-updated { margin-top: 20px; }

.ps-updated-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ps-text);
  font-family: var(--ps-font);
}

.ps-updated-date {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ps-sub);
}

.ps-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.ps-chip {
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--ps-sub);
}

/* ---------- segurança dos dados ---------- */
.ps-safety-card {
  border: 1px solid var(--ps-border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
}

.ps-safety-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.ps-safety-row svg {
  flex: 0 0 auto;
  color: var(--ps-sub);
  margin-top: 1px;
}

.ps-safety-main {
  font-size: 13px;
  line-height: 18px;
  color: var(--ps-sub);
}

.ps-safety-sub {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ps-sub-light);
}

.ps-link {
  display: inline-block;
  color: var(--ps-green);
  font-family: var(--ps-font);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- avaliações ---------- */
.ps-devices {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.ps-devices::-webkit-scrollbar { display: none; }

.ps-devchip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--ps-border);
  font-size: 13px;
  color: var(--ps-text);
  white-space: nowrap;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}

.ps-devchip.selected {
  background: var(--ps-chip-sel-bg);
  border-color: transparent;
  color: var(--ps-chip-sel-text);
}

.ps-ratingsum {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 18px;
}

.ps-ratingbig { flex: 0 0 auto; }

.ps-bignum {
  font-family: var(--ps-font);
  font-size: 54px;
  font-weight: 400;
  line-height: 62px;
  color: var(--ps-text);
}

.ps-ratingbig .ps-stars { margin-top: 2px; }

.ps-total {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ps-sub);
  white-space: nowrap;
}

.ps-hist {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-hist-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps-hist-num {
  width: 8px;
  font-size: 12px;
  color: var(--ps-text);
  flex: 0 0 auto;
}

.ps-hist-track {
  flex: 1;
  height: 10px;
  border-radius: 10px;
  background: var(--ps-track);
  overflow: hidden;
}

.ps-hist-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--ps-green);
}

/* estrelas (preenchimento fracionário em duas camadas) */
.ps-stars {
  position: relative;
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
}

.ps-stars svg { display: inline-block; }

.ps-stars-bg {
  display: block;
  white-space: nowrap;
  color: var(--ps-star-off);
}

.ps-stars-fg {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  color: var(--ps-green);
}

/* resenhas individuais */
.ps-review { margin-top: 26px; }

.ps-review-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ps-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--ps-font);
}

.ps-review-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--ps-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-review-top .ps-iconbtn { margin-right: -10px; color: var(--ps-sub); }

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

.ps-review-date {
  font-size: 12px;
  color: var(--ps-sub);
}

.ps-review-text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ps-sub);
}

.ps-helpful-count {
  margin-top: 12px;
  font-size: 12px;
  color: var(--ps-sub);
}

.ps-helpful-q {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ps-sub);
}

.ps-helpful-btns {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.ps-helpful-btns button {
  border: 1px solid var(--ps-border);
  border-radius: 16px;
  padding: 5px 20px;
  font-size: 12px;
  color: var(--ps-sub);
  position: relative;
  overflow: hidden;
}

.ps-seeall {
  display: block;
  margin-top: 26px;
  color: var(--ps-green);
  font-family: var(--ps-font);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

/* ---------- rodapé ---------- */
.ps-flag {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 16px 24px;
  margin-top: 20px;
  color: var(--ps-sub);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.ps-bottom-space { height: 40px; }

/* ---------- ripple ---------- */
.ps-ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: .12;
  transform: scale(0);
  animation: ps-ripple .45s ease-out forwards;
  pointer-events: none;
}

@keyframes ps-ripple {
  to { transform: scale(2.5); opacity: 0; }
}
