/* ===== CSS Variables ===== */
:root {
  --dark-navy: #0a0e27;
  --navy-light: #111640;
  --cyan: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.15);
  --text-primary: #e0e6ed;
  --text-secondary: #8892a4;
  --font-mono: 'Courier New', Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --globe-size: 560px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--dark-navy);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-overflow-scrolling: touch;
}

/* ===== Layout: full viewport, no scroll ===== */
.page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overscroll-behavior: none;
}

/* ===== Header ===== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 2px;
}

nav {
  display: flex;
  gap: 0.25rem;
}

nav button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

nav button:hover,
nav button:focus {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
}

nav button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ===== Main content ===== */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  min-height: 0;
}

/* Left: slogan & info */
.hero {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero .tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--cyan), #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 360px;
}

.hero .links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero .links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 229, 255, 0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.hero .links a:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--cyan);
}

/* Right: globe container */
.globe-wrap {
  width: var(--globe-size);
  height: var(--globe-size);
  flex-shrink: 0;
  position: relative;
}

.globe-wrap canvas {
  width: 100%;
  height: 100%;
}

/* ===== Footer ===== */
footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0 2rem;
  height: 40px;
  border-top: 1px solid rgba(0, 229, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: var(--cyan);
}

footer .divider {
  opacity: 0.3;
}

/* ===== WeChat QR Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  position: relative;
  background: var(--navy-light);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  max-width: min(280px, 85vw);
  box-sizing: border-box;
}

.modal-content img {
  width: min(200px, 60vw);
  height: min(200px, 60vw);
  object-fit: contain;
  border-radius: 4px;
}

.modal-content p {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--cyan);
}

/* ===== Meteor Canvas ===== */
#meteor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ===== Responsive ===== */

/* 900px */
@media (max-width: 900px) {
  :root {
    --globe-size: 400px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero {
    max-width: 340px;
  }
}

/* 600px — stack vertically */
@media (max-width: 600px) {
  main {
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
  }

  .hero {
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  .hero p {
    max-width: 100%;
  }

  .hero .links {
    justify-content: center;
  }

  .globe-wrap {
    width: min(280px, 70vw);
    height: min(280px, 70vw);
  }

  footer {
    height: auto;
    padding: 0.4rem 1rem;
    flex-wrap: wrap;
  }
}

/* 400px */
@media (max-width: 400px) {
  header {
    padding: 0 1rem;
  }

  main {
    padding: 0.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .globe-wrap {
    width: min(220px, 65vw);
    height: min(220px, 65vw);
  }
}
