/* 光学实验台主题封面（蓝图工程风：图纸网格、白色线描、黄色标注）：全屏覆盖实验台；16:9 课堂屏设计，普通桌面窗口自适应。动画仅用 transform/opacity/描边位移。 */
#cover { --card: #0a1a2e; position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: minmax(400px, 0.78fr) 1.45fr; align-items: center; gap: 1vw; padding: 0 3vw 0 5.5vw; overflow: hidden; color: #f2f8ff; background: linear-gradient(rgba(190, 220, 255, .1) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(190, 220, 255, .1) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(rgba(214, 234, 255, .2) 1.5px, transparent 1.5px) 0 0 / 120px 120px, linear-gradient(90deg, rgba(214, 234, 255, .2) 1.5px, transparent 1.5px) 0 0 / 120px 120px, #0d3566; transition: opacity .7s ease, transform .7s ease; }
#cover.leaving { opacity: 0; transform: scale(1.06); pointer-events: none; }
html.cover-on #physics-classroom-toolbar { opacity: .85; }

/* 背景：彩色光晕缓慢漂移、透视网格地面向前流动、电荷光点上升 */
.cv-bg { position: absolute; inset: 0; pointer-events: none; }
.cv-blob { display: none; position: absolute; width: 58vmax; height: 58vmax; border-radius: 50%; opacity: .55; animation: cvDrift 18s ease-in-out infinite alternate; }
.cv-blob.a { left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(62, 224, 255, .5), transparent 62%); }
.cv-blob.b { right: -20vmax; top: -10vmax; background: radial-gradient(circle, rgba(176, 107, 255, .45), transparent 62%); animation-duration: 22s; animation-delay: -6s; }
.cv-blob.c { left: 25vw; bottom: -30vmax; background: radial-gradient(circle, rgba(255, 95, 168, .35), transparent 60%); animation-duration: 26s; animation-delay: -12s; }
@keyframes cvDrift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vmax, 4vmax) scale(1.12); } 100% { transform: translate(-4vmax, 7vmax) scale(.95); } }
.cv-floor { position: absolute; left: -40%; right: -40%; bottom: -6%; height: 52%; transform: perspective(520px) rotateX(64deg); transform-origin: 50% 0; background-image: linear-gradient(rgba(234, 244, 255, .3) 1.5px, transparent 1.5px), linear-gradient(90deg, rgba(234, 244, 255, .24) 1.5px, transparent 1.5px); background-size: 64px 64px; animation: cvFloor 2.6s linear infinite; -webkit-mask-image: linear-gradient(to top, #000 25%, transparent 95%); mask-image: linear-gradient(to top, #000 25%, transparent 95%); }
@keyframes cvFloor { to { background-position: 0 64px, 0 0; } }
.cv-sparks i { position: absolute; bottom: -12px; width: var(--s); height: var(--s); border-radius: 0; background: transparent; border: 1.5px solid var(--c); opacity: 0; animation: cvRise var(--d) linear var(--delay) infinite; }
@keyframes cvRise { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .9; } 80% { opacity: .6; } 100% { transform: translate(4vw, -105vh); opacity: 0; } }

/* 文案 */
.cv-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 18px; animation: cvIn .9s ease both; }
.cv-copy small { align-self: flex-start; padding: 4px 10px; border: 1.5px solid #eaf4ff; font-size: clamp(14px, 1.15vw, 18px); color: #eaf4ff; letter-spacing: .18em; }
.cv-copy h1 { margin: 0; font-size: clamp(64px, 7.6vw, 136px); line-height: 1.02; font-weight: 800; letter-spacing: .04em; display: flex; flex-wrap: wrap; }
.cv-copy h1 span { color: #fff; }
.cv-t1 { color: #fff; }
.cv-copy h1 .cv-t2 { color: #ffd43b; text-decoration: underline 6px; text-underline-offset: 14px; }
@keyframes cvShine { to { background-position: 200% 0; } } /* 背景宽 200%，位移 200% 恰为一个完整周期，首尾同色可无缝循环 */
.cv-copy p { margin: 0; font-size: clamp(18px, 1.6vw, 26px); color: #d6e8fb; letter-spacing: .08em; font-family: Consolas, "Microsoft YaHei", monospace; }
.cv-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; padding: 0; list-style: none; max-width: 560px; }
.cv-chips li.more { background: none; border-style: dashed; color: #b9d4ef; }
.cv-chips li { padding: 7px 14px; border-radius: 2px; font-size: clamp(14px, 1.05vw, 17px); color: #fff; background: rgba(127, 220, 255, .14); border: 1.5px solid #7fdcff; animation: cvIn .7s ease both; }
.cv-chips li:nth-child(4n+2) { background: rgba(255, 212, 59, .14); border-color: #ffd43b; }
.cv-chips li:nth-child(4n+3) { background: rgba(255, 138, 101, .16); border-color: #ff8a65; }
.cv-chips li:nth-child(4n) { background: rgba(110, 231, 168, .14); border-color: #6ee7a8; }
.cv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; }
.cv-enter { position: relative; display: inline-flex; align-items: center; gap: 14px; padding: 18px 38px; border: 0; border-radius: 2px; font-size: clamp(22px, 1.9vw, 30px); font-weight: 700; letter-spacing: .1em; color: #0b2d57; background: #ffd43b; box-shadow: 6px 6px 0 rgba(4, 20, 42, .55); transition: transform .2s, box-shadow .2s; }
.cv-enter span { transition: transform .2s; }
.cv-enter:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(4, 20, 42, .55); } .cv-enter:hover span { transform: translateX(6px); }
.cv-enter::after { content: ''; position: absolute; inset: -6px; border-radius: inherit; border: 2px dashed rgba(255, 212, 59, .8); animation: cvRing 2s ease-out infinite; pointer-events: none; }
@keyframes cvRing { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.12, 1.4); opacity: 0; } }
.cv-music { padding: 14px 22px; border-radius: 2px; font-size: clamp(16px, 1.25vw, 20px); color: #fff; background: transparent; border: 2px solid #eaf4ff; }
.cv-music:hover { background: rgba(234, 244, 255, .12); }
.cv-copy em { font-style: normal; font-size: 14px; color: #a9c6e6; letter-spacing: .1em; }
@keyframes cvIn { from { opacity: 0; transform: translateY(18px); } }

/* 光学演示 */
.cv-stage { position: relative; z-index: 1; transition: transform .25s ease-out; animation: cvFloat 7s ease-in-out infinite; }
@keyframes cvFloat { 50% { translate: 0 -10px; } }
.cv-optics { display: block; width: 100%; max-height: 92vh; overflow: visible; }
.cv-card { fill: #0b2d57; stroke: #eaf4ff; stroke-width: 2.5; }
.cv-frame { fill: none; stroke: rgba(234, 244, 255, .5); stroke-width: 1.2; }
.cv-axis { stroke: #ffd43b; stroke-width: 1.5; stroke-dasharray: 18 5 3 5; opacity: .7; }
.cv-dim { fill: #ffd43b; font: 700 15px Consolas, monospace; text-anchor: middle; }
.cv-dimline { stroke: #ffd43b; stroke-width: 1.2; }
.cv-white { fill: none; stroke: #fffbe8; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 360; stroke-dashoffset: 360; }
.cv-optics.on .cv-white { animation: cvDraw .9s ease-out forwards; }
.cv-ray { fill: none; stroke: var(--c); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 520; opacity: .95; }
.cv-optics.on .cv-ray { animation: cvDraw 1.1s ease-out var(--d) forwards, cvShimmer 2.6s ease-in-out calc(var(--d) + 1.2s) infinite; }
@keyframes cvDraw { to { stroke-dashoffset: 0; } }
@keyframes cvShimmer { 50% { opacity: .55; } }
.cv-dot { fill: var(--c); opacity: 0; }
.cv-optics.on .cv-dot { animation: cvPop .5s ease-out var(--d) forwards; }
@keyframes cvPop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.cv-dot { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 10px var(--c)); }
.cv-prism { fill: url(#cvGlass); stroke: #eaf4ff; stroke-width: 3; stroke-linejoin: round; }
.cv-screen { fill: #e9eef2; opacity: .9; }
.cv-spec { opacity: 0; }
.cv-optics.on .cv-spec { animation: cvFade .8s ease 1.9s forwards; }
@keyframes cvFade { to { opacity: 1; } }
.cv-lens { fill: url(#cvGlass); stroke: #eaf4ff; stroke-width: 3; }
.cv-lray { fill: none; stroke: #ffe9a8; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 300; stroke-dashoffset: 300; }
.cv-optics.on .cv-lray { animation: cvDraw 1s ease-out var(--d) forwards; }
.cv-focus { opacity: 0; transform-box: fill-box; transform-origin: center; }
.cv-optics.on .cv-focus { animation: cvFade .5s ease 2.2s forwards, cvGlow 1.8s ease-in-out 2.7s infinite; }
@keyframes cvGlow { 50% { transform: scale(1.25); } }
.cv-tag { fill: #eaf4ff; font: 700 17px "Microsoft YaHei", sans-serif; text-anchor: middle; }
.cv-caption { fill: #ffd43b; font: 20px "Microsoft YaHei", sans-serif; text-anchor: middle; letter-spacing: .08em; opacity: 0; }
.cv-optics.on .cv-caption { animation: cvFade .8s ease 2.4s forwards; }

@media (max-width: 900px) { #cover { grid-template-columns: 1fr; padding: 6vh 6vw; align-content: center; } .cv-stage { display: none; } }
@media (prefers-reduced-motion: reduce) { #cover *, #cover *::after { animation: none !important; } .cv-ray, .cv-white, .cv-lray { stroke-dashoffset: 0; } .cv-dot, .cv-spec, .cv-focus, .cv-caption { opacity: 1; } }
