/* Google Play Store - Android Mobile & Web 1:1 Pixel-Perfect Theme */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --gp-bg: #202124;
  --gp-surface: #303134;
  --gp-surface-hover: #3c4043;
  --gp-border: #3c4043;
  --gp-border-subtle: rgba(255, 255, 255, 0.08);
  --gp-green: #01875f;
  --gp-green-hover: #01704e;
  --gp-green-light: rgba(1, 135, 95, 0.15);
  --gp-text-primary: #e8eaed;
  --gp-text-secondary: #9aa0a6;
  --gp-text-tertiary: #5f6368;
  --gp-font-heading: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gp-font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --gp-radius-sm: 8px;
  --gp-radius-md: 12px;
  --gp-radius-lg: 20px;
  --gp-radius-pill: 9999px;
  --gp-container-max: 760px;
  --gp-header-height: 56px;
}

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

body {
  background-color: var(--gp-bg);
  color: var(--gp-text-primary);
  font-family: var(--gp-font-body);
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--gp-font-heading);
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
}

/* ==========================================================================
   TOP HEADER (GOOGLE PLAY ANDROID APP STORE BAR)
   ========================================================================== */
.gp-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--gp-bg);
  border-bottom: 1px solid var(--gp-border-subtle);
}

.gp-top-bar {
  max-width: var(--gp-container-max);
  margin: 0 auto;
  height: var(--gp-header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.gp-logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.gp-brand-text {
  font-family: var(--gp-font-heading);
  font-size: 20px;
  font-weight: 500;
  color: var(--gp-text-primary);
  letter-spacing: -0.2px;
}

.gp-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gp-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gp-text-primary);
  transition: background-color 0.2s;
}

.gp-icon-btn:hover {
  background-color: var(--gp-surface-hover);
}

.gp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e3a72f;
  margin-left: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

.gp-avatar:hover {
  transform: scale(1.08);
}

.gp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   MAIN CONTENT CONTAINER
   ========================================================================== */
.gp-main-container {
  max-width: var(--gp-container-max);
  margin: 0 auto;
  padding: 16px 16px 64px;
}

/* ==========================================================================
   HERO / BANNER TRAILER
   ========================================================================== */
.gp-hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  border-radius: var(--gp-radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  background-color: #000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.gp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gp-trailer-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: var(--gp-radius-pill);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
  z-index: 5;
}

.gp-trailer-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.06);
}

/* ==========================================================================
   APP HEADER & PRIMARY DETAILS
   ========================================================================== */
.gp-app-header {
  display: flex;
  gap: 20px;
  margin-bottom: 18px;
  align-items: center;
}

.gp-app-icon-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background-color: var(--gp-surface);
}

@media (min-width: 600px) {
  .gp-app-icon-wrap {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }
}

.gp-app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gp-app-title-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gp-app-title {
  font-family: var(--gp-font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--gp-text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

@media (min-width: 600px) {
  .gp-app-title {
    font-size: 28px;
  }
}

.gp-developer-link {
  font-family: var(--gp-font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--gp-green);
  display: inline-block;
  margin-bottom: 4px;
  transition: opacity 0.2s;
}

.gp-developer-link:hover {
  text-decoration: underline;
}

.gp-app-subtitle {
  font-size: 12px;
  color: var(--gp-text-secondary);
}

/* ==========================================================================
   METRICS ROW (3-COLUMN STATS)
   ========================================================================== */
.gp-metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 0;
  margin-bottom: 20px;
}

.gp-metric-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.gp-metric-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: var(--gp-border);
}

.gp-metric-val {
  font-family: var(--gp-font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--gp-text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.gp-star-icon {
  width: 12px;
  height: 12px;
  fill: var(--gp-text-primary);
}

.gp-content-badge {
  display: inline-block;
  border: 1px solid var(--gp-text-secondary);
  border-radius: 2px;
  padding: 1px 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.gp-metric-label {
  font-size: 12px;
  color: var(--gp-text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   INSTALL BUTTON & PLAY STORE NATIVE ANIMATION
   ========================================================================== */
.gp-actions-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

/* Base Install Button */
.gp-install-container {
  width: 100%;
  position: relative;
}

.gp-primary-btn {
  width: 100%;
  background-color: var(--gp-green);
  color: #ffffff;
  height: 48px;
  border-radius: var(--gp-radius-pill);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.gp-primary-btn:hover {
  background-color: var(--gp-green-hover);
  box-shadow: 0 4px 12px rgba(1, 135, 95, 0.4);
}

.gp-primary-btn:active {
  transform: scale(0.98);
}

/* Native Animated Installing State */
.gp-primary-btn.installing {
  background-color: var(--gp-surface);
  color: var(--gp-text-primary);
  border: 1px solid var(--gp-border);
  cursor: default;
  pointer-events: none;
}

.gp-btn-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: rgba(1, 135, 95, 0.35);
  border-right: 2px solid var(--gp-green);
  transition: width 0.15s linear;
  z-index: 1;
}

.gp-btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Play Store Circular Spinner Animation */
.gp-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--gp-green);
  border-radius: 50%;
  animation: gp-spin 0.8s linear infinite;
}

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

/* Installed / Open Button State */
.gp-primary-btn.installed {
  background-color: transparent;
  border: 1px solid var(--gp-green);
  color: var(--gp-green);
}

.gp-primary-btn.installed:hover {
  background-color: var(--gp-green-light);
}

/* Sub Actions (Share & Wishlist) */
.gp-sub-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.gp-text-action-btn {
  color: var(--gp-green);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--gp-radius-pill);
  transition: background-color 0.2s;
}

.gp-text-action-btn:hover {
  background-color: var(--gp-green-light);
}

/* ==========================================================================
   SCREENSHOTS CAROUSEL
   ========================================================================== */
.gp-section-title {
  font-family: var(--gp-font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gp-text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  cursor: pointer;
}

.gp-section-title .gp-arrow-icon {
  color: var(--gp-text-secondary);
  transition: transform 0.2s;
}

.gp-section-title:hover .gp-arrow-icon {
  transform: translateX(4px);
  color: var(--gp-text-primary);
}

.gp-screenshots-container {
  position: relative;
  margin-bottom: 28px;
}

.gp-screenshots-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 14px;
  scrollbar-width: none;
}

.gp-screenshots-track::-webkit-scrollbar {
  display: none;
}

.gp-screenshot-card {
  flex: 0 0 auto;
  width: 190px;
  height: 338px;
  border-radius: var(--gp-radius-md);
  overflow: hidden;
  background-color: var(--gp-surface);
  border: 1px solid var(--gp-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gp-screenshot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.gp-screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gp-carousel-arrow {
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--gp-surface);
  border: 1px solid var(--gp-border);
  color: var(--gp-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s, transform 0.2s;
}

.gp-carousel-arrow:hover {
  background-color: var(--gp-surface-hover);
  transform: translateY(-50%) scale(1.08);
}

.gp-carousel-arrow.left {
  right: auto;
  left: -10px;
  display: none;
}

/* ==========================================================================
   ABOUT THIS APP SECTION & TAGS
   ========================================================================== */
.gp-about-section {
  margin-bottom: 28px;
}

.gp-about-content {
  color: var(--gp-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
  margin-bottom: 20px;
}

.gp-meta-details {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 20px;
  font-size: 13px;
}

.gp-meta-col-title {
  font-weight: 700;
  color: var(--gp-text-primary);
  margin-bottom: 4px;
}

.gp-meta-col-val {
  color: var(--gp-text-secondary);
}

.gp-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.gp-tag-pill {
  background-color: var(--gp-surface);
  color: var(--gp-text-primary);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--gp-radius-pill);
  border: 1px solid var(--gp-border);
  transition: background-color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.gp-tag-pill:hover {
  background-color: var(--gp-surface-hover);
  border-color: var(--gp-text-secondary);
}

/* ==========================================================================
   DATA SAFETY SECTION
   ========================================================================== */
.gp-data-safety-box {
  background-color: transparent;
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-radius-sm);
  padding: 16px;
  margin-bottom: 28px;
}

.gp-data-safety-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--gp-text-secondary);
}

.gp-data-safety-icon {
  width: 24px;
  height: 24px;
  color: var(--gp-text-secondary);
  flex-shrink: 0;
}

.gp-see-details-link {
  color: var(--gp-green);
  font-weight: 500;
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
}

/* ==========================================================================
   RATINGS AND REVIEWS
   ========================================================================== */
.gp-reviews-section {
  margin-bottom: 36px;
}

.gp-verified-sub {
  font-size: 12px;
  color: var(--gp-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: -10px;
  margin-bottom: 16px;
}

.gp-ratings-scorecard {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
}

.gp-rating-big-num-area {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gp-big-rating-num {
  font-family: var(--gp-font-heading);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--gp-text-primary);
  margin-bottom: 6px;
}

.gp-stars-group {
  display: flex;
  gap: 2px;
  color: var(--gp-green);
  margin-bottom: 4px;
}

.gp-stars-group svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.gp-total-revs-text {
  font-size: 12px;
  color: var(--gp-text-secondary);
}

.gp-rating-bars-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.gp-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gp-bar-num {
  font-size: 12px;
  color: var(--gp-text-secondary);
  width: 8px;
}

.gp-bar-track {
  flex: 1;
  height: 10px;
  background-color: var(--gp-surface);
  border-radius: 5px;
  overflow: hidden;
}

.gp-bar-fill {
  height: 100%;
  background-color: var(--gp-green);
  border-radius: 5px;
}

/* User Reviews List */
.gp-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gp-review-card {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gp-border-subtle);
}

.gp-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gp-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gp-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--gp-green);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.gp-user-name {
  font-family: var(--gp-font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--gp-text-primary);
}

.gp-review-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.gp-review-stars {
  display: flex;
  gap: 2px;
  color: var(--gp-green);
}

.gp-review-stars svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.gp-review-date {
  font-size: 12px;
  color: var(--gp-text-secondary);
}

.gp-review-body {
  font-size: 13px;
  color: var(--gp-text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.gp-review-helpful {
  font-size: 12px;
  color: var(--gp-text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.gp-helpful-btn {
  background-color: transparent;
  color: var(--gp-text-secondary);
  border: 1px solid var(--gp-border);
  padding: 4px 10px;
  border-radius: var(--gp-radius-pill);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.gp-helpful-btn:hover {
  background-color: var(--gp-surface);
  color: var(--gp-text-primary);
}

/* ==========================================================================
   SIMILAR APPS
   ========================================================================== */
.gp-similar-section {
  margin-bottom: 36px;
}

.gp-similar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 600px) {
  .gp-similar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gp-similar-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--gp-radius-md);
  background-color: transparent;
  transition: background-color 0.2s;
  cursor: pointer;
}

.gp-similar-card:hover {
  background-color: var(--gp-surface);
}

.gp-similar-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin-bottom: 8px;
  object-fit: cover;
}

.gp-similar-title {
  font-family: var(--gp-font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--gp-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-similar-dev {
  font-size: 12px;
  color: var(--gp-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-similar-rating {
  font-size: 12px;
  color: var(--gp-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.gp-flag-area {
  padding: 16px 0 24px;
  border-top: 1px solid var(--gp-border-subtle);
  border-bottom: 1px solid var(--gp-border-subtle);
  margin-bottom: 32px;
}

.gp-flag-btn {
  color: var(--gp-text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gp-flag-btn:hover {
  color: var(--gp-text-primary);
}

.gp-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 12px;
  color: var(--gp-text-secondary);
  padding-bottom: 24px;
}

@media (min-width: 600px) {
  .gp-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.gp-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.gp-legal-links a:hover {
  color: var(--gp-text-primary);
}

.gp-country-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   MODALS & TOASTS
   ========================================================================== */
.gp-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gp-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.gp-modal-dialog {
  background-color: var(--gp-surface);
  border: 1px solid var(--gp-border);
  border-radius: var(--gp-radius-md);
  width: 100%;
  max-width: 500px;
  padding: 24px;
  position: relative;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.gp-modal-backdrop.active .gp-modal-dialog {
  transform: scale(1);
}

.gp-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--gp-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.gp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #323232;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--gp-radius-pill);
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  z-index: 2000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gp-toast.show {
  transform: translateX(-50%) translateY(0);
}
