@charset "UTF-8";

:root {
  --yellow: #ffe238;
  --purple: #6c43f4;
  --navy: #07172f;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: #fff;
  background: var(--navy);
  font-family: "Arial Rounded MT Bold", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.download-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 50px 28px;
  background:
    linear-gradient(90deg, rgba(7,23,47,.97) 0%, rgba(7,23,47,.86) 47%, rgba(7,23,47,.18) 100%),
    url("public/assets/game-bg.jpeg") center 65% / cover no-repeat;
}

.download-page::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 73% 48%, rgba(255,178,222,.48), transparent 28%);
  pointer-events: none;
}

.aurora {
  position: absolute;
  width: 620px;
  height: 620px;
  right: -80px;
  top: 50%;
  border-radius: 50%;
  background: rgba(255,248,213,.8);
  box-shadow: 0 0 80px #efe1ff, 0 0 180px rgba(124,83,255,.6);
  transform: translateY(-50%);
}

.stars {
  position: absolute;
  inset: 0;
  opacity: .8;
  background-image:
    radial-gradient(circle at 18% 20%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 82% 14%, #fff 0 1.5px, transparent 2px),
    radial-gradient(circle at 56% 73%, #ffe866 0 1px, transparent 2px);
  background-size: 120px 120px, 190px 190px, 230px 230px;
}

.download-card {
  position: relative;
  z-index: 3;
  width: min(1160px, 100%);
}

.logo {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  color: #171936;
}

.sun { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

.label {
  margin: 30px 0 14px;
  color: #cbbfff;
  font: 800 11px Arial, sans-serif;
  letter-spacing: 4px;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 106px);
  line-height: 1;
  letter-spacing: -6px;
  text-shadow: 0 7px 0 #11182e, 0 12px 28px rgba(0,0,0,.5);
}

h1 span {
  display: inline-block;
  margin-left: 12px;
  color: var(--yellow);
  -webkit-text-stroke: 1px #291a4c;
  text-shadow: 5px 5px 0 var(--purple), 8px 8px 0 #251747;
}

.download-buttons {
  display: flex;
  gap: 14px;
  margin-top: 48px;
}

.download-button {
  min-width: 200px;
  height: 70px;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: 40px 105px;
  justify-content: center;
  align-items: center;
  column-gap: 14px;
  color: #fff;
  background: #000;
  border: 2px solid #fff;
  border-radius: 16px;
  box-shadow: 5px 6px 0 var(--purple);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.download-button:hover {
  transform: translateY(-4px);
  box-shadow: 5px 10px 0 var(--purple);
}

.download-button > span:last-child {
  width: 105px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  transform: translateX(14px);
}
.download-button small { font: 9px Arial, sans-serif; letter-spacing: .5px; }
.download-button strong { font-size: 20px; line-height: 1.15; }
.ios-guide-trigger {
  margin-top: 20px;
  padding: 0;
  color: #d6cfff;
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
}
.ios-guide-trigger:hover { color: var(--yellow); }
.ios-guide-trigger span { margin-left: 6px; }
.store-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 40px;
  font-size: 31px;
  justify-self: center;
  align-self: center;
}
.store-icon.android {
  width: 40px;
  height: 40px;
  padding: 2px;
  object-fit: contain;
  background: #000;
  border-radius: 7px;
}

.version {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: #9fadc4;
  font-size: 11px;
}

.version i {
  width: 7px;
  height: 7px;
  background: #4df09a;
  border-radius: 50%;
  box-shadow: 0 0 10px #4df09a;
}

.fairy {
  position: absolute;
  z-index: 2;
  right: max(10px, calc((100% - 1260px) / 2));
  bottom: -90px;
  width: min(49vw, 660px);
  max-height: 96vh;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(57,24,102,.55));
  animation: float 5s ease-in-out infinite;
}

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 28px;
  padding: 13px 20px;
  color: #171a35;
  background: var(--yellow);
  border: 2px solid #111633;
  border-radius: 12px;
  box-shadow: 4px 4px 0 #111633;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: .25s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.ios-guide-modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 24, .8);
  backdrop-filter: blur(10px);
}

.ios-guide-modal[hidden] { display: none; }

.guide-panel {
  position: relative;
  width: min(480px, 100%);
  padding: 34px;
  color: #fff;
  background: #0b1225;
  border: 2px solid #fff;
  border-radius: 22px;
  box-shadow: 7px 8px 0 var(--purple);
}

.guide-close {
  position: absolute;
  top: 12px;
  right: 15px;
  color: #fff;
  background: none;
  border: 0;
  font-size: 26px;
  cursor: pointer;
}

.guide-label { margin: 0 0 8px; color: #a998ff; font: 800 9px Arial, sans-serif; letter-spacing: 3px; }
.guide-panel h2 { margin: 0; font-size: 25px; }
.guide-steps { margin: 25px 0 20px; padding: 0; list-style: none; }
.guide-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 15px 0; border-top: 1px solid rgba(255,255,255,.1); }
.guide-steps li > span { color: var(--yellow); font: 800 11px Arial, sans-serif; }
.guide-steps strong { display: block; margin-bottom: 6px; font-size: 14px; }
.guide-steps p { margin: 0; color: #a8b4c8; font-size: 12px; line-height: 1.7; }
.guide-steps a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }

@keyframes float { 50% { transform: translateY(-14px) rotate(1deg); } }

@media (max-width: 820px) {
  .download-page {
    align-items: start;
    padding-top: 72px;
    text-align: center;
    background:
      linear-gradient(180deg, rgba(7,23,47,.92) 0%, rgba(7,23,47,.58) 52%, #07172f 100%),
      url("public/assets/game-bg.jpeg") center / cover no-repeat;
  }

  .download-card { display: flex; flex-direction: column; align-items: center; }
  .logo { width: 48px; height: 48px; }
  .label { margin-top: 24px; }
  h1 { font-size: clamp(50px, 13vw, 76px); letter-spacing: -4px; }
  h1 span { margin-left: 7px; }
  .download-buttons { width: min(100%, 350px); flex-direction: column; margin-top: 35px; }
  .download-button { width: 100%; justify-content: center; }
  .version { margin-top: 18px; }
  .ios-guide-trigger { margin-top: 18px; }
  .guide-panel { padding: 30px 22px 24px; text-align: left; }
  .aurora { width: 430px; height: 430px; right: -140px; top: 76%; }
  .fairy { width: 440px; max-width: none; right: 50%; bottom: -220px; transform: translateX(50%); opacity: .55; animation: none; }
}

@media (max-height: 670px) and (min-width: 821px) {
  .download-page { padding-top: 35px; padding-bottom: 35px; }
  .fairy { bottom: -150px; }
}
