*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%;overflow:hidden}
body{
  background:#0a0a0a;color:#e8e4df;font-family:'Noto Serif SC',serif;
  display:flex;align-items:center;justify-content:center;
  -webkit-font-smoothing:antialiased
}

/* ambient particle canvas */
#particles{position:fixed;inset:0;pointer-events:none;opacity:.4;z-index:1}

/* mouse glow */
#glow{
  position:fixed;width:600px;height:600px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.03) 0%,transparent 70%);
  pointer-events:none;transform:translate(-50%,-50%);z-index:2;
  transition:opacity .3s ease;opacity:0
}

.scene{position:relative;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;text-align:center;padding:2rem;z-index:10}

/* ==================== 首页状态 ==================== */
.home{
  position:absolute;inset:0;
  display:flex;flex-direction:column;
  align-items:center;justify-content:space-between;
  padding:clamp(3rem,8vh,6rem) 2rem clamp(4rem,10vh,8rem);
  transition:opacity .6s ease,transform .6s ease
}
.home.hidden{opacity:0;transform:scale(.95);pointer-events:none}

/* 顶部标题 */
.home-title{
  font-size:clamp(2.5rem,8vw,5rem);font-weight:600;
  letter-spacing:.3em;color:#f8dc8a;
  text-shadow:0 0 40px rgba(248,220,138,.3);
  animation:titleGlow 3s ease-in-out infinite
}
@keyframes titleGlow{
  0%,100%{text-shadow:0 0 40px rgba(248,220,138,.3),0 0 80px rgba(248,220,138,.15)}
  50%{text-shadow:0 0 60px rgba(248,220,138,.5),0 0 120px rgba(248,220,138,.25)}
}

/* 底部球形按钮 */
.orb-container{
  position:relative;
  display:flex;flex-direction:column;align-items:center;gap:2rem
}

.orb{
  position:relative;
  /*width:clamp(100px,25vw,160px);*/
  width:clamp(140px,35vw,260px);
  height:clamp(140px,35vw,260px);
  border-radius:50%;
  cursor:pointer;
  background:radial-gradient(circle at 30% 30%,#f8dc8a 0%,#e5b84a 40%,#c49a2a 70%,#8b7020 100%);
  box-shadow:
    0 0 60px rgba(248,220,138,.6),
    0 0 120px rgba(248,220,138,.4),
    0 0 180px rgba(248,220,138,.2),
    inset -10px -10px 30px rgba(0,0,0,.3),
    inset 5px 5px 20px rgba(255,255,255,.3);
  transition:transform .4s ease,box-shadow .4s ease;
  animation:orbPulse 4s ease-in-out infinite
}
.orb::before{
  content:'';
  position:absolute;
  top:8%;left:12%;
  width:40%;height:25%;
  background:radial-gradient(ellipse at center,rgba(255,255,255,.6) 0%,transparent 70%);
  border-radius:50%;
  filter:blur(3px)
}
.orb::after{
  content:'';
  position:absolute;inset:-20%;
  border-radius:50%;
  background:radial-gradient(circle,rgba(248,220,138,.2) 0%,transparent 60%);
  animation:orbGlow 3s ease-in-out infinite
}
.orb:hover{
  transform:scale(1.08);
  box-shadow:
    0 0 80px rgba(248,220,138,.8),
    0 0 160px rgba(248,220,138,.5),
    0 0 240px rgba(248,220,138,.3),
    inset -10px -10px 30px rgba(0,0,0,.3),
    inset 5px 5px 20px rgba(255,255,255,.4)
}
.orb:active{transform:scale(1.02)}

@keyframes orbPulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.02)}
}
@keyframes orbGlow{
  0%,100%{opacity:.5;transform:scale(1)}
  50%{opacity:1;transform:scale(1.1)}
}

.orb-hint{
  font-size:clamp(.75rem,2vw,.9rem);font-weight:300;
  color:#6b665e;letter-spacing:.15em;
  animation:hintPulse 3s ease-in-out infinite
}
@keyframes hintPulse{
  0%,100%{opacity:.4}
  50%{opacity:.7}
}

/* ==================== 翻书过场 ==================== */
.transition-book{
  position:fixed;top:50%;left:50%;
  width:120px;height:160px;
  transform:translate(calc(-50% + 60px),-50%) scale(0);
  opacity:0;
  z-index:100;
  perspective:800px
}
.transition-book.active{
  animation:transitionBookAppear 2.4s cubic-bezier(.4,0,.2,1) forwards
}

@keyframes transitionBookAppear{
  0%{transform:translate(calc(-50% + 60px),-50%) scale(0);opacity:0}
  15%{transform:translate(calc(-50% + 60px),-50%) scale(1);opacity:1}
  85%{transform:translate(calc(-50% + 60px),-50%) scale(1);opacity:1}
  100%{transform:translate(calc(-50% + 60px),-50%) scale(1.2);opacity:0}
}

.mini-book{
  position:relative;width:100%;height:100%;
  transform-style:preserve-3d
}

.mini-book-cover{
  position:absolute;inset:0;
  background:linear-gradient(135deg,#1a1612 0%,#0d0b08 100%);
  border-radius:3px 12px 12px 3px;
  box-shadow:
    inset 0 0 30px rgba(0,0,0,.5),
    0 10px 30px rgba(0,0,0,.5),
    0 0 0 1px rgba(232,228,223,.08);
  transform-origin:left center
}

.mini-book-spine{
  position:absolute;left:0;top:0;bottom:0;width:12px;
  background:linear-gradient(90deg,rgba(0,0,0,.4) 0%,transparent 100%);
  border-radius:3px 0 0 3px
}

.mini-book-pages{
  position:absolute;right:0;top:4px;bottom:4px;width:2px;
  background:repeating-linear-gradient(180deg,#e8e4df 0px,#e8e4df 1px,#c4bfb6 1px,#c4bfb6 2px);
  opacity:.15;border-radius:0 1px 1px 0
}

/* 多页翻书动画 */
.mini-book-flip{
  position:absolute;inset:0;
  background:linear-gradient(135deg,#1a1612 0%,#0d0b08 100%);
  border-radius:3px 12px 12px 3px;
  transform-origin:left center;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  opacity:0
}

.transition-book.active .mini-book-flip:nth-child(4){
  opacity:1;
  animation:miniFlip 1s cubic-bezier(.4,0,.2,1) .2s forwards
}
.transition-book.active .mini-book-flip:nth-child(5){
  opacity:1;
  animation:miniFlip 1s cubic-bezier(.4,0,.2,1) .35s forwards
}
.transition-book.active .mini-book-flip:nth-child(6){
  opacity:1;
  animation:miniFlip 1s cubic-bezier(.4,0,.2,1) .5s forwards
}
.transition-book.active .mini-book-flip:nth-child(7){
  opacity:1;
  animation:miniFlip 1s cubic-bezier(.4,0,.2,1) .65s forwards
}
.transition-book.active .mini-book-flip:nth-child(8){
  opacity:1;
  animation:miniFlip 1s cubic-bezier(.4,0,.2,1) .8s forwards
}

@keyframes miniFlip{
  0%{transform:rotateY(0deg)}
  50%{background:linear-gradient(135deg,#2a2622 0%,#1a1612 100%)}
  100%{transform:rotateY(-175deg)}
}

/* ==================== 答案页 ==================== */
.answer{
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;
  opacity:0;pointer-events:none;
  transition:opacity .8s ease
}
.answer.visible{opacity:1;pointer-events:auto}

.answer .cn{
  font-size:clamp(1.6rem,5.5vw,3rem);font-weight:600;
  letter-spacing:.08em;line-height:1.6;max-width:14em;
  background:linear-gradient(135deg,#e8e4df 0%,#c4bfb6 100%);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;
  opacity:0;transform:translateY(12px);
  transition:opacity 1s ease .15s,transform 1s ease .15s
}
.answer .en{
  font-family:'Cormorant Garamond',serif;font-weight:300;font-style:italic;
  font-size:clamp(.82rem,2vw,1.05rem);
  color:#6b665e;letter-spacing:.06em;margin-top:1.8rem;max-width:28em;
  opacity:0;transform:translateY(8px);
  transition:opacity .9s ease .55s,transform .9s ease .55s
}
.answer.visible .cn,
.answer.visible .en{opacity:1;transform:translateY(0)}

.again{
  position:absolute;bottom:clamp(2rem,6vh,4rem);
  font-family:'Noto Serif SC',serif;font-size:.8rem;font-weight:300;
  color:#5a564f;letter-spacing:.2em;
  background:none;border:none;cursor:pointer;
  opacity:0;transition:opacity .6s ease .9s,color .3s,transform .3s ease
}
.answer.visible .again{opacity:1}
.again:hover{color:#e8e4df;transform:translateY(-2px)}
