/* Google Play Store Authentic Style System */
:root {
  --play-green: #01875f;
  --play-green-hover: #006f4e;
  --play-green-light: #e6f4ea;
  --play-green-ripple: rgba(1, 135, 95, 0.12);
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-tertiary: #80868b;
  --border-color: #dadce0;
  --border-light: #e8eaed;
  --bg-color: #ffffff;
  --bg-card: #f8f9fa;
  --star-gold: #e37400;
  --star-fill: #01875f;
  --chip-bg: #f1f3f4;
  --chip-active-bg: #e6f4ea;
  --chip-active-text: #01875f;
  --font-family: "Google Sans", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.1);
  --shadow-md: 0 2px 6px rgba(60, 64, 67, 0.15), 0 1px 2px rgba(60, 64, 67, 0.1);
  --shadow-float: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Container for Mobile view (max-width 560px for realistic Play Store phone experience on desktop) */
.page-container {
  max-width: 580px;
  margin: 0 auto;
  background-color: var(--bg-color);
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow-x: hidden;
  padding-bottom: 90px;
}

/* ==========================================
   TOP HEADER
   ========================================== */
.play-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-light);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.play-logo-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-logo-svg {
  width: 32px;
  height: 32px;
  display: block;
}

.play-logo-text {
  font-size: 19px;
  font-weight: 500;
  color: #5f6368;
  letter-spacing: -0.2px;
}

.play-logo-text span {
  font-weight: 600;
  color: #202124;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.icon-btn:hover {
  background-color: var(--chip-bg);
  color: var(--text-primary);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6d00, #ffab00);
  color: white;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* ==========================================
   APP HERO SECTION
   ========================================== */
.app-hero {
  padding: 20px 20px 12px 20px;
}

.hero-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.app-icon-wrapper {
  position: relative;
  flex-shrink: 0;
}

.app-icon-img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: block;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

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

.app-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 3px;
  word-break: break-word;
}

.app-developer {
  font-size: 14px;
  font-weight: 500;
  color: var(--play-green);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 4px;
  transition: var(--transition);
}

.app-developer:hover {
  text-decoration: underline;
}

.app-monetization {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================
   APP STATS ROW (Rating, Downloads, Age)
   ========================================== */
.app-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px 0;
  margin: 8px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  position: relative;
}

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

.stat-top {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.star-icon-small {
  color: var(--text-primary);
  font-size: 12px;
}

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

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 0 4px;
  border-radius: 2px;
  height: 18px;
  line-height: 18px;
}

/* ==========================================
   CALL TO ACTION BUTTONS
   ========================================== */
.cta-section {
  padding: 4px 20px 16px 20px;
}

.install-btn-main {
  width: 100%;
  height: 48px;
  background-color: var(--play-green);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(1, 135, 95, 0.25);
  text-decoration: none;
}

.install-btn-main:hover {
  background-color: var(--play-green-hover);
  box-shadow: 0 2px 6px rgba(1, 135, 95, 0.35);
  transform: translateY(-1px);
}

.install-btn-main:active {
  transform: translateY(0);
}

.secondary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 14px;
}

.secondary-btn {
  background: none;
  border: none;
  color: var(--play-green);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
}

.secondary-btn:hover {
  background-color: var(--play-green-ripple);
}

.device-compatibility-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 12px;
  padding: 8px 12px;
  background-color: var(--chip-bg);
  border-radius: var(--radius-sm);
}

.device-icon {
  font-size: 14px;
}

/* ==========================================
   SCREENSHOTS CAROUSEL
   ========================================== */
.screenshots-section {
  padding: 12px 0 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.screenshots-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 20px 12px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.screenshots-scroll::-webkit-scrollbar {
  height: 4px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.screenshot-card {
  flex: 0 0 auto;
  width: 220px;
  height: 390px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}

.screenshot-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

/* Event banner card */
.event-card {
  flex: 0 0 auto;
  width: 320px;
  height: 390px;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.event-banner-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.event-card-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.event-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #c5221f;
  background: #fce8e6;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 6px;
}

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

.event-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.event-btn {
  background: var(--play-green);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  align-self: flex-start;
}

/* ==========================================
   CONTENT SECTIONS (About, Data Safety, etc.)
   ========================================== */
.section-wrapper {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
}

.section-header-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
  cursor: pointer;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chevron-icon {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.about-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.app-pill {
  background-color: var(--chip-bg);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
}

/* ==========================================
   DATA SAFETY SECTION
   ========================================== */
.safety-box {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
}

.safety-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
}

.safety-item:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

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

.safety-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.safety-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================
   RATINGS AND REVIEWS
   ========================================== */
.rating-overview {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 16px 0;
}

.rating-big-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
}

.rating-huge-score {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.stars-row {
  color: var(--play-green);
  font-size: 14px;
  letter-spacing: 1px;
  margin: 6px 0 2px 0;
}

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

.rating-bars-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.bar-star-num {
  width: 10px;
  text-align: right;
  font-weight: 500;
}

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

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

/* Review Filter Chips */
.review-chips {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.review-chip {
  background-color: var(--chip-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.review-chip.active {
  background-color: var(--chip-active-bg);
  color: var(--chip-active-text);
  border-color: #ceead6;
}

/* User Reviews List */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.review-card {
  padding: 12px 0;
}

.review-card:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  flex: 1;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.review-stars-date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
}

.review-stars {
  color: var(--play-green);
  font-size: 11px;
}

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

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

.helpful-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

/* Interactive Star Rating Widget */
.rate-app-box {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}

.rate-app-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.rate-app-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.interactive-stars {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.star-rate-btn {
  background: none;
  border: none;
  font-size: 26px;
  color: #dadce0;
  cursor: pointer;
  transition: var(--transition);
}

.star-rate-btn:hover,
.star-rate-btn.active {
  color: var(--play-green);
  transform: scale(1.15);
}

/* ==========================================
   SIMILAR GAMES SECTION
   ========================================== */
.similar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.similar-game-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.similar-game-card:hover {
  background-color: #edf2f7;
  transform: translateY(-1px);
}

.similar-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.similar-info {
  flex: 1;
  min-width: 0;
}

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

.similar-genre {
  font-size: 11px;
  color: var(--text-secondary);
}

.similar-rating {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ==========================================
   FOOTER
   ========================================== */
.play-footer {
  padding: 24px 20px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

.footer-country {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 16px;
}

.footer-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-link {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ==========================================
   STICKY BOTTOM INSTALL BAR (Conversion Booster)
   ========================================== */
.sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: 100%;
  max-width: 580px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-light);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-bottom-bar.visible {
  transform: translateX(-50%) translateY(0);
}

.sticky-app-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sticky-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.sticky-text {
  min-width: 0;
}

.sticky-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.sticky-install-btn {
  background-color: var(--play-green);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(1, 135, 95, 0.25);
  transition: var(--transition);
}

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

/* ==========================================
   DOWNLOAD FEEDBACK OVERLAY / MODAL
   ========================================== */
.download-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: #323232;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

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

.spinner-icon {
  animation: spin 0.8s linear infinite;
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
}

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