/* 云端小铺（苹果目录 / 星星动效）
   —— 由 styles.css 第 2710–2899 行原样切分，规则与顺序未改动。 */
/* ============ 云端小铺 - 手绘苹果目录 ============ */
.market-card {
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.market-rank {
  font-size: 20px;
  font-weight: 800;
  font-style: italic;
  color: #ccc;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.market-rank.rank-0 { color: #FFB900; }
.market-rank.rank-1 { color: #C0C0C0; }
.market-rank.rank-2 { color: #CD7F32; }
.market-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.market-info { flex: 1; min-width: 0; }
.market-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-desc {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-meta {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

/* 苹果目录容器 */
.apple-menu-container {
  padding: 40px 0 100px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 800px;
  width: 100%;
  box-sizing: border-box;
}

/* 全屏背景 S 型轨道 */
.s-trail-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.apple-menu-row {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  padding-left: 15%; /* 整体向右推，不再死贴着左边 */
  box-sizing: border-box;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.3s;
  animation: floatApple 6s ease-in-out infinite;
}
.apple-menu-row:active { transform: scale(0.95) !important; }

/* 错落排列：左右彻底拉开，距离屏幕边缘对称 */
/* 假设左侧基准是 8%，右侧因为要容纳文字，基准设为 52% 左右 */
.apple-row-0 { padding-left: 8%; margin-bottom: 40px; }
.apple-row-1 { padding-left: 52%; margin-bottom: 50px; animation-delay: 1s; }
.apple-row-2 { padding-left: 10%; margin-bottom: 45px; animation-delay: 2s; }
.apple-row-3 { padding-left: 55%; margin-bottom: 50px; animation-delay: 0.7s; }
.apple-row-4 { padding-left: 8%; margin-bottom: 40px; animation-delay: 1.5s; }
.apple-row-5 { padding-left: 50%; margin-bottom: 20px; animation-delay: 2.5s; }

@keyframes floatApple {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

.apple-icon-wrap {
  width: 56px;
  height: 56px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  transition: transform 0.3s;
}
/* 恢复每颗苹果的角度、大小、偏移错落感 */
.apple-row-0 .apple-icon-wrap { transform: scale(1.1) rotate(-10deg) translateY(-5px); }
.apple-row-1 .apple-icon-wrap { transform: scale(0.9) rotate(15deg) translateY(5px); }
.apple-row-2 .apple-icon-wrap { transform: scale(1.05) rotate(-5deg) translateY(-2px); }
.apple-row-3 .apple-icon-wrap { transform: scale(0.95) rotate(12deg) translateY(8px); }
.apple-row-4 .apple-icon-wrap { transform: scale(1.15) rotate(-18deg) translateY(-8px); }
.apple-row-5 .apple-icon-wrap { transform: scale(0.9) rotate(8deg) translateY(0px); }

.apple-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(2px 6px 8px rgba(180,60,60,0.25));
  transition: transform 0.2s;
}

/* 文本排版 */
.apple-menu-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  margin-left: 16px;
  font-family: 'Georgia', serif;
  color: #333;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(255,255,255,0.8); /* 防止文字压在轨道上看不清 */
}
.apple-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
}
.apple-count {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

/* ===== 满屏星星飘落动效 ===== */
.star-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.star-rain span {
  position: absolute;
  top: -20px;
  color: #fff;
  opacity: 0;
  text-shadow: 0 0 10px rgba(255, 212, 232, 0.8);
  animation: fall linear infinite;
}

/* 给 12 个星星分别随机化：水平位置、下落时间、缩放大小、延迟 */
.star-rain span:nth-child(1) { left: 10%; font-size: 14px; animation-duration: 9s; animation-delay: 0s; }
.star-rain span:nth-child(2) { left: 25%; font-size: 18px; animation-duration: 12s; animation-delay: 2s; }
.star-rain span:nth-child(3) { left: 40%; font-size: 10px; animation-duration: 8s; animation-delay: 4s; }
.star-rain span:nth-child(4) { left: 55%; font-size: 16px; animation-duration: 14s; animation-delay: 1s; }
.star-rain span:nth-child(5) { left: 70%; font-size: 12px; animation-duration: 10s; animation-delay: 5s; }
.star-rain span:nth-child(6) { left: 85%; font-size: 20px; animation-duration: 11s; animation-delay: 3s; }
.star-rain span:nth-child(7) { left: 15%; font-size: 15px; animation-duration: 13s; animation-delay: 7s; }
.star-rain span:nth-child(8) { left: 35%; font-size: 11px; animation-duration: 9s; animation-delay: 6s; }
.star-rain span:nth-child(9) { left: 65%; font-size: 17px; animation-duration: 15s; animation-delay: 8s; }
.star-rain span:nth-child(10){ left: 80%; font-size: 13px; animation-duration: 8s; animation-delay: 2.5s; }
.star-rain span:nth-child(11){ left: 50%; font-size: 19px; animation-duration: 12s; animation-delay: 9s; }
.star-rain span:nth-child(12){ left: 90%; font-size: 14px; animation-duration: 10s; animation-delay: 1.5s; }

/* 下落动画：从上落下并伴随左右摇摆 */
@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(1000px) rotate(180deg); opacity: 0; }
}

