:root {
  --bg: #090b1a;
  --card: rgba(19, 24, 51, 0.85);
  --glass-bg: linear-gradient(155deg, rgba(255, 255, 255, 0.15), rgba(19, 24, 51, 0.36));
  --glass-border: rgba(255, 255, 255, 0.24);
  --glass-shadow: 0 20px 42px rgba(4, 8, 26, 0.34);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.92);
  --accent: #58a6ff;
  --accent-2: #9d4edd;
  --success: #34d399;
  --error: #ff6b6b;
  --bg-photo: url("/images/campus-bg-main.jpg?v=20260414d");
}

* {
  box-sizing: border-box;
}

/* ===== 选中文本配色 ===== */
::selection {
  background: rgba(88, 166, 255, 0.28);
  color: #ffffff;
}

body {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "华文行楷", "FZShuTi", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #1a1f4a 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    var(--bg-photo),
    url("/images/campus-bg-main.JPG?v=20260414d"),
    url("/images/campus-bg.jpg?v=20260414d");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  filter: blur(0px) saturate(1.08) brightness(1.08);
  transform: scale(1.01);
  opacity: 1;
  z-index: -3;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(88, 166, 255, 0.06), transparent 42%),
    radial-gradient(circle at 85% 78%, rgba(157, 78, 221, 0.05), transparent 46%),
    linear-gradient(120deg, rgba(5, 8, 22, 0.04), rgba(7, 11, 28, 0.06));
  z-index: -2;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 14, 30, 0.4);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb {
  background: rgba(88, 166, 255, 0.35);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 166, 255, 0.6);
}

.auth-body {
  display: grid;
  place-items: center;
  background: transparent;
}

.auth-body::before {
  filter: blur(0px) saturate(1.16) brightness(1.2);
  opacity: 1;
}

.auth-body::after {
  background: transparent;
}

.auth-plain {
  background: #000 !important;
}

.auth-plain::before,
.auth-plain::after {
  display: none !important;
}

/* ===== 管理员编辑/新增地点 纯色背景，不显示背景图 ===== */
.admin-form-body {
  background: #f5f0e1 !important;
}

.admin-form-body::before,
.admin-form-body::after {
  display: none !important;
}

.background-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.28), transparent 60%);
  filter: blur(20px);
  animation: pulse 4s ease-in-out infinite;
}

.auth-card,
.panel,
.detail-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.22), rgba(19, 24, 51, 0.52));
  border: 1px solid rgba(230, 238, 255, 0.34);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  position: relative;
  overflow: hidden;
}

/* ===== 面板流光扫过 ===== */
.panel::after,
.detail-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.10), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  z-index: 1;
  pointer-events: none;
}

.panel:hover::after,
.detail-card:hover::after {
  left: 130%;
}

.panel:hover,
.detail-card:hover {
  transform: translateY(-5px);
  border-color: rgba(157, 78, 221, 0.6);
  box-shadow:
    0 28px 48px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(88, 166, 255, 0.18),
    0 0 60px rgba(157, 78, 221, 0.12);
}

.auth-card {
  width: min(420px, 92vw);
  padding: 28px;
  z-index: 1;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(19, 24, 51, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.auth-body .auth-card {
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  text-align: center;
}

.auth-body .auth-card h1 {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.55),
    0 4px 16px rgba(0, 0, 0, 0.35),
    0 0 32px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.auth-body .auth-card .form {
  text-align: left;
}

.login-emblem {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
  margin: 0 auto 14px;
  display: block;
  background: rgba(255, 255, 255, 0.92);
}

h1, h2 {
  margin: 0 0 10px;
}

.subtitle {
  margin-top: 0;
  color: var(--muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  color: #ffffff;
  font-size: 14px;
}

input {
  border: 1px solid #31427a;
  background: #111634;
  color: var(--text);
  font-family: inherit;
  border-radius: 10px;
  padding: 10px 12px;
}

textarea {
  border: 1px solid #31427a;
  background: #111634;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  resize: vertical;
  font-family: inherit;
}

/* ===== 表单焦点发光 ===== */
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(88, 166, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15), 0 0 20px rgba(88, 166, 255, 0.1);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

button,
.btn {
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  padding: 10px 16px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.26), transparent 44%),
    linear-gradient(140deg, rgba(88, 166, 255, 0.96), rgba(157, 78, 221, 0.92));
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 12px 24px rgba(88, 166, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 30px rgba(88, 166, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  border-color: rgba(255, 255, 255, 0.4);
}

button::after,
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 44%;
  height: 100%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.48s ease;
}

button:hover::after,
.btn:hover::after {
  left: 135%;
}

.btn.ghost {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(19, 24, 51, 0.24));
  border: 1px solid rgba(170, 198, 255, 0.44);
  color: #eaf2ff;
  box-shadow: 0 10px 22px rgba(5, 10, 30, 0.26);
}

.error {
  color: var(--error);
}

.success {
  color: var(--success);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid rgba(70, 96, 200, 0.4);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(7, 10, 27, 0.54));
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.topbar h1 {
  margin: 0;
  line-height: 1.2;
}

.topbar p {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 14px;
}

.topbar-main {
  background: transparent;
  border-bottom: 1px solid rgba(170, 202, 255, 0.24);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.topbar-main h1 {
  color: #ffffff;
  font-family: "STKaiti", "KaiTi", "华文行楷", "FZShuTi", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-emblem {
  width: 74px;
  height: 74px;
  aspect-ratio: 1 / 1;
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 50%;
  clip-path: circle(50% at 50% 50%);
  border: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.36),
    0 0 0 4px rgba(124, 194, 255, 0.24),
    0 0 24px rgba(124, 194, 255, 0.38);
  background: rgba(255, 255, 255, 0.96);
}

.topbar-main .brand-emblem {
  width: 88px;
  height: 88px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.container {
  display: grid;
  grid-template-columns: 5fr 1fr;
  gap: 20px;
  padding: 20px 28px 28px;
}

.panel {
  padding: 16px;
}

#map {
  margin-top: 10px;
  position: relative;
  overflow: visible !important;
}

.map-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.map-base-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.map-markers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  text-decoration: none;
  cursor: pointer;
  z-index: 10;
}

/* ===== 标记点外层光晕（慢速脉冲） ===== */
.map-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 10px 5px rgba(88, 166, 255, 0.45),
    0 0 25px 10px rgba(88, 166, 255, 0.2),
    0 0 45px 16px rgba(157, 78, 221, 0.1);
  animation: haloOuter 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* ===== 标记点内层光晕（快速脉冲，错相） ===== */
.map-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 5px 2px rgba(255, 255, 255, 0.8),
    0 0 14px 6px rgba(88, 166, 255, 0.4),
    0 0 28px 10px rgba(88, 166, 255, 0.2);
  animation: haloInner 1.4s ease-in-out infinite 0.3s;
  pointer-events: none;
  z-index: -1;
}

.map-marker-dot {
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 3px 1px rgba(255, 255, 255, 0.9),
    0 0 8px 3px rgba(88, 166, 255, 0.55),
    0 0 16px 5px rgba(88, 166, 255, 0.2);
  animation: dotPulse 2.4s ease-in-out infinite;
}

.map-marker-label {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

.map-marker:hover .map-marker-dot {
  background: #ffffff;
  box-shadow:
    0 0 5px 2px rgba(255, 255, 255, 1),
    0 0 14px 6px rgba(88, 166, 255, 0.6),
    0 0 26px 10px rgba(88, 166, 255, 0.3),
    0 0 45px 15px rgba(157, 78, 221, 0.15);
  transform: scale(1.4);
  animation: none;
  transition: all 0.25s ease;
}

.map-marker:hover .map-marker-label {
  color: #ffe9a0;
  font-size: 12px;
  text-shadow:
    0 0 10px rgba(88, 166, 255, 0.4),
    0 1px 4px rgba(0, 0, 0, 0.85);
  transition: all 0.25s ease;
}

.map-marker:hover::before {
  box-shadow:
    0 0 16px 8px rgba(88, 166, 255, 0.5),
    0 0 35px 14px rgba(88, 166, 255, 0.25),
    0 0 60px 22px rgba(157, 78, 221, 0.12);
  animation: haloOuterHover 0.8s ease-in-out infinite;
  transition: box-shadow 0.25s ease;
}

.map-marker:hover::after {
  box-shadow:
    0 0 8px 4px rgba(255, 255, 255, 0.9),
    0 0 20px 9px rgba(88, 166, 255, 0.45),
    0 0 38px 14px rgba(88, 166, 255, 0.2);
  animation: haloInnerHover 0.6s ease-in-out infinite;
  transition: box-shadow 0.25s ease;
}

/* ===== 光点脉冲 ===== */
@keyframes dotPulse {
  0%, 100% {
    box-shadow:
      0 0 3px 1px rgba(255, 255, 255, 0.9),
      0 0 8px 3px rgba(88, 166, 255, 0.55),
      0 0 16px 5px rgba(88, 166, 255, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 5px 2px rgba(255, 255, 255, 1),
      0 0 12px 5px rgba(88, 166, 255, 0.7),
      0 0 22px 8px rgba(88, 166, 255, 0.3);
    transform: scale(1.2);
  }
}

/* ===== 外层光晕动画 ===== */
@keyframes haloOuter {
  0%, 100% {
    box-shadow:
      0 0 10px 5px rgba(88, 166, 255, 0.45),
      0 0 25px 10px rgba(88, 166, 255, 0.2),
      0 0 45px 16px rgba(157, 78, 221, 0.1);
  }
  50% {
    box-shadow:
      0 0 14px 7px rgba(88, 166, 255, 0.3),
      0 0 32px 13px rgba(157, 78, 221, 0.15),
      0 0 55px 20px rgba(157, 78, 221, 0.06);
  }
}

/* ===== 内层光晕动画 ===== */
@keyframes haloInner {
  0%, 100% {
    box-shadow:
      0 0 5px 2px rgba(255, 255, 255, 0.8),
      0 0 14px 6px rgba(88, 166, 255, 0.4),
      0 0 28px 10px rgba(88, 166, 255, 0.2);
  }
  50% {
    box-shadow:
      0 0 7px 3px rgba(255, 255, 255, 0.5),
      0 0 18px 8px rgba(88, 166, 255, 0.25),
      0 0 34px 13px rgba(157, 78, 221, 0.1);
  }
}

/* ===== 悬停时外层光晕加速 ===== */
@keyframes haloOuterHover {
  0%, 100% {
    box-shadow:
      0 0 16px 8px rgba(88, 166, 255, 0.5),
      0 0 35px 14px rgba(88, 166, 255, 0.25),
      0 0 60px 22px rgba(157, 78, 221, 0.12);
  }
  50% {
    box-shadow:
      0 0 20px 10px rgba(88, 166, 255, 0.35),
      0 0 42px 17px rgba(157, 78, 221, 0.18),
      0 0 70px 26px rgba(157, 78, 221, 0.06);
  }
}

/* ===== 悬停时内层光晕加速 ===== */
@keyframes haloInnerHover {
  0%, 100% {
    box-shadow:
      0 0 8px 4px rgba(255, 255, 255, 0.9),
      0 0 20px 9px rgba(88, 166, 255, 0.45),
      0 0 38px 14px rgba(88, 166, 255, 0.2);
  }
  50% {
    box-shadow:
      0 0 10px 5px rgba(255, 255, 255, 0.6),
      0 0 25px 11px rgba(88, 166, 255, 0.3),
      0 0 44px 17px rgba(157, 78, 221, 0.12);
  }
}

.list-panel {
  padding: 14px;
}

/* ===== 卡片容器 ===== */
.card-stack-wrapper {
  position: relative;
  width: 100%;
}

/* ===== 堆叠预览层（展开前显示） ===== */
.stack-preview {
  position: relative;
  width: 100%;
  height: 100px;
  cursor: pointer;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.stack-preview.hiding {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* 预览层里的三张假卡片（模拟堆叠） */
.stack-preview .preview-card {
  position: absolute;
  left: 6px;
  right: 6px;
  border-radius: 12px;
  border: 1px solid rgba(108, 137, 255, 0.35);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(17, 22, 52, 0.62));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  height: 52px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stack-preview .preview-card-3 {
  top: 0;
  z-index: 1;
  transform: translateY(10px) rotate(-1.5deg) scale(0.92);
  opacity: 0.6;
}

.stack-preview .preview-card-2 {
  top: 0;
  z-index: 2;
  transform: translateY(5px) rotate(1deg) scale(0.96);
  opacity: 0.8;
}

.stack-preview .preview-card-1 {
  top: 0;
  z-index: 3;
  transform: translateY(0) rotate(0) scale(1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 预览卡呼吸光效 */
.stack-preview:not(.hiding) {
  animation: previewGlow 2.8s ease-in-out infinite;
}

@keyframes previewGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(88, 166, 255, 0.1)); }
  50%      { filter: drop-shadow(0 0 24px rgba(88, 166, 255, 0.25)) drop-shadow(0 0 48px rgba(157, 78, 221, 0.1)); }
}

.stack-preview:hover .preview-card-3 {
  transform: translateY(13px) rotate(-2deg) scale(0.92);
}
.stack-preview:hover .preview-card-2 {
  transform: translateY(7px) rotate(1.5deg) scale(0.96);
}
.stack-preview:hover .preview-card-1 {
  transform: translateY(-2px) scale(1.02);
}

/* 预览卡内部文字 */
.preview-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #bcc8ff;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.preview-icon {
  font-size: 16px;
}

.preview-arrow {
  font-size: 11px;
  animation: arrowBounce 0.8s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ===== 全屏地点浮层 ===== */
.places-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.places-overlay.active {
  pointer-events: auto;
  opacity: 1;
}

/* 半透明遮罩 */
.places-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 15, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* 弹出面板 */
.places-sheet {
  position: relative;
  width: min(680px, 92vw);
  max-height: 82vh;
  background: linear-gradient(160deg, rgba(20, 26, 55, 0.96), rgba(10, 14, 35, 0.98));
  border: 1px solid rgba(124, 170, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 60px rgba(88, 166, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.places-overlay.active .places-sheet {
  transform: translateY(0) scale(1);
}

/* 浮层头部 */
.places-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(124, 170, 255, 0.15);
  flex-shrink: 0;
}

.places-header h2 {
  margin: 0;
  font-size: 20px;
  background: linear-gradient(135deg, #7cc4ff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.places-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #aab8e0;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
  line-height: 1;
}

.places-close:hover {
  background: rgba(255, 100, 100, 0.25);
  border-color: rgba(255, 100, 100, 0.5);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 100, 100, 0.3);
}

/* 卡片网格 */
.places-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1;
}

/* ===== 单张弹出卡片 ===== */
.pop-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(108, 137, 255, 0.3);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(17, 22, 52, 0.55));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* 泡泡弹出动画 */
.pop-card.popping {
  animation: popBubble 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popBubble {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  60% {
    opacity: 1;
    transform: scale(1.05) translateY(-3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pop-card:hover {
  border-color: rgba(157, 78, 221, 0.6);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), 0 0 20px rgba(157, 78, 221, 0.15);
  transform: translateY(-3px) scale(1.02);
}

.pop-card strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.pop-card strong::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #58a6ff;
  box-shadow: 0 0 8px rgba(88,166,255,0.6);
  flex-shrink: 0;
}

.pop-card span {
  display: block;
  color: rgba(255,255,255,0.75);
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
}

/* ===== 英雄统计栏 ===== */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  padding: 10px 28px;
  margin: 20px 28px 0;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(255,255,255,0.1), rgba(19,24,51,0.38));
  border: 1px solid rgba(170,202,255,0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.stat-item {
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, #b8d8ff, #c8a8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.7))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.stat-label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}



/* ===== 标题装饰线 ===== */
.panel h2,
.detail-card h2,
.admin-table-wrap h2 {
  position: relative;
  padding-bottom: 8px;
}
.panel h2::after,
.detail-card h2::after,
.admin-table-wrap h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #58a6ff, #9d4edd);
}

.glow-marker span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7cc2ff;
  box-shadow: 0 0 0 0 rgba(124, 194, 255, 0.75);
  animation: glow 1.7s infinite;
  border: 2px solid #ffffff;
}

.popup-card h3 {
  margin: 4px 0;
}

.popup-card p {
  margin: 4px 0 10px;
}

.popup-card a {
  color: #2c7be5;
  font-weight: 700;
}

.detail-container {
  display: grid;
  place-items: center;
  padding: 24px;
}

.detail-card {
  width: min(900px, 95vw);
  padding: 18px;
  animation: fadeInUp 0.55s ease;
}

.detail-image {
  width: 100%;
  border-radius: 14px;
  max-height: 400px;
  object-fit: cover;
}

.tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(88, 166, 255, 0.6);
  color: #b9d8ff;
}

.lead {
  font-size: 18px;
  color: #ffffff;
}

.content {
  color: #ffffff;
  line-height: 1.8;
}

.gallery-title {
  margin-top: 22px;
  margin-bottom: 10px;
}

.video-section {
  margin-top: 20px;
}

.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding-top: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(230, 238, 255, 0.32);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
  background: rgba(10, 14, 30, 0.6);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.drawing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.drawing-item {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(11, 15, 36, 0.62));
  border: 1px solid rgba(183, 209, 255, 0.28);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.drawing-item:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(124, 194, 255, 0.78);
}

.drawing-item img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.drawing-item p {
  margin: 8px 10px 10px;
  color: #ffffff;
  font-size: 14px;
}

.assistant-panel {
  margin-top: 20px;
  border: 1px solid rgba(88, 166, 255, 0.34);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(8, 12, 30, 0.56));
  backdrop-filter: blur(12px) saturate(1.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  padding: 12px;
}

.assistant-messages {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px 8px;
}

.assistant-bubble {
  border-radius: 10px;
  padding: 9px 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 14px;
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.suggestion-chip {
  border: 1px solid rgba(124, 194, 255, 0.45);
  background: rgba(88, 166, 255, 0.14);
  color: #dbe8ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.suggestion-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 194, 255, 0.82);
  background: rgba(88, 166, 255, 0.22);
}

.suggestion-chip:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.assistant-bubble-bot {
  background: rgba(88, 166, 255, 0.17);
  border: 1px solid rgba(88, 166, 255, 0.45);
  align-self: flex-start;
}

.assistant-bubble-user {
  background: rgba(157, 78, 221, 0.2);
  border: 1px solid rgba(157, 78, 221, 0.45);
  align-self: flex-end;
}

.assistant-form {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.assistant-form input {
  width: 100%;
}

.back-link {
  color: #b7cbff;
  text-align: center;
  margin-top: 8px;
}

.admin-form-card {
  width: min(720px, 95vw);
  overflow: visible;
  max-height: none;
}

.provider-indicator {
  margin: 10px 0 16px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(16, 20, 40, 0.6));
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.provider-indicator[data-provider="qwen"] {
  border-color: rgba(255, 205, 112, 0.7);
  color: #ffe3b1;
  box-shadow: 0 16px 30px rgba(255, 197, 100, 0.24);
}

.provider-indicator[data-provider="deepseek"] {
  border-color: rgba(88, 166, 255, 0.85);
  color: #d6ecff;
  box-shadow: 0 16px 30px rgba(88, 166, 255, 0.28);
}

.provider-indicator[data-provider="openai"] {
  border-color: rgba(148, 240, 200, 0.8);
  color: #d9fff0;
  box-shadow: 0 16px 30px rgba(94, 214, 156, 0.26);
}

.provider-indicator[data-provider="custom"] {
  border-color: rgba(180, 150, 255, 0.8);
  color: #e6dcff;
  box-shadow: 0 16px 30px rgba(157, 78, 221, 0.28);
}

.preset-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.test-panel {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(123, 163, 255, 0.4);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(12, 18, 44, 0.58));
}

.test-panel h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.test-result {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.preview-panel {
  display: block;
  clear: both;
  margin-top: 16px;
  margin-bottom: 12px;
  position: relative;
  width: 100%;
}

.preview-panel h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

.preview-card {
  border: 1px dashed rgba(123, 163, 255, 0.45);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(10, 14, 36, 0.58));
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-radius: 12px;
  padding: 10px;
  height: auto;
  position: static;
}

.video-preview {
  display: none;
  margin-bottom: 8px;
}

.admin-form-card .video-embed {
  display: none;
}

.preview-main-image {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px;
  display: none;
}

.preview-hint {
  color: var(--muted);
  margin: 8px 2px 4px;
  font-size: 14px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.preview-grid-item {
  border: 1px solid rgba(90, 130, 255, 0.36);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(12, 17, 44, 0.62));
}

.preview-grid-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.preview-grid-item p {
  margin: 8px;
  font-size: 13px;
  color: #ffffff;
}

.admin-table-wrap {
  width: min(1100px, 96vw);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid rgba(90, 130, 255, 0.26);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

/* ===== 表格斑马纹与悬停 ===== */
.admin-table tbody tr:nth-child(even) {
  background: rgba(88, 166, 255, 0.04);
}
.admin-table tbody tr:hover {
  background: rgba(88, 166, 255, 0.1);
  transition: background 0.2s ease;
}

.admin-table th {
  color: #ffffff;
  font-size: 14px;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn.danger {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(140deg, #ff6b6b, #c92a2a);
}

@media (max-width: 900px) {
  body::before {
    top: 0;
    left: 0;
    right: 0;
    height: 100svh;
    width: 100vw;
    background-position: center center;
    background-size: cover;
    background-attachment: scroll;
    transform: none;
    filter: brightness(1.03);
  }

  .background-glow {
    display: none;
  }

  .topbar,
  .panel,
  .detail-card,
  .auth-card {
    backdrop-filter: blur(8px) saturate(1.15);
    -webkit-backdrop-filter: blur(8px) saturate(1.15);
    background: rgba(10, 14, 30, 0.72);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
  }

  .assistant-panel {
    background: rgba(12, 16, 32, 0.75);
    border-color: rgba(120, 170, 255, 0.4);
  }

  .topbar {
    padding: 10px 12px;
    gap: 8px;
  }

  .brand-block {
    gap: 10px;
    min-width: 0;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar p {
    font-size: 12px;
  }

  .actions {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 2px;
  }

  .actions .btn,
  .actions button {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }

  .container {
    grid-template-columns: 1fr;
  }

  #map {
    max-height: 70vh;
    overflow: hidden;
  }

  .map-base-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }

  .brand-emblem {
    width: 60px;
    height: 60px;
  }

  .topbar-main .brand-emblem {
    width: 72px;
    height: 72px;
  }

  .login-emblem {
    width: 90px;
    height: 90px;
  }

  .detail-container {
    width: 100%;
    padding: 16px 12px 20px;
    place-items: center;
  }

  .detail-card {
    width: 100%;
    margin: 0 auto;
  }

  .places-sheet {
    width: 94vw;
    max-height: 88vh;
  }

  .places-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px 20px;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 8px 10px;
  }

  .topbar p {
    display: none;
  }

  .topbar-main .brand-emblem {
    width: 64px;
    height: 64px;
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 194, 255, 0.8);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(124, 194, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 194, 255, 0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

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

/* ===== 交错入场动画 ===== */
.stagger-item {
  opacity: 0;
  animation: staggerIn 0.5s ease forwards;
}
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.40s; }

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

/* ===== 聊天气泡弹入 ===== */
@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.assistant-bubble {
  animation: bubbleIn 0.35s ease forwards;
}

/* ===== 页脚 ===== */
.site-footer {
  text-align: center;
  padding: 20px 28px 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  border-top: 1px solid rgba(170, 202, 255, 0.18);
  letter-spacing: 0.4px;
  background: linear-gradient(180deg, rgba(19,24,51,0.3), rgba(9,11,26,0.5));
}
.site-footer p {
  margin: 4px 0;
}
.site-footer a {
  color: rgba(124, 194, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-footer a:hover {
  color: #7cc2ff;
}

/* ===== 粒子画布 ===== */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ===== 访问量角标 ===== */
.visit-badge {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(19, 24, 51, 0.62));
  border: 1px solid rgba(170, 202, 255, 0.34);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  user-select: none;
}

.visit-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 194, 255, 0.7);
  box-shadow: 0 14px 30px rgba(88, 166, 255, 0.18);
}

.visit-badge .visit-icon {
  font-size: 18px;
  line-height: 1;
}

.visit-badge .visit-count {
  font-weight: 700;
  background: linear-gradient(135deg, #58a6ff, #9d4edd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 15px;
}

@media (max-width: 520px) {
  .visit-badge {
    bottom: 14px;
    right: 14px;
    padding: 6px 12px;
    font-size: 12px;
  }
  .visit-badge .visit-count {
    font-size: 13px;
  }
}

/* ===== AI 思考中小机器人 ===== */
.robot-thinking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.robot-body {
  position: relative;
  width: 44px;
  height: 40px;
  flex-shrink: 0;
}

/* 头部 */
.robot-head {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(160deg, #3a4f8a, #1e2a52);
  border: 2px solid rgba(124, 170, 255, 0.55);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.1),
    0 4px 12px rgba(0,0,0,0.3);
  animation: robotNod 2.6s ease-in-out infinite;
}

/* 天线 */
.robot-antenna {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 10px;
  background: rgba(124, 170, 255, 0.6);
  border-radius: 1px;
}

.robot-antenna::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #58a6ff;
  box-shadow: 0 0 8px rgba(88, 166, 255, 0.8), 0 0 16px rgba(88, 166, 255, 0.4);
  animation: antennaGlow 1.4s ease-in-out infinite;
}

/* 眼睛 */
.robot-eyes {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.robot-eye {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7cc2ff;
  box-shadow: 0 0 6px rgba(124, 194, 255, 0.7), 0 0 12px rgba(124, 194, 255, 0.3);
  animation: robotBlink 3s ease-in-out infinite;
}

.robot-eye:nth-child(2) {
  animation-delay: 0.15s;
}

/* 嘴 — 扫描线 */
.robot-mouth {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: rgba(124, 194, 255, 0.5);
  overflow: hidden;
}

.robot-mouth::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: #7cc2ff;
  animation: scanMouth 1.2s ease-in-out infinite;
}

/* 思考文字 */
.robot-text {
  font-size: 13px;
  color: rgba(170, 202, 255, 0.85);
  letter-spacing: 0.5px;
  animation: thinkFade 2.6s ease-in-out infinite;
}

/* 思考气泡 */
.robot-thoughts {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}

.robot-thought-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(124, 194, 255, 0.6);
  animation: thoughtFloat 1.6s ease-in-out infinite;
}

.robot-thought-dot:nth-child(2) {
  animation-delay: 0.3s;
}

.robot-thought-dot:nth-child(3) {
  animation-delay: 0.6s;
}

/* ===== 机器人动画关键帧 ===== */
@keyframes robotNod {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  30% { transform: translateX(-50%) translateY(-2px); }
  60% { transform: translateX(-50%) translateY(0); }
}

@keyframes robotBlink {
  0%, 90%, 96%, 100% { transform: scaleY(1); }
  93% { transform: scaleY(0.1); }
}

@keyframes antennaGlow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(88, 166, 255, 0.8), 0 0 16px rgba(88, 166, 255, 0.4);
    background: #58a6ff;
  }
  50% {
    box-shadow: 0 0 14px rgba(88, 166, 255, 1), 0 0 24px rgba(88, 166, 255, 0.6);
    background: #9dd4ff;
  }
}

@keyframes scanMouth {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

@keyframes thinkFade {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes thoughtFloat {
  0%, 100% {
    opacity: 0.2;
    transform: translateY(0);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-6px);
  }
}

/* ===== AI 悬浮球 ===== */
.ai-float-wrapper {
  position: fixed;
  top: 50%;
  left: 22px;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ai-float-ball {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(170, 202, 255, 0.5);
  background: linear-gradient(145deg, rgba(88, 166, 255, 0.92), rgba(157, 78, 221, 0.86));
  box-shadow:
    0 10px 32px rgba(88, 166, 255, 0.38),
    0 0 0 0 rgba(88, 166, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  animation: aiBallPulse 2.4s ease-in-out infinite;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.ai-float-ball::after {
  content: "AI";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b9d, #ff8e53);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.ai-float-ball-label {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(19, 24, 51, 0.5));
  border: 1px solid rgba(170, 202, 255, 0.28);
  border-radius: 999px;
  padding: 3px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.ai-float-ball:hover {
  transform: scale(1.1);
  border-color: rgba(210, 230, 255, 0.85);
  box-shadow:
    0 16px 40px rgba(88, 166, 255, 0.5),
    0 0 0 16px rgba(88, 166, 255, 0.08);
}

.ai-float-ball:active {
  transform: scale(0.94);
}

@keyframes aiBallPulse {
  0%, 100% {
    box-shadow:
      0 10px 32px rgba(88, 166, 255, 0.38),
      0 0 0 0 rgba(88, 166, 255, 0.6);
  }
  50% {
    box-shadow:
      0 10px 32px rgba(88, 166, 255, 0.38),
      0 0 0 22px rgba(88, 166, 255, 0);
  }
}

/* ===== AI 对话框 ===== */
.ai-float-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(4, 8, 26, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ai-float-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ai-float-dialog {
  width: min(480px, 92vw);
  max-height: 82vh;
  border-radius: 18px;
  border: 1px solid rgba(170, 202, 255, 0.34);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(12, 18, 44, 0.72));
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.48),
    0 0 40px rgba(88, 166, 255, 0.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ai-float-overlay.open .ai-float-dialog {
  transform: translateY(0) scale(1);
}

.ai-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(170, 202, 255, 0.2);
  flex-shrink: 0;
}

.ai-dialog-header h3 {
  margin: 0;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-dialog-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.ai-dialog-close:hover {
  background: rgba(255, 107, 107, 0.25);
  border-color: rgba(255, 107, 107, 0.55);
}

.ai-dialog-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 复用 assistant 内部样式，微调对话框内的消息区 */
.ai-float-dialog .assistant-messages {
  max-height: 340px;
}

.ai-float-dialog .assistant-suggestions {
  margin-bottom: 4px;
}

.ai-float-dialog .assistant-form {
  margin-top: 4px;
}

@media (max-width: 520px) {
  .ai-float-wrapper {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    gap: 4px;
  }

  .ai-float-ball {
    width: 56px;
    height: 56px;
    font-size: 17px;
  }

  .ai-float-ball::after {
    width: 22px;
    height: 22px;
    font-size: 10px;
    top: -4px;
    right: -4px;
  }

  .ai-float-ball-label {
    font-size: 10px;
    padding: 2px 10px;
  }

  .ai-float-dialog {
    max-height: 88vh;
  }

  .ai-dialog-header {
    padding: 10px 14px;
  }

  .ai-dialog-body {
    padding: 10px 14px;
  }
}