:root {
  --primary: #4a7dff;
  --primary-light: #6b9aff;
  --green: #34c759;
  --bg: #f8f9fc;
  --card-bg: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --border: #e5e5ea;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 40px;
}

/* 顶部应用信息 */
.app-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 20px 30px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.app-icon-wrap {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  margin-bottom: 16px;
}

.app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-name {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.app-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.app-rating .stars {
  color: #ffb300;
  font-size: 16px;
  letter-spacing: 1px;
}

.app-rating .rating-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.app-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.app-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.tag {
  font-size: 12px;
  color: var(--text-secondary);
  background: #f0f1f5;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 500;
}

/* 客服微信 */
.wechat-section {
  background: var(--card-bg);
  margin: 0 16px 16px;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.wechat-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  text-align: center;
  color: #e63222;
  letter-spacing: 0.5px;
}

.wechat-title span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.wechat-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.wechat-row:last-of-type {
  border-bottom: none;
}

.wechat-label {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.wechat-id {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-left: 8px;
}

.copy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.copy-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.wechat-tip {
  font-size: 12px;
  color: var(--green);
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* 应用数据统计 */
.app-stats {
  background: var(--card-bg);
  margin: 0 16px 16px;
  border-radius: var(--radius);
  padding: 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: var(--shadow);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-value span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
}

/* 应用截图 */
.screenshots-section {
  margin: 0 16px 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-left: 12px;
  position: relative;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.screenshots-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screenshots-scroll::-webkit-scrollbar {
  height: 4px;
}

.screenshots-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 2px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.screenshot-item {
  flex-shrink: 0;
  width: 52%;
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  transition: transform 0.2s;
}

.screenshot-item:hover {
  transform: scale(1.02);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* 应用介绍 */
.intro-section {
  margin: 0 16px 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.intro-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.feature-block {
  margin-bottom: 20px;
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-block h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feature-icon {
  font-size: 18px;
}

.feature-block ul {
  list-style: none;
  padding-left: 0;
}

.feature-block li {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}

.feature-block li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--primary);
  font-weight: 700;
}

/* 底部CTA */
.bottom-cta {
  text-align: center;
  padding: 30px 20px 90px;
}

.bottom-cta p {
  font-size: 14px;
  color: var(--text-secondary);
}

.copyright {
  font-size: 11px;
  color: #bbb;
  margin-top: 10px;
}

/* 底部悬浮栏 */
.floating-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 900;
}

.float-btn {
  display: block;
  width: 100%;
  padding: 14px 0;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
  border: none;
  border-radius: 26px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(238, 90, 36, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.5px;
}

.float-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(238, 90, 36, 0.3);
}

/* 返回顶部 */
.back-top {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.2s;
  z-index: 800;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-top:active {
  transform: scale(0.9);
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 1000;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 桌面端适配 */
@media (min-width: 481px) {
  body {
    background: #e8e9ec;
  }
  .container {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    background: var(--bg);
    min-height: 100vh;
  }
}

@media (max-width: 360px) {
  .app-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 20px;
  }
  .app-name {
    font-size: 22px;
  }
  .stat-value {
    font-size: 15px;
  }
  .screenshot-item {
    width: 62%;
  }
}
