/* Reset and Base Styles */
:root {
  --bg-color: #202124;
  --text-primary: #ffffff;
  --text-secondary: #9aa0a6;
  --accent-color: #01875f; /* Play Store Green */
  --divider-color: #5f6368;
  --popup-bg: #2d2e32;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #000; /* As requested in original HTML */
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

#app {
  max-width: 480px; /* Mobile app constrained width on desktop */
  margin: 0 auto;
  background-color: var(--bg-color);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Header */
.pwa-header {
  padding: 24px 24px 0 24px;
}

.header-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.app-logo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.app-info {
  flex: 1;
}

.app-name {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.developer-name {
  font-size: 14px;
  color: var(--accent-color);
  margin-bottom: 4px;
  font-weight: 500;
}

.verified-badge {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-verified {
  width: 14px;
  height: 14px;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 2px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background-color: var(--divider-color);
  opacity: 0.3;
}

.star {
  font-size: 12px;
}

.icon-rating {
  border: 1px solid var(--text-secondary);
  padding: 0 4px;
  border-radius: 2px;
  font-size: 10px;
  height: 16px;
  line-height: 14px;
}

/* Action Area */
.action-area {
  padding: 0 24px 24px 24px;
}

.install-btn {
  width: 100%;
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.install-btn:active {
  background-color: #016e4d;
}

/* Image Gallery */
.image-gallery {
  margin-bottom: 24px;
}

.gallery-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 24px;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}

.gallery-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.gallery-scroll img {
  height: 200px; /* Adjust based on ratio */
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* About Section */
.about-section {
  padding: 0 24px;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  cursor: pointer;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 500;
}

.arrow-icon {
  font-size: 18px;
  color: var(--text-secondary);
}

.description-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-line; /* Respect newlines in text */
  max-height: 120px;
  overflow: hidden; /* Simplified 'read more' look */
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
}

.updated-info {
  margin-top: 16px;
}

.updated-info h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.updated-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Data Safety */
.data-safety-section {
  padding: 0 24px;
  margin-bottom: 24px;
}

.safety-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.safety-item {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.safety-item .icon-shield, 
.safety-item .icon-data,
.safety-item .icon-lock,
.safety-item .icon-trash {
  width: 20px;
  text-align: center;
  color: var(--text-secondary);
}

.safety-text {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

/* Reviews */
.reviews-section {
  padding: 0 24px;
  margin-bottom: 40px;
}

.rating-overview {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.rating-big {
  text-align: center;
}

.rating-big .score {
  font-size: 48px;
  font-weight: 400;
  display: block;
  line-height: 1;
}

.rating-big .stars {
  font-size: 12px;
  color: var(--accent-color);
  margin: 4px 0;
}

.rating-big .count {
  font-size: 10px;
  color: var(--text-secondary);
}

.rating-bars {
  flex: 1;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.bar-track {
  flex: 1;
  height: 8px;
  background-color: #35363a;
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background-color: var(--accent-color);
  border-radius: 4px;
}

.review-card {
  margin-bottom: 24px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.reviewer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}

.name {
  font-size: 13px;
  font-weight: 500;
}

.more-options {
  color: var(--text-secondary);
  font-size: 18px;
}

.review-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.review-meta .stars {
  font-size: 12px;
  color: var(--accent-color);
}

.review-meta .date {
  font-size: 12px;
  color: var(--text-secondary);
}

.review-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.more-reviews {
  color: var(--accent-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* Footer Links */
.footer-links {
  padding: 24px;
  border-top: 1px solid var(--divider-color);
  text-align: center;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.link-row a {
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}

/* PWA Popup */
.pwa-install-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: transparent;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 100;
}

.popup-content {
  background-color: var(--popup-bg);
  width: 100%;
  max-width: 480px;
  padding: 16px 24px;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.5);
  pointer-events: auto;
  text-align: center;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.popup-header h3 {
  font-size: 16px;
  font-weight: 500;
}

.speed-text {
  font-size: 12px;
  color: var(--accent-color);
  margin-bottom: 16px;
}

.verify-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.popup-install-btn {
  width: 100%;
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
