/* ============================================================
   电子科技大学.com（奶龙版）— 共用样式
   入场动画页 index.html + 导航页 nav.html
   ============================================================ */

:root {
  --uestc-blue: #0a2d6b;
  --uestc-deep: #061a40;
  --uestc-cyan: #35c5ff;
  --nailong-gold: #ffc832;
  --nailong-orange: #ff8c42;
  --nailong-cream: #fff3d0;
  --glow-gold: rgba(255, 200, 50, 0.55);
  --glow-cyan: rgba(53, 197, 255, 0.45);
  --card-bg: rgba(14, 42, 96, 0.55);
  --card-border: rgba(93, 168, 255, 0.28);
  --text-main: #eaf2ff;
  --text-dim: #9db6dd;
  --radius: 18px;
  font-size: 16px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(53, 197, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 15% 110%, rgba(255, 140, 66, 0.14), transparent 55%),
    linear-gradient(180deg, var(--uestc-deep) 0%, var(--uestc-blue) 55%, #07204e 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* 全屏 canvas 背景 */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.layer { position: relative; z-index: 2; }

/* ============ 顶部飘带 marquee ============ */
.slogan-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 140, 66, 0.92), rgba(255, 200, 50, 0.92), rgba(53, 197, 255, 0.92));
  color: #3b1d00;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 0;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.slogan-track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 28s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ============================================================
   入场页 index.html
   ============================================================ */

.splash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 20px 40px;
  gap: 8px;
}

/* —— 加载条 —— */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(180deg, #04122e, #0a2d6b);
  transition: opacity 0.7s ease, visibility 0.7s;
}
.boot.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot .boot-logo {
  font-size: 3.2rem;
  animation: bootBounce 0.9s ease-in-out infinite;
}
@keyframes bootBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-14px) scale(1.06); }
}
.boot .boot-text {
  letter-spacing: 0.35em;
  color: #9fd4ff;
  font-size: 0.95rem;
}
.boot .boot-bar {
  width: min(320px, 70vw);
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: 0 0 24px var(--glow-cyan);
}
.boot .boot-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--nailong-gold), var(--nailong-orange), var(--uestc-cyan));
  animation: bootFill 1.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes bootFill {
  to { width: 100%; }
}
.boot .boot-pct {
  color: var(--nailong-gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* —— 奶龙主形象 —— */
.nailong-wrap {
  width: min(280px, 62vw);
  filter: drop-shadow(0 18px 40px rgba(255, 160, 40, 0.45));
  animation: floaty 3.6s ease-in-out infinite;
}
.reveal .nailong-wrap {
  animation:
    dropIn 0.9s cubic-bezier(0.18, 0.9, 0.28, 1.25) both,
    floaty 3.6s ease-in-out 1s infinite;
}
@keyframes dropIn {
  from { transform: translateY(-120vh) rotate(-12deg) scale(0.6); opacity: 0; }
  to   { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-16px) rotate(1.5deg); }
}

/* —— 标题 —— */
.main-title {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.15;
  background: linear-gradient(100deg, #ffd76a 0%, #fff6d8 22%, #7fd7ff 48%, #ffd76a 72%, #fff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 0 18px var(--glow-gold))
    drop-shadow(0 6px 30px rgba(53, 197, 255, 0.5));
  animation: shimmer 4.5s linear infinite;
}
@keyframes shimmer {
  from { background-position: 0% center; }
  to   { background-position: 220% center; }
}
.reveal .main-title {
  animation:
    titlePop 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.3) both,
    shimmer 4.5s linear 0.8s infinite;
}
@keyframes titlePop {
  from { transform: scale(0.4); opacity: 0; letter-spacing: 0.5em; filter: blur(12px) brightness(3); }
  to   { transform: scale(1); opacity: 1; letter-spacing: 0.12em; filter: blur(0) brightness(1); }
}

.title-en {
  margin-top: 6px;
  font-size: clamp(0.72rem, 2.2vw, 1.05rem);
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.reveal .title-en { animation: fadeUp 0.7s 0.55s both; }

.title-badge {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}
.title-badge span {
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(255, 215, 106, 0.5);
  background: rgba(255, 200, 50, 0.12);
  color: var(--nailong-gold);
  backdrop-filter: blur(6px);
}
.title-badge span.alt {
  border-color: rgba(53, 197, 255, 0.5);
  background: rgba(53, 197, 255, 0.12);
  color: var(--uestc-cyan);
}
.reveal .title-badge span { animation: fadeUp 0.6s 0.75s both; }
.reveal .title-badge span:nth-child(2) { animation-delay: 0.85s; }
.reveal .title-badge span:nth-child(3) { animation-delay: 0.95s; }

@keyframes fadeUp {
  from { transform: translateY(22px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* —— 进入按钮 —— */
.enter-btn {
  position: relative;
  margin-top: 34px;
  padding: 18px 58px;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  color: #3a2000;
  background: linear-gradient(135deg, #ffe27a, #ffb63c 55%, #ff8c42);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    0 0 0 4px rgba(255, 215, 106, 0.25),
    0 12px 40px rgba(255, 160, 40, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: pulseGlow 1.8s ease-in-out infinite;
}
.enter-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 0 0 6px rgba(255, 215, 106, 0.35),
    0 18px 55px rgba(255, 170, 50, 0.7);
}
.enter-btn:active { transform: scale(0.97); }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 215, 106, 0.25), 0 12px 40px rgba(255, 160, 40, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(255, 215, 106, 0.12), 0 16px 55px rgba(255, 170, 50, 0.75); }
}
.reveal .enter-btn { animation: fadeUp 0.7s 1.05s both, pulseGlow 1.8s 1.8s ease-in-out infinite; }

.enter-hint {
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
}
.reveal .enter-hint { animation: fadeUp 0.7s 1.2s both; }

/* —— 角落装饰 —— */
.corner-note {
  position: fixed;
  z-index: 20;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
}
.corner-note.left  { left: 18px; bottom: 16px; }
.corner-note.right { right: 18px; bottom: 16px; text-align: right; }

/* ============================================================
   导航页 nav.html
   ============================================================ */

.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 22px 60px;
}

.nav-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}
.nav-mascot {
  width: 92px;
  height: 92px;
  flex: none;
  cursor: pointer;
  object-fit: contain;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 10px 22px rgba(255, 160, 40, 0.4));
}
.nav-mascot:hover { transform: rotate(-8deg) scale(1.1); }
.nav-mascot.zing { animation: zing 0.55s ease; }
@keyframes zing {
  0%   { transform: rotate(0) scale(1); }
  35%  { transform: rotate(-18deg) scale(1.22); }
  70%  { transform: rotate(12deg) scale(0.94); }
  100% { transform: rotate(0) scale(1); }
}

.nav-brand h1 {
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(95deg, #ffd76a, #fff 40%, #7fd7ff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-brand p {
  margin-top: 4px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  font-size: 0.88rem;
}

.nav-tools {
  margin-left: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.tool-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.18s ease;
  backdrop-filter: blur(8px);
}
.tool-btn:hover {
  border-color: var(--nailong-gold);
  color: var(--nailong-gold);
  transform: translateY(-2px);
}

/* —— 奶龙语录条 —— */
.oracle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  margin-bottom: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 200, 50, 0.35);
  background: linear-gradient(120deg, rgba(255, 200, 50, 0.12), rgba(53, 197, 255, 0.1));
  backdrop-filter: blur(10px);
}
.oracle .oracle-tag {
  flex: none;
  padding: 5px 13px;
  border-radius: 99px;
  background: var(--nailong-gold);
  color: #4a2a00;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}
.oracle .oracle-text {
  font-size: 1.02rem;
  line-height: 1.6;
}
.oracle .oracle-refresh {
  margin-left: auto;
  flex: none;
  border: none;
  background: transparent;
  color: var(--uestc-cyan);
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.oracle .oracle-refresh:hover { transform: rotate(180deg); }

/* —— 分区卡片 —— */
.section { margin-bottom: 38px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 1.28rem;
  letter-spacing: 0.12em;
}
.section-head h2 em {
  font-style: normal;
  color: var(--nailong-gold);
  margin-right: 8px;
}
.section-head span {
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: block;
  padding: 20px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  text-decoration: none;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 200, 50, 0.16), transparent 55%);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 200, 50, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 200, 50, 0.18);
}
.card:hover::before { opacity: 1; }

.card .card-ico {
  font-size: 1.85rem;
  line-height: 1;
}
.card h3 {
  margin-top: 12px;
  font-size: 1.06rem;
  letter-spacing: 0.05em;
}
.card p {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.55;
}
.card .card-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: rgba(53, 197, 255, 0.14);
  color: var(--uestc-cyan);
  border: 1px solid rgba(53, 197, 255, 0.3);
}
.card .card-tag.gold {
  background: rgba(255, 200, 50, 0.14);
  color: var(--nailong-gold);
  border-color: rgba(255, 200, 50, 0.32);
}

/* —— 整活专区 —— */
.fun-zone {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
}
.fun-btn {
  padding: 26px 18px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 200, 50, 0.45);
  background: rgba(255, 160, 40, 0.08);
  color: var(--nailong-gold);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fun-btn:hover {
  background: rgba(255, 160, 40, 0.2);
  transform: translateY(-4px) scale(1.02);
}
.fun-btn small {
  display: block;
  margin-top: 8px;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}

/* —— 页脚 —— */
.nav-footer {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(157, 182, 221, 0.18);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.9;
}
.nav-footer a {
  color: var(--uestc-cyan);
  text-decoration: none;
}
.nav-footer a:hover { text-decoration: underline; }

/* —— 响应式 —— */
@media (max-width: 720px) {
  .nav-tools { margin-left: 0; width: 100%; }
  .oracle { flex-wrap: wrap; }
  .oracle .oracle-refresh { margin-left: 0; }
  .main-title { letter-spacing: 0.06em; }
  .enter-btn { padding: 16px 42px; font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
}
