/* 麻神对战下载页 — 完整主图满屏 contain + 透明点击层叠在图上按钮 */

:root {
  --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --green-android: linear-gradient(180deg, #5fe06a 0%, #2cb84a 45%, #1a9a3a 100%);
  --blue-ios: linear-gradient(180deg, #5eb0ff 0%, #3d8ef5 45%, #2a6fd4 100%);
  /* 与主图上下边缘取色（对称衔接） */
  --sky-high: #e8f2f6;
  --sky-mid: #80c5ca;
  --seam-bottom: #87b08c;
  --water-mid: #5a9aaa;
  --water-deep: #3d7288;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

body.landing-page {
  margin: 0;
  height: 100%;
  min-height: 100dvh;
  font-family: var(--font-ui);
  color: #fff;
  background: var(--water-deep);
  overflow: hidden;
}

.landing {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100svh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: var(--safe-bottom);
  background: linear-gradient(180deg, var(--sky-mid) 0%, #6a9e9a 42%, var(--water-deep) 100%);
  overflow: hidden;
}

.landing__petals {
  position: absolute;
  inset: 0;
  z-index: 8;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.landing__frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: block;
  overflow: hidden;
  z-index: 2;
}

/* 尺寸由 js/layout-stage.js 按视口 contain 计算 */
.landing__stage {
  position: relative;
  line-height: 0;
}

.landing__motion-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  will-change: transform;
}

.landing__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  vertical-align: top;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  will-change: transform;
}

/* 叠在图上原生按钮位置，仅保留可点区域（不重复绘制按钮） */
.landing__dock {
  position: absolute;
  left: 4.5%;
  right: 4.5%;
  bottom: 11.8%;
  height: 9.2%;
  z-index: 10;
  pointer-events: none;
}

.landing__dock .landing__download,
.landing__dock .dl-pill {
  pointer-events: auto;
}

.landing__dock .landing__download {
  height: 100%;
  gap: 3%;
}

.landing__dock .dl-pill {
  min-height: 0;
  height: 100%;
  padding: 0;
  background: transparent !important;
  box-shadow: none;
  color: transparent;
  overflow: visible;
}

.landing__dock .dl-pill__shine,
.landing__dock .dl-pill__icon,
.landing__dock .dl-pill__label {
  display: none;
}

.landing__download {
  display: flex;
  gap: 2.5%;
}

.dl-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: clamp(44px, 12vw, 52px);
  padding: 8px 10px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.15s ease;
}

.dl-pill:active {
  transform: translateY(2px) scale(0.98);
}

.dl-pill--android {
  background: var(--green-android);
}

.dl-pill--ios {
  background: var(--blue-ios);
}

.dl-pill__shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  border-radius: 999px 999px 0 0;
  pointer-events: none;
}

.dl-pill__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(32px, 9vw, 36px);
  height: clamp(32px, 9vw, 36px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.dl-pill__label {
  font-size: clamp(0.78rem, 3.6vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.landing__ios-tip {
  margin: 6px 0 0;
  text-align: center;
  font-size: clamp(0.5rem, 2.6vw, 0.58rem);
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 50, 90, 0.7);
  pointer-events: none;
}

/* iOS 教程弹窗 */
.ios-guide {
  border: none;
  padding: 0;
  max-width: calc(100% - 32px);
  width: 380px;
  background: transparent;
}

.ios-guide::backdrop {
  background: rgba(20, 60, 90, 0.55);
  backdrop-filter: blur(6px);
}

.ios-guide__panel {
  position: relative;
  padding: 24px 20px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f4fc 100%);
  border: 2px solid #3d8ef5;
  box-shadow: 0 16px 40px rgba(0, 80, 140, 0.25);
  color: #234;
}

.ios-guide__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(61, 142, 245, 0.15);
  color: #2a6fd4;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.ios-guide h2 {
  margin: 0 28px 10px 0;
  font-size: 1.1rem;
  color: #1a5fa8;
}

.ios-guide__intro {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: #556;
  line-height: 1.55;
}

.ios-guide__steps {
  margin: 0 0 18px;
  padding-left: 1.15rem;
  font-size: 0.8rem;
  color: #334;
  line-height: 1.55;
}

.ios-guide__steps strong {
  color: #1a5fa8;
}

.ios-guide__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ios-guide__install {
  padding: 13px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--blue-ios);
  box-shadow: 0 4px 14px rgba(42, 111, 212, 0.4);
}

.ios-guide__secondary {
  padding: 11px;
  border: 1px solid #aac8e8;
  border-radius: 999px;
  background: transparent;
  color: #667;
  font-size: 0.88rem;
  cursor: pointer;
}

@media (min-width: 481px) {
  body.landing-page {
    background: var(--water-deep);
  }

  .landing {
    box-shadow: 0 0 48px rgba(0, 0, 0, 0.2);
  }
}
