/* iPhone 满意度问卷 · Apple 风格 */

:root {
  --black: #1d1d1f;
  --white: #f5f5f7;
  --pure-white: #ffffff;
  --gray: #86868b;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --nav-h: 48px;
  --maxw: 680px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  font-synthesis: none;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans",
    "Noto Sans SC", "Noto Sans Arabic", "Microsoft YaHei", sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.4;
  letter-spacing: -0.01em;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, select { font-family: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- 导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.nav-inner {
  max-width: 980px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-logo {
  color: var(--black);
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.nav-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  height: 30px;
  max-width: 46vw;
  padding: 0 28px 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231d1d1f' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 980px;
  cursor: pointer;
}
.lang-select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
[dir="rtl"] .lang-select {
  padding: 0 12px 0 28px;
  background-position: left 10px center;
}

/* ---------------- 问卷主体 ---------------- */
.survey {
  min-height: calc(100svh - var(--nav-h) - 72px);
  display: flex;
  justify-content: center;
  padding: 28px 20px 48px;
}
.pane {
  width: 100%;
  max-width: var(--maxw);
  animation: rise 0.45s var(--ease);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.intro { text-align: center; padding-top: 12px; }
.eyebrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
}
.intro-title {
  margin-top: 10px;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.intro-sub {
  margin: 16px auto 0;
  max-width: 540px;
  font-size: 18px;
  font-weight: 500;
  color: #6e6e73;
  line-height: 1.45;
}
.prizes-kicker {
  margin-top: 26px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}
.prize-row {
  margin: 14px auto 4px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(18px, 5vw, 40px);
}
.prize {
  width: min(168px, 40vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.prize img {
  width: 100%;
  height: clamp(120px, 28vw, 200px);
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.16));
}
.prize.compact img {
  height: clamp(96px, 24vw, 140px);
}
.prize figcaption {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.q-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
}
.q-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 22px;
}
.q-bar > span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 0.35s var(--ease);
}

.q-title {
  font-size: clamp(22px, 4.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.q-hint {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
}

.options {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
}
.opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--pure-white);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  cursor: pointer;
  text-align: start;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.opt:hover { border-color: rgba(0, 113, 227, 0.45); }
.opt:has(input:checked) {
  border-color: var(--blue);
  background: #f2f7ff;
  box-shadow: 0 0 0 1px var(--blue);
}
.opt:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.opt-key {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  background: var(--white);
  direction: ltr;
}
.opt:has(input:checked) .opt-key {
  color: #fff;
  background: var(--blue);
}
.opt-text {
  flex: 1;
  padding-top: 3px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.q-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: #ff3b30;
}
.q-error:empty { display: none; }

.q-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.btn {
  height: 50px;
  padding: 0 22px;
  font-size: 17px;
  font-weight: 500;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn-primary {
  flex: 1;
  color: #fff;
  background: var(--blue);
}
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost {
  color: var(--black);
  background: rgba(0, 0, 0, 0.06);
}
.btn-ghost:hover { background: rgba(0, 0, 0, 0.1); }
.btn-block { width: min(100%, 280px); margin-top: 28px; }

.thanks { text-align: center; }
.thanks-mark {
  width: 64px;
  height: 64px;
  margin: 8px auto 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #30d158;
}
.thanks-mark svg { width: 32px; height: 32px; }
.thanks .intro-title { font-size: clamp(28px, 5vw, 40px); }
.recap {
  margin-top: 28px;
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.recap-item {
  padding: 14px 16px;
  background: var(--pure-white);
  border-radius: 16px;
}
.recap-q {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  line-height: 1.4;
}
.recap-a {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.footer {
  color: var(--gray);
  text-align: center;
  padding: 8px 22px 28px;
  font-size: 12px;
  line-height: 1.6;
}

/* ---------------- 抽奖页 ---------------- */
.lottery { text-align: center; width: 100%; }
.lottery .intro-title { white-space: pre-line; }
.lottery-prizes { margin-top: 8px; }
.prize.compact { width: min(132px, 36vw); }
.lottery-form {
  margin: 28px auto 0;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.lottery-form .btn-block {
  width: 100%;
  max-width: none;
  margin-top: 0;
  position: relative;
}
.field {
  position: relative;
  width: 100%;
  text-align: left;
}
[dir="rtl"] .field { text-align: right; }
.field input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 56px;
  padding: 22px 18px 6px;
  font-size: 17px;
  font-family: inherit;
  line-height: 1.2;
  color: var(--black);
  background: var(--pure-white);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.3s, background 0.3s;
}
.field input:focus {
  border-color: var(--blue);
  background: #fff;
}
.field label {
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 17px;
  color: #86868b;
  pointer-events: none;
  transition: all 0.2s var(--ease);
}
[dir="rtl"] .field label { left: auto; right: 18px; }
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 9px;
  font-size: 11px;
}
.field input.invalid { border-color: #ff453a; }
.field-error {
  min-height: 16px;
  margin-top: 6px;
  font-size: 12px;
  color: #ff6961;
  padding-left: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.field-error.show { opacity: 1; }
[dir="rtl"] .field-error { padding-left: 0; padding-right: 4px; }
.join-fine {
  margin-top: 18px;
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.5;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.btn.loading { pointer-events: none; }
.btn.loading .btn-text { opacity: 0; }
.btn-loader {
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
}
.btn.loading .btn-loader { opacity: 1; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 结果弹层 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  min-height: 312px;
  background: var(--pure-white);
  border-radius: 24px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  transform: scale(0.88) translateY(20px);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
}
.modal.open .modal-card { transform: scale(1) translateY(0); }
.modal-card--compact { min-height: 0; padding: 36px 32px 28px; }
.modal-card--compact .modal-title { margin-bottom: 24px; }

.draw-stage { display: none; width: 100%; }
.modal-card.drawing .draw-stage { display: block; }
.draw-verify { display: none; }
.modal-card.verifying .draw-verify { display: block; }
.modal-card.verifying .draw-reel-wrap { display: none; }
.draw-reel-wrap { width: 100%; }
.verify-status {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 18px 0 22px;
}
.verify-status.done { color: #1a7f37; }
.verify-track {
  width: 78%;
  max-width: 240px;
  height: 6px;
  margin: 0 auto 18px;
  border-radius: 99px;
  background: #ececef;
  overflow: hidden;
}
.verify-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #0a84ff, #0060df);
}
.verify-bar.done { background: linear-gradient(90deg, #30d158, #28b14c); }
.draw-status {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 16px;
}
.draw-status.win { color: #1a7f37; font-weight: 700; }
.draw-reel {
  position: relative;
  height: 132px;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, #f5f5f7 0%, #ececef 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.draw-reel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(245,245,247,0.95) 0%, rgba(245,245,247,0) 30%,
    rgba(236,236,239,0) 70%, rgba(236,236,239,0.95) 100%);
}
.draw-reel::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  top: 50%;
  height: 116px;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
  border-top: 2px solid rgba(0, 113, 227, 0.28);
  border-bottom: 2px solid rgba(0, 113, 227, 0.28);
  box-sizing: border-box;
}
.draw-reel.win::after {
  border-color: rgba(48, 209, 88, 0.95);
  box-shadow: 0 0 0 2px rgba(48, 209, 88, 0.55), 0 0 28px rgba(48, 209, 88, 0.5);
}
.draw-strip { display: flex; flex-direction: column; will-change: transform; }
.draw-item {
  height: 132px;
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--black);
}
.draw-item .di-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}
.draw-item .di-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--black);
  opacity: 0.88;
}
.draw-item .di-icon svg { width: 36px; height: 36px; }
.draw-item .di-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 0 10px;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}
.modal-card.drawing .modal-emoji,
.modal-card.drawing .modal-prize-img,
.modal-card.drawing .modal-title,
.modal-card.drawing .modal-text,
.modal-card.drawing .modal-btn { display: none !important; }
.modal-emoji {
  line-height: 1;
  color: var(--blue);
  display: flex;
  justify-content: center;
}
.modal-emoji[hidden] { display: none !important; }
.modal-emoji svg { width: 54px; height: 54px; }
.modal-emoji.win { color: #d99a2b; }
.modal-prize-img {
  display: block;
  width: min(160px, 55%);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.16));
}
.modal-prize-img[hidden] { display: none !important; }
.modal-title {
  margin-top: 16px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.modal-text {
  margin-top: 10px;
  font-size: 16px;
  color: var(--gray);
  line-height: 1.5;
  white-space: pre-line;
}
.modal-btn {
  margin-top: 26px;
  width: 100%;
  height: 50px;
  font-size: 17px;
  font-weight: 500;
  font-family: inherit;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.3s, transform 0.15s;
}
.modal-btn:hover { background: var(--blue-hover); }
.modal-btn:active { transform: scale(0.97); }
.modal-btn.whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  background: #25d366;
  box-sizing: border-box;
}
.modal-btn.whatsapp:hover { background: #1ebe5b; }
.modal-btn.whatsapp[hidden] { display: none !important; }
.modal-btn.whatsapp .wa-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.modal-btn.ghost {
  margin-top: 12px;
  background: transparent;
  color: var(--gray);
}
.modal-btn.ghost:hover { background: rgba(0, 0, 0, 0.05); color: var(--black); }

/* ---------------- Safari 引导页 ---------------- */
.safari-guide {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(245, 245, 247, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.safari-guide.show { display: flex; }
.sg-card {
  width: 100%;
  max-width: 360px;
  background: var(--pure-white);
  border-radius: 28px;
  padding: 44px 34px 30px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
}
.sg-logo { color: var(--black); display: inline-flex; opacity: 0.9; }
.sg-title {
  margin-top: 14px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
}
.sg-desc {
  margin-top: 12px;
  font-size: 16px;
  color: var(--gray);
  line-height: 1.5;
}
.sg-arrow {
  position: fixed;
  top: 8px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
[dir="rtl"] .sg-arrow { right: auto; left: 16px; align-items: flex-start; text-align: left; }
[dir="rtl"] .sg-arrow svg { transform: scaleX(-1); }
.sg-arrow svg {
  width: 64px;
  height: 74px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: sgArrow 1.4s ease-in-out infinite;
}
.sg-arrow-tip {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.4;
  max-width: 66vw;
  white-space: pre-line;
}
@keyframes sgArrow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(7px, -7px); }
}
.sg-or { margin-top: 26px; font-size: 13px; color: var(--gray); }
.sg-url {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--white);
  border-radius: 12px;
  font-size: 13px;
  color: var(--black);
  word-break: break-all;
  line-height: 1.4;
  direction: ltr;
  text-align: center;
}
.sg-copy {
  margin-top: 16px;
  width: 100%;
  height: 50px;
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: 980px;
  cursor: pointer;
}
.sg-copy:hover { background: var(--blue-hover); }
.sg-copy:active { transform: scale(0.97); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
