/* 详情页独立样式 */

/* 顶部返回栏 - 绿色背景 */
.detail-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(135deg, #5fc88f 0%, #4fb87e 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-btn {
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 8px;
  line-height: 1;
  min-width: 40px;
}

.detail-title {
  flex: 1;
  text-align: center;
  font-size: 1.063rem;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 10px;
}

.menu-btn {
  display: flex;
  align-items: center;
  padding: 8px;
  min-width: 40px;
  justify-content: flex-end;
}

/* 主内容区域 */
.detail-content {
  padding-top: 48px;
  background-color: #f5f5f5;
  overflow: hidden;
}

/* 应用信息卡片 */
.app-info-card {
  background-color: #fff;
  padding: 15px;
  margin-bottom: 8px;
}

.app-info-top {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.app-icon-detail {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  flex-shrink: 0;
  object-fit: cover;
  background-color: #f0f0f0;
  border: 1px solid #e8e8e8;
}

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

.app-name-detail {
  font-size: 1.063rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.3;
}

.app-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 0;
  font-size: 0.813rem;
  overflow: hidden;
}

.info-item {
  display: flex;
  align-items: center;
  line-height: 1.5;
  white-space: nowrap;
}

.info-label {
  color: #999;
  min-width: 40px;
}

.info-text {
  color: #666;
  flex: 1;
}

/* 立即下载按钮 */
.btn-download-primary {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #5fc88f 0%, #4fb87e 100%);
  color: #fff;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(95, 200, 143, 0.3);
  margin-bottom: 12px;
}

.btn-download-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* iOS版本提示 */
.ios-tip {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background-color: #f5f5f5;
  border-radius: 6px;
  font-size: 0.813rem;
  line-height: 1.5;
}

.tip-icon {
  color: #999;
  font-size: 1rem;
  margin-right: 6px;
  flex-shrink: 0;
}

.tip-text {
  color: #666;
}

.tip-link {
  color: #ff6b6b;
  font-weight: 500;
  text-decoration: none;
  margin-left: 4px;
}

.tip-link:hover {
  text-decoration: underline;
}

/* 应用截图 */
.screenshots-section {
  background-color: #fff;
  padding: 12px 0;
  margin-bottom: 8px;
}

.screenshots-header {
  padding: 0 12px 10px;
  font-size: 0.938rem;
  font-weight: 600;
  color: #333;
}

.screenshots-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.screenshots-list {
  display: flex;
  gap: 8px;
  padding: 0 12px;
}

.screenshot-item {
  flex-shrink: 0;
  width: 160px;
  height: 284px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #f0f0f0;
  border: 1px solid #e8e8e8;
}

.screenshot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 详情内容区 */
.detail-section {
  background-color: #fff;
  padding: 12px;
  margin-bottom: 8px;
}

.section-title-bar {
  font-size: 0.938rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

/* 游戏介绍 */
.game-intro {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #666;
  margin-bottom: 15px;
}

.intro-paragraph {
  margin-bottom: 12px;
  text-indent: 2em;
}

.intro-paragraph:last-child {
  margin-bottom: 0;
}

/* 游戏特色/玩法 */
.feature-list {
  margin-top: 12px;
}

.feature-item {
  margin-bottom: 12px;
  padding-left: 18px;
  position: relative;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #666;
}

.feature-item::before {
  content: "●";
  position: absolute;
  left: 0;
  color: #52c41a;
  font-size: 0.75rem;
}

.feature-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

/* 更新日志 */
.update-info {
  background-color: #f8f9fa;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 0.813rem;
  color: #666;
}

.update-version {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.changelog-list {
  margin-top: 8px;
}

.changelog-item {
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
  font-size: 0.813rem;
  line-height: 1.6;
  color: #666;
}

.changelog-item::before {
  content: "·";
  position: absolute;
  left: 6px;
  color: #999;
}

/* 应用信息表格 */
.info-table {
  width: 100%;
  font-size: 0.813rem;
}

.info-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  flex-shrink: 0;
  color: #999;
}

.info-value {
  flex: 1;
  color: #333;
}

/* 相关下载 */
.related-section {
  background-color: #fff;
  padding: 12px;
  margin-bottom: 8px;
}

.related-header {
  font-size: 0.938rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.related-scroll-wrapper {
  position: relative;
}

.related-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

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

/* 每一屏 */
.related-page {
  flex-shrink: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 12px 8px;
  scroll-snap-align: start;
  padding: 0 2px;
}

.related-grid-item {
  text-align: center;
  min-width: 0;
    min-height: 0;
}

.related-grid-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.related-grid-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background-color: #f0f0f0;
  margin-bottom: 6px;
  border: 1px solid #e8e8e8;
}

.related-grid-name {
  font-size: 0.75rem;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 6px;
  width: 100%;
  line-height: 1.2;
}

.related-grid-btn {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid #52c41a;
  color: #52c41a;
  border-radius: 12px;
  font-size: 0.688rem;
  font-weight: 500;
}

.related-grid-btn:active {
  background-color: #f0fdf4;
}

/* 分页指示器 */
.related-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.related-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #d9d9d9;
  cursor: pointer;
  transition: all 0.3s ease;
}

.related-dot.active {
  width: 16px;
  border-radius: 3px;
  background-color: #1890ff;
}

/* 游戏排行榜 */
.rank-section {
  background-color: #fff;
  padding: 12px;
  margin-bottom: 60px;
}

.rank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.rank-title {
  font-size: 0.938rem;
  font-weight: 600;
  color: #333;
}

.rank-tabs {
  display: flex;
  gap: 15px;
}

.rank-tab {
  font-size: 0.813rem;
  color: #999;
  padding: 4px 8px;
  border-radius: 4px;
}

.rank-tab.active {
  color: #52c41a;
  background-color: #f0fdf4;
}

.rank-list {
  margin-top: 12px;
  transition: opacity 0.3s ease-in-out;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
  background-color: #f0f0f0;
  border: 1px solid #e8e8e8;
}

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

.rank-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.rank-stars {
  color: #ffa940;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.rank-meta {
  font-size: 0.688rem;
  color: #999;
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.rank-meta span {
  position: relative;
  padding-right: 8px;
}

.rank-meta span:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: 0;
  color: #ddd;
}

.rank-action {
  flex-shrink: 0;
}

.btn-rank-detail {
  padding: 6px 14px;
  background-color: #52c41a;
  color: #fff;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 500;
}

.btn-rank-detail:active {
  background-color: #3ea015;
}

/* 评论区 */
.comments-section {
  background-color: #fff;
  padding: 12px;
  margin-bottom: 60px;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.comments-title {
  font-size: 0.938rem;
  font-weight: 600;
  color: #333;
}

.comments-more {
  font-size: 0.813rem;
  color: #999;
}

.comments-list {
  margin-top: 12px;
}

.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.813rem;
  flex-shrink: 0;
}

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

.comment-user-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.comment-name {
  font-size: 0.813rem;
  color: #333;
  font-weight: 500;
}

.comment-rating {
  color: #ff9500;
  font-size: 0.75rem;
}

.comment-time {
  font-size: 0.688rem;
  color: #999;
}

.comment-content {
  font-size: 0.813rem;
  line-height: 1.6;
  color: #666;
  margin-top: 6px;
}

/* 固定底部下载栏 */
.fixed-download-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 8px 12px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

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

.fixed-app-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background-color: #f0f0f0;
}

.fixed-app-details {
  flex: 1;
  min-width: 0;
}

.fixed-app-name {
  font-size: 0.813rem;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.fixed-app-size {
  font-size: 0.688rem;
  color: #999;
}

.fixed-download-btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, #52c41a 0%, #3ea015 100%);
  color: #fff;
  border-radius: 18px;
  font-size: 0.813rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.fixed-download-btn:active {
  opacity: 0.9;
}

