/* =========================================================
   首页三维地球 · gp-globe
   角标态：右上角悬浮球（首页在其后方正常显示）
   全屏态：整屏透明层，首页成为背景板，只留地球与控件
   ========================================================= */

.gp-globe {
  --gp-size: 340px;
  position: fixed;
  top: 76px;
  right: 18px;
  width: var(--gp-size);
  height: var(--gp-size);
  z-index: 55;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 20px 52px -14px rgba(43, 30, 90, 0.42),
    0 0 0 1px rgba(122, 99, 201, 0.3) inset,
    0 0 0 5px rgba(255, 255, 255, 0.55);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: width .3s ease, height .3s ease, top .3s ease, right .3s ease,
              box-shadow .3s ease, opacity .3s ease;
}
.gp-globe:active { cursor: grabbing; }
.gp-globe.is-mini { --gp-size: 196px; top: 72px; right: 14px; opacity: .95; }
.gp-globe.is-mini:hover { --gp-size: 244px; opacity: 1; }

/* 全屏：整屏透明层，页面在后方继续可见（不遮、不虚化） */
.gp-globe.is-full {
  inset: 0;
  top: 0; right: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  z-index: 9000;
  box-shadow: none;
  cursor: grab;
  background: transparent;
}
.gp-globe.is-full .gp-frame { border-radius: 0; background: transparent; }
.gp-globe.is-full .gp-frame::after { display: none; }

/* 圆形裁切容器（仅作用于地球画布，不裁切提示/卡片） */
.gp-frame {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 32% 28%, #2b2350 0%, #141026 62%, #0a0814 100%);
  transition: border-radius .3s ease;
  perspective: 700px; /* 球体视差倾斜的 3D 透视 */
}
/* 角标态的柔和光环，全屏时隐藏，避免挡住首页 */
.gp-frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 24px 6px rgba(122, 99, 201, .22);
  pointer-events: none;
}

/* Cesium 容器 */
.gp-canvas { position: absolute; inset: 0; will-change: transform; }
.gp-canvas .cesium-viewer,
.gp-canvas .cesium-viewer-cesiumWidgetContainer,
.gp-canvas .cesium-widget,
.gp-canvas .cesium-widget canvas { width: 100% !important; height: 100% !important; }
.gp-canvas .cesium-widget canvas { position: absolute; inset: 0; display: block; }
.gp-canvas .cesium-viewer-bottom,
.gp-canvas .cesium-credit-expand-link { display: none !important; }

/* 加载占位：CSS 球体，Cesium 就绪前也有动感 */
.gp-loader {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 34% 30%, rgba(146, 122, 233, .55), transparent 46%),
    radial-gradient(circle at 70% 74%, rgba(91, 71, 184, .42), transparent 52%),
    #100c22;
  transition: opacity .55s ease;
}
.gp-loader::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(160, 140, 255, .28);
  box-shadow: inset 0 0 22px rgba(122, 99, 201, .35);
  animation: gp-pulse 2.6s ease-in-out infinite;
}
.gp-loader span {
  position: relative;
  font: 500 11px/1.4 var(--sans, -apple-system, "PingFang SC", sans-serif);
  letter-spacing: .18em;
  color: rgba(214, 205, 255, .82);
}
.gp-globe.is-ready .gp-loader { opacity: 0; pointer-events: none; }
@keyframes gp-pulse {
  0%, 100% { transform: scale(.96); opacity: .5; }
  50%      { transform: scale(1.02); opacity: 1; }
}

/* 底部提示条 */
.gp-hint {
  position: absolute;
  left: 50%; bottom: -26px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0;
  text-align: center;
  font: 500 11px/1.5 var(--sans, -apple-system, "PingFang SC", sans-serif);
  letter-spacing: .04em;
  color: #7a63c9;
  opacity: 0;
  transition: opacity .22s ease;
  pointer-events: none;
}
.gp-globe:hover .gp-hint,
.gp-globe.is-full .gp-hint { opacity: 1; }
.gp-globe.is-full .gp-hint {
  bottom: 24px;
  font-size: 12.5px;
  color: rgba(240, 236, 255, .9);
  text-shadow: 0 1px 12px rgba(20, 12, 44, .9), 0 0 2px rgba(0, 0, 0, .6);
}

/* 悬停国家/城市名 */
.gp-tip {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(16, 12, 34, .84);
  border: 1px solid rgba(150, 130, 230, .45);
  color: #efeaff;
  font: 600 12.5px/1 var(--sans, -apple-system, "PingFang SC", sans-serif);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .16s ease;
  pointer-events: none;
  backdrop-filter: blur(6px);
  z-index: 3;
}
.gp-tip.on { opacity: 1; }
.gp-tip em {
  font-style: normal;
  font-weight: 500;
  font-size: 11px;
  color: #b9a9ff;
  margin-left: 6px;
  letter-spacing: .04em;
}

/* 全屏控件 */
.gp-exit, .gp-back, .gp-view3d {
  position: absolute;
  top: 20px;
  display: none;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(20, 15, 40, .55);
  color: #f0ecff;
  font: 600 12px/1 var(--sans, -apple-system, "PingFang SC", sans-serif);
  letter-spacing: .04em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s ease, border-color .2s ease;
  z-index: 4;
}
.gp-exit { right: 22px; }
.gp-view3d { right: 132px; }
.gp-back { right: 236px; }
.gp-exit:hover, .gp-back:hover, .gp-view3d:hover {
  background: rgba(122, 99, 201, .55); border-color: rgba(255, 255, 255, .55);
}
.gp-globe.is-full .gp-exit,
.gp-globe.is-full .gp-back,
.gp-globe.is-full .gp-view3d { display: block; }
.gp-globe.is-full:not(.is-drill) .gp-back { display: none; }

/* 面包屑：世界 › 法国 › 巴黎 */
.gp-crumbs {
  position: absolute;
  top: 22px; left: 26px;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 15, 40, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(240, 236, 255, .95);
  font: 600 12.5px/1 var(--sans, -apple-system, "PingFang SC", sans-serif);
  backdrop-filter: blur(8px);
  z-index: 4;
}
.gp-crumbs.on { display: flex; }
.gp-crumbs b { cursor: pointer; color: #c9baff; font-weight: 600; }
.gp-crumbs b:hover { color: #fff; text-decoration: underline; }
.gp-crumbs span { color: #ffd47a; }
.gp-crumbs i { font-style: normal; color: rgba(201, 186, 255, .5); }

/* 城市院校卡片 */
.gp-card {
  position: absolute;
  right: 26px; bottom: 62px;
  width: 268px;
  max-height: 62vh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 169, 255, .55) transparent;
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: rgba(18, 13, 38, .82);
  border: 1px solid rgba(150, 130, 230, .32);
  box-shadow: 0 24px 60px -20px rgba(8, 4, 24, .8);
  backdrop-filter: blur(14px);
  color: #efeaff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 4;
}
.gp-card.on { opacity: 1; transform: none; pointer-events: auto; }
.gp-card::-webkit-scrollbar { width: 7px; }
.gp-card::-webkit-scrollbar-track { background: rgba(255, 255, 255, .07); border-radius: 4px; }
.gp-card::-webkit-scrollbar-thumb { background: rgba(185, 169, 255, .5); border-radius: 4px; }
.gp-card::-webkit-scrollbar-thumb:hover { background: rgba(185, 169, 255, .8); }
.gp-card-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.gp-card-hd b { font: 700 16px/1.2 var(--sans, -apple-system, "PingFang SC", sans-serif); letter-spacing: .01em; }
.gp-card-hd em {
  font-style: normal;
  font-size: 11.5px;
  color: #b9a9ff;
}
/* 城市具体地理信息块（国家/坐标/时区/人口）——无底色，仅分隔线 */
.gp-card-geo {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 8px 0 10px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.gp-card-geo > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  line-height: 1.4;
}
.gp-card-geo span {
  flex: 0 0 auto;
  color: #a89be4;
  letter-spacing: .02em;
}
.gp-card-geo b {
  font-weight: 600;
  color: #f3edff;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.gp-card ul { list-style: none; margin: 0; padding: 0; }
.gp-card li { margin: 0 0 6px; }
/* 院校名单滚动区：名单过长时出现拖动轴，上下滑动查看全部 */
.gp-card-list {
  max-height: 34vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 2px 0 6px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(185, 169, 255, .55) transparent;
}
.gp-card-list::-webkit-scrollbar { width: 7px; }
.gp-card-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .07);
  border-radius: 4px;
}
.gp-card-list::-webkit-scrollbar-thumb {
  background: rgba(185, 169, 255, .5);
  border-radius: 4px;
}
.gp-card-list::-webkit-scrollbar-thumb:hover { background: rgba(185, 169, 255, .8); }
.gp-card li a {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #e6dfff;
  text-decoration: none;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.gp-card li a:hover { color: #ffd47a; }
.gp-card-note { margin-top: 4px; font-size: 11px; color: #b9a9ff; opacity: .8; line-height: 1.6; }
.gp-card-sub {
  margin: 2px 0 8px;
  font-size: 11.5px;
  color: #b9a9ff;
  letter-spacing: .03em;
  line-height: 1.6;
}
/* 985 / 211 徽标 */
.gp-badge {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  margin-left: 4px;
  border-radius: 4px;
  color: #2b2350;
  background: #b9a9ff;
  vertical-align: 1px;
}
.gp-badge.b985 { background: #ffd47a; }
.gp-badge.b211 { background: #b9a9ff; }
.gp-badge.bdl { background: #8ee0c9; color: #123; }
/* 省级名单：按城市分组 */
.gp-city-grp { margin-bottom: 10px; }
.gp-city-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0 3px;
  border-bottom: 1px solid rgba(185, 169, 255, .28);
  margin-bottom: 3px;
}
.gp-city-hd b {
  font-size: 12px;
  font-weight: 700;
  color: #ffd47a;
  letter-spacing: .04em;
}
.gp-city-hd em {
  font-style: normal;
  font-size: 10.5px;
  color: #b9a9ff;
  opacity: .85;
}
.gp-card li.gp-uni-li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.gp-card li.gp-uni-li .gp-uni-row {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.gp-card li.gp-uni-li .gp-uni-site {
  flex: 0 0 auto;
  display: inline-block;
  width: auto;
  padding: 3px 2px;
  font-size: 11.5px;
  color: #8ee0c9;
  border-bottom: 0;
  opacity: .85;
}
.gp-card li.gp-uni-li .gp-uni-site:hover { color: #ffd47a; opacity: 1; }
.gp-card-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: #b9a9ff;
  text-decoration: none;
}
.gp-card-more:hover { color: #ffd47a; }

/* 全屏时锁定页面滚动（鼠标键盘只控制地球） */
body.gp-globe-open { overflow: hidden; }
body.gp-globe-open .gp-globe { position: fixed; }

/* 窄屏：贴在 Hero 右侧留白处，随页面滚动走 */
@media (max-width: 1520px) {
  .gp-globe {
    position: absolute;
    --gp-size: 306px;
    top: 84px;
    right: 18px;
  }
  .gp-globe.is-mini { --gp-size: 224px; top: 84px; right: 18px; opacity: 1; }
}
@media (max-width: 1360px) {
  .gp-globe { --gp-size: 268px; top: 88px; right: 16px; }
  .gp-globe.is-mini { --gp-size: 200px; top: 88px; right: 16px; }
}
/* 中屏：不再整体隐藏地球仪（1180px 以下原本 display:none，导致 1080/1024 笔记本
   上右上角一片空白），改为逐级缩小；实测 840px 以下会遮挡正文，恢复隐藏 */
@media (max-width: 1180px) {
  .gp-globe { --gp-size: 218px; top: 96px; right: 12px; }
  .gp-globe.is-mini { --gp-size: 168px; top: 96px; right: 12px; opacity: 1; }
}
@media (max-width: 980px) {
  .gp-globe { --gp-size: 176px; top: 92px; right: 10px; }
  .gp-globe.is-mini { --gp-size: 140px; top: 92px; right: 10px; }
}
/* 更窄窗口 / 手机：地球仪会遮挡正文，仍隐藏 */
@media (max-width: 840px) {
  .gp-globe { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gp-globe, .gp-loader::after, .gp-hint, .gp-tip, .gp-card { transition: none; animation: none; }
}
