:root {
  --primary-color: #01875f;
  --primary-hover: #017250;
  --text-dark: #202124;
  --text-muted: #5f6368;
  --text-light: #70757a;
  --bg-page: #f0f4f9;
  --bg-card: #ffffff;
  --border-color: #e0e0e0;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", 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-page);
  color: var(--text-dark);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.page-wrapper {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  min-height: 100vh;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Header */
.top-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

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

.google-play-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #3c4043;
}

.header-search svg {
  color: #5f6368;
  cursor: pointer;
}

/* App Hero */
.app-hero {
  padding: 20px 20px 12px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

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

.app-icon {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  background: #070a35;
}

.app-meta {
  flex: 1;
}

.app-meta h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: #202124;
  margin-bottom: 4px;
}

.app-developer {
  font-size: 14px;
  font-weight: 600;
  color: #01875f;
  margin-bottom: 2px;
  display: inline-block;
  text-decoration: none;
}

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

.verified-icon {
  width: 14px;
  height: 14px;
  fill: #01875f;
}

/* Stats Row */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px 10px;
  border-bottom: 1px solid #f1f3f4;
  margin: 0 16px;
  text-align: center;
}

.stat-item {
  flex: 1;
  position: relative;
}

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

.stat-val {
  font-size: 14px;
  font-weight: 700;
  color: #202124;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Download Action Section */
.download-section {
  padding: 16px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-install-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(1, 135, 95, 0.35);
  transition: transform 0.15s ease, background 0.2s ease;
  width: 100%;
}

.btn-install-primary:active {
  transform: scale(0.98);
  background-color: var(--primary-hover);
}

.btn-icon-flash {
  font-size: 18px;
}

.btn-subtext {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.95;
}

.btn-download-apk-direct {
  background: #f1f8f5;
  color: #01875f;
  border: 1.5px solid #01875f;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}

.btn-download-apk-direct:hover {
  background: #e2f4ed;
}

/* 30-Second Countdown Modal Styles */
.timer-circle-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 14px auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: #e8eaed;
  stroke-width: 8;
}

.timer-circle-bar {
  fill: none;
  stroke: #01875f;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-count-display {
  position: absolute;
  font-size: 28px;
  font-weight: 800;
  color: #202124;
}

.timer-badge-apk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f8f5;
  color: #01875f;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.timer-progress-note {
  font-size: 13px;
  color: #5f6368;
  line-height: 1.4;
  margin-bottom: 14px;
}

.btn-download-ready {
  background: #01875f;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 12px rgba(1, 135, 95, 0.4);
  animation: pulseBtn 1.5s infinite;
}

@keyframes pulseBtn {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* Screenshot Slider */
.screenshots-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
  -webkit-overflow-scrolling: touch;
}

.screenshots-carousel::-webkit-scrollbar {
  height: 5px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.screen-item {
  flex: 0 0 160px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background: #0d1117;
  aspect-ratio: 9/16;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Section styling */
.content-section {
  padding: 18px 20px;
  border-top: 1px solid #f1f3f4;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  cursor: pointer;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: #202124;
}

.arrow-icon {
  font-size: 18px;
  color: #5f6368;
}

.about-text {
  font-size: 13.5px;
  color: #3c4043;
  line-height: 1.6;
  white-space: pre-line;
}

.update-date-box {
  margin-top: 14px;
}

.update-label {
  font-size: 13px;
  font-weight: 700;
  color: #202124;
}

.update-val {
  font-size: 12px;
  color: #5f6368;
  margin-top: 2px;
}

/* Data Safety Box */
.data-safety-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.safety-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.safety-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #5f6368;
}

.safety-desc {
  font-size: 12.5px;
  color: #3c4043;
  line-height: 1.45;
}

/* Ratings & Reviews */
.rating-overview {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 20px;
}

.big-rating {
  text-align: center;
}

.big-number {
  font-size: 44px;
  font-weight: 800;
  color: #202124;
  line-height: 1;
}

.big-stars {
  color: #fbbc04;
  font-size: 14px;
  margin-top: 4px;
}

.total-ratings-count {
  font-size: 11px;
  color: #5f6368;
  margin-top: 2px;
}

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

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #5f6368;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: #e8eaed;
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #01875f;
  border-radius: 3px;
}

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

.review-item {
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f3f4;
}

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

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

.author-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #202124;
}

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

.review-stars {
  color: #fbbc04;
  font-size: 12px;
}

.review-date {
  font-size: 11px;
  color: #70757a;
}

.review-comment {
  font-size: 12.5px;
  color: #3c4043;
  line-height: 1.45;
}

/* Sticky Bottom Install Bar */
.sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 99;
}

.sticky-mini-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.sticky-name {
  font-size: 14px;
  font-weight: 700;
  color: #202124;
  line-height: 1.2;
}

.sticky-sub {
  font-size: 11px;
  color: #01875f;
}

.sticky-btn {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 380px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  text-align: center;
  animation: popIn 0.25s ease-out;
  position: relative;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #202124;
  margin-bottom: 8px;
}

.modal-body-text {
  font-size: 13.5px;
  color: #5f6368;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-steps {
  text-align: left;
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #3c4043;
}

.modal-steps li {
  margin-bottom: 6px;
}

.modal-btn {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.modal-close-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #888;
  cursor: pointer;
}

/* Event Popup Modal */
.event-modal-box {
  background: transparent;
  max-width: 320px;
  width: 100%;
  position: relative;
  text-align: center;
}

.event-art-img {
  width: 100%;
  border-radius: 16px;
  display: block;
}

.event-btn-download {
  position: absolute;
  width: 84%;
  height: 95px;
  left: 8%;
  bottom: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.event-close-btn {
  position: absolute;
  top: -38px;
  right: 0;
  color: #fff;
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Spacer for sticky bar */
.bottom-spacer {
  height: 70px;
}
