/* Google Play Modern Clean Stylesheet - Highly Optimized & Responsive */
:root {
  --primary-green: #01875f;
  --primary-green-hover: #017250;
  --text-primary: #1f1f1f;
  --text-secondary: #5f6368;
  --text-muted: #80868b;
  --bg-color: #ffffff;
  --border-light: #dadce0;
  --bg-card: #f8fafd;
  --star-gold: #01875f;
  --font-family: 'Google Sans', Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 1. Header */
.gp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  height: 56px;
  border-bottom: 1px solid #f1f3f4;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.gp-header-inner {
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

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

.gp-logo svg {
  width: 32px;
  height: 32px;
}

.gp-logo span {
  font-family: 'Google Sans', Roboto, sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #5f6368;
  letter-spacing: -0.2px;
}

/* Main Container */
.gp-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* 2. Hero Section */
.hero-section {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
  align-items: flex-start;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}

.hero-meta {
  flex: 1;
}

.app-title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.app-dev {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary-green);
  margin-bottom: 2px;
}

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

/* 3. Metrics Row */
.metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
  padding: 12px 0 16px;
  margin-bottom: 20px;
}

.metric-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.metric-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-light);
}

.metric-top {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.metric-top svg {
  width: 13px;
  height: 13px;
  fill: var(--text-primary);
}

.pegi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #000;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.metric-bottom {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* 4. Install Button */
.install-btn-container {
  margin-bottom: 24px;
}

.install-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  background-color: var(--primary-green);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  user-select: none;
  text-decoration: none;
}

.install-btn:hover {
  background-color: var(--primary-green-hover);
}

.install-btn:active {
  transform: scale(0.99);
}

/* 5. Screenshot Carousel */
.carousel-wrapper {
  position: relative;
  margin: 0 -16px 32px;
  padding: 0 16px;
}

.carousel-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.carousel-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex-shrink: 0;
  height: 204px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  background: #f1f3f4;
}

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

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.carousel-nav-btn.next {
  right: 6px;
}

.carousel-nav-btn.prev {
  left: 6px;
}

/* 6. Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  cursor: pointer;
}

.section-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.section-arrow {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

/* 7. Features Highlights Box */
.custom-features-box {
  margin-bottom: 18px;
  padding: 16px 18px;
  background: var(--bg-card);
  border-left: 4px solid var(--primary-green);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--text-primary);
}

.app-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.app-description p {
  margin-bottom: 12px;
}

.expand-text-btn {
  background: none;
  border: none;
  color: var(--primary-green);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin-bottom: 16px;
}

.meta-tags-row {
  margin-bottom: 28px;
}

.meta-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.meta-date strong {
  color: var(--text-primary);
  font-weight: 500;
}

.pill-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
}

/* 8. Play Fest Event Banner */
.event-card {
  border-radius: 16px;
  background: #fff8e6;
  border: 1px solid #fce8b2;
  overflow: hidden;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
}

.event-content {
  padding: 16px;
}

.event-badge {
  display: inline-block;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.event-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.event-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.event-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

/* 9. Data Safety */
.safety-intro {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.safety-card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 32px;
}

.safety-item {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.safety-item:last-child {
  margin-bottom: 12px;
}

.safety-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.safety-text-main {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

.safety-text-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.safety-details-link {
  display: inline-block;
  color: var(--primary-green);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  margin-top: 6px;
}

/* 10. Ratings & Reviews */
.reviews-verified {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.device-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.device-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-secondary);
}

.device-chip.active {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: transparent;
}

.rating-overview {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.big-rating-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.big-score {
  font-size: 54px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.stars-row {
  display: flex;
  gap: 3px;
  margin: 6px 0 4px;
}

.stars-row svg {
  width: 14px;
  height: 14px;
  fill: var(--primary-green);
}

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

.histogram-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.hist-num {
  font-size: 12px;
  color: var(--text-secondary);
  width: 10px;
  text-align: right;
}

.hist-track {
  flex: 1;
  height: 8px;
  background: #e8eaed;
  border-radius: 4px;
  overflow: hidden;
}

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

/* Review Cards */
.review-card {
  padding: 16px 0;
  border-bottom: 1px solid #f1f3f4;
}

.review-card:last-of-type {
  border-bottom: none;
}

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

.author-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.author-menu-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

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

.review-stars-row .stars {
  display: flex;
  gap: 2px;
}

.review-stars-row .stars svg {
  width: 12px;
  height: 12px;
  fill: var(--primary-green);
}

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

.review-body {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.review-helpful-count {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.helpful-feedback-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.helpful-question {
  font-size: 12px;
  color: var(--text-secondary);
}

.helpful-btn {
  border: 1px solid var(--border-light);
  background: transparent;
  border-radius: 9999px;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.helpful-btn:hover {
  background: #f8f9fa;
}

.helpful-btn.selected {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #1a73e8;
}

.see-all-reviews-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 0;
  color: var(--primary-green);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  margin-top: 10px;
}

/* 11. App Support Accordion */
.support-section {
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
  margin-top: 18px;
}

.support-accordion-content {
  display: none;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.support-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.support-item a {
  color: var(--primary-green);
  text-decoration: none;
}

.flag-inappropriate {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-top: 24px;
  text-decoration: none;
}

/* Desktop Enhancements */
@media (min-width: 768px) {
  .gp-container {
    padding-top: 32px;
  }
  .app-icon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
  }
  .app-title {
    font-size: 28px;
  }
  .install-btn {
    width: 220px;
  }
  .screenshot-item {
    height: 296px;
  }
  .carousel-nav-btn {
    display: flex;
  }
  .event-card {
    flex-direction: row;
    align-items: center;
  }
  .event-content {
    flex: 1;
    padding: 24px;
  }
  .event-img {
    width: 320px;
    height: 180px;
  }
}
