/* SECTION: boot-overlay —— 港言AI创作 入场动画层（独立注入，不依赖站点其他样式） */
#gy-boot {
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;
  background: #080b12;
  color: #e6ecf7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Source Han Sans SC", "SimHei", sans-serif;
  display: block;
  opacity: 1;
  transition: opacity .55s ease;
}

#gy-boot.gy-out { opacity: 0; pointer-events: none; }

#gy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: blur(0.4px) saturate(1.12);
}

/* 底板与暗化层 */
#gy-plate {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 45%, rgba(20, 28, 46, .55), rgba(6, 8, 14, .92));
  opacity: 0;
  transition: opacity .8s ease;
}
#gy-boot.gy-plate-on #gy-plate { opacity: 1; }

/* 扫描线与颗粒 */
#gy-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .028) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
#gy-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(115% 95% at 50% 50%, transparent 52%, rgba(0, 0, 0, .55));
}

/* 幕次容器 */
.gy-act {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 2rem;
  text-align: center;
}

/* SECTION: 第一幕 黑幕标识 */
#gy-black { background: #05070c; transition: opacity .5s ease; }
#gy-black .gy-bk-1 {
  font-size: clamp(1.5rem, 5.2vw, 3.1rem);
  font-weight: 900;
  letter-spacing: .22em;
  color: #f2f6ff;
  opacity: 0;
  animation: gy-rise 1.1s .15s cubic-bezier(.16, .9, .25, 1) forwards;
}
#gy-black .gy-bk-2 {
  font-size: clamp(.62rem, 1.7vw, .9rem);
  letter-spacing: .5em;
  color: var(--gy-accent, #2f6bff);
  font-weight: 700;
  opacity: 0;
  animation: gy-rise 1s .5s cubic-bezier(.16, .9, .25, 1) forwards;
}
#gy-black .gy-bk-3 {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(.55rem, 1.4vw, .78rem);
  letter-spacing: .34em;
  color: rgba(200, 214, 240, .5);
  opacity: 0;
  animation: gy-rise 1s .8s cubic-bezier(.16, .9, .25, 1) forwards;
}
@keyframes gy-rise { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* SECTION: 第二幕 过曝洗白 */
#gy-wash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}
#gy-boot.gy-washing #gy-wash { animation: gy-wash 1.05s ease-out forwards; }
@keyframes gy-wash {
  0% { opacity: 0; }
  26% { opacity: .96; }
  60% { opacity: .5; }
  100% { opacity: 0; }
}

/* SECTION: 常驻 HUD（品牌块 / 页脚 / 准星） */
#gy-hud { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .7s ease .1s; }
#gy-boot.gy-hud-on #gy-hud { opacity: 1; }

.gy-corner {
  position: absolute;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(.52rem, 1.15vw, .68rem);
  letter-spacing: .2em;
  color: rgba(186, 202, 232, .62);
  line-height: 1.9;
}
.gy-tl { top: clamp(14px, 3.2vh, 30px); left: clamp(16px, 3.4vw, 42px); }
.gy-tr { top: clamp(14px, 3.2vh, 30px); right: clamp(16px, 3.4vw, 42px); text-align: right; }
.gy-bl { bottom: clamp(14px, 3.2vh, 30px); left: clamp(16px, 3.4vw, 42px); }
.gy-br { bottom: clamp(14px, 3.2vh, 30px); right: clamp(16px, 3.4vw, 42px); text-align: right; }
.gy-corner b { color: var(--gy-accent, #2f6bff); font-weight: 700; letter-spacing: .16em; }

/* 环形准星：缺口留在正下方，不遮文字 */
.gy-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(230px, 34vw, 420px);
  height: clamp(230px, 34vw, 420px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(140, 170, 225, .18);
}
.gy-ring::before, .gy-ring::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(140, 170, 225, .22);
  animation: gy-spin 26s linear infinite;
}
.gy-ring::after { inset: 27%; border-style: solid; border-color: rgba(140, 170, 225, .1); animation-duration: 40s; animation-direction: reverse; }
.gy-ring-tick {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gy-accent, #2f6bff);
  border-left-color: var(--gy-accent, #2f6bff);
  animation: gy-spin 7.5s linear infinite;
  opacity: .8;
}
@keyframes gy-spin { to { transform: rotate(360deg); } }

/* SECTION: 授权步骤主字 */
#gy-steps { justify-content: flex-end; padding-bottom: clamp(74px, 15vh, 150px); }
.gy-step-zh {
  font-size: clamp(1.35rem, 4.4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: .12em;
  color: #f4f8ff;
  min-height: 1.2em;
  text-shadow: 0 0 26px rgba(47, 107, 255, .28);
}
.gy-step-en {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(.6rem, 1.6vw, .86rem);
  letter-spacing: .3em;
  color: var(--gy-accent, #2f6bff);
  min-height: 1.3em;
}
.gy-step-en .gy-caret { animation: gy-blink .9s steps(1) infinite; }
@keyframes gy-blink { 50% { opacity: 0; } }

/* 步骤轨道 */
.gy-rail {
  position: absolute;
  left: 50%;
  bottom: clamp(40px, 8.4vh, 76px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 16px);
}
.gy-dot {
  width: clamp(7px, 1.1vw, 10px);
  height: clamp(7px, 1.1vw, 10px);
  border-radius: 50%;
  background: rgba(150, 172, 210, .26);
  transition: background .3s, box-shadow .3s, transform .3s;
}
.gy-dot.on { background: var(--gy-accent, #2f6bff); box-shadow: 0 0 12px var(--gy-accent, #2f6bff); transform: scale(1.22); }
.gy-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: linear-gradient(90deg, transparent, var(--gy-accent, #2f6bff)); transition: width .35s ease; }

/* 确认按钮 */
.gy-confirm {
  pointer-events: auto;
  margin-top: .3rem;
  padding: .8rem 1.9rem;
  border-radius: 999px;
  border: 1px solid var(--gy-accent, #2f6bff);
  background: rgba(47, 107, 255, .12);
  color: #eaf0ff;
  font-size: clamp(.78rem, 1.8vw, .95rem);
  font-weight: 700;
  letter-spacing: .18em;
  cursor: pointer;
  display: none;
  transition: transform .18s, background .25s, box-shadow .25s;
}
.gy-confirm.show { display: inline-block; animation: gy-rise .45s ease both; }
.gy-confirm:hover { background: rgba(47, 107, 255, .26); box-shadow: 0 0 26px rgba(47, 107, 255, .4); transform: translateY(-1px); }
.gy-hint {
  font-family: ui-monospace, Consolas, monospace;
  font-size: clamp(.5rem, 1.1vw, .64rem);
  letter-spacing: .2em;
  color: rgba(170, 188, 218, .5);
  display: none;
}
.gy-hint.show { display: block; }

/* SECTION: 身份卡 */
.gy-idcard {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(.56rem, 1.3vw, .74rem);
  letter-spacing: .2em;
  color: rgba(196, 212, 240, .74);
  border: 1px solid rgba(140, 170, 225, .2);
  border-radius: 10px;
  padding: .7rem 1.1rem;
  line-height: 1.9;
  background: rgba(10, 14, 24, .5);
  backdrop-filter: blur(6px);
  display: none;
}
.gy-idcard.show { display: block; animation: gy-rise .5s ease both; }
.gy-idcard i { font-style: normal; color: var(--gy-accent, #2f6bff); }

/* SECTION: 色散故障揭幕 */
#gy-boot.gy-glitch .gy-step-zh,
#gy-boot.gy-glitch #gy-final-box { animation: gy-glitch .5s steps(2) 2; }
@keyframes gy-glitch {
  0% { text-shadow: 3px 0 var(--gy-glitch-a, #ff2e63), -3px 0 var(--gy-glitch-b, #00d4ff); transform: translateX(0); }
  25% { text-shadow: -5px 1px var(--gy-glitch-a, #ff2e63), 5px -1px var(--gy-glitch-b, #00d4ff); transform: translateX(2px) skewX(-2deg); }
  50% { text-shadow: 4px -2px var(--gy-glitch-a, #ff2e63), -4px 2px var(--gy-glitch-b, #00d4ff); transform: translateX(-2px); }
  75% { text-shadow: -2px 2px var(--gy-glitch-a, #ff2e63), 2px -2px var(--gy-glitch-b, #00d4ff); transform: translateX(1px) skewX(1.5deg); }
  100% { text-shadow: none; transform: none; }
}
#gy-boot.gy-glitch #gy-split {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 5px, rgba(255, 46, 99, .08) 5px 6px, transparent 6px 11px, rgba(0, 212, 255, .08) 11px 12px);
  animation: gy-split .5s ease-out forwards;
}
@keyframes gy-split { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-24px); } }

/* SECTION: 终幕欢迎 */
#gy-final-box {
  display: none;
  padding: 1rem 2.1rem;
  border: 1px solid rgba(150, 175, 225, .34);
  border-radius: 14px;
  background: rgba(7, 10, 18, .74);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(.7rem, 2vw, 1rem);
  letter-spacing: .3em;
  color: #f6f9ff;
  box-shadow: 0 0 40px rgba(0, 0, 0, .5);
}
#gy-final-box.show { display: block; animation: gy-rise .6s cubic-bezier(.16, .9, .25, 1) both; }
#gy-final-welcome {
  display: none;
  font-size: clamp(.95rem, 2.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: .1em;
  color: #eef4ff;
}
#gy-final-welcome.show { display: block; animation: gy-rise .7s .18s ease both; }
#gy-final-welcome em { font-style: normal; color: var(--gy-accent, #2f6bff); }

/* SECTION: 跳过与设置 */
#gy-skip {
  position: absolute;
  top: clamp(12px, 2.8vh, 26px);
  right: clamp(14px, 3vw, 34px);
  pointer-events: auto;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(150, 175, 225, .26);
  background: rgba(10, 14, 24, .55);
  color: rgba(214, 226, 248, .82);
  font-size: clamp(.6rem, 1.3vw, .72rem);
  letter-spacing: .16em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 5;
  transition: background .25s, color .25s;
}
#gy-skip:hover { background: rgba(47, 107, 255, .22); color: #fff; }

#gy-gear {
  position: absolute;
  bottom: clamp(14px, 3vh, 28px);
  right: clamp(16px, 3.4vw, 42px);
  pointer-events: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(150, 175, 225, .24);
  background: rgba(10, 14, 24, .5);
  color: rgba(200, 216, 244, .78);
  cursor: pointer;
  font-size: 15px;
  z-index: 6;
}
#gy-gear:hover { color: #fff; border-color: var(--gy-accent, #2f6bff); }

#gy-panel {
  position: absolute;
  right: clamp(14px, 3vw, 34px);
  bottom: clamp(56px, 9vh, 84px);
  width: min(330px, calc(100vw - 28px));
  max-height: min(64vh, 480px);
  overflow: auto;
  pointer-events: auto;
  background: rgba(9, 13, 22, .9);
  border: 1px solid rgba(140, 170, 225, .22);
  border-radius: 14px;
  padding: 14px 15px 16px;
  backdrop-filter: blur(14px);
  display: none;
  z-index: 7;
  text-align: left;
  scrollbar-width: thin;
}
#gy-panel.show { display: block; animation: gy-rise .3s ease both; }
#gy-panel h4 { margin: 12px 0 7px; font-size: 10px; letter-spacing: .24em; color: rgba(170, 190, 224, .55); font-weight: 700; text-transform: uppercase; }
#gy-panel h4:first-child { margin-top: 0; }
.gy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; font-size: 12px; color: #d8e2f4; }
.gy-row label { flex: 1; letter-spacing: .04em; }
.gy-row input[type=text], .gy-row select {
  flex: 1.15;
  min-width: 0;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(140, 170, 225, .2);
  border-radius: 7px;
  color: #eef3ff;
  padding: 5px 7px;
  font-size: 11.5px;
  font-family: inherit;
}
.gy-row input[type=range] { flex: 1.2; accent-color: var(--gy-accent, #2f6bff); }
.gy-row input[type=color] { width: 30px; height: 22px; border: none; background: none; padding: 0; cursor: pointer; }
.gy-row output { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--gy-accent, #2f6bff); min-width: 34px; text-align: right; }
.gy-sw { position: relative; width: 38px; height: 21px; flex: none; }
.gy-sw input { opacity: 0; width: 0; height: 0; }
.gy-sw span { position: absolute; inset: 0; border-radius: 999px; background: rgba(150, 172, 210, .28); transition: background .25s; cursor: pointer; }
.gy-sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .25s; }
.gy-sw input:checked + span { background: var(--gy-accent, #2f6bff); }
.gy-sw input:checked + span::after { transform: translateX(17px); }
.gy-btns { display: flex; gap: 8px; margin-top: 13px; }
.gy-btns button {
  flex: 1;
  padding: .55rem;
  border-radius: 9px;
  border: 1px solid rgba(140, 170, 225, .26);
  background: rgba(255, 255, 255, .06);
  color: #e8eefc;
  font-size: 11.5px;
  letter-spacing: .08em;
  cursor: pointer;
}
.gy-btns button:hover { border-color: var(--gy-accent, #2f6bff); background: rgba(47, 107, 255, .18); }
.gy-note { font-size: 10.5px; line-height: 1.7; color: rgba(160, 180, 214, .6); margin-top: 10px; }

/* SECTION: 暖白主题（可选，默认暗色） */
#gy-boot.gy-light { background: #f7f4ef; color: #17202f; }
#gy-boot.gy-light #gy-plate { background: radial-gradient(120% 80% at 50% 45%, rgba(255, 255, 255, .8), rgba(226, 220, 210, .95)); }
#gy-boot.gy-light .gy-step-zh { color: #141b28; text-shadow: none; }
#gy-boot.gy-light .gy-corner, #gy-boot.gy-light .gy-hint { color: rgba(30, 42, 62, .55); }
#gy-boot.gy-light .gy-idcard { background: rgba(255, 255, 255, .6); color: rgba(26, 36, 54, .8); border-color: rgba(30, 42, 62, .18); }
#gy-boot.gy-light #gy-final-box { background: rgba(255, 255, 255, .78); color: #131a26; border-color: rgba(30, 42, 62, .2); }
#gy-boot.gy-light #gy-final-welcome { color: #131a26; }
#gy-boot.gy-light #gy-black { background: #10151d; }
#gy-boot.gy-light #gy-panel { background: rgba(255, 255, 255, .92); border-color: rgba(30, 42, 62, .16); }
#gy-boot.gy-light .gy-row { color: #1c2534; }
#gy-boot.gy-light .gy-row input[type=text], #gy-boot.gy-light .gy-row select { background: rgba(20, 28, 44, .06); border-color: rgba(30, 42, 62, .16); color: #16202f; }
#gy-boot.gy-light .gy-btns button { background: rgba(20, 28, 44, .05); color: #17202f; border-color: rgba(30, 42, 62, .16); }
#gy-boot.gy-light #gy-scan { opacity: .35; }
#gy-boot.gy-light #gy-vignette { background: radial-gradient(115% 95% at 50% 50%, transparent 58%, rgba(120, 110, 96, .28)); }
#gy-boot.gy-light #gy-skip { background: rgba(255, 255, 255, .72); color: rgba(26, 36, 54, .8); border-color: rgba(30, 42, 62, .16); }
#gy-boot.gy-light #gy-gear { background: rgba(255, 255, 255, .72); color: #1c2534; border-color: rgba(30, 42, 62, .16); }

@media (max-width: 640px) {
  #gy-steps { padding-bottom: 128px; }
  .gy-ring { width: 62vw; height: 62vw; }
  #gy-panel { max-height: 56vh; }
}
