* { box-sizing: border-box; }
:root {
  --navy: #171d43;
  --yellow: #ffdf32;
  --blue: #479be9;
}
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  color: #20212a;
  overflow: hidden;
}
.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  background: #8fc7fa url("./assets/campus.png") center center / cover no-repeat;
}
.sky-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,249,219,.08));
}
.mascot {
  position: absolute;
  z-index: 1;
  width: clamp(260px, 24vw, 405px);
  height: auto;
  left: clamp(8px, 8.5vw, 140px);
  bottom: clamp(8px, 3vh, 28px);
  filter: drop-shadow(0 18px 14px rgba(92, 67, 24, .18));
  transform-origin: 50% 90%;
  animation: mascot-enter .85s cubic-bezier(.2,.8,.2,1) both, mascot-float 4s ease-in-out 1s infinite;
  transition: filter .35s ease, translate .35s ease;
}
.welcome-card {
  position: absolute;
  z-index: 2;
  top: 53.4%;
  left: 50.7%;
  transform: translate(-50%, -50%) rotate(-.55deg);
  width: min(38vw, 620px);
  min-width: 520px;
  height: min(80vh, 720px);
  min-height: 670px;
  padding: 48px 44px 30px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 64px 58px 54px 58px;
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(248,251,255,.62) 56%, rgba(236,245,255,.58));
  box-shadow:
    0 38px 65px rgba(24, 53, 91, .25),
    0 12px 24px rgba(42, 74, 119, .15),
    inset 0 2px 0 rgba(255,255,255,.94),
    inset 2px 0 0 rgba(255,255,255,.55),
    inset -2px -3px 0 rgba(190,211,239,.38);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  transform-style: preserve-3d;
  transition: box-shadow .35s ease, background .35s ease, border-color .35s ease;
}
.welcome-card::before {
  content: "";
  position: absolute;
  inset: 7px 8px 9px;
  border-radius: 57px 51px 48px 51px;
  border: 1px solid rgba(255,255,255,.62);
  pointer-events: none;
  transition: inset .35s ease, border-color .35s ease;
}
.welcome-card:hover::before { inset: 5px 6px 7px; border-color: rgba(255,255,255,.9); }
.welcome-card:hover {
  background: linear-gradient(145deg, rgba(255,255,255,.84), rgba(248,251,255,.72) 56%, rgba(236,245,255,.69));
  border-color: rgba(255,255,255,.98);
  box-shadow:
    0 48px 78px rgba(24, 53, 91, .29),
    0 18px 34px rgba(42, 74, 119, .19),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 2px 0 0 rgba(255,255,255,.72),
    inset -2px -3px 0 rgba(190,211,239,.42);
}
.welcome-card::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: -16px;
  height: 24px;
  border-radius: 50%;
  background: rgba(43, 65, 99, .22);
  filter: blur(17px);
  z-index: -1;
  pointer-events: none;
}
.card-header { width: 100%; text-align: center; flex-shrink: 0; position: relative; z-index: 1; }
.welcome-line {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  font-size: 29px; font-weight: 500; color: #111;
}
.paper-plane { display: inline-block; font-size: 31px; color: #17304f; transform: rotate(-35deg); text-shadow: 1px 1px 0 #fff; }
h1 {
  margin: 7px 0 0;
  font-size: clamp(35px, 3vw, 48px);
  letter-spacing: 1px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--navy);
  text-shadow: 0 1px 0 rgba(20,24,62,.08);
}
.yellow-underline {
  display: block; width: 65%; height: 7px; border-radius: 8px;
  background: var(--yellow); margin: 2px auto 17px;
  transform: rotate(-1deg);
}
.subtitle { margin: 0; font-size: 21px; letter-spacing: .4px; color: #33343a; }
.site-link {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 15px;
  width: 100%; min-height: 86px; margin-top: 22px; padding: 13px 25px;
  border-radius: 30px; background: rgba(255,255,255,.94);
  border: 1px solid rgba(88,150,240,0);
  color: inherit; text-decoration: none;
  box-shadow: 0 1px 0 rgba(40,65,95,.02);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.site-link:hover {
  transform: translateY(-3px);
  border-color: rgba(88,150,240,.38);
  box-shadow: 0 12px 28px rgba(55,112,170,.18), 0 2px 6px rgba(55,112,170,.08);
}
.site-link:active { transform: translateY(-1px) scale(.995); }
/* 悬停高光：一道斜光泽从左扫到右 */
.site-link::after {
  content: "";
  position: absolute; top: 0; left: -75%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.85) 50%, transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left .6s ease;
}
.site-link:hover::after { left: 135%; }
.globe {
  width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center;
  border-radius: 50%; background: #f0f4f8;
  transition: background .25s ease;
}
.globe svg {
  width: 39px; height: 39px; fill: none; stroke: #315d7f; stroke-width: 1.8;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), stroke .25s ease;
}
.site-link:hover .globe { background: #e6f0ff; }
.site-link:hover .globe svg { transform: rotate(14deg) scale(1.12); stroke: #1f7ae0; }
.site-copy { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.site-copy strong { font-size: 18px; font-weight: 500; }
.site-copy small { color: #9b9b9b; font-size: 16px; letter-spacing: .4px; }
.external { font-size: 30px; color: #315d7f; line-height: 1; transition: transform .25s ease, color .25s ease; }
.site-link:hover .external { transform: translate(4px, -4px); color: #1f7ae0; }
.countdown {
  z-index: 1;
  position: relative; width: 200px; height: 200px; margin: 15px auto 0; flex-shrink: 0;
  display: grid; place-items: center;
}
/* 环心呼吸光晕 */
.countdown::before {
  content: "";
  position: absolute; inset: 4px; border-radius: 50%;
  background: radial-gradient(circle, rgba(88,150,240,.16), rgba(88,150,240,0) 68%);
  animation: halo-breathe 2.4s ease-in-out infinite;
}
/* 紧急态涟漪：平时隐藏，最后一秒开始逐秒扩散 */
.countdown::after {
  content: "";
  position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid rgba(88,150,240,.55);
  opacity: 0; pointer-events: none;
}
.countdown.urgent::after { animation: ring-ripple 1s ease-out infinite; }
.countdown.urgent #arcGrad stop { stop-color: #ffb020; }
.countdown.urgent #arcGrad stop:last-child { stop-color: #ffd23e; }
.countdown.urgent .countdown-center span { color: #b06a10; }
/* 取消后全场冻结、褪灰 */
.countdown.cancelled .ring-sweep { animation-play-state: paused; opacity: .25; }
.countdown.cancelled .ring-progress { stroke: #b9c6dd; filter: none; }
.countdown.cancelled .countdown-center span { visibility: hidden; }
.countdown.cancelled::before { animation: none; opacity: .5; }
.countdown.cancelled.urgent::after { animation: none; opacity: 0; }

.countdown-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.countdown-ring circle { fill: none; }
/* 珠点虚线轨道 */
.ring-track {
  stroke: #d3e1f5; stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 0.5 10.5;
}
/* 渐变进度弧，JS 驱动 3s 连续收缩 */
.ring-progress {
  stroke: url(#arcGrad); stroke-width: 10; stroke-linecap: round;
  filter: drop-shadow(0 2px 5px rgba(58,145,232,.35));
}
#arcGrad stop { transition: stop-color .4s ease; }
/* 每秒一道的雷达扫光，追逐弧线头部 */
.ring-sweep {
  position: absolute; inset: 3px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(88,150,240,.30), rgba(88,150,240,.05) 55deg, transparent 70deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 15px), #000 calc(100% - 14px));
  animation: sweep-spin 1s linear infinite reverse;
}
.countdown-center { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.countdown-center strong {
  font-size: 54px; font-weight: 700; line-height: 1; color: #172143;
  font-variant-numeric: tabular-nums;
}
.countdown-center strong.tick { animation: num-pop .5s cubic-bezier(.2,.8,.2,1); }
.countdown-center span { font-size: 14px; color: #5b5c62; transition: color .4s ease; }
.rays { z-index: 0; position: absolute; width: 340px; height: 150px; top: 56%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.rays i { position: absolute; width: 24px; height: 5px; border-radius: 4px; background: #ffe53d; animation: ray-pulse 1.8s ease-in-out infinite alternate; }
.rays i:nth-child(1) { left: 9px; top: 51px; transform: rotate(-18deg); }
.rays i:nth-child(2) { left: 15px; top: 83px; transform: rotate(-7deg); }
.rays i:nth-child(3) { left: 35px; top: 20px; transform: rotate(32deg); }
.rays i:nth-child(4) { right: 9px; top: 51px; transform: rotate(18deg); }
.rays i:nth-child(5) { right: 15px; top: 83px; transform: rotate(7deg); }
.rays i:nth-child(6) { right: 35px; top: 20px; transform: rotate(-32deg); }
.rays i:nth-child(2), .rays i:nth-child(5) { animation-delay: .25s; }
.rays i:nth-child(3), .rays i:nth-child(6) { animation-delay: .5s; }
.actions { position: relative; z-index: 1; display: flex; gap: 16px; width: 100%; margin-top: 20px; }
.btn {
  flex: 1; height: 68px; border-radius: 36px; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; font-family: inherit; font-size: 18px; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(47,69,104,.12); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-primary { background: var(--yellow); color: #191919; border: 1px solid rgba(255,216,0,.65); }
.btn-primary:hover { background: #ffe85b; }
.btn-primary span { font-size: 22px; }
.btn-secondary { background: rgba(255,255,255,.72); border: 1px solid #dedede; color: #303036; }
.security-note { position: relative; z-index: 1; margin: 28px 0 0; color: #c0c0c0; font-size: 14px; letter-spacing: .3px; text-align: center; }
.shield { color: #83aee3; font-size: 20px; vertical-align: -2px; margin-right: 6px; }
.cancel-note { position: relative; z-index: 1; font-size: 12px; color: #6f7d91; margin-top: 10px; text-align: center; }
@keyframes sweep-spin { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes halo-breathe { 0%, 100% { opacity: .55; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }
@keyframes ring-ripple { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.16); opacity: 0; } }
@keyframes num-pop { 0% { transform: translateY(-7px) scale(1.2); opacity: .2; filter: blur(3px); } 60% { opacity: 1; filter: none; } 100% { transform: none; } }
@keyframes ray-pulse { from { opacity: .55; scale: .85; } to { opacity: 1; scale: 1.12; } }
@keyframes mascot-enter { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes mascot-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) {
  .ring-sweep, .countdown::before, .countdown.urgent::after { animation: none; }
  .countdown-center strong.tick { animation: none; }
  .site-link::after { transition: none; }
  .site-link, .globe svg, .external { transition: none; }
}
@media (max-height: 649px) {
  body { overflow: auto; }
}
@media (max-width: 1100px) {
  .welcome-card { left: 57%; width: 560px; min-width: 0; padding: 40px 34px 24px; }
  .mascot { left: 1vw; width: 29vw; }
}
@media (max-height: 760px) and (min-width: 761px) {
  .welcome-card { min-height: 0; height: 94vh; padding-top: 24px; padding-bottom: 18px; border-radius: 46px; }
  .welcome-line { font-size: 23px; }
  h1 { font-size: 37px; }
  .subtitle { font-size: 17px; }
  .site-link { min-height: 68px; margin-top: 13px; }
  .countdown { width: 160px; height: 160px; margin-top: 8px; }
  .countdown-center strong { font-size: 43px; }
  .actions { margin-top: 12px; }
  .btn { height: 54px; }
  .security-note { margin-top: 14px; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .scene { min-height: 900px; height: 100vh; background-position: center; }
  .mascot { width: 138px; left: -18px; bottom: 2px; opacity: .95; }
  .welcome-card { top: 44%; left: 50%; width: calc(100% - 28px); height: auto; min-height: 620px; padding: 32px 22px 22px; border-radius: 38px; }
  .welcome-line { font-size: 22px; }
  .paper-plane { font-size: 24px; }
  h1 { font-size: clamp(30px, 8vw, 39px); }
  .subtitle { font-size: 17px; }
  .site-link { min-height: 72px; padding: 10px 14px; gap: 10px; border-radius: 24px; }
  .site-copy strong { font-size: 15px; }
  .site-copy small { font-size: 13px; }
  .globe { width: 40px; height: 40px; flex-basis: 40px; }
  .countdown { width: 165px; height: 165px; margin-top: 14px; }
  .countdown-center strong { font-size: 45px; }
  .rays { top: 56%; transform: translate(-50%,-50%) scale(.85); }
  .actions { gap: 10px; margin-top: 16px; }
  .btn { height: 55px; font-size: 15px; }
  .security-note { margin-top: 20px; font-size: 12px; }
}
