/* ========================================
   天马寻仙决下载页 - 精致版
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: #f5f5f7;
  min-height: 100vh;
  color: #1d1d1f;
  line-height: 1.5;
  padding: 50px 20px;
}

.container {
  max-width: 400px;
  margin: 0 auto;
}

/* 标题区 */
.header {
  text-align: center;
  margin-bottom: 36px;
}

.title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  /* 闪亮文字效果 */
  display: inline-block;
  background: linear-gradient(90deg,
    #1d1d1f 0%,
    #1d1d1f 40%,
    #c8c8c8 50%,
    #1d1d1f 60%,
    #1d1d1f 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shiny-move 4s linear infinite;
}

@keyframes shiny-move {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.subtitle {
  font-size: 0.85rem;
  color: #86868b;
  min-width: 10em;
}

/* 版本卡片 */
.version-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  cursor: grab;
  user-select: none;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card:active,
.card.dragging {
  cursor: grabbing;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06), 0 20px 48px rgba(0, 0, 0, 0.1);
  transform: scale(1.02);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  object-fit: cover;
  background: #f5f5f7;
  flex-shrink: 0;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-name {
  font-size: 1rem;
  font-weight: 500;
  color: #1d1d1f;
  margin-bottom: 3px;
}

.card-desc {
  font-size: 0.78rem;
  color: #86868b;
}

.card-qrcode {
  flex-shrink: 0;
  padding: 4px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}

.card-qrcode img,
.card-qrcode canvas {
  display: block;
  width: 58px !important;
  height: 58px !important;
}

/* 下载按钮 */
.card-actions {
  display: flex;
  gap: 10px;
  position: relative;
}

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-star-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  pointer-events: none;
  z-index: 1;
}

.btn-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.8;
}

.btn > span,
.btn > a {
  position: relative;
  z-index: 2;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-android {
  background: #00c853;
}

.btn-android:hover {
  background: #00a844;
  box-shadow: 0 4px 12px rgba(0, 200, 83, 0.3), 0 0 20px rgba(0, 200, 83, 0.15);
}

.btn-ios {
  background: #007aff;
}

.btn-ios:hover {
  background: #0066d6;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3), 0 0 20px rgba(0, 122, 255, 0.15);
}

.btn-pc {
  background: #5856d6;
}

.btn-pc:hover {
  background: #4a48c2;
  box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3), 0 0 20px rgba(88, 86, 214, 0.15);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn:active {
  transform: scale(0.98);
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 22px;
  padding: 30px;
  max-width: 355px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868b;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  font-size: 1.1rem;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #1d1d1f;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 22px;
  text-align: center;
}

.guide-list {
  list-style: none;
}

.guide-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  font-size: 0.88rem;
  color: #4a4a4a;
  border-bottom: 1px solid #f0f0f0;
}

.guide-list li:last-child {
  border-bottom: none;
}

.guide-list li::before {
  content: attr(data-step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 600;
  flex-shrink: 0;
}

.guide-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
  text-align: center;
  font-size: 0.78rem;
  color: #86868b;
}

/* 响应式 */
@media (max-width: 440px) {
  body {
    padding: 40px 16px;
  }

  .title {
    font-size: 1.6rem;
  }

  .card {
    padding: 18px;
  }

  .card-icon {
    width: 48px;
    height: 48px;
  }

  .card-actions {
    flex-direction: column;
  }
}
