/* 基础复位 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #050505; /* 场景底深黑色 */
    font-family: 'Noto Serif SC', serif;
}

body.subapp-open {
    overflow: hidden;
}

body.subapp-open #wujie-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#wujie-container.community-scroll-host {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#wujie-container.community-scroll-host::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

#wujie-container.map-scroll-host {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#wujie-container.map-scroll-host::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body.subapp-open .scene > :not(#wujie-container):not(#close-subapp-btn) {
    display: none !important;
}

/* 子应用返回按钮 */
.close-subapp-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 225, 182, 0.45);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f3e7c7;
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0.36;
  transition: opacity 0.18s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* 壳首页：狸奴 */
.shell-cat {
  position: absolute;
  z-index: 11;
  /* ==================================================== */
  /* 【主页狸奴尺寸调节】 */
  /* 保持与 SpritePet.vue 中的 PET_SIZE 数值一致 */
  /* ==================================================== */
  width: 280px;  /* 从 176px 放大 */
  height: 280px; /* 从 176px 放大 */
  left: 0;
  top: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  opacity: 0.98;
}

.shell-cat:active {
  cursor: grabbing;
}

.shell-cat__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.shell-cat__lottie {
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}

.shell-cat--lottie-ready .shell-cat__lottie {
  display: block;
}

.shell-cat--lottie-ready .shell-cat__img {
  display: none;
}

.shell-cat__bubble {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 12px 16px;
  background-color: rgba(253, 246, 227, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.15);
  font-family: "STKaiti", "KaiTi", "SimSun", serif;
  font-size: 14px;
  line-height: 1.5;
  color: #2c2825;
  text-align: center;
  word-wrap: break-word;
  white-space: pre-wrap;
  pointer-events: none;
}

.shell-cat__bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: rgba(253, 246, 227, 0.9) transparent transparent transparent;
}

.shell-cat__bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 9px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.shell-cat__chat-panel {
  position: absolute;
  right: calc(100% + 0.5rem);
  bottom: 0;
  width: min(320px, 72vw);
  border: 1px solid rgba(212, 175, 55, 0.34);
  background: rgba(10, 16, 22, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  padding: 0.52rem;
  display: grid;
  gap: 0.42rem;
}

.shell-cat__chat-panel[hidden] {
  display: none !important;
}

.shell-cat__chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #f3e7c7;
  font-size: 0.8rem;
}

.shell-cat__chat-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.shell-cat__chat-status {
  color: #9f9275;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.shell-cat__chat-status--online {
  color: #7dc5a6;
}

.shell-cat__chat-status--warn {
  color: #d7a463;
}

.shell-cat__chat-close {
  border: none;
  background: transparent;
  color: #debb7e;
  font-size: 0.74rem;
  cursor: pointer;
}

.shell-cat__chat-history {
  max-height: 170px;
  overflow: auto;
  display: grid;
  gap: 0.34rem;
  padding-right: 0.2rem;
}

.shell-cat__chat-line {
  margin: 0;
  color: #e5dac2;
  font-size: 0.76rem;
  line-height: 1.5;
  display: grid;
  gap: 0.12rem;
}

.shell-cat__chat-role {
  color: #debb7e;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.shell-cat__chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.36rem;
}

.shell-cat__chat-input {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #f3e7c7;
  padding: 0.34rem 0.44rem;
  font-size: 0.74rem;
}

.shell-cat__chat-input:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(212, 175, 55, 0.38);
}

.shell-cat__chat-send {
  border: none;
  background: rgba(212, 175, 55, 0.16);
  color: #debb7e;
  padding: 0.32rem 0.52rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.shell-cat__chat-send:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.close-subapp-btn:hover,
.close-subapp-btn:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(222, 187, 126, 0.5);
  filter: saturate(1.06);
  outline: none;
}

.close-subapp-btn:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .close-subapp-btn {
    top: 14px;
    left: 14px;
    padding: 11px 14px;
  }
}

/* 全局背景层 */
.scene {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-image: url('../images/微信图片2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 电影级调色暗罩 */
.scene::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0) 20%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

/* 毛玻璃通用样式 */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    z-index: 10;
}

/* 1. 左上角：登录按钮 */
.login-entry {
    position: absolute;
    top: 40px;
    left: 50px;
  width: 146px;
  height: 52px;
  border: none;
  border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 12;
  background: linear-gradient(135deg, rgba(193, 150, 84, 0.95), rgba(127, 91, 45, 0.35) 55%, rgba(70, 51, 30, 0.2));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.login-entry:hover,
.login-entry:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(222, 187, 126, 0.5);
  filter: saturate(1.08);
  outline: none;
}

.login-entry-inner {
  width: 142px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(245, 225, 182, 0.45);
  background: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), url('../images/西园雅集.jpg') center/cover no-repeat;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #f3e7c7;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.login-entry svg {
  width: 22px;
  height: 22px;
  fill: #f3e7c7;
}

/* 2. 屏幕上侧：大标题 */
.main-title {
    position: absolute;
    top: 12%; /* 使用百分比适配不同屏幕高度 */
    left: 50%; /* 恢复绝对居中，霸气镇场 */
    transform: translateX(-50%);
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 16px;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    z-index: 10;
}

/* 3. 左侧垂直菜单 */
.side-nav {
  position: absolute;
  top: 57%;
  left: clamp(24px, 11vw, 200px);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 2.6vh, 30px);
  z-index: 10;
  width: max-content;
}

/* ===== 双闪按钮 (数智宋脉 - 辅功能) ===== */
.btn-double-flash {
  position: relative;
  padding: 16px 47px;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('../images/闸口盘车.jpg') center/cover no-repeat;
  font-size: 23px;
  font-weight: 500;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 11px;
  box-shadow: 0 0 0 transparent;
  cursor: pointer;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  overflow: visible;
  isolation: isolate;
  transition: all 0.3s ease-in-out;
}
.btn-double-flash .flash-text { position: relative; z-index: 4; }
.btn-double-flash .star-1, .btn-double-flash .star-2, .btn-double-flash .star-3, .btn-double-flash .star-4, .btn-double-flash .star-5, .btn-double-flash .star-6 { position: absolute; height: auto; filter: drop-shadow(0 0 0 #b9f0ff); z-index: 1; opacity: 0; pointer-events: none; transition: all 0.9s cubic-bezier(0.05, 0.83, 0.43, 0.96); }
.btn-double-flash .star-1 { top: 20%; left: 20%; width: 25px; }
.btn-double-flash .star-2 { top: 45%; left: 45%; width: 15px; transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-double-flash .star-3 { top: 40%; left: 40%; width: 5px; transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-double-flash .star-4 { top: 20%; left: 40%; width: 8px; transition-duration: 0.75s; transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-double-flash .star-5 { top: 25%; left: 45%; width: 15px; transition-duration: 0.65s; transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-double-flash .star-6 { top: 5%; left: 50%; width: 5px; transition-duration: 0.75s; }
.btn-double-flash .fil0 { fill: #d7f6ff; }
.btn-double-flash:hover { background: transparent; color: #8fd7ff; border-color: #8fd7ff; box-shadow: 0 0 25px rgba(143,215,255,0.45); text-shadow: none; }
.btn-double-flash:hover .star-1 { top: -8%; left: -8%; width: 22px; filter: drop-shadow(0 0 12px #b9f0ff); z-index: 3; opacity: 1; }
.btn-double-flash:hover .star-2 { top: 32%; left: -5%; width: 14px; filter: drop-shadow(0 0 11px #b9f0ff); z-index: 3; opacity: 1; }
.btn-double-flash:hover .star-3 { top: 72%; left: 8%; width: 8px; filter: drop-shadow(0 0 9px #b9f0ff); z-index: 3; opacity: 1; }
.btn-double-flash:hover .star-4 { top: -18%; left: 92%; width: 16px; filter: drop-shadow(0 0 12px #b9f0ff); z-index: 3; opacity: 1; }
.btn-double-flash:hover .star-5 { top: 28%; left: 110%; width: 13px; filter: drop-shadow(0 0 11px #b9f0ff); z-index: 3; opacity: 1; }
.btn-double-flash:hover .star-6 { top: 78%; left: 96%; width: 9px; filter: drop-shadow(0 0 9px #b9f0ff); z-index: 3; opacity: 1; }

/* ===== 星光按钮 (宋韵溯源 - 辅功能) ===== */
.btn-star {
  position: relative;
  padding: 16px 47px;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('../images/宋韵.jpg') center/cover no-repeat;
  font-size: 23px;
  font-weight: 500;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 11px;
  box-shadow: 0 0 0 #fec1958c;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}
.btn-star .star-1 { position: absolute; top: 20%; left: 20%; width: 25px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 1s cubic-bezier(0.05, 0.83, 0.43, 0.96); }
.btn-star .star-2 { position: absolute; top: 45%; left: 45%; width: 15px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 1s cubic-bezier(0, 0.4, 0, 1.01); }
.btn-star .star-3 { position: absolute; top: 40%; left: 40%; width: 5px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 1s cubic-bezier(0, 0.4, 0, 1.01); }
.btn-star .star-4 { position: absolute; top: 20%; left: 40%; width: 8px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 0.8s cubic-bezier(0, 0.4, 0, 1.01); }
.btn-star .star-5 { position: absolute; top: 25%; left: 45%; width: 15px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 0.6s cubic-bezier(0, 0.4, 0, 1.01); }
.btn-star .star-6 { position: absolute; top: 5%; left: 50%; width: 5px; height: auto; filter: drop-shadow(0 0 0 #fffdef); z-index: -5; transition: all 0.8s ease; }
.btn-star .fil0 { fill: #fffdef; }
.btn-star:hover { background: transparent; color: #fec195; box-shadow: 0 0 25px #fec1958c; border-color: #fec195; text-shadow: none; }
.btn-star:hover .star-1 { position: absolute; top: -80%; left: -30%; width: 25px; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; }
.btn-star:hover .star-2 { position: absolute; top: -25%; left: 10%; width: 15px; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; }
.btn-star:hover .star-3 { position: absolute; top: 55%; left: 25%; width: 5px; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; }
.btn-star:hover .star-4 { position: absolute; top: 30%; left: 80%; width: 8px; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; }
.btn-star:hover .star-5 { position: absolute; top: 25%; left: 115%; width: 15px; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; }
.btn-star:hover .star-6 { position: absolute; top: 5%; left: 60%; width: 5px; filter: drop-shadow(0 0 10px #fffdef); z-index: 2; }

/* ===== 草草按钮 (社区雅集 - 辅功能) ===== */
.btn-grass {
  position: relative;
  padding: 16px 47px;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('../images/社区.jpg') center/cover no-repeat;
  font-size: 23px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 11px;
  filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3));
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 5px;
  overflow: visible;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  transition: all 0.3s ease-in-out;
}
.btn-grass:hover { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); text-shadow: none; }
.btn-grass .icon-1 { position: absolute; top: 0; right: 0; width: 34px; transform-origin: 0 0; transform: rotate(10deg); transition: all 0.5s ease-in-out, opacity 0.3s ease; filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.3)); overflow: visible; opacity: 0; }
.btn-grass:hover .icon-1 { animation: slay-1 3s cubic-bezier(0.52, 0, 0.58, 1) infinite; transform: rotate(10deg); opacity: 1; }
@keyframes slay-1 { 0% { transform: rotate(10deg); } 50% { transform: rotate(-5deg); } 100% { transform: rotate(10deg); } }
.btn-grass .icon-2 { position: absolute; top: 0; left: 34px; width: 16px; transform-origin: 50% 0; transform: rotate(10deg); transition: all 1s ease-in-out, opacity 0.3s ease; filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.5)); overflow: visible; opacity: 0; }
.btn-grass:hover .icon-2 { animation: slay-2 3s cubic-bezier(0.52, 0, 0.58, 1) 1s infinite; transform: rotate(0); opacity: 1; }
@keyframes slay-2 { 0% { transform: rotate(0deg); } 50% { transform: rotate(15deg); } 100% { transform: rotate(0); } }
.btn-grass .icon-3 { position: absolute; top: 0; left: 0; width: 24px; transform-origin: 50% 0; transform: rotate(-5deg); transition: all 1s ease-in-out, opacity 0.3s ease; filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.5)); overflow: visible; opacity: 0; }
.btn-grass:hover .icon-3 { animation: slay-3 2s cubic-bezier(0.52, 0, 0.58, 1) 1s infinite; transform: rotate(0); opacity: 1; }
@keyframes slay-3 { 0% { transform: rotate(0deg); } 50% { transform: rotate(-5deg); } 100% { transform: rotate(0); } }
.btn-grass .fil0 { fill: rgba(255,255,255,0.85); }
.btn-grass svg { overflow: visible; }

/* ===== 爱心按钮 (云端点妆) ===== */
.btn-heart {
  position: relative;
  padding: 16px 47px;
  font-size: 23px;
  font-weight: 500;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 11px;
  cursor: pointer;
  font-family: 'Noto Serif SC', serif;
  letter-spacing: 5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  overflow: visible;
  background: transparent;
  transition: all 0.3s ease-in-out;
}

.btn-heart::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('../images/点妆.jpg') center/cover no-repeat;
  border-radius: 11px;
  z-index: 1;
  transition: opacity 0.4s ease;
}
.btn-heart:hover::before { opacity: 0; }

.btn-heart .heart-text { position: relative; z-index: 3; pointer-events: none; }
.btn-heart .heart-1, .btn-heart .heart-2, .btn-heart .heart-3, .btn-heart .heart-4, .btn-heart .heart-5, .btn-heart .heart-6 {
  position: absolute; height: auto; filter: drop-shadow(0 0 0 #fd1853); z-index: 0; opacity: 0; transition: all 1s cubic-bezier(0.05, 0.83, 0.43, 0.96);
}
.btn-heart .heart-1 { top: 20%; left: 20%; width: 25px; }
.btn-heart .heart-2 { top: 45%; left: 45%; width: 15px; transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-heart .heart-3 { top: 40%; left: 40%; width: 5px;  transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-heart .heart-4 { top: 20%; left: 40%; width: 8px;  transition-duration: 0.8s; transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-heart .heart-5 { top: 25%; left: 45%; width: 15px; transition-duration: 0.6s; transition-timing-function: cubic-bezier(0, 0.4, 0, 1.01); }
.btn-heart .heart-6 { top: 5%;  left: 50%; width: 5px;  transition-duration: 0.8s; }
.btn-heart:hover .heart-1 { top: -2%;  left: 0%;   filter: drop-shadow(0 0 10px #fd1853); z-index: 2; opacity: 1; }
.btn-heart:hover .heart-2 { top: 34%;  left: 41.5%; filter: drop-shadow(0 0 10px #fd1853); z-index: 2; opacity: 1; }
.btn-heart:hover .heart-3 { top: 55%;  left: 25%;   filter: drop-shadow(0 0 10px #fd1853); z-index: 2; opacity: 1; }
.btn-heart:hover .heart-4 { top: 0%;   left: 55%;   filter: drop-shadow(0 0 10px #fd1853); z-index: 2; opacity: 1; }
.btn-heart:hover .heart-5 { top: 25%;  left: 85%;   filter: drop-shadow(0 0 10px #fd1853); z-index: 2; opacity: 1; }
.btn-heart:hover .heart-6 { top: 75%;  left: 60%;   filter: drop-shadow(0 0 10px #fd1853); z-index: 2; opacity: 1; }


/* 登录浮窗（保留原组件审美） */
.login-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1200;
}

.login-modal.is-open {
  display: flex;
}

.login-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.login-modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: min(92vw, 420px);
  height: 430px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
}

.login-modal-close {
  position: absolute;
  top: -6px;
  right: 2px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #f0f0f0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.login-modal-close:hover,
.login-modal-close:focus-visible {
  color: #ffffff;
  outline: none;
}

.login-modal .wrapper {
  --input-focus: #2d8cf0;
  --font-color: #323232;
  --font-color-sub: #666;
  --bg-color: #fff;
  --bg-color-alt: #666;
  --main-color: #323232;
}

.login-modal .switch {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 50px;
  height: 20px;
}

.login-modal .card-side::before {
  position: absolute;
  content: '登录';
  left: -70px;
  top: 0;
  width: 100px;
  text-decoration: underline;
  color: #f5f5f5;
  font-weight: 600;
}

.login-modal .card-side::after {
  position: absolute;
  content: '注册';
  left: 70px;
  top: 0;
  width: 100px;
  text-decoration: none;
  color: #f5f5f5;
  font-weight: 600;
}

.login-modal .card-side {
  pointer-events: none;
}

.login-modal .toggle {
  opacity: 0;
  width: 0;
  height: 0;
}

.login-modal .slider {
  box-sizing: border-box;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  box-shadow: 4px 4px var(--main-color);
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-color);
  transition: 0.3s;
}

.login-modal .slider:before {
  box-sizing: border-box;
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  border: 2px solid var(--main-color);
  border-radius: 5px;
  left: -2px;
  bottom: 2px;
  background-color: var(--bg-color);
  box-shadow: 0 3px 0 var(--main-color);
  transition: 0.3s;
}

.login-modal .toggle:checked + .slider {
  background-color: var(--input-focus);
}

.login-modal .toggle:checked + .slider:before {
  transform: translateX(30px);
}

.login-modal .toggle:checked ~ .card-side:before {
  text-decoration: none;
}

.login-modal .toggle:checked ~ .card-side:after {
  text-decoration: underline;
}

.login-modal .flip-card__inner {
  width: 300px;
  height: 370px;
  position: relative;
  background-color: transparent;
  perspective: 1000px;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  margin-top: 0;
}

.login-modal .toggle:checked ~ .flip-card__inner {
  transform: rotateY(180deg);
}

.login-modal .flip-card__front,
.login-modal .flip-card__back {
  padding: 20px;
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: lightgrey;
  gap: 14px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  box-shadow: 4px 4px var(--main-color);
  width: 100%;
  min-height: 100%;
}

.login-modal .flip-card__back {
  transform: rotateY(180deg);
}

.login-modal .flip-card__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.login-modal .title {
  margin: 10px 0 4px;
  font-size: 25px;
  font-weight: 900;
  text-align: center;
  color: var(--main-color);
}

.login-modal .flip-card__input {
  width: 250px;
  height: 40px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  background-color: var(--bg-color);
  box-shadow: 4px 4px var(--main-color);
  font-size: 15px;
  font-weight: 600;
  color: var(--font-color);
  padding: 5px 10px;
  outline: none;
}

.login-modal .flip-card__input::placeholder {
  color: var(--font-color-sub);
  opacity: 0.8;
}

.login-modal .flip-card__input:focus {
  border: 2px solid var(--input-focus);
}

.login-modal .flip-card__btn {
  margin: 8px 0 2px;
  width: 120px;
  height: 40px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  background-color: var(--bg-color);
  box-shadow: 4px 4px var(--main-color);
  font-size: 17px;
  font-weight: 600;
  color: var(--font-color);
  cursor: pointer;
}

.login-modal .flip-card__btn:active {
  box-shadow: 0 0 var(--main-color);
  transform: translate(3px, 3px);
}

.login-modal .auth-msg {
  min-height: 20px;
  margin-top: -4px;
  font-size: 13px;
  font-weight: 600;
  color: #2f2f2f;
}

.login-modal .auth-msg.error {
  color: #b11e1e;
}

.login-modal .auth-msg.success {
  color: #2b7a2b;
}

.login-modal .logout-inline {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.login-modal .logout-inline[hidden] {
  display: none;
}

.login-modal .logout-inline-text {
  font-size: 12px;
  color: #3b3b3b;
  font-weight: 600;
}

.login-modal .logout-inline-btn {
  width: 120px;
  height: 34px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  background: #f2f2f2;
  box-shadow: 3px 3px var(--main-color);
  font-size: 14px;
  font-weight: 600;
  color: var(--font-color);
  cursor: pointer;
}

.login-modal .logout-inline-btn:active {
  box-shadow: 0 0 var(--main-color);
  transform: translate(2px, 2px);
}

body.has-login-modal {
  overflow: hidden;
}

/* 响应式降级：屏幕较小时垂直排列，但云端点妆依然最巨大并在第一位 */
@media (max-width: 720px) {
  .login-entry {
    top: 20px;
    left: 20px;
    width: 128px;
    height: 46px;
  }

  .login-entry-inner {
    width: 124px;
    height: 42px;
    font-size: 14px;
    letter-spacing: 1px;
    gap: 8px;
  }

  .login-entry svg {
    width: 18px;
    height: 18px;
  }

  .main-title {
    top: 76px;
    left: 50%; /* 移动端强制居中 */
    font-size: 34px;
    letter-spacing: 8px;
  }

 /* 移动端排版修正 */
  .side-nav {
    top: auto;
    bottom: 8%;
    left: 50%; 
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; 
    width: max-content;
  }

  .btn-heart {
      padding: 20px 60px; /* 移动端适度等比放大 */
      font-size: 30px;
      letter-spacing: 10px;
      margin-bottom: 6vh; /* 移动端将主按钮和下方三个功能单独拉开距离 */
      left: 0; /* 移动端重置偏移，保证居中 */
  }

  .btn-double-flash,
  .btn-star,
  .btn-grass {
    padding: 14px 40px;
    font-size: 20px;
    letter-spacing: 3px;
    left: 0; /* 移动端重置偏移，保证居中 */
  }

  .login-modal .flip-card__inner {
    width: min(86vw, 300px);
    height: 370px;
  }

  .login-modal .flip-card__input {
    width: min(72vw, 250px);
  }
}