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

body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #1a202c;
}

/* Hero */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.menu a {
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.menu a:hover {
  opacity: 1;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background: #fff;
  color: #764ba2;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Sections */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section.alt {
  background: #f7fafc;
  max-width: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: #764ba2;
}

/* Footer */
.footer {
  background: #1a202c;
  color: #a0aec0;
  text-align: center;
  padding: 2rem;
}

@media (max-width: 600px) {
  .hero-content h1 { font-size: 2rem; }
  .menu { gap: 1rem; }
}

/* Guestbook */
.guest-form {
  max-width: 560px;
  margin: 2rem auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guest-form input,
.guest-form textarea {
  font: inherit;
  padding: 0.8rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.guest-form textarea { min-height: 100px; resize: vertical; }

.guest-form .btn {
  background: #764ba2;
  color: #fff;
  border: none;
  cursor: pointer;
}

.messages {
  display: grid;
  gap: 1rem;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
  max-height: 480px;        /* 约能看到4~5条，其余滚动查看 */
  overflow-y: auto;
  padding-right: 0.5rem;    /* 给滚动条留位置，避免贴着卡片 */
}

/* 滚动条美化（Webkit内核浏览器） */
.messages::-webkit-scrollbar {
  width: 6px;
}
.messages::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}
.messages::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}

.msg-card small { color: #a0aec0; }
.empty { color: #a0aec0; }

/* Changelog */
.changelog {
  list-style: none;
  max-width: 640px;
  margin: 1.5rem auto 0;
  text-align: left;
}

.changelog li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.5rem;
  border-left: 2px solid #e2e8f0;
  color: #4a5568;
}

.changelog li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1.1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #764ba2;
}

.changelog li:first-child {
  border-left-color: #764ba2;
}


/* Video */
.video-wrap {
  max-width: 720px;
  margin: 2rem auto 0;
}

.video-wrap video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  background: #000;
}

.video-credit {
  display: block;
  margin-top: 0.5rem;
  color: #a0aec0;
}