/* ── Google Fonts with display=swap for performance ── */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* ════════════════════════════════════
   CSS Custom Properties
════════════════════════════════════ */
:root {
  --bg:      #1a1326;
  --bg2:     #231a35;
  --bg3:     #2d2244;
  --surface: #312550;
  --a1:      #c084fc;
  --a2:      #f472b6;
  --a3:      #67e8f9;
  --gold:    #fde68a;
  --text:    #f0e6ff;
  --muted:   #a78bca;
  --border:  rgba(192,132,252,0.2);
  --glow:    rgba(192,132,252,0.35);
  /* Robust font stack: Google Fonts → system CJK → system sans */
  --font: 'M PLUS Rounded 1c', 'Noto Sans SC',
          'PingFang SC', 'Hiragino Sans GB', 'Hiragino Kaku Gothic ProN',
          'Microsoft YaHei', 'Meiryo', 'Apple SD Gothic Neo',
          -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ════════════════════════════════════
   Reset
════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ════════════════════════════════════
   Background — Stars
════════════════════════════════════ */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  animation: twinkle var(--d) var(--dl) infinite ease-in-out;
}
@keyframes twinkle {
  0%, 100% { opacity: 0;          transform: scale(.6); }
  50%       { opacity: var(--op); transform: scale(1);  }
}

/* ════════════════════════════════════
   Background — Gradient Mesh
════════════════════════════════════ */
.mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%,  rgba(139, 92,246,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%,  rgba(244,114,182,.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%,  rgba(103,232,249,.07) 0%, transparent 50%);
}

/* ════════════════════════════════════
   Layout wrapper
════════════════════════════════════ */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ════════════════════════════════════
   Navigation
════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  background: rgba(26,19,38,.82);
  border-bottom: 1px solid var(--border);
}
.nav-in {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* fallback */
}
.nav-logo .paw {
  -webkit-text-fill-color: initial;
  color: initial;
  font-size: 1.25rem;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--a1); }

/* ════════════════════════════════════
   Language Selector
════════════════════════════════════ */
.lang-selector {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(192,132,252,.1);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 11px 5px 10px;
  color: var(--a1);
  -webkit-text-fill-color: var(--a1);
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1;
}
.lang-btn:hover,
.lang-selector.open .lang-btn {
  background: rgba(192,132,252,.18);
  border-color: var(--a1);
  box-shadow: 0 0 14px var(--glow);
}
.lang-btn .globe-ico { flex-shrink: 0; opacity: .85; display: block; }
.lang-btn .lang-label { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.lang-btn .chevron {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  display: block;
}
.lang-selector.open .lang-btn .chevron { transform: rotate(180deg); }

/* Dropdown */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  background: var(--bg2);
  border: 1px solid rgba(192,132,252,.25);
  border-radius: 16px;
  padding: 6px;
  box-shadow:
    0 20px 60px rgba(0,0,0,.55),
    0 0 0 1px rgba(192,132,252,.06),
    inset 0 1px 0 rgba(255,255,255,.04);
  opacity: 0;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .2s cubic-bezier(.4,0,.2,1),
              transform .2s cubic-bezier(.4,0,.2,1);
  z-index: 200;
}
.lang-selector.open .lang-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.lang-option:hover {
  background: rgba(192,132,252,.12);
  color: var(--text);
}
.lang-option.active {
  background: rgba(192,132,252,.18);
  color: var(--a1);
  font-weight: 700;
}
.lang-option .flag  { font-size: 1.1rem; flex-shrink: 0; line-height: 1; }
.lang-option .lname { flex: 1; }
.lang-option .check {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: var(--a1);
  opacity: 0;
  display: block;
}
.lang-option.active .check { opacity: 1; }

/* Mobile: hide nav links, shrink lang button */
@media (max-width: 540px) {
  .nav-links { display: none; }
  .lang-btn .lang-label { display: none; }
}

/* ════════════════════════════════════
   Hero Section
════════════════════════════════════ */
.hero {
  padding: 90px 0 70px;
  text-align: center;
  position: relative;
}
.paw-fl {
  position: absolute;
  font-size: 1.5rem;
  opacity: .12;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  animation: floatP var(--fd) var(--fde) infinite ease-in-out;
}
@keyframes floatP {
  0%, 100% { transform: translateY(0)     rotate(var(--rot));                  opacity: .10; }
  50%       { transform: translateY(-16px) rotate(calc(var(--rot) + 8deg));    opacity: .20; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(192,132,252,.12);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 16px;
  font-size: .75rem;
  color: var(--a1);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 26px;
  animation: fadeUp .6s ease both;
}
.badge .dot {
  width: 7px;
  height: 7px;
  background: var(--a2);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;  transform: scale(1);  }
  50%       { opacity: .4; transform: scale(.7); }
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 10px;
  animation: fadeUp .6s .1s ease both;
}
.grad {
  background: linear-gradient(135deg, var(--a1) 0%, var(--a2) 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.hero-jp {
  font-size: clamp(.9rem, 2.5vw, 1.15rem);
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: .12em;
  animation: fadeUp .6s .18s ease both;
}
.hero-desc {
  font-size: clamp(.9rem, 2vw, 1.05rem);
  color: rgba(240,230,255,.72);
  max-width: 520px;
  margin: 0 auto 42px;
  line-height: 1.78;
  animation: fadeUp .6s .26s ease both;
}

/* ── Mascot ── */
.mascot-wrap {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 0 auto 42px;
  animation: fadeUp .7s .12s ease both;
}
.m-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 0deg, var(--a1), var(--a2), var(--a3), var(--a1));
  animation: spinR 6s linear infinite;
}
@keyframes spinR { to { transform: rotate(360deg); } }
.m-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* Light gradient matching the PNG's background for seamless look */
  background: radial-gradient(circle at 40% 35%, #e8daf5 0%, #c9b8e8 60%, #a890d0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: bob 3s ease-in-out infinite;
}
.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes bob {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-8px); }
}
.m-shadow {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(244,114,182,.45) 0%, transparent 70%);
  animation: shad 3s ease-in-out infinite;
}
@keyframes shad {
  0%, 100% { opacity: .6; transform: translateX(-50%) scaleX(1);   }
  50%       { opacity: .3; transform: translateX(-50%) scaleX(.75); }
}

/* ── CTA Buttons ── */
.cta {
  display: flex;
  gap: 13px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp .6s .34s ease both;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: .93rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover { transform: translateY(-3px); }
.btn-p {
  background: linear-gradient(135deg, var(--a1), var(--a2));
  color: #1a1326;
  box-shadow: 0 4px 24px rgba(192,132,252,.4);
}
.btn-p:hover {
  box-shadow: 0 8px 32px rgba(192,132,252,.6);
  filter: brightness(1.08);
}
.btn-s {
  background: transparent;
  color: var(--a1);
  border: 2px solid var(--a1);
}
.btn-s:hover {
  box-shadow: 0 0 18px var(--glow);
  background: rgba(192,132,252,.07);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Version tag */
#vtag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(103,232,249,.1);
  border: 1px solid rgba(103,232,249,.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: .76rem;
  color: var(--a3);
  font-weight: 700;
  margin-top: 18px;
  animation: fadeUp .6s .42s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 0 76px;
}

/* ════════════════════════════════════
   Section common
════════════════════════════════════ */
.stag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--a2);
  margin-bottom: 9px;
}
.stitle {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 13px;
  line-height: 1.2;
}
.slead {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 50px;
}
.scenter { text-align: center; }

/* ════════════════════════════════════
   Features
════════════════════════════════════ */
#features { padding: 0 0 86px; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}
.feat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 24px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.feat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(192,132,252,.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.feat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(192,132,252,.45);
  box-shadow: 0 12px 36px rgba(192,132,252,.15);
}
.feat-card:hover::before { opacity: 1; }
.feat-ico  { font-size: 2.1rem; margin-bottom: 13px; display: block; line-height: 1; }
.feat-name { font-size: 1rem;  font-weight: 700; margin-bottom: 7px; color: var(--text); }
.feat-desc { font-size: .86rem; color: var(--muted); line-height: 1.65; }

/* ════════════════════════════════════
   Install Steps
════════════════════════════════════ */
#install { padding: 0 0 86px; }
.steps {
  display: flex;
  flex-direction: column;
  max-width: 660px;
  margin: 0 auto;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 36px;
  bottom: 36px;
  width: 2px;
  background: linear-gradient(to bottom, var(--a1), var(--a2));
  opacity: .3;
}
.step { display: flex; gap: 20px; align-items: flex-start; padding: 18px 0; }
.snum {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--a1);
  position: relative;
  z-index: 1;
  transition: border-color .2s, box-shadow .2s;
}
.step:hover .snum {
  border-color: var(--a1);
  box-shadow: 0 0 14px var(--glow);
}
.scont { padding-top: 9px; }
.sttl  { font-size: .97rem; font-weight: 700; margin-bottom: 5px; color: var(--text); }
.sdesc { font-size: .86rem; color: var(--muted); line-height: 1.6; }
.sdesc code {
  background: var(--surface);
  color: var(--a3);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-size: .84em;
}
.sdesc a { color: var(--a1); }

/* ════════════════════════════════════
   Download
════════════════════════════════════ */
#download { padding: 0 0 96px; }
.dl-card {
  background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 50px 42px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.dl-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,132,252,.12) 0%, transparent 70%);
  pointer-events: none;
}
.dl-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,114,182,.09) 0%, transparent 70%);
  pointer-events: none;
}
.dl-title { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 11px; }
.dl-sub   { color: var(--muted); font-size: .93rem; margin-bottom: 34px; line-height: 1.65; }
.dl-btns  {
  display: flex;
  gap: 13px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}
.dl-meta {
  font-size: .76rem;
  color: var(--muted);
  opacity: .7;
  position: relative;
  z-index: 1;
}
#dlvi {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 11px;
  min-height: 20px;
  position: relative;
  z-index: 1;
}
#dlvi .ltag { color: var(--a3); font-weight: 700; margin-right: 6px; }

/* ════════════════════════════════════
   Footer
════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 34px 24px;
  text-align: center;
}
.foot-in {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}
.foot-logo {
  font-size: 1.05rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.foot-links { display: flex; gap: 20px; list-style: none; }
.foot-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .83rem;
  transition: color .2s;
}
.foot-links a:hover { color: var(--a1); }
.foot-copy { font-size: .76rem; color: rgba(167,139,202,.5); }

/* ════════════════════════════════════
   Scroll Reveal
════════════════════════════════════ */
.rv {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.rv.vis {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════
   Responsive
════════════════════════════════════ */
@media (max-width: 640px) {
  .dl-card { padding: 34px 20px; }
  .steps::before { left: 24px; }
  .snum { width: 48px; height: 48px; }
}
