/* ================================================================
   styles.css — MAXWINBD PWA
   Google Play Store Authentic Redesign
   Phase 1-18 strict adherence.
   ================================================================ */

:root {
  --play-green: #01875F;
  --play-green-ripple: rgba(1, 135, 95, 0.12);
  --text-primary: #202124;
  --text-secondary: #5F6368;
  --border-color: #E8EAED;
  --bg-color: #FFFFFF;
  --ripple-color: rgba(0, 0, 0, 0.08);
  
  --font-stack: 'Roboto', 'Google Sans', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  font-family: var(--font-stack);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

a {
  text-decoration: none;
}

/* Play Store Wrapper */
.play-store-wrapper {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-color);
  box-shadow: 0 0 20px rgba(0,0,0,0.05);
  padding-top: 68px; /* Match new taller web topbar height */
}

/* ─────────────────────────────────────────────────────────────────
   RIPPLE EFFECT (CSS ONLY)
   ───────────────────────────────────────────────────────────── */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #000 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}

.ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.1;
  transition: 0s;
}

.ripple-text:active {
  background-color: var(--ripple-color);
  border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────────
   TOPBAR
   ───────────────────────────────────────────────────────────── */
.play-topbar {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 600px;
  height: 68px; /* Increased to match Google Play Web */
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px; /* Increased padding */
  z-index: 100;
  transition: box-shadow 0.3s;
}

.play-topbar.is-scrolled {
  box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 
              0 1px 10px 0 rgba(0,0,0,0.12), 
              0 2px 4px -1px rgba(0,0,0,0.2);
}

.icon-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
}

.play-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.play-topbar-logo {
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 4px;
}
.play-topbar-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transform: scale(2.2); /* Even bigger Google Play logo */
  transform-origin: left center;
}

.avatar-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 8px;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #01875F;
  color: #FFF;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────────
   APP HEADER
   ───────────────────────────────────────────────────────────── */
.app-header {
  display: flex;
  padding: 8px 24px 24px;
  gap: 24px;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 20%;
  background: #01875f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.app-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#app-name {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 28px;
  margin-bottom: 2px;
  word-break: break-word;
}

.dev-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--play-green);
  text-decoration: none;
  margin-bottom: 4px;
  align-self: flex-start;
  padding: 2px 4px;
  margin-left: -4px;
}

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

/* ─────────────────────────────────────────────────────────────────
   METRICS SCRIP
   ───────────────────────────────────────────────────────────── */
.metrics-scroller {
  display: flex;
  align-items: center;
  padding: 0 24px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.metrics-scroller::-webkit-scrollbar {
  display: none;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  flex-shrink: 0;
}

.m-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 24px;
}

.m-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.m-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  margin: 0 16px;
  flex-shrink: 0;
}

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

/* ─────────────────────────────────────────────────────────────────
   INSTALL AREA & PREP CARD
   ───────────────────────────────────────────────────────────── */
.install-section {
  padding: 0 24px 16px;
}

.play-btn-primary {
  width: 100%;
  height: 40px;
  border-radius: 8px; /* Standard Google Play web button radius */
  background-color: var(--play-green);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.play-protect-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.install-state-prep[hidden] {
  display: none;
}

.prep-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.prep-progress {
  width: 48px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prep-pct {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  color: var(--play-green);
}

.prep-text {
  flex: 1;
}

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

.prep-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 2px;
}

.play-btn-outline {
  width: 100%;
  height: 40px;
  border-radius: 8px; /* Standard Google Play web button radius */
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--play-green);
  font-size: 14px;
  font-weight: 500;
}

/* Secondary Actions */
.secondary-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  padding: 0 24px;
}

.action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--play-green);
  font-weight: 500;
  padding: 12px;
  border-radius: 8px;
}

.action-btn svg {
  stroke: var(--play-green);
}

/* ─────────────────────────────────────────────────────────────────
   SCREENSHOTS
   ───────────────────────────────────────────────────────────── */
.screenshots-section {
  margin-bottom: 24px;
  position: relative; /* For absolute positioning of arrows */
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15), 0 0 1px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  border: 1px solid var(--border-color);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s;
}

.slider-arrow-left {
  left: 4px;
}
.slider-arrow-right {
  right: 4px;
}

.slider-arrow.is-disabled {
  opacity: 0 !important;
  pointer-events: none;
}

.screenshots-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 24px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; /* Ensures smooth momentum scrolling on iOS */
}

.screenshots-scroller::-webkit-scrollbar {
  display: none;
}

.screenshot-img {
  height: 250px;
  width: auto;
  border-radius: 8px;
  flex-shrink: 0;
  scroll-snap-align: start;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  object-fit: cover; /* Ensures screenshots fill cleanly */
  display: block;
}

/* ─────────────────────────────────────────────────────────────────
   GENERAL PLAY SECTIONS
   ───────────────────────────────────────────────────────────── */
.play-section {
  padding: 0 24px 24px;
}

.play-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

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

.arrow-btn {
  width: 48px;
  height: 48px;
}

/* What's New */
.whats-new-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.whats-new-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 20px;
}

/* About Text */
.about-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 20px;
  white-space: pre-line;
}
.about-text.clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

/* Tags */
.play-tags {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.play-tag {
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Data Safety */
.data-safety-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 20px;
}

.data-safety-box {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ds-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 20px;
}

.data-safety-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--play-green);
  margin-top: 8px;
  align-self: flex-start;
  padding: 4px;
  margin-left: -4px;
}

/* ─────────────────────────────────────────────────────────────────
   RATINGS & REVIEWS
   ───────────────────────────────────────────────────────────── */
.rating-overview {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

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

.rating-num {
  font-size: 48px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.1;
}

.rating-stars {
  font-size: 12px;
  color: var(--play-green);
  letter-spacing: 2px;
  margin: 4px 0;
}

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

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

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

.bar-n {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  width: 8px;
  text-align: right;
}

.bar-bg {
  flex: 1;
  height: 10px;
  background: var(--border-color);
  border-radius: 100px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--play-green);
  border-radius: 0 100px 100px 0; /* Square left, round right */
}

/* Review Cards */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.review-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.review-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 400;
}

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

.review-stars {
  font-size: 12px;
  color: var(--play-green);
  letter-spacing: 1px;
}

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

.review-device {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: -4px;
}

.review-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 20px;
}

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

.thumb-btn {
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────────
   SIMILAR APPS
   ───────────────────────────────────────────────────────────── */
.similar-apps-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.similar-apps-scroller::-webkit-scrollbar { display: none; }

.similar-card {
  width: 104px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.sim-icon {
  width: 104px;
  height: 104px;
  border-radius: 20%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 32px;
}

.sim-name {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

/* ─────────────────────────────────────────────────────────────────
   DEVELOPER CONTACT
   ───────────────────────────────────────────────────────────── */
.dev-contact-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}
.dev-contact-toggle h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.dev-contact-content {
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
}

.dev-link-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  color: var(--text-primary);
}

.dev-link-text {
  display: flex;
  flex-direction: column;
}

.dl-title {
  font-size: 14px;
  font-weight: 400;
}
.dl-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
/* -----------------------------------------------------------------
   FOOTER (PLAY STORE WEB STYLE)
   ------------------------------------------------------------- */
.play-footer {
  border-top: 1px solid var(--border-color);
  padding: 24px;
  margin-top: 24px;
  background: var(--bg-color);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
}
