:root{
  --bg0:#070712;
  --bg1:#0b0920;
  --text:#f5f6ff;
  --muted:rgba(255,255,255,.7);
  --muted2:rgba(255,255,255,.55);
  --glass:rgba(255,255,255,.06);
  --glass2:rgba(255,255,255,.10);
  --stroke:rgba(255,255,255,.12);
  --accent:#ff4da6;
  --accent2:#6ee7ff;
  --good:#2ef2a5;
  --warn:#ffd36a;
  --bad:#ff6b6b;
  --shadow:0 18px 50px rgba(0,0,0,.45);
  --radius:18px;
  --radius2:26px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Noto Sans CJK SC, sans-serif;
  --font-en: "Cinzel Decorative", ui-serif, "Times New Roman", Georgia, serif;
  --font-cn: "Noto Serif SC", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background:
            radial-gradient(circle at 50% 100%, #1e102e 0%, #000000 62%, #000000 100%),
            radial-gradient(980px 720px at 70% 16%, rgba(255,190,84,.12), transparent 58%),
            radial-gradient(1000px 820px at 18% 18%, rgba(255,78,78,.12), transparent 60%);
  color:var(--text);
  overflow-x:hidden;
}

.bg{position:fixed; inset:0; pointer-events:none; z-index:0}
.glow{position:absolute; width:980px; height:980px; filter:blur(60px); opacity:.45}
.g1{left:-320px; top:-320px; background:radial-gradient(circle at 40% 40%, rgba(255,90,90,.55), transparent 60%)}
.g2{right:-360px; bottom:-360px; background:radial-gradient(circle at 60% 60%, rgba(255,190,84,.42), transparent 60%)}
.grid{
  position:absolute; inset:0; opacity:.25;
  background:
    linear-gradient(to right, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity:.14;
  mask-image: radial-gradient(ellipse at 50% 22%, rgba(0,0,0,.9), transparent 72%);
}

.moon{
  position:absolute;
  left: 56px;
  top: 56px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.98), rgba(255,230,170,.82) 40%, rgba(255,180,90,.20) 68%, rgba(0,0,0,0) 72%);
  filter: blur(.2px);
  opacity: .92;
}
.moon::after{
  content:"";
  position:absolute;
  inset:-32px;
  border-radius:999px;
  background: radial-gradient(circle, rgba(255,210,120,.10), rgba(0,0,0,0) 65%);
}

.controls{
  position:fixed;
  top:16px;
  right:16px;
  z-index: 8;
  display:flex;
  gap:8px;
  padding:10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 18px 55px rgba(0,0,0,.45);
}
.controls::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:999px;
  background: radial-gradient(220px 80px at 30% 25%, rgba(255,255,255,.18), transparent 70%);
  pointer-events:none;
}

.wrap{position:relative; z-index:3; max-width:1100px; margin:0 auto; padding:24px 18px 220px}
.hero{display:grid; grid-template-columns: 1fr; gap:18px; align-items:start}
@media (max-width: 940px){
  .hero{grid-template-columns:1fr; gap:14px}
  .controls{left:16px; right:16px; justify-content:center}
}

.stage{
  position:fixed;
  left:18px;
  bottom:18px;
  top:auto;
  translate: 0 0;
  z-index:2;
  pointer-events:none;
}
.polaroid{
  width: min(260px, 64vw);
  pointer-events:auto;
  transform: rotate(-3deg);
  filter: drop-shadow(0 22px 46px rgba(0,0,0,.45));
}
.polaroidFrame{
  position:relative;
  padding:14px 14px 46px;
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.38);
}
.polaroidFrame::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  background:
    radial-gradient(900px 240px at 20% 10%, rgba(110,231,255,.16), transparent 55%),
    radial-gradient(900px 240px at 80% 10%, rgba(255,77,166,.14), transparent 55%);
  pointer-events:none;
  mix-blend-mode: multiply;
  opacity:.35;
}
.polaroidImg{
  display:block;
  width:100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.02));
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.08);
  opacity:0;
  transition: opacity .18s ease;
}
.polaroidImg.show{opacity:1}
.polaroidImg.show ~ .polaroidPlaceholder{display:none}
.polaroidPlaceholder{
  position:absolute;
  left:14px; right:14px; top:14px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(0,0,0,.52);
  font-weight:850;
  letter-spacing:.4px;
  background: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,.05) 0px,
    rgba(0,0,0,.05) 12px,
    rgba(0,0,0,.02) 12px,
    rgba(0,0,0,.02) 24px
  );
  border: 1px dashed rgba(0,0,0,.16);
}
.polaroidBar{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 6px;
}
.polaroidCaption{
  font-weight:900;
  color: rgba(255,255,255,.82);
  text-shadow: 0 10px 28px rgba(0,0,0,.55);
  letter-spacing:.6px;
  white-space: nowrap;
  font-size: 12px;
}
.polaroidBtns{display:flex; gap:8px; align-items:center}
.btnTiny{padding:8px 10px; font-size:12px}
.controls .btnTiny{white-space:nowrap}

.polaroidBtns .btnTiny{
  min-width: 48px;
  height: 40px;
  padding: 6px 8px;
  line-height: 1.05;
  text-align:center;
}
.btnUpload{white-space:normal}

@media (max-width: 860px){
  .stage{
    bottom: 16px;
    left: 12px;
  }
  .polaroid{transform: rotate(-2deg); width:min(220px, 68vw)}
}

.center-stage{
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  width: min(980px, 92vw);
}

.luxury-text{
  font-family: var(--font-en);
  font-size: 16vw;
  margin: 0;
  line-height: 1;
  background:
    radial-gradient(420px 240px at 35% 18%, rgba(255,255,255,.92), rgba(255,255,255,0) 62%),
    linear-gradient(180deg, #fffdf0 6%, #ffd56a 30%, #ff8b3d 62%, #ff3a2d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: url(#paint) drop-shadow(0 4px 0 rgba(0,0,0,.58)) drop-shadow(0 0 56px rgba(255, 140, 60, 0.22));
  -webkit-text-stroke: 3px rgba(0,0,0,.24);
  position: relative;
  letter-spacing: -0.02em;
}

.luxury-text::before{
  content: attr(data-text);
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(
      115deg,
      rgba(255,255,255,.18) 0px,
      rgba(255,255,255,.18) 6px,
      rgba(255,255,255,0) 10px,
      rgba(255,255,255,0) 18px
    ),
    radial-gradient(260px 120px at 65% 65%, rgba(255,200,120,.35), transparent 70%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  mix-blend-mode: overlay;
  opacity: .55;
  filter: blur(.45px);
}

.luxury-text::after{
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, transparent 40%, rgba(255,255,255,0.8) 50%, transparent 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 5.2s infinite linear;
  opacity: .78;
}
@keyframes shine{
  0%{background-position: 200% 0}
  100%{background-position: -200% 0}
}

.greeting-box{margin-top: 20px}
.en-sub{
  font-family: var(--font-en);
  font-size: 24px;
  color: rgba(255,245,195,.86);
  letter-spacing: 8px;
  margin: 0 0 12px 0;
  opacity: 0.82;
  text-shadow: 0 16px 40px rgba(0,0,0,0.6);
}
.cn-wish{
  font-family: var(--font-cn);
  font-size: 18px;
  color: rgba(255,255,255,.84);
  line-height: 1.8;
  font-weight: 300;
  margin: 50px 0 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

@media (max-width: 520px){
  .en-sub{letter-spacing: 6px; font-size: 18px}
  .cn-wish{font-size: 14px}
}

.title{margin:10px 0 8px; line-height:1.02}
.year{
  display:inline-block;
  font-size:48px;
  font-weight:900;
  letter-spacing:1px;
  background: linear-gradient(135deg, #ffffff, rgba(110,231,255,.95), rgba(255,77,166,.95));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  text-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.titleLine{
  display:block;
  margin-top:8px;
  font-size:52px;
  font-weight:950;
  letter-spacing:2px;
}
.subtitle{margin:0 0 16px; color:var(--muted); font-size:15px; line-height:1.6; max-width:48ch}

.panel{
  position:relative;
  overflow:hidden;
  padding:16px;
  border-radius:var(--radius2);
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow:var(--shadow);
}
.panel::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  background:
    radial-gradient(380px 180px at 18% 6%, rgba(255,255,255,.22), transparent 62%),
    radial-gradient(420px 220px at 78% 18%, rgba(255,214,126,.10), transparent 68%);
  pointer-events:none;
}
.panel::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 42%);
  pointer-events:none;
  mix-blend-mode: screen;
  opacity:.55;
}
.panelDock{
  position: fixed;
  top: 74px;
  right: 18px;
  width: min(380px, calc(100vw - 36px));
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 7;
  transition: transform .18s ease, opacity .18s ease;
}
.panelDock::-webkit-scrollbar{width:0;height:0}
.panelDock.isHidden{
  transform: translateX(calc(100% + 22px));
  opacity: 0;
  pointer-events:none;
}

.panelDock .panelHeader{gap:8px}
.panelDock .panelHint{display:none}
.panelDock .cardMain{font-size:15px; min-height:56px}
.panelDock .btn{padding:9px 12px; font-size:13px}
.panelDock .wishInput{height:36px}
.panelDock .fileInput{height:36px}
.panelDock .fileInput{padding:6px 10px; font-size:12px}
.panelDock .fileInput::file-selector-button{padding:5px 10px}
.panelDock .fileInput::-webkit-file-upload-button{padding:5px 10px}
.panelDock .customBox{padding:10px}
.panelDock .customHint{display:none}

@media (max-width: 860px){
  .panelDock{
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
  }
  .panelDock .panelHint{display:block}
  .panelDock .customHint{display:block}
}
.panelHeader{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.panelTitle{font-weight:750}
.panelHint{font-size:12px; color:var(--muted2)}

.card{
  margin-top:12px;
  border-radius: 22px;
  background: radial-gradient(1200px 340px at 10% 10%, rgba(255,77,166,.20), transparent 55%),
              radial-gradient(900px 300px at 90% 30%, rgba(110,231,255,.16), transparent 55%),
              rgba(12,10,30,.58);
  border:1px solid rgba(255,255,255,.14);
  overflow:hidden;
}
.cardInner{padding:16px 16px 14px}
.cardMain{
  font-size:18px;
  line-height:1.65;
  font-weight:650;
  letter-spacing:.2px;
  min-height:68px;
}
.cardMeta{
  margin-top:10px;
  display:flex; justify-content:space-between; align-items:center;
  color:rgba(255,255,255,.65);
  font-size:12px;
}
.metaLabel{opacity:.7}
.metaValue{opacity:.92}

.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}

.wishRow{
  margin-top:12px;
  display:flex;
  gap:10px;
  align-items:center;
}
.wishInput{
  flex:1;
  min-width: 180px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.92);
  outline: none;
}
.wishInput::placeholder{color: rgba(255,255,255,.55)}
.wishInput:focus{
  border-color: rgba(110,231,255,.35);
  box-shadow: 0 0 0 3px rgba(110,231,255,.10);
}

.customBox{
  margin-top:12px;
  padding:12px;
  border-radius: 22px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.customHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.customTitle{font-weight:800}
.customToggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color: rgba(255,255,255,.70);
  user-select:none;
}
.customToggle input{accent-color: var(--accent)}
.customRow{
  margin-top:10px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.customRow > *{min-width:0}
.fileInput{
  flex:1;
  min-width: 0;
  max-width: 100%;
  height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.78);
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fileInput::file-selector-button{
  appearance:none;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(170%);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.fileInput::-webkit-file-upload-button{
  appearance:none;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1;
}
.customHint{
  margin-top:10px;
  font-size:12px;
  color: rgba(255,255,255,.55);
  line-height:1.55;
}
.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  color:rgba(255,255,255,.92);
  background:rgba(255,255,255,.06);
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  backdrop-filter: blur(12px) saturate(170%);
  -webkit-backdrop-filter: blur(12px) saturate(170%);
}
.btn:hover{transform:translateY(-1px); background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.20)}
.btn:active{transform:translateY(0)}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btnPrimary{
  background: linear-gradient(135deg, rgba(255,77,166,.95), rgba(110,231,255,.72));
  border-color: rgba(255,255,255,.22);
  color:#0b0720;
}
.btnSecondary{background:rgba(255,255,255,.08)}
.btnGhost{background:rgba(255,255,255,.05)}

.fx{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:4;
  mix-blend-mode: screen;
  opacity:.92;
}

.danmuLayer{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:6;
}
.danmu{
  position:absolute;
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.36);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  font-weight: 750;
  font-size: 13px;
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  animation: danmuFloat 4.6s ease-in forwards;
}
.danmu::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:999px;
  background: radial-gradient(160px 40px at 30% 30%, hsla(var(--h, 330), 100%, 70%, .26), transparent 70%),
              radial-gradient(140px 40px at 70% 40%, hsla(var(--h, 200), 100%, 70%, .22), transparent 70%);
  z-index:-1;
  filter: blur(6px);
}
@keyframes danmuFloat{
  0%{opacity:0; transform: translateX(-50%) translateY(0) scale(.98); filter: blur(0px)}
  10%{opacity:1}
  85%{opacity:1}
  100%{opacity:0; transform: translateX(-50%) translateY(-250px) scale(1.02); filter: blur(1.5px)}
}
.toast{
  position:fixed; left:50%; bottom:18px; transform:translateX(-50%);
  z-index:20;
  max-width:min(560px, 92vw);
  padding:10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.14);
  color:rgba(255,255,255,.92);
  font-size:13px;
  opacity:0;
  translate:0 10px;
  transition: opacity .18s ease, translate .18s ease;
  pointer-events:none;
}
.toast.show{opacity:1; translate:0 0}

.wsqCorner{
  position:fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index:7;
  width: clamp(120px, 18vw, 240px);
  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
  pointer-events:auto;
  filter: drop-shadow(0 18px 38px rgba(0,0,0,.45));
}
.wsqCorner::before{
  content:"";
  position:absolute;
  inset:-26px -18px -18px -26px;
  background:
    radial-gradient(120px 90px at 65% 70%, rgba(110,231,255,.18), transparent 68%),
    radial-gradient(140px 100px at 45% 55%, rgba(255,77,166,.14), transparent 70%);
  filter: blur(10px);
  opacity:.75;
  pointer-events:none;
}
.wsqCorner::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-8px;
  width: 66%;
  height: 20px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,.35), rgba(0,0,0,0) 70%);
  filter: blur(2px);
  opacity:.55;
  pointer-events:none;
  animation: wsqShadow 3.8s ease-in-out infinite;
}
.wsqFloat{
  animation: wsqFloat 3.8s ease-in-out infinite;
}
.wsqImg{
  display:block;
  width:100%;
  height:auto;
  transform-origin: 80% 86%;
  will-change: transform;
  animation: wsqSway 5.6s ease-in-out infinite;
}
.wsqCorner:hover .wsqImg{
  animation-duration: 4.6s;
}
.wsqCorner:active .wsqImg{
  transform: rotate(0deg) scale(.98);
}
@keyframes wsqFloat{
  0%,100%{transform: translateY(0)}
  50%{transform: translateY(-10px)}
}
@keyframes wsqSway{
  0%,100%{transform: rotate(-2deg)}
  50%{transform: rotate(2.6deg)}
}
@keyframes wsqShadow{
  0%,100%{transform: translateX(-50%) scale(1); opacity:.52}
  50%{transform: translateX(-50%) scale(.86); opacity:.34}
}

@media (prefers-reduced-motion: reduce){
  .btn{transition:none}
  .wsqFloat,.wsqImg,.wsqCorner::after{animation:none !important}
}
