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

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --accent: #00cec9;
  --accent2: #fd79a8;

  /* Light theme backgrounds */
  --bg: #f3f4f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f1ff;

  /* Light theme text */
  --text: #1a1a2e;
  --text-secondary: #5a5a7a;
  --text-tertiary: #8e8ea8;

  /* Light theme borders */
  --border: #e0e0ec;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
  --shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
  --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.08);
  --shadow-xl: 0 16px 48px rgba(108, 92, 231, 0.12);

  --radius: 16px;
  --radius-lg: 24px;
}

html {
  scroll-behavior: smooth;
}

@font-face {
  font-family: shuhei;
  src: url("//assets.jiadouai.com/ttf/AlimamaShuHeiTi-Bold.woff2")
    format("woff2");
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Background glow (light-theme: subtle tinted blurs) ---- */

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--top {
  width: 600px;
  height: 600px;
  background: var(--primary-light);
  top: -200px;
  right: -200px;
}

.bg-glow--mid {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: 50%;
  left: -250px;
  transform: translateY(-50%);
}

.bg-glow--bottom {
  width: 500px;
  height: 500px;
  background: var(--accent2);
  bottom: -200px;
  right: -150px;
}

/* ---- Header ---- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: linear-gradient(
    to bottom,
    rgba(243, 244, 249, 0.5),
    rgba(243, 244, 249, 0.3)
  );
}

.header_container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.header__logo-img {
  display: block;
  height: 16px;
  width: auto;
}

.header_right {
  display: flex;
  column-gap: 16px;
}

/* ---- Container ---- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), #5b4ec7);
  color: #fff;
  box-shadow: 0 4px 24px rgba(108, 92, 231, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  background: var(--bg-card-hover);
  border-color: rgba(108, 92, 231, 0.25);
  color: var(--primary);
}

.btn--login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary), #7c6ff7);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(108, 92, 231, 0.2);
}

.btn--login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 28px rgba(108, 92, 231, 0.35);
}

.btn--login__icon {
  flex-shrink: 0;
}

.btn--user-center {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn--user-center:hover {
  background: var(--bg-card-hover);
  border-color: rgba(108, 92, 231, 0.25);
}

/* ---- Section (shared) ---- */

.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section--alt {
  background: #f0f1f6;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  padding: 6px 18px;
  border-radius: 100px;
  background: rgba(108, 92, 231, 0.06);
  border: 1px solid rgba(108, 92, 231, 0.12);
}

.section__label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.4);
}

.section__title {
  font-family: shuhei;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Modal ---- */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

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

.modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 640px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f0f5;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 1;
  line-height: 1;
}

.modal__close:hover {
  background: #e0e0ea;
  color: var(--text);
}

.modal__body {
  display: flex;
  gap: 32px;
  padding: 48px 40px;
}

.modal__left {
  flex-shrink: 0;
  text-align: center;
}

.modal__qrcode {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f5f5;
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  border: 1px solid var(--border);
}

.modal__qrcode-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal__qrcode-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal__qrcode-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.modal__right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

.modal__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal__info-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal__info-label {
  font-size: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  min-width: 56px;
}

.modal__info-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

/* ---- CSS Animations ---- */

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  33% {
    transform: translateY(-120px) rotate(10deg) scale(1.25);
  }
  66% {
    transform: translateY(-60px) rotate(-8deg) scale(1.12);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ---- Scroll reveal utilities ---- */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .btn--login span {
    display: none;
  }

  .modal__body {
    flex-direction: column;
    align-items: center;
    padding: 40px 24px;
    gap: 24px;
  }

  .modal__qrcode {
    width: 150px;
    height: 150px;
  }

  .modal__right {
    text-align: center;
  }

  .modal__info-item {
    justify-content: center;
  }
}
