/* Reset & Base */
:root {
  --primary-color: #1a73e8;
  --primary-dark: #1557b0;
  --primary-tint: #e8f0fe;
  --surface-color: #ffffff;
  --background-color: #f5f8fc;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --border-color: #dadce0;
  --error-color: #d93025;
  --star-color: #1a73e8;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --radius-xl: 24px;
}

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

body {
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
    sans-serif;
  background:
    radial-gradient(circle at top, rgba(26, 115, 232, 0.08), transparent 28%),
    linear-gradient(180deg, #f7faff 0%, var(--background-color) 18%, #eef3fa 100%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body.guide-open {
  overflow: hidden;
}

body.theme-ios-store {
  background:
    linear-gradient(180deg, #f5f5f7 0%, #ffffff 20%, #f8f8fa 100%);
  color: #111111;
}

/* Utilities */
.hidden {
  display: none !important;
}
.visible {
  visibility: visible !important;
}
.container {
  padding: 0;
}

.main-content {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

body.theme-ios-store .main-content {
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.app-info-ios,
.storefront-ios .app-info-play,
.storefront-play .app-info-ios {
  display: none;
}

.storefront-ios .app-info-ios,
.storefront-play .app-info-play {
  display: block;
}

/* App Info Section */
.app-info {
  padding: max(20px, env(safe-area-inset-top)) var(--spacing-lg) 0;
}

body.theme-ios-store .app-info {
  padding-top: max(14px, env(safe-area-inset-top));
}

.ios-store-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.ios-app-meta {
  display: flex;
  gap: 16px;
  min-width: 0;
}

.ios-icon-wrapper {
  width: 116px;
  height: 116px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.08),
    0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

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

.ios-title-block {
  min-width: 0;
  padding-top: 4px;
}

.ios-app-title {
  font-size: 31px;
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin-bottom: 6px;
}

.ios-app-subtitle {
  color: #007aff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ios-app-meta-line {
  color: #6e6e73;
  font-size: 14px;
  line-height: 1.45;
}

.ios-cta-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-top: 6px;
}

.ios-install-btn {
  width: auto;
  min-width: 86px;
  height: 34px;
  padding: 0 20px;
  border-radius: 999px;
  box-shadow: none;
  background: #007aff;
}

.ios-inapp-note {
  font-size: 11px;
  color: #8e8e93;
  line-height: 1.35;
  text-align: right;
  max-width: 90px;
}

.ios-metadata-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 20px;
}

.ios-meta-item {
  position: relative;
  padding: 0 8px;
  text-align: center;
}

.ios-meta-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  width: 0.5px;
  background: rgba(60, 60, 67, 0.22);
}

.ios-meta-top {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: #1c1c1e;
  margin-bottom: 6px;
  white-space: nowrap;
}

.ios-meta-top span {
  color: #ff9500;
}

.ios-meta-bottom {
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.25;
}

.hero-strip {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

body.theme-ios-store .hero-strip {
  display: none;
}

.hero-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(26, 115, 232, 0.1);
  border: 1px solid rgba(26, 115, 232, 0.14);
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-badge-soft {
  background: rgba(52, 168, 83, 0.1);
  border-color: rgba(52, 168, 83, 0.16);
  color: #137333;
}

.app-header {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  align-items: flex-start;
}

body.theme-ios-store .app-header {
  gap: 16px;
  margin-bottom: 22px;
  align-items: center;
}

.icon-wrapper {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  overflow: hidden;
  position: relative;
  border-radius: 50%;
  box-shadow:
    0 18px 34px rgba(30, 60, 114, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

body.theme-ios-store .icon-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 22.5%;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.08),
    0 0 0 0.5px rgba(0, 0, 0, 0.08);
}

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

.app-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center vertically */
}

.app-details h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

body.theme-ios-store .app-details h1 {
  font-size: 33px;
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.app-developer {
  font-size: 15px;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 6px;
}

body.theme-ios-store .app-developer {
  font-size: 16px;
  color: #007aff;
  font-weight: 600;
  margin-bottom: 4px;
}

.app-monetization {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.45;
  max-width: 26ch;
}

body.theme-ios-store .app-monetization {
  font-size: 14px;
  color: #6e6e73;
  max-width: none;
}

/* App Stats Section */
.app-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 22px;
  padding: 8px 6px;
  border: 1px solid rgba(26, 115, 232, 0.08);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 26px rgba(19, 71, 140, 0.06);
}

body.theme-ios-store .app-stats {
  padding: 0;
  margin-bottom: 20px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.storefront-play .app-stats {
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  gap: 5px;
  padding: 10px 8px 10px;
}

body.theme-ios-store .stat-item {
  padding: 0 8px 0 0;
  gap: 4px;
}

.stat-item:not(:last-child)::after {
  height: 24px;
}

body.theme-ios-store .stat-item:not(:last-child)::after {
  height: 34px;
  background: linear-gradient(
    180deg,
    rgba(60, 60, 67, 0),
    rgba(60, 60, 67, 0.22),
    rgba(60, 60, 67, 0)
  );
}

/* Separator vertical line */
.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(218, 220, 224, 0),
    rgba(218, 220, 224, 0.9),
    rgba(218, 220, 224, 0)
  );
}

/* 统一所有内容样式 */
.stat-item .rating,
.stat-item .download-info,
.stat-item .security-info,
.stat-item .age-rating {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-primary);
  line-height: 1;
  min-height: 20px;
  white-space: nowrap;
}

body.theme-ios-store .stat-item .rating,
body.theme-ios-store .stat-item .download-info,
body.theme-ios-store .stat-item .security-info,
body.theme-ios-store .stat-item .age-rating {
  font-size: 17px;
  font-weight: 700;
  color: #1c1c1e;
  min-height: 22px;
}

/* 评分 */
.stat-item .rating .rating-value {
  font-size: 14px;
  font-weight: 700;
}

.stat-item .rating svg {
  color: #fbbc04;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  transform: translateY(-0.5px);
}

/* 下载大小 */
.stat-item .download-info .download-value {
  font-size: 14px;
  font-weight: 500;
}

.stat-item .download-info svg {
  flex-shrink: 0;
  color: var(--text-secondary);
  width: 12px;
  height: 12px;
  opacity: 0.88;
}

/* 安全认证 */
.stat-item .security-info {
  color: #34a853;
}

.stat-item .security-info .security-value {
  font-size: 14px;
  font-weight: 700;
  color: #34a853;
}

.stat-item .security-info svg {
  flex-shrink: 0;
  color: #34a853;
  width: 12px;
  height: 12px;
}

/* 年龄评级 */
.stat-item .age-rating {
  font-weight: 600;
}

.stat-label {
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  color: var(--text-secondary);
  min-height: 16px;
  max-width: 100%;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

body.theme-ios-store .stat-label {
  font-size: 12px;
  color: #8e8e93;
  text-transform: none;
}

.stat-item .age-rating svg {
  flex-shrink: 0;
  color: var(--text-primary);
  width: 12px;
  height: 12px;
}

/* Install Button */
.action-buttons {
  margin-bottom: 16px;
  width: 100%;
  padding-top: 0;
}

body.theme-ios-store .action-buttons {
  margin-bottom: 16px;
}

.storefront-play .install-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
}

.install-btn {
  background:
    linear-gradient(180deg, #1a73e8 0%, #1467d4 100%);
  color: white;
  border: none;
  border-radius: 999px;
  width: 100%;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.12s ease, box-shadow 0.12s ease;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(26, 115, 232, 0.28);
}

body.theme-ios-store .install-btn {
  width: auto;
  min-width: 116px;
  margin-left: auto;
  height: 34px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 999px;
  background: #007aff;
  box-shadow: none;
}

body.theme-ios-store .install-btn:active {
  background: #0066d6;
}

.storefront-ios .compatibility {
  margin-bottom: 12px;
}

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

.install-btn:disabled {
  background-color: #e0e0e0;
  color: #9aa0a6;
  cursor: default;
  box-shadow: none;
}

/* Progress Bar in Button */
.install-btn-progress {
  position: relative;
  overflow: hidden;
  background-color: #e8f0fe;
  color: var(--primary-color);
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: transparent;
  z-index: 0;
}

.progress {
  height: 100%;
  background-color: rgba(26, 115, 232, 0.15);
  transition: width 0.2s ease;
}

.progress-text {
  z-index: 1;
}

/* Compatibility */
.compatibility {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

body.theme-ios-store .compatibility {
  font-size: 13px;
  color: #6e6e73;
}
.compatibility .device-icon::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
}

.runtime-helper {
  margin-bottom: 18px;
  padding: 14px 15px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(26, 115, 232, 0.1), rgba(52, 168, 83, 0.08));
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid rgba(26, 115, 232, 0.14);
  box-shadow: 0 10px 24px rgba(19, 71, 140, 0.08);
}

body.theme-ios-store .runtime-helper {
  background: #f2f2f7;
  border: none;
  box-shadow: none;
  border-radius: 18px;
  color: #3a3a3c;
}

.section-kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

body.theme-ios-store .section-kicker {
  margin-bottom: 10px;
}

.section-kicker-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
}

body.theme-ios-store .section-kicker-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #111111;
}

.section-kicker p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-align: right;
  max-width: 240px;
}

body.theme-ios-store .section-kicker p {
  display: none;
}

/* Screenshots */
.screenshots-section {
  margin-bottom: 30px;
  overflow: hidden;
}

body.theme-ios-store .screenshots-section {
  margin-bottom: 34px;
}

.ios-screenshots-section {
  margin-bottom: 36px;
}

.screenshots-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding-right: 12px;
}

body.theme-ios-store .screenshots-scroll {
  gap: 12px;
  padding-right: 6px;
}

.ios-screenshots-scroll {
  gap: 14px;
}

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

.screenshot-item {
  height: 198px;
  border-radius: 18px;
  box-shadow:
    0 16px 30px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.65);
  cursor: pointer;
  object-fit: cover;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.theme-ios-store .screenshot-item {
  height: 210px;
  border-radius: 22px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.ios-screenshot-item {
  width: 252px;
  max-width: 68vw;
}


body.theme-ios-store .ios-screenshot-item {
  width: min(252px, 68vw);
  max-width: none;
  height: auto;
  aspect-ratio: 320 / 500;
  object-fit: contain;
}
.screenshot-item:first-child {
  transform: translateY(-2px);
}

.screenshot-item:active {
  transform: scale(0.985);
}

.screenshot-item.wide {
  width: 320px;
  max-width: 80vw;
  height: 180px;
}

/* App Details Sections */
.app-details-section {
  padding: 0 var(--spacing-lg) var(--spacing-lg);
}

body.theme-ios-store .app-details-section {
  padding-top: 8px;
}

.storefront-play .app-details-section {
  padding-top: 2px;
}

.detail-section {
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(32, 33, 36, 0.08);
  padding-bottom: 24px;
}

body.theme-ios-store .detail-section {
  margin-bottom: 0;
  padding: 22px 0;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.16);
}

.storefront-play .detail-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
}
.detail-section:last-child {
  border-bottom: none;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0; /* Reset */
}

body.theme-ios-store .section-title {
  font-size: 26px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.arrow {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1;
}

.section-content p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.72;
}

body.theme-ios-store .section-content p {
  font-size: 16px;
  color: #3a3a3c;
  line-height: 1.66;
}

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

/* Data Security */
.security-features {
  list-style: none;
  padding: 18px;
  border: 1px solid rgba(32, 33, 36, 0.08);
  border-radius: 18px;
  margin: 16px 0;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.95), #ffffff);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

body.theme-ios-store .security-features {
  padding: 0;
  border: none;
  border-radius: 0;
  margin: 18px 0 0;
  background: transparent;
  box-shadow: none;
}

.security-features li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

body.theme-ios-store .security-features li {
  padding: 14px 0;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
  margin-bottom: 0;
}

body.theme-ios-store .security-features li:last-child {
  border-bottom: none;
}
.security-features li:last-child {
  margin-bottom: 0;
}

/* Icons for security items */
.security-features li:nth-child(1)::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23202124'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  flex-shrink: 0;
}
.security-features li:nth-child(2)::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23202124'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.feature-text h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.feature-text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Updated On Date */
.version-info {
  margin-top: 16px;
  font-size: 15px;
}
.version-info p:first-child {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.version-info p:last-child {
  color: var(--text-secondary);
}

/* Ratings Overview */
.rating-overview {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border: 1px solid rgba(32, 33, 36, 0.07);
}

body.theme-ios-store .rating-overview {
  padding: 0;
  margin-bottom: 18px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.rating-left {
  text-align: center;
  margin-right: 24px;
  min-width: 80px;
}

.rating-big {
  font-size: 58px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.05em;
}

body.theme-ios-store .rating-big {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.rating-stars {
  color: var(--primary-color);
  font-size: 13px;
  margin: 4px 0;
  letter-spacing: 0;
}

body.theme-ios-store .rating-stars {
  color: #ff9500;
}

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

.rating-bars {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rating-bar-item {
  display: flex;
  align-items: center;
  height: 16px;
}

.star-level {
  font-size: 13px;
  color: var(--text-secondary);
  width: 16px;
  text-align: right;
  margin-right: 12px;
  font-weight: 500;
}

.bar-container {
  flex-grow: 1;
  height: 10px;
  background-color: #e8eaed;
  border-radius: 5px;
  overflow: hidden;
}

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

/* Reviews List */
.review-item {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #fbfcff;
  border: 1px solid rgba(32, 33, 36, 0.06);
}

body.theme-ios-store .review-item {
  padding: 18px 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
}

.storefront-play .review-item {
  padding: 16px;
  border-radius: 18px;
  background: #fbfcff;
  border: 1px solid rgba(32, 33, 36, 0.06);
  margin-bottom: 16px;
}

.storefront-play .review-item:last-child {
  border-bottom: none;
}

body.theme-ios-store .review-item:last-child {
  border-bottom: none;
}

.review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 500;
  font-size: 14px;
  flex-shrink: 0;
}

.color-blue {
  background-color: #5c6bc0;
}
.color-purple {
  background-color: #ab47bc;
}
.color-green {
  background-color: #66bb6a;
}
.color-pink {
  background-color: #ec407a;
}
.color-orange {
  background-color: #ffa726;
}

.review-content {
  flex: 1;
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.review-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 8px;
}

.review-rating {
  color: var(--primary-color);
  font-size: 14px;
  margin-right: auto;
}

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

.review-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Verified Badge */
.verified-badge {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

body.theme-ios-store .verified-badge {
  color: #8e8e93;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  display: flex;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  z-index: 2001;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 30px;
  padding: 20px 10px;
  cursor: pointer;
  z-index: 2001;
}
.lightbox-nav:active {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-nav.prev {
  left: 10px;
}
.lightbox-nav.next {
  right: 10px;
}

/* Guidance Modal */
.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.guide-sheet {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  box-shadow: 0 -28px 60px rgba(15, 23, 42, 0.24);
  transform: translateY(100%);
  transition: transform 0.28s ease;
}

.guide-modal.visible .guide-sheet {
  transform: translateY(0);
}

.guide-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.guide-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.guide-title {
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.guide-description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.6;
}

.guide-visual {
  margin-bottom: 18px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #f7fafe, #eef5ff);
  border: 1px solid rgba(26, 115, 232, 0.14);
  box-shadow: 0 16px 30px rgba(17, 64, 128, 0.09);
}

.guide-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.guide-caption {
  padding: 10px 14px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.guide-steps {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  color: var(--text-primary);
}

.guide-steps li {
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 380px) {
  .app-info,
  .app-details-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .app-header {
    gap: 14px;
  }

  .ios-store-header {
    flex-direction: column;
    gap: 14px;
  }

  .ios-app-meta {
    width: 100%;
  }

  .ios-icon-wrapper {
    width: 96px;
    height: 96px;
  }

  .ios-cta-block {
    width: 100%;
    align-items: stretch;
    padding-top: 0;
  }

  .ios-install-btn {
    width: 100%;
    min-width: 0;
    height: 44px;
  }

  .ios-inapp-note {
    max-width: none;
    text-align: left;
  }

  .ios-metadata-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 0;
  }

  .ios-meta-item:nth-child(2)::after {
    display: none;
  }

  .icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
  }

  .app-details h1 {
    font-size: 26px;
  }

  body.theme-ios-store .app-details h1 {
    font-size: 30px;
  }

  .ios-app-title {
    font-size: 28px;
  }

  .app-stats {
    gap: 6px 0;
    padding: 6px 4px;
  }

  .stat-label {
    font-size: 10px;
  }

  .section-kicker {
    display: block;
  }

  .section-kicker p {
    text-align: left;
    margin-top: 6px;
  }

  .rating-overview {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .rating-left {
    margin-right: 0;
  }
}

/* Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.loader-hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-visible {
  opacity: 1;
  visibility: visible;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* App Transition */
#app-root {
  transition: opacity 0.5s ease;
}
.app-hidden {
  opacity: 0;
  visibility: hidden;
}
.app-visible {
  opacity: 1;
  visibility: visible;
}
.app-fade-out {
  opacity: 0;
}

/* PC端居中显示移动端内容 */
@media (min-width: 769px) {
  body {
    background:
      radial-gradient(circle at top, rgba(26, 115, 232, 0.12), transparent 24%),
      linear-gradient(180deg, #f3f8ff, #e8eef8);
    padding: 24px 0;
  }
  #app-root {
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    min-height: calc(100vh - 48px);
    border-radius: 34px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
      0 30px 70px rgba(18, 50, 94, 0.16),
      0 0 0 1px rgba(255, 255, 255, 0.4);
  }
}

@media (max-width: 480px) {
  body.theme-ios-store .ios-store-header {
    flex-direction: column;
    gap: 14px;
  }

  body.theme-ios-store .ios-app-meta {
    width: 100%;
  }

  body.theme-ios-store .ios-cta-block {
    width: 100%;
    align-items: stretch;
    padding-top: 0;
  }

  body.theme-ios-store .ios-inapp-note {
    max-width: none;
    text-align: left;
  }
  body.theme-ios-store .install-btn {
    width: 100%;
    margin-left: 0;
    height: 42px;
  }

  body.theme-ios-store .app-header {
    align-items: flex-start;
  }
}
