/* ============ NINEJ PORTFOLIO ============ */
:root {
  --pink: #F0559E;
  --pink-soft: #F291CE;
  --purple: #A855C8;
  --purple-deep: #7A3E93;
  --ink: #1A1A1A;
  --grey: #8A8A8A;
  --grey-line: #DCD7CC;
  --cream: #F2EDE4;
  --white: #FFFFFF;
  --pixel: "Press Start 2P", "Courier New", ui-monospace, monospace;
  --cn: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

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

html, body {
  height: 100%;
  background: #EDEAE4;
  overflow: hidden;
  font-family: var(--cn);
  -webkit-font-smoothing: antialiased;
}

.pixel { font-family: var(--pixel); letter-spacing: .04em; }

/* ---- 等比舞台 ---- */
.viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}
.stage {
  position: relative;
  width: 1440px;
  height: 900px;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .22);
  transform-origin: center center;
}

/* ---- 视图切换：闪白瞬间硬切，新页淡入 ---- */
.view {
  position: absolute;
  inset: 0;
  display: none;
  background: var(--white);
}
.view.is-active {
  display: block;
  animation: viewIn .45s ease both;
}
@keyframes viewIn { from { opacity: 0; } }

/* 通用返回按钮 */
.back {
  position: absolute;
  top: 40px;
  left: 44px;
  width: 64px;
  height: 52px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 12;
  padding: 8px;
  transition: transform .2s ease;
}
.back:hover { transform: translateX(-6px); }
.back svg { width: 100%; height: 100%; }
.back svg path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: square;
}

/* ============ HOME ============ */
.view--home { background: var(--white); }
.home-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}
.computer {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  width: 460px;
  transition: transform .45s cubic-bezier(.2, .8, .25, 1), filter .3s;
  animation: float 5s ease-in-out infinite;
}
.computer img { width: 100%; display: block; }
.computer:hover {
  transform: scale(1.06) translateY(-8px);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .12));
  animation-play-state: paused;
}
.computer.is-launching {
  transform: scale(1.45);
  opacity: 0;
  animation: none;
  transition: transform .5s ease-in, opacity .35s .25s ease-in;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.home-welcome {
  font-size: 34px;
  color: var(--ink);
  margin-top: 4px;
}
.home-hint {
  font-size: 10px;
  color: #B8B8B8;
  animation: blink 2.4s steps(1) infinite;
}
@keyframes blink { 0%, 70% { opacity: 1; } 71%, 100% { opacity: .25; } }
.home-foot {
  position: absolute;
  bottom: 42px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: #C8C8C8;
}

/* ============ MENU ============ */
.view--menu { background: var(--white); }
.halftone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.menu-about {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  z-index: 6;
  animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.94); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.menu-grid { position: absolute; inset: 0; z-index: 8; }
.entry {
  position: absolute;
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 14px;
  transition: transform .25s cubic-bezier(.2, 1.2, .4, 1), background .25s;
}
.entry img {
  width: 130px;
  filter: drop-shadow(0 6px 14px rgba(168, 85, 200, .18));
  transition: transform .25s ease;
}
.entry .en { font-size: 12px; color: var(--purple); }
.entry .cn { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .1em; }
.entry:hover { transform: translateY(-10px); background: rgba(255, 255, 255, .55); }
.entry:hover img { transform: scale(1.08) rotate(-3deg); }

.entry--tl { left: 100px; top: 110px; }
.entry--tr { right: 100px; top: 96px; }
.entry--bl { left: 106px; bottom: 104px; }
.entry--br { right: 106px; bottom: 118px; }

.sparkle {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .55; transform: scale(.92) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.08) rotate(8deg); }
}
.sp-a { width: 82px; left: 330px; top: 96px; }
.sp-b { width: 64px; right: 330px; top: 130px; animation-delay: .8s; }
.sp-c { width: 56px; left: 350px; bottom: 150px; animation-delay: 1.6s; }
.sp-d { width: 88px; right: 340px; bottom: 120px; animation-delay: 2.2s; }

/* ============ PORTFOLIO / 通用页头 ============ */
.page-title {
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 56px;
  color: var(--ink);
  z-index: 6;
}
.page-sub {
  position: absolute;
  top: 186px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--ink);
  z-index: 6;
}

/* 作品散落 */
.works { position: absolute; inset: 0; z-index: 5; }
.work {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 18px;
  transition: transform .3s cubic-bezier(.2, 1.1, .3, 1), background .3s;
}
.work:hover { transform: translateY(-16px) scale(1.04); background: rgba(255, 255, 255, .6); }
.work img {
  max-height: 300px;
  width: auto;
  display: block;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .16));
}
.work svg {
  width: 210px;
  height: 190px;
  display: block;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .14));
}
.work .meta { text-align: center; opacity: .45; transition: opacity .3s; }
.work:hover .meta { opacity: 1; }
.work .no { font-size: 12px; color: var(--purple); display: block; }
.work .nm { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: .06em; }

.w-1 { left: 190px; top: 400px; }
.w-2 { left: 620px; top: 380px; }
.w-3 { left: 1090px; top: 330px; }

/* ============ PROJECT DETAIL ============ */
.project-body {
  position: absolute;
  left: 0;
  right: 0;
  top: 250px;
  bottom: 210px;
  z-index: 5;
}
.poster {
  position: absolute;
  left: 110px;
  top: 0;
  width: 360px;
  min-height: 520px;
  background: #fff;
  border: 1px solid #DADADA;
  padding: 30px 26px 26px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideIn .45s ease both;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px); } }
.poster img { width: 100%; display: block; }
.poster h2 {
  font-size: 42px;
  line-height: 1.05;
  font-family: Inter, var(--cn);
  font-weight: 900;
  white-space: pre-line;
  color: #111;
}
.poster .slogan { font-size: 13px; font-weight: 700; color: #E03A2F; }
.blob-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.blob {
  height: 130px;
  border-radius: 40px;
  display: grid;
  place-items: center;
}
.blob svg { width: 110px; height: 110px; }
.poster .sign { font-size: 11px; color: var(--grey); margin-top: auto; }

.scribbles { position: absolute; inset: 0; pointer-events: none; }
.scribbles svg { position: absolute; }

.info-band {
  position: absolute;
  left: 580px;
  right: 90px;
  bottom: 120px;
  height: 130px;
  background: var(--cream);
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 34px;
  z-index: 6;
  animation: rise .5s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.band-year { font-size: 20px; color: #111; }
.band-col { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.band-title { font-size: 44px; font-weight: 700; color: #111; letter-spacing: .04em; }
.band-sub { font-size: 14px; color: var(--grey); }
.band-cat {
  font-size: 12px;
  color: var(--grey);
  border-left: 1px solid #D8D0C2;
  padding-left: 24px;
  letter-spacing: .06em;
}

/* ============ SIMPLE PAGES (VIDEO / CREATION / CONTACT) ============ */
.view--simple { background: var(--white); }
.retro-tv, .retro-mail {
  position: absolute;
  left: 50%;
  top: 300px;
  transform: translateX(-50%);
  width: 720px;
  background: var(--cream);
  border: 3px solid var(--purple);
  z-index: 6;
  animation: rise .45s ease both;
}
.tv-bar {
  background: var(--purple);
  color: #fff;
  font-size: 11px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tv-bar::before, .tv-bar::after {
  content: "";
  width: 12px; height: 12px; border-radius: 50%;
  background: #FBC9E4;
}
.tv-screen {
  height: 360px;
  background: #1B1B1B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.play-btn {
  border: 0;
  background: var(--pink-soft);
  color: var(--purple-deep);
  font-size: 14px;
  padding: 18px 30px;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.play-btn:hover { transform: scale(1.07); background: var(--pink); color: #fff; }
.tv-note { font-size: 12px; color: #8d8d8d; }
.tv-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  font-size: 10px;
  color: var(--purple-deep);
}
.tv-track {
  flex: 1;
  height: 8px;
  background: #E4DCCE;
  border-radius: 4px;
  overflow: hidden;
}
.tv-track i { display: block; width: 22%; height: 100%; background: var(--pink-soft); }

.mail-list { list-style: none; padding: 8px 0; }
.mail-list li {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 26px;
  border-bottom: 1px dashed #DED6C8;
}
.mail-list li:last-child { border-bottom: 0; }
.mail-list .pixel { font-size: 11px; color: var(--purple); width: 150px; }
.mail-list a {
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s, transform .2s;
  display: inline-block;
}
.mail-list a:hover { color: var(--pink); transform: translateX(6px); }

.creation-grid {
  position: absolute;
  left: 50%;
  top: 300px;
  transform: translateX(-50%);
  width: 900px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  z-index: 6;
}
.creation-grid div {
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--pink-soft);
  background: rgba(255, 255, 255, .7);
  cursor: default;
  transition: transform .25s, background .25s;
}
.creation-grid div:hover { transform: translateY(-8px); background: #fff; }
.creation-grid .cg-en { font-size: 10px; color: var(--purple); }
.creation-grid .cg-cn { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: .12em; }

/* ============ 转场白闪 ============ */
.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 99;
}
.flash.on { animation: flashAnim .55s ease; }
@keyframes flashAnim {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}

/* 进场 */
.view.is-active .page-title,
.view.is-active .page-sub { animation: dropIn .5s cubic-bezier(.2, 1.1, .3, 1) both; }
.view.is-active .page-sub { animation-delay: .08s; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-18px); } }
