:root {
  --bg-start: #030615;
  --bg-end: #070d2b;
  --panel-bg: rgba(8, 16, 47, 0.72);
  --panel-border: rgba(133, 151, 255, 0.18);
  --panel-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --text-main: #f6f7ff;
  --text-secondary: rgba(233, 236, 255, 0.74);
  --text-muted: rgba(205, 214, 255, 0.5);
  --violet: #8474ff;
  --violet-light: #a79cff;
  --cyan: #00dfd8;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg-start) 0%, #040816 35%, var(--bg-end) 100%);
  color: var(--text-main);
  font-family: "Inter", "Noto Sans SC", "Noto Sans TC", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(98, 74, 255, 0.1), transparent 18%),
    radial-gradient(circle at 73% 65%, rgba(0, 223, 216, 0.08), transparent 20%),
    linear-gradient(to right, rgba(100, 132, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(100, 132, 255, 0.04) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  pointer-events: none;
  z-index: 0;
}

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

button {
  font: inherit;
}

.grid-click-glow {
  position: fixed;
  left: var(--grid-click-x, 50%);
  top: var(--grid-click-y, 50%);
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background-image:
    linear-gradient(to right, rgba(200, 215, 255, 0.95) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200, 215, 255, 0.95) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: calc(400px - var(--grid-click-x, 50%)) calc(400px - var(--grid-click-y, 50%));
  -webkit-mask-image: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 65%);
  mask-image: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 65%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 0 0;
  mask-size: 0 0;
  filter: drop-shadow(0 0 6px rgba(180, 200, 255, 0.8)) drop-shadow(0 0 12px rgba(160, 180, 255, 0.4));
}

.grid-click-glow.is-active {
  animation: grid-glow-ripple 1200ms cubic-bezier(0.12, 0.8, 0.32, 1) forwards;
}

@keyframes grid-glow-ripple {
  0% {
    -webkit-mask-size: 0 0;
    mask-size: 0 0;
    opacity: 1;
  }

  100% {
    -webkit-mask-size: 800px 800px;
    mask-size: 800px 800px;
    opacity: 0;
  }
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  height: 100svh;
  padding: 14px 18px 18px;
  overflow: hidden;
}

.decor-planet-left,
.decor-planet-right {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.decor-planet-left {
  left: 18px;
  top: 104px;
  width: 141px;
  opacity: 0.95;
  filter: drop-shadow(0 18px 34px rgba(86, 91, 255, 0.22));
}

.decor-planet-right {
  right: -24px;
  top: 12px;
  width: 250px;
  opacity: 0.95;
  filter: drop-shadow(0 24px 42px rgba(140, 84, 255, 0.24));
}

.topbar,
.content-shell {
  width: min(100%, 1260px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 38, 0.74);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 700;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8, 13, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.lang-button {
  min-width: 68px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(233, 236, 255, 0.7);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.lang-button:hover {
  color: #fff;
}

.lang-button.is-active {
  background: linear-gradient(180deg, rgba(91, 77, 193, 0.82), rgba(74, 63, 170, 0.88));
  color: #fff;
}

.content-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100svh - 74px);
  padding: 4px 0 0;
}

.hero {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  padding: 100px 0 24px;
}

.hero-badge {
  position: relative;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
  width: fit-content;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 223, 216, 0.2);
  background: rgba(5, 24, 54, 0.65);
  color: rgba(0, 223, 216, 0.92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(0, 223, 216, 0.08);
}

.hero-badge {
  margin: 0 auto 30px;
}

.hero-title {
  position: relative;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
  margin: 0 auto;
  max-width: 980px;
  text-align: center;
  font-size: clamp(74px, 9.4vw, 137px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.035em;
  background: linear-gradient(90deg, #ffffff 0%, #faf5ff 30%, #ead5ff 54%, #cf9aff 76%, #a374f4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.hero-copy {
  position: relative;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
  max-width: 820px;
  margin: 18px auto 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 21px;
  line-height: 1.7;
}

.hero-flight-stage {
  position: relative;
  z-index: 1;
  --cat-size: clamp(188px, 24vw, 228px);
  --cat-rest-shift-y: -56%;
  --cat-flight-rise: -96px;
  margin: 42px auto 0;
  width: min(100%, 940px);
  min-height: 178px;
  transition: transform 220ms ease;
  cursor: pointer;
}

.hero-flight-stage:focus-visible {
  outline: none;
}

.decor-cat-orbit {
  position: absolute;
  left: calc(100% - 24px);
  top: calc(50% - 30px);
  z-index: 1;
  width: var(--cat-size);
  transform: translate3d(0, var(--cat-rest-shift-y), 0);
  transform-origin: center center;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  transition: transform 320ms linear;
}

.decor-cat {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 36px rgba(126, 117, 255, 0.26));
  will-change: transform, filter;
  transition: transform 100ms step-end, filter 320ms ease;
}

.hero-flight-stage.is-cat-flying .decor-cat {
  filter: drop-shadow(0 26px 48px rgba(126, 117, 255, 0.34));
}

.preview-section {
  width: min(100%, 1260px);
  margin: 0 auto 50px;
  flex: 0 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 108px;
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(133, 151, 255, 0.12);
  background: linear-gradient(180deg, rgba(8, 16, 44, 0.84), rgba(6, 12, 31, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015), 0 12px 28px rgba(4, 9, 25, 0.22);
}

.feature-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.feature-copy h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: rgba(235, 230, 249, 0.9);
}

.feature-copy p {
  margin: 0;
  color: rgba(230, 233, 255, 0.58);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .page-shell {
    min-height: 100%;
    height: auto;
    overflow: visible;
    padding: 12px 12px 24px;
  }

  .topbar {
    flex-direction: row;
    align-items: flex-start;
  }

  .brand {
    font-size: 26px;
  }

  .topbar-actions {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .status-pill {
    width: auto;
    max-width: min(56vw, 240px);
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .content-shell {
    display: block;
    min-height: 0;
    padding: 10px 0 0;
  }

  .hero {
    display: block;
    padding-bottom: 0;
  }

  .hero-title {
    font-size: 62px;
    line-height: 1.08;
    letter-spacing: -0.02em;
  }

  .hero-copy {
    margin-top: 14px;
    font-size: 18px;
  }

  .hero-flight-stage {
    --cat-size: clamp(136px, 26vw, 168px);
    --cat-rest-shift-y: -52%;
    --cat-flight-rise: -58px;
    margin-top: 30px;
    min-height: 168px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .decor-planet-left {
    left: -5px;
    top: 74px;
    width: 120px;
  }

  .decor-planet-right {
    right: -26px;
    top: 18px;
    width: 180px;
  }

  .decor-cat-orbit {
    left: calc(100% - 52px);
    top: calc(40% - 38px);
    opacity: 0.9;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 10px;
  }

  .brand {
    font-size: 24px;
  }

  .status-pill {
    max-width: min(58vw, 220px);
    min-height: 34px;
    padding: 0 12px;
    font-size: 11px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .preview-section {
    margin-bottom: 0;
  }
}
