/* App storefront UI — front page only */

.asf-app {
  --asf-bg: #f5f5f5;
  --asf-card: #fff;
  --asf-text: #202124;
  --asf-muted: #5f6368;
  --asf-green: #0f766e;
  --asf-green-light: #14b8a6;
  --asf-radius: 12px;
  --asf-shadow: 0 1px 2px rgba(60, 64, 67, 0.12), 0 2px 8px rgba(60, 64, 67, 0.08);
  max-width: 520px;
  margin: 0 auto;
  padding: 64px 16px 108px;
  background: var(--asf-bg);
  color: var(--asf-text);
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  box-sizing: border-box;
}

.asf-app *,
.asf-app *::before,
.asf-app *::after {
  box-sizing: border-box;
}

.asf-container {
  min-height: 1px;
}

/* Top bar giống tham chiếu */
.asf-store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e8eaed;
}

.asf-google-header-l {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.asf-google-header-con {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

.asf-google-header-text {
  font-size: 22px;
  font-weight: 400;
  color: #5f6368;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.asf-gg-header-r {
  flex-shrink: 0;
}

.asf-img-image {
  display: block;
  max-height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.asf-hero {
  display: flex;
  gap: 16px;
  padding: 16px 0 12px;
}

.asf-hero-icon {
  flex-shrink: 0;
}

.asf-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: var(--asf-shadow);
  display: block;
}

.asf-verifyed-icon {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.asf-protect-icon {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.asf-hero-main {
  flex: 1;
  min-width: 0;
}

.asf-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.asf-title {
  font-size: 24px;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}

.asf-subtitle {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--asf-muted);
}

.asf-shield-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--asf-muted);
}

.asf-shield-row .asf-protect-icon {
  margin-top: 1px;
}

.asf-marks {
  display: flex;
  gap: 8px;
  padding: 8px 0 14px;
  overflow-x: auto;
}

.asf-mark {
  background: var(--asf-card);
  border-radius: var(--asf-radius);
  padding: 10px 12px;
  min-width: 96px;
  text-align: center;
  box-shadow: var(--asf-shadow);
}

.asf-mark-top {
  margin-bottom: 6px;
}

.asf-mark-strong {
  font-size: 15px;
  font-weight: 600;
}

.asf-mark-bottom {
  font-size: 12px;
  color: var(--asf-muted);
  line-height: 1.3;
}

.asf-mat-star {
  font-style: normal;
  color: #fbbc04;
  font-size: 14px;
}

.asf-mark-pill {
  font-size: 13px;
}

.asf-mark-top--img {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.asf-item-r-img {
  height: 28px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.asf-install-block {
  margin-bottom: 14px;
}

.asf-install-primary {
  position: relative;
  overflow: hidden;
}

.asf-install-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 62%
  );
  transform: translateX(-100%);
  animation: asf-shine 2.8s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}

/* Đếm ngược: shine chậm, không scale */
.asf-install-btn:disabled .asf-install-shine {
  animation-duration: 3.2s;
  opacity: 0.75;
}

/* Tiếp tục: shine nhanh + sáng hơn */
.asf-install-btn:not(:disabled) .asf-install-shine {
  animation: asf-shine-active 1.6s ease-in-out infinite;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
}

@keyframes asf-shine {
  0% {
    transform: translateX(-100%);
  }
  55%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes asf-shine-active {
  0% {
    transform: translateX(-120%) skewX(-12deg);
  }
  100% {
    transform: translateX(120%) skewX(-12deg);
  }
}

.asf-install-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
  padding: 0 8px;
}

.asf-rabit {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.asf-install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, var(--asf-green-light), var(--asf-green));
  box-shadow: 0 2px 10px rgba(15, 118, 110, 0.35);
  transform: scale(1);
  transform-origin: center;
  will-change: transform, box-shadow;
}

/* Tiếp tục: nhấp nhô + glow lặp lại */
.asf-install-btn:not(:disabled) {
  animation: asf-cta-pulse 1.6s ease-in-out infinite;
}

@keyframes asf-cta-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 2px 10px rgba(15, 118, 110, 0.35),
      0 0 0 0 rgba(20, 184, 166, 0.45);
  }
  50% {
    transform: scale(1.045);
    box-shadow:
      0 6px 22px rgba(15, 118, 110, 0.45),
      0 0 0 6px rgba(20, 184, 166, 0.2);
  }
}

.asf-install-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  animation: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .asf-install-btn:not(:disabled) {
    animation: none;
  }

  .asf-install-shine,
  .asf-install-btn:not(:disabled) .asf-install-shine {
    animation: none;
    opacity: 0;
  }
}

.asf-install-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--asf-muted);
  flex-wrap: wrap;
}

.asf-time-count {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--asf-green);
}

.asf-share-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.asf-share-item {
  flex: 1;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid #dadce0;
  border-radius: 10px;
  background: var(--asf-card);
  font-size: 13px;
  color: var(--asf-text);
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
}

.asf-share-item:hover {
  background: #f1f3f4;
}

.asf-share-ic {
  flex-shrink: 0;
  color: var(--asf-muted);
}

.asf-share-svg {
  display: block;
  fill: currentColor;
}

.asf-share-txt {
  min-width: 0;
}

.asf-img-scroll {
  margin-bottom: 14px;
}

.asf-img-scroll__list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.asf-img-scroll__view {
  flex-shrink: 0;
  scroll-snap-align: start;
}

.asf-img-scroll__view img {
  display: block;
  width: 260px;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--asf-shadow);
}

.asf-app-des {
  background: var(--asf-card);
  border-radius: var(--asf-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--asf-shadow);
}

.asf-des-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.asf-top-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--asf-text);
}

.asf-arrow-ic {
  font-size: 22px;
  color: var(--asf-muted);
  line-height: 1;
}

.asf-des-con {
  font-size: 14px;
  color: var(--asf-muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.asf-update-time {
  padding: 0 4px 12px;
}

.asf-update-label {
  font-size: 13px;
  color: var(--asf-muted);
  margin-bottom: 4px;
}

.asf-time {
  font-size: 14px;
  font-weight: 500;
}

.asf-app-tag {
  margin-bottom: 12px;
}

.asf-tag-item {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f0fe;
  color: #1967d2;
  font-size: 12px;
  font-weight: 500;
}

.asf-description__data-safety {
  background: var(--asf-card);
  border-radius: var(--asf-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--asf-shadow);
}

.asf-des_item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--asf-muted);
  line-height: 1.45;
}

.asf-des_item:last-of-type {
  margin-bottom: 12px;
}

.asf-des_img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.asf-see-detail,
.asf-see-all {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid #dadce0;
  border-radius: 10px;
  background: #fafafa;
  font-size: 14px;
  font-weight: 500;
  color: var(--asf-green);
  cursor: pointer;
  text-align: center;
}

.asf-see-detail:hover,
.asf-see-all:hover {
  background: #f1f3f4;
}

.asf-rate .asf-rate-top {
  margin-bottom: 8px;
}

.asf-rate-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--asf-muted);
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 10px;
}

.asf-tip-text {
  flex: 1;
}

.asf-tip-info {
  flex-shrink: 0;
  opacity: 0.7;
}

.asf-score {
  margin-bottom: 16px;
}

.asf-score-label {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.asf-platform-item {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  color: var(--asf-muted);
  cursor: pointer;
}

.asf-platform-item.is-active {
  border-color: var(--asf-green);
  color: var(--asf-green);
  font-weight: 600;
  background: #e6f7f5;
}

.asf-plat-ic {
  font-size: 16px;
  line-height: 1;
}

.asf-score-progress {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.asf-score-left {
  flex-shrink: 0;
  text-align: center;
  min-width: 72px;
}

.asf-rate-text {
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 4px;
}

.asf-star-box {
  letter-spacing: 2px;
  color: #fbbc04;
  font-size: 14px;
  margin-bottom: 4px;
}

.asf-commont-num {
  font-size: 12px;
  color: var(--asf-muted);
}

.asf-score-right {
  flex: 1;
  min-width: 0;
}

.asf-progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.asf-item-text {
  width: 12px;
  font-size: 12px;
  color: var(--asf-muted);
  text-align: right;
}

.asf-progress-box {
  flex: 1;
  height: 8px;
  background: #e8eaed;
  border-radius: 999px;
  overflow: hidden;
}

.asf-box-line {
  height: 100%;
  background: var(--asf-green);
  border-radius: 999px;
  min-width: 2px;
}

.asf-commomt-con {
  border-top: 1px solid #e8eaed;
  padding-top: 12px;
}

.asf-commont-item {
  padding: 14px 0;
  border-bottom: 1px solid #f1f3f4;
}

.asf-commont-item:last-child {
  border-bottom: none;
}

.asf-item-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.asf-user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asf-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.asf-username {
  font-weight: 600;
  font-size: 14px;
}

.asf-more {
  color: var(--asf-muted);
  font-size: 18px;
  line-height: 1;
}

.asf-commont-star {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.asf-mini-stars {
  color: #fbbc04;
  font-size: 13px;
  letter-spacing: 0;
}

.asf-commont-time {
  font-size: 12px;
  color: var(--asf-muted);
}

.asf-commont-text {
  font-size: 14px;
  color: var(--asf-text);
  line-height: 1.45;
  margin-bottom: 10px;
}

.asf-help-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.asf-help-tip {
  font-size: 13px;
  color: var(--asf-muted);
  width: 100%;
}

.asf-help-actions {
  display: flex;
  gap: 8px;
}

.asf-help-btn {
  padding: 6px 14px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  font-size: 13px;
  color: var(--asf-green);
  cursor: default;
}

.asf-see-all {
  margin-top: 8px;
}

.asf-line {
  height: 1px;
  background: #e8eaed;
  margin: 8px 0 16px;
}

.asf-footer {
  display: flex;
  gap: 24px;
  padding: 8px 4px 16px;
}

.asf-footer-section {
  flex: 1;
  min-width: 0;
}

.asf-section-item {
  font-size: 13px;
  color: var(--asf-muted);
  margin-bottom: 10px;
  line-height: 1.35;
}

.asf-section-label {
  font-weight: 600;
  color: var(--asf-text);
  margin-bottom: 12px;
}

.asf-footer-agreement {
  padding: 12px 4px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12px;
  color: var(--asf-muted);
}

.asf-footer-item {
  cursor: default;
}

.asf-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  gap: 2px;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: var(--asf-card);
  border-top: 1px solid #e8eaed;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  max-width: 520px;
  margin: 0 auto;
}

.asf-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  border: none;
  background: transparent;
  font-size: 10px;
  color: var(--asf-muted);
  cursor: pointer;
  line-height: 1.15;
  min-width: 0;
}

.asf-nav-ic {
  font-size: 18px;
  line-height: 1;
  opacity: 0.85;
}

.asf-nav button.is-active {
  color: var(--asf-green);
  font-weight: 600;
}

.asf-nav button.is-active .asf-nav-ic {
  opacity: 1;
}

.asf-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #323232;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 60;
}

.asf-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Trang chủ storefront: không header/footer theme — bỏ khoảng trống main */
body.asf-store-landing-body #main {
  padding-top: 0;
  padding-bottom: 0;
}

body.asf-store-landing-body #content.page-wrapper {
  padding-top: 0;
  margin-bottom: 0;
}
