:root {
  --color-jade-primary: #5d8c72;
  --color-jade-light: #7fb896;
  --color-jade-pale: #e8f3ec;
  --color-gold: #c8a45c;
  --color-bg-deep: #0a0f0d;
  --color-bg-base: #0d1412;
  --color-text-primary: #f0f5f2;
  --color-text-muted: rgba(240, 245, 242, 0.5);
  --color-text-faint: rgba(240, 245, 242, 0.3);

  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif;
  --font-sans: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;

  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overscroll-behavior-y: none;
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(10, 15, 13, 0.7) 100%);
}

.container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.content {
  text-align: center;
  max-width: 600px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo-mark {
  margin-bottom: 32px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(93, 140, 114, 0.3);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  background: linear-gradient(180deg, var(--color-jade-light) 0%, var(--color-jade-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  line-height: 1.3;
}

.slogan {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  letter-spacing: 0.5em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  padding-left: 0.5em;
}

.subtitle {
  font-size: 0.9rem;
  color: var(--color-text-faint);
  letter-spacing: 0.15em;
  margin-bottom: 48px;
}

.cta-wrapper {
  margin-bottom: 48px;
}

.cta-btn {
  position: relative;
  padding: 14px 40px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  letter-spacing: 0.15em;
  color: var(--color-jade-light);
  background: transparent;
  border: 1px solid var(--color-jade-primary);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.4s var(--ease-smooth);
}

@media (hover: hover) {
  .cta-btn:hover {
    color: var(--color-bg-deep);
    border-color: var(--color-jade-light);
    box-shadow: 0 0 30px rgba(127, 184, 150, 0.3);
  }
}

.cta-btn:active {
  color: var(--color-bg-deep);
  border-color: var(--color-jade-light);
  transform: scale(0.97);
  transition-duration: 0.1s;
}

.cta-btn .cta-text {
  position: relative;
  z-index: 2;
}

.cta-btn .cta-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-jade-light), transparent);
  transition: left 0.5s var(--ease-smooth);
  z-index: 1;
}

@media (hover: hover) {
  .cta-btn:hover .cta-glow {
    left: 100%;
  }
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-jade-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-smooth);
  z-index: 1;
}

@media (hover: hover) {
  .cta-btn:hover::before {
    transform: scaleX(1);
  }
}

.tags {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.tag {
  font-size: 0.8rem;
  color: var(--color-text-faint);
  letter-spacing: 0.15em;
}

.tag-divider {
  color: var(--color-jade-primary);
  font-size: 0.7rem;
}

.footer {
  text-align: center;
  margin-top: auto;
  padding-top: 20px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 8px 2px;
  transition: color 0.3s var(--ease-smooth);
}

@media (hover: hover) {
  .footer-links a:hover {
    color: var(--color-jade-light);
  }
}

.footer-links a:active {
  color: var(--color-jade-light);
}

.footer-sep {
  color: var(--color-text-faint);
  font-size: 0.7rem;
}

.copyright {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
}

.beian {
  font-size: 0.7rem;
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
  margin-top: 6px;
}

.beian a {
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color 0.3s var(--ease-smooth);
}

.beian a:hover {
  color: var(--color-jade-light);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-smooth) forwards;
}

.fade-in-delay-1 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-smooth) 0.2s forwards;
}

.fade-in-delay-2 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-smooth) 0.4s forwards;
}

.fade-in-delay-3 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-smooth) 0.6s forwards;
}

.fade-in-delay-4 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-smooth) 0.8s forwards;
}

.fade-in-delay-5 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--ease-smooth) 1s forwards;
}

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

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 13, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: relative;
  width: 90%;
  max-width: 420px;
  padding: 48px 32px 32px;
  background: linear-gradient(180deg, #0f1815 0%, #0a0f0d 100%);
  border: 1px solid rgba(127, 184, 150, 0.2);
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(93, 140, 114, 0.1);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s var(--ease-smooth);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.3s var(--ease-smooth);
}

@media (hover: hover) {
  .modal-close:hover {
    color: var(--color-jade-light);
  }
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-jade-light);
  margin-bottom: 12px;
  text-align: center;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}

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

.modal-input {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(127, 184, 150, 0.2);
  border-radius: 2px;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: border-color 0.3s var(--ease-smooth);
  outline: none;
}

.modal-input:focus {
  border-color: var(--color-jade-primary);
}

.modal-input::placeholder {
  color: var(--color-text-faint);
}

.modal-submit {
  padding: 14px;
  background: var(--color-jade-primary);
  border: none;
  border-radius: 2px;
  color: var(--color-bg-deep);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0.15em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.3s var(--ease-smooth);
}

.modal-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

@media (hover: hover) {
  .modal-submit:not(:disabled):hover {
    background: var(--color-jade-light);
    box-shadow: 0 4px 20px rgba(127, 184, 150, 0.3);
  }
}

.modal-submit:not(:disabled):active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

.modal-success {
  display: none;
  text-align: center;
  color: var(--color-jade-light);
  font-size: 0.9rem;
  padding: 20px 0;
  letter-spacing: 0.08em;
}

.modal-success.show {
  display: block;
}

@media (max-width: 767px) {
  .logo-icon {
    width: 64px;
    height: 64px;
  }

  .slogan {
    letter-spacing: 0.35em;
  }

  .cta-btn {
    padding: 12px 32px;
    font-size: 0.85rem;
  }

  .modal {
    padding: 40px 24px 24px;
  }

  /* 防止 iOS 聚焦输入框时自动缩放页面 */
  .modal-input,
  .modal-submit {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .slogan {
    letter-spacing: 0.25em;
    font-size: 0.85rem;
  }

  .tags {
    gap: 10px;
  }

  .footer-links {
    gap: 8px;
  }
}

/* 移动端浏览器地址栏收起/展开时保持布局稳定 */
@supports (height: 100dvh) {
  html, body {
    height: 100dvh;
  }
}

/* 用户系统开启"减少动态效果"时，关闭所有动画 */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-delay-1,
  .fade-in-delay-2,
  .fade-in-delay-3,
  .fade-in-delay-4,
  .fade-in-delay-5 {
    animation: none;
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01s !important;
    transition-duration: 0.01s !important;
  }
}
