/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: Avenir, Helvetica, Arial, "PingFang SC", sans-serif;
  color: #333;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 首页样式 */
.home {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.inner {
  flex: 1;
  background: linear-gradient(180deg, #eef6ff, rgba(24, 125, 255, 0.05) 350px, transparent 650px);
}

/* 头部 */
.head {
  height: 100px;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 50px;
  height: 50px;
  margin-right: 14px;
}

.logo h2 {
  margin: 0;
  color: #ff930e;
  font-size: 30px;
  font-weight: bold;
}

/* 主体内容 */
.cont {
  text-align: center;
}

.title {
  font-size: 36px;
  font-weight: bold;
  margin: 24px 0 36px;
}

.title .line1 {
  color: #333;
}

.title .line2 {
  color: #666;
  font-size: 18px;
  font-weight: normal;
  margin-top: 12px;
}

/* 下载区域 */
.load {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.primary-download,
.other-downloads,
.platform-support {
  width: 100%;
}

.primary-download {
  display: flex;
  justify-content: center;
}

.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 147, 14, 0.08);
  color: #b85d00;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.more-toggle:hover {
  background: rgba(255, 147, 14, 0.14);
}

.more-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.more-toggle-icon {
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}

.more-toggle.is-open .more-toggle-icon {
  transform: rotate(180deg);
}

.other-downloads[hidden] {
  display: none !important;
}

.other-downloads {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 1rem;
}

.platform-support {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.platform-support-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(94, 91, 113, 1);
}

.platforms-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.platform-logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 5rem;
}

.platform-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
}

.platform-logo-label {
  font-size: 0.95rem;
  color: #8A8A8A;
}

.way {
  width: min(100%, 13rem);
  min-width: 10rem;
  min-height: 10.6875rem;
  position: relative;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  border-radius: 28px;
  border: 2px solid #ffb34f;
  background: #fff;
}

.primary-download .way {
  width: min(100%, 24rem);
  min-height: 11.5rem;
}

.primary-download .txt {
  font-size: 1.45rem;
}

.way:hover {
  transform: scale(1.1);
}

.way.is-probing,
.way.is-disabled,
.way.is-probing:hover,
.way.is-disabled:hover {
  transform: none;
}

.way.is-probing {
  cursor: progress;
  box-shadow: 0 12px 30px rgba(255, 147, 14, 0.18);
}

.way.is-probing::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 147, 14, 0.2);
  border-top-color: #b85d00;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.way.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.way img.device-icon {
  width: 3.75rem;
  height: 3.75rem;
  margin-bottom: 0.875rem;
  margin-top: 1.875rem;
  object-fit: contain;
  filter: grayscale(1);
}

.way .txt {
  font-size: 1.25rem;
  font-weight: bold;
  color: #a34e00;
}

.way .download-status {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  min-height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1.2;
  color: #b85d00;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.way .download-status.show {
  opacity: 1;
}

.now-device-badge {
  position: absolute;
  top: -33px;
  right: -7px;
  width: 80px;
  z-index: 999;
}

/* Mac教程链接 */
.tutorial {
  width: 100%;
  font-size: 1.875rem;
  color: #F48234;
  text-decoration: underline;
  margin-top: 1.25rem;
  cursor: pointer;
}

.tutorial:hover {
  opacity: 0.8;
}

/* 原飞喵地图与六项功能布局 */
.download-hero {
  padding: 20px 0 48px;
  background: url('../images/feimiao/banner_mapbg@2x.png') center top / 100% auto no-repeat;
}
.devices-title { display: flex; color: #777; text-align: left; }
.devices-title span { width: 50%; }
.tit { max-width: 960px; margin: 60px auto 80px; color: #333; font-size: 46px; }
.items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; margin-bottom: 100px; }
.block { text-align: center; }
.block img { width: 130px; height: 130px; object-fit: contain; margin-bottom: 30px; }
.block .block-tit { font-size: 28px; color: #333; margin: 0 0 20px; }
.block .content { color: #666; font-size: 16px; }
.message { color: #fff; margin: 10px auto 0; font-size: 14px; }

/* Footer */
.footer {
  width: 100%;
  padding: 32px 16px;
  background: #2b2c34;
  text-align: center;
}

.agreements {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 6px;
}

.agreement {
  font-size: 14px;
}

.agreement a {
  color: #ffb34f;
  text-decoration: none;
}

.agreement a:hover {
  color: #fff;
  text-decoration: underline;
}

.copyright {
  font-size: 13px;
  color: #C9CBD1;
  margin-top: 14px;
}

/* 加载状态 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  font-size: 1.25rem;
  color: #999;
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  margin-left: 10px;
  border: 3px solid #ddd;
  border-top-color: #b85d00;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

#load-container[aria-busy='true'] .tutorial {
  pointer-events: none;
  opacity: 0.7;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式 */
@media (max-width: 767px) {
  .container { padding: 0 24px; }
  .head { height: 86px; }
  .logo h2 { font-size: 26px; }
  .title { font-size: 26px; text-wrap: balance; }
  .title .line2 { font-size: 16px; }
  .devices-title { gap: 16px; font-size: 13px; }
  .download-hero { padding: 12px 0 24px; }
  .tit { font-size: 30px; margin: 40px auto; text-wrap: balance; }
  .items { grid-template-columns: 1fr; gap: 28px; margin-bottom: 40px; }
  .block img { margin-bottom: 16px; }
  .block .block-tit { margin-bottom: 12px; }
  .other-downloads .way { width: calc(50% - 8px); min-width: 0; }
  .tutorial { font-size: 18px; }
  .footer { padding: 24px 16px; }
  .message { max-width: 340px; line-height: 1.8; }
}
