/* ============ 暮樱花 · 个人门户 ============ */
:root {
  --night-top: #171a3a;
  --night-mid: #2b2452;
  --night-glow: #8a5370;
  --ink: #ffffff;
  --ink-soft: rgba(255, 239, 244, 0.86);
  --ink-dim: rgba(214, 190, 200, 0.62);
  --petal-1: rgba(244, 178, 200, 0.85);
  --petal-2: rgba(255, 219, 231, 0.8);
  --petal-3: rgba(238, 160, 186, 0.7);
  --branch: #6b4a55;
  --font-kai: 'LXGW WenKai', 'KaiTi', 'SimSun', serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-kai);
  color: var(--ink-soft);
  overflow-x: hidden;
  min-height: 100vh;
  background: linear-gradient(175deg,
    var(--night-top) 0%,
    var(--night-mid) 45%,
    #3d2b56 72%,
    var(--night-glow) 100%);
  background-attachment: fixed;
}

/* 飘落花瓣画布：全屏、可点穿 */
#petals {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 四角樱花枝 */
.branch {
  position: fixed;
  width: clamp(160px, 22vw, 300px);
  height: clamp(160px, 22vw, 300px);
  z-index: 0;
  opacity: 0.92;
  pointer-events: none;
}
.branch--tl { top: -8px; left: -8px; }
.branch--tr { top: -8px; right: -8px; transform: scaleX(-1); }
.branch--bl { bottom: -8px; left: -8px; transform: scaleY(-1); }
.branch--br { bottom: -8px; right: -8px; transform: scale(-1); }

/* 顶部导航 */
.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
}
.nav__brand {
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  text-decoration: none;
  text-shadow: 0 0 18px rgba(255, 190, 220, 0.35);
}
.nav__links a {
  margin-left: 1.6rem;
  font-size: 1.02rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.25rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.nav__links a:hover {
  color: #ffc6dc;
  border-bottom-color: rgba(255, 198, 220, 0.6);
}

/* 站牌（顶端小标题） */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.4rem, 3.5vw, 2.6rem) 1rem clamp(1.6rem, 4vw, 3rem);
}
.hero__seal {
  width: clamp(1.9rem, 4vw, 2.6rem);
  height: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.3vw, 1.5rem);
  color: #f0657f;
  border: 2px solid rgba(240, 101, 127, 0.85);
  border-radius: 0.3rem;
  transform: rotate(-6deg);
  margin-bottom: clamp(0.5rem, 1.2vw, 0.9rem);
  box-shadow: 0 2px 12px rgba(240, 101, 127, 0.22);
}
.hero__title {
  font-family: var(--font-kai);
  font-weight: 700;
  font-size: clamp(2.3rem, 6.5vw, 4.2rem);
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: #fff;
  text-shadow:
    0 0 26px rgba(255, 190, 220, 0.28),
    0 4px 18px rgba(20, 14, 40, 0.55);
  user-select: none;
}
.hero__tagline {
  margin-top: clamp(0.4rem, 1.1vw, 0.8rem);
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  letter-spacing: 0.45em;
  padding-left: 0.45em; /* 抵消末字字距 */
  color: var(--ink-soft);
}
.hero__domain {
  margin-top: 0.5rem;
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  letter-spacing: 0.22em;
  color: var(--ink-dim);
}

/* 页脚 */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.2rem 1rem 1.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

/* 往下滚动指示（站牌已置顶，不再需要） */

/* 作品区：玩点游戏吧 */
.games {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem 3.2rem;
}
.games__title {
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: #fff;
  text-shadow: 0 0 22px rgba(255, 190, 220, 0.35);
  margin-bottom: 2.4rem;
}
.games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}
.game-card {
  display: block;
  background: rgba(24, 20, 46, 0.42);
  border: 1px solid rgba(255, 205, 222, 0.2);
  border-radius: 1.1rem;
  padding: 1.7rem 1.9rem;
  text-decoration: none;
  color: var(--ink-soft);
  backdrop-filter: blur(6px);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 205, 222, 0.55);
  box-shadow: 0 12px 32px rgba(10, 6, 26, 0.4), 0 0 26px rgba(244, 178, 200, 0.16);
}
.game-card__badge {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: #f0657f;
  border: 1px solid rgba(240, 101, 127, 0.7);
  border-radius: 999px;
  padding: 0.18rem 0.8rem;
  margin-bottom: 0.9rem;
}
.game-card__badge--soon { color: var(--ink-dim); border-color: rgba(214, 190, 200, 0.4); }
.game-card h3 {
  font-size: 1.22rem;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 0.5rem;
}
.game-card p {
  font-size: 0.94rem;
  line-height: 1.85;
  color: var(--ink-dim);
  margin-bottom: 1.1rem;
}
.game-card__cta {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: #ffc6dc;
}
.game-card--soon { opacity: 0.7; pointer-events: none; }

/* 留言板 */
.guestbook {
  position: relative;
  z-index: 2;
  max-width: 840px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem 4.5rem;
}
.guestbook__title {
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 190, 220, 0.3);
}
.guestbook__hint {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.86rem;
  letter-spacing: 0.24em;
  padding-left: 0.24em;
  color: var(--ink-dim);
}
.guestbook__form {
  margin: 1.4rem auto 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: rgba(24, 20, 46, 0.4);
  border: 1px solid rgba(255, 205, 222, 0.18);
  border-radius: 1rem;
  padding: 1.2rem 1.3rem;
  backdrop-filter: blur(6px);
}
.guestbook__row {
  display: flex;
  gap: 0.7rem;
}
.gb-input {
  font: inherit;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(255, 235, 242, 0.08);
  border: 1px solid rgba(255, 205, 222, 0.28);
  border-radius: 0.6rem;
  padding: 0.55rem 0.8rem;
  outline: none;
  transition: border-color 0.25s, background 0.25s;
}
.gb-input::placeholder { color: rgba(214, 190, 200, 0.55); }
.gb-input:focus {
  border-color: rgba(255, 198, 220, 0.7);
  background: rgba(255, 235, 242, 0.14);
}
.gb-input--nick { flex: 1; }
.guestbook__form textarea { resize: vertical; min-height: 4.6rem; }
.gb-btn {
  font: inherit;
  letter-spacing: 0.18em;
  color: #fff;
  background: linear-gradient(135deg, #e8749f, #cf5e86);
  border: none;
  border-radius: 0.6rem;
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s;
  white-space: nowrap;
}
.gb-btn:hover { filter: brightness(1.12); }
.gb-btn:active { transform: translateY(1px); }
.gb-btn:disabled { opacity: 0.6; cursor: default; }
.guestbook__status {
  margin-top: 0.8rem;
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: #ffc6dc;
}
.guestbook__list {
  list-style: none;
  margin-top: 1.6rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.gb-item {
  background: rgba(24, 20, 46, 0.36);
  border: 1px solid rgba(255, 205, 222, 0.14);
  border-radius: 0.8rem;
  padding: 0.75rem 1rem;
}
.gb-item__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}
.gb-item__nick {
  color: #ffc6dc;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.gb-item__time {
  color: var(--ink-dim);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}
.gb-item__text {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.8;
  letter-spacing: 0.03em;
  white-space: pre-wrap;
  word-break: break-word;
}
.gb-empty {
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  padding: 1.2rem 0;
}

@media (max-width: 640px) {
  .nav { padding: 0.85rem 1rem; }
  .nav__links a { margin-left: 1rem; font-size: 0.95rem; }
  .branch--bl, .branch--br { display: none; }
}