/* v39 — Uptodown Style
   Palette: Primary #009688 | Surface #f5f5f5 | Text #424242
   Font: Inter 400/600
*/

:root {
  --primary: #009688;
  --primary-dark: #00796b;
  --accent: #26a69a;
  --surface: #f5f5f5;
  --bg: #ffffff;
  --text: #424242;
  --muted: #757575;
  --border: #e0e0e0;
  --check: #43a047;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ── Shell ── */
.app-shell {
  width: min(100%, 480px);
  padding-bottom: 32px;
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary);
  padding: 0 16px;
  height: 52px;
  color: #fff;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}

.icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── App Info ── */
.app-info-section {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 16px 16px;
}

.app-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-details {
  flex: 1;
  min-width: 0;
}

.app-name {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}

.app-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.stars {
  color: #f9a825;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.rating-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.app-developer {
  margin: 0;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

/* ── Download Section ── */
.download-section {
  padding: 0 16px 20px;
}

.download-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 15px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s;
}

.download-btn:active {
  opacity: 0.9;
}

/* Shimmer animation on download button */
.download-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 2.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% center; left: -60%; }
  100% { background-position: 200% center; left: 110%; }
}

.download-counter {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.counter-icon {
  color: var(--primary);
  font-weight: 700;
}

/* ── Info Grid ── */
.info-grid-section {
  padding: 0 16px 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.info-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.info-cell:last-child {
  border-right: none;
}

.info-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}

.info-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

/* ── Trust / Virus Scan ── */
.trust-section {
  margin: 0 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.trust-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.shield-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-text strong {
  font-size: 0.95rem;
  color: var(--text);
}

.trust-text span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Virus scan list */
.scan-list {
  list-style: none;
  margin: 0;
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.scan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  opacity: 0;
  animation: fadeIn 0.4s ease forwards;
}

.scan-item:last-child {
  border-bottom: none;
}

.scan-item:nth-child(1) { animation-delay: 0s; }
.scan-item:nth-child(2) { animation-delay: 0.2s; }
.scan-item:nth-child(3) { animation-delay: 0.4s; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.check-icon {
  width: 22px;
  height: 22px;
  background: var(--check);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Screenshots ── */
.screenshot-section {
  padding: 0 16px 20px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.screenshot-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 150px;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screenshot-track::-webkit-scrollbar {
  display: none;
}

.screenshot-card {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  background: var(--surface);
}

/* ── Description ── */
.description-section {
  padding: 20px 16px;
  border-top: 1px solid var(--border);
}

.description-text {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.last-updated {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Reviews ── */
.reviews-section {
  padding: 20px 16px;
  border-top: 1px solid var(--border);
}

.review-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.reviewer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e67e22;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.reviewer-info {
  flex: 1;
}

.reviewer-info strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text);
}

.review-stars {
  color: #f9a825;
  font-size: 0.8rem;
}

.review-date {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.review-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Footer ── */
.app-footer {
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-copy {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .download-btn::after,
  .scan-item {
    animation: none;
  }
  .scan-item {
    opacity: 1;
  }
}
