* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #262242; color: #F0ECFF;
  max-width: 480px; margin: 0 auto;
  min-height: 100vh; position: relative;
}
.top-bar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #262242 0%, #262242 100%);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top-bar h1 { font-size: 18px; font-weight: 600; flex: 1; }
.search-bar {
  flex: 1; display: flex; align-items: center;
  background: rgba(104,86,164,0.14);
  border-radius: 18px; padding: 8px 14px;
  font-size: 14px; color: #C7BBE8;
}
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: #F0ECFF; font-size: 14px;
}
.page { display: none; }
.page.active { display: block; min-height: 100vh; padding-bottom: 70px; }
.page.active.chat-page { display: flex !important; flex-direction: column; height: 100vh; min-height: 100vh !important; padding-bottom: 0 !important; }
.tab-bar.hidden-in-chat { display: none !important; }
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%; max-width: 480px; margin: 0 auto;
  background: rgba(38, 34, 66, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex; justify-content: space-around; align-items: center;
  border-top: 1px solid rgba(168, 148, 234, 0.09); z-index: 100;
  height: 78px; box-sizing: border-box;
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 8px);
  padding-top: 10px;
}
.tab-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12px; color: #806FC2; cursor: pointer;
  height: 60px;
  position: relative;
  transition: all 0.25s ease;
  opacity: 0.55;
}
.tab-item.active {
  opacity: 1;
}
.tab-item.active::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 52px;
  border-radius: 16px;
  background: radial-gradient(ellipse at center, rgba(146, 124, 255, 0.18) 0%, rgba(146, 124, 255, 0.08) 60%, transparent 100%);
  z-index: -1;
  filter: blur(2px);
}
.tab-icon-wrap {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 3px;
  border-radius: 10px;
  transition: all 0.25s ease;
}
.tab-icon-svg {
  width: 26px; height: 26px;
  display: block;
}
.tab-label {
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  transition: all 0.25s ease;
}
.tab-item.active .tab-icon-svg {
  color: #927CFF;
  filter: drop-shadow(0 1px 3px rgba(146, 124, 255, 0.35));
}
.tab-item.active .tab-label {
  color: #927CFF;
  font-weight: 600;
}
.tab-item-center {
  margin-top: 0;
  height: 60px;
  opacity: 1;
}
.tab-center-btn {
  width: 54px; height: 38px;
  border-radius: 19px;
  background: linear-gradient(135deg, #927CFF 0%, #806FC2 50%, #927CFF 100%);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 3px;
  box-shadow: 0 4px 12px rgba(146, 124, 255, 0.38), 0 2px 5px rgba(146, 124, 255, 0.2);
  transition: all 0.25s ease;
  position: relative;
}
.tab-center-btn::after {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(146, 124, 255, 0.22) 0%, rgba(146, 124, 255, 0.22) 100%);
  filter: blur(6px);
  opacity: 0.7;
  z-index: -1;
}
.tab-center-icon {
  width: 22px; height: 22px;
  display: block;
}
.tab-item-center .tab-label {
  color: #927CFF;
  font-weight: 600;
}
.tab-item.active .tab-center-btn {
  transform: scale(1.05);
  box-shadow: 0 5px 14px rgba(146, 124, 255, 0.42), 0 2px 6px rgba(146, 124, 255, 0.28);
}
.banner {
  margin: 12px 16px; height: 120px; border-radius: 24px;
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; position: relative; overflow: hidden;
}
.categories {
  display: flex; flex-wrap: wrap;
  padding: 0 12px; gap: 8px; margin-bottom: 16px;
}
.cat-item {
  flex: 0 0 calc(16.66% - 7px);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px; background: rgba(104,86,164,0.16);
  border: 1px solid rgba(168,148,234,0.09); border-radius: 20px; font-size: 12px; cursor: pointer;
}
.cat-icon { font-size: 24px; margin-bottom: 4px; }
.rank-tabs {
  display: flex; padding: 0 16px; gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 12px;
}
.rank-tab {
  padding: 10px 0; font-size: 14px; color: #C7BBE8;
  cursor: pointer; position: relative;
}
.rank-tab.active { color: #F0ECFF; font-weight: 600; }
.rank-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: #927CFF; border-radius: 2px;
}
.card-list { padding: 0 16px; }
.card-item {
  display: flex; gap: 12px; padding: 12px 16px; margin-bottom: 8px;
  background: rgba(104, 86, 164, 0.16);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(168, 148, 234, 0.09); border-radius: 20px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) inset;
}
.card-cover {
  width: 80px; height: 110px; border-radius: 12px;
  background: linear-gradient(135deg, #2e2a48 0%, #2e2a48 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; flex-shrink: 0;
}
.card-info { flex: 1; min-width: 0; }
.card-title {
  font-size: 15px; font-weight: 600; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-desc {
  font-size: 12px; color: #C7BBE8; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px;
}
.card-meta { display: flex; gap: 10px; font-size: 11px; color: #C7BBE8; }
.card-tag {
  display: inline-block; padding: 2px 6px;
  background: rgba(234,152,66,0.18);
  color: #F8B058; border-radius: 6px;
  font-size: 10px; margin-right: 4px;
}
.author-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer;
}
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #806FC2, #927CFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.author-info { flex: 1; }
.author-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.author-stats { font-size: 12px; color: #C7BBE8; }
.follow-btn {
  padding: 6px 14px; font-size: 12px;
  background: #927CFF; border: none; border-radius: 16px;
  color: #F0ECFF; cursor: pointer;
}
.follow-btn.followed { background: rgba(255,255,255,0.1); color: #C7BBE8; }
.follow-btn.follow-back { background: #E27A8A; color: #F0ECFF; }
.detail-header {
  position: relative; height: 200px;
  background: linear-gradient(135deg, #2a2640 0%, #262242 100%);;
  display: flex; align-items: flex-end; padding: 20px 16px;
}
.back-btn {
  position: absolute; top: 12px; left: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
}
.detail-info { padding: 16px; }
.detail-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.detail-desc { font-size: 14px; color: #C7BBE8; line-height: 1.6; margin-bottom: 12px; }
.detail-creator {
  display: flex; align-items: center; gap: 10px; padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.start-btn {
  display: block; width: 100%; padding: 14px;
  background: #927CFF;
  color: #F0ECFF; border: none; border-radius: 25px;
  font-size: 16px; font-weight: 600; margin-top: 16px; cursor: pointer;
}
.fav-btn {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; border: none;
}

.chat-header {
  flex-shrink: 0;
  padding: 12px 16px; background: #262242;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative; z-index: 10;
}
.chat-header .title { flex: 1; font-size: 15px; font-weight: 600; }
.chat-messages { flex: 1 1 auto; overflow-y: auto; padding: 16px; min-height: 0; }
.msg { margin-bottom: 16px; display: flex; gap: 10px; }
.msg.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.msg.assistant .msg-avatar { background: linear-gradient(135deg, #806FC2, #927CFF); }
.msg.user .msg-avatar { background: linear-gradient(135deg, #927CFF, #806FC2);; }
.msg-bubble {
  max-width: 75%; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; word-wrap: break-word;
}
.msg.assistant .msg-bubble { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.08); border-top-left-radius: 4px; }
.msg.assistant .msg-bubble.msg-html { max-width: 100% !important; background: #fff; padding: 0; overflow: hidden; border-radius: 12px; }
.msg.assistant .msg-bubble.msg-html .ai-text { display: block; }
.msg.assistant .msg-bubble.msg-html iframe { width: 100% !important; border-radius: 0; }
.msg.html-msg { display: block !important; }
.msg.html-msg .msg-avatar { display: none !important; }
.msg.html-msg .msg-bubble { width: 100% !important; max-width: 100% !important; }
.msg.user .msg-bubble { background: linear-gradient(135deg, #927CFF, #806FC2);; border-top-right-radius: 4px; }
.chat-input-bar {
  flex-shrink: 0; padding: 10px 12px; background: #262242;
  display: flex; gap: 8px; align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-input {
  flex: 1; background: rgba(255,255,255,0.1);
  border: none; border-radius: 20px;
  padding: 10px 14px; color: #F0ECFF;
  font-size: 14px; outline: none; resize: none; max-height: 100px;
  font-family: inherit;
}
.send-btn {
  padding: 10px 18px; background: #927CFF; color: #F0ECFF;
  border: none; border-radius: 20px; font-size: 14px; cursor: pointer;
}
.send-btn:disabled { opacity: 0.5; }
.card-html-render { 
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.06); 
  margin-bottom: 8px; 
  position: relative;
  overflow: hidden;
}
.card-html-render iframe {
  width: 100%;
  border: none;
  display: block;
  background: transparent;
}
.points-info { flex-shrink: 0; font-size: 11px; color: #C7BBE8; text-align: center; padding: 4px 8px; background: #262242; border-top: 1px solid rgba(255,255,255,0.04); }
.cardedit-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #262242 0%, #262242 40%, #262242 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 80px;
}
.cardedit-page::before {
  content: "";
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 400px;
  background: radial-gradient(circle, rgba(146, 124, 255, 0.18) 0%, rgba(146, 124, 255, 0.05) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.profile-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #262242 0%, #262242 40%, #262242 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 100px;
}
.profile-bg-glow {
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 400px;
  background: radial-gradient(circle, rgba(146, 124, 255, 0.22) 0%, rgba(146, 124, 255, 0.06) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.profile-top-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}
.profile-top-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(146, 124, 255, 0.1);
  border: 0.5px solid rgba(146, 124, 255, 0.15);
  display: flex; align-items: center; justify-content: center;
  color: #927CFF;
  cursor: pointer;
  transition: all 0.2s ease;
}
.profile-top-icon:active { transform: scale(0.95); }
.profile-top-icon svg { width: 20px; height: 20px; }
.profile-top-title {
  font-size: 18px;
  font-weight: 700;
  color: #927CFF;
  letter-spacing: 1px;
}
.profile-user-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 20px 20px;
  cursor: pointer;
}
.profile-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
}
.profile-avatar-ring {
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #927CFF 0%, #927CFF 50%, #806FC2 100%);
  filter: blur(6px);
  opacity: 0.6;
  animation: pulse-ring 3s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.04); }
}
.profile-avatar {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(128, 111, 194, 0.8);
  border: 1.5px solid rgba(146, 124, 255, 0.4);
  display: flex; align-items: center; justify-content: center;
  color: #927CFF;
  overflow: hidden;
}
.profile-avatar svg { width: 44px; height: 44px; }
.profile-user-name {
  font-size: 20px;
  font-weight: 700;
  color: #927CFF;
  margin-bottom: 6px;
}
.profile-settings-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(128, 111, 194, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(146, 124, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}
.profile-settings-btn:active { transform: scale(0.9); }
.profile-user-bio {
  font-size: 13px;
  color: rgba(146, 124, 255, 0.4);
}
.profile-stats-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}
.profile-stat-card {
  flex: 1;
  background: rgba(128, 111, 194, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(146, 124, 255, 0.2);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.profile-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #927CFF;
  margin-bottom: 4px;
}
.profile-stat-label {
  font-size: 11px;
  color: rgba(146, 124, 255, 0.45);
}
.profile-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  padding: 4px 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(146, 124, 255, 0.5);
  background: rgba(128, 111, 194, 0.5);
  border: 0.5px solid rgba(146, 124, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
}
.profile-tab.active {
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  color: #F0ECFF;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(146, 124, 255, 0.3);
}
.profile-card-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}
.profile-card {
  flex: 1;
  background: rgba(128, 111, 194, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(146, 124, 255, 0.2);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.profile-card:active { transform: scale(0.97); }
.profile-card-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(146, 124, 255, 0.3) 0%, rgba(146, 124, 255, 0.2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #927CFF;
  margin-bottom: 12px;
}
.profile-card-icon svg { width: 20px; height: 20px; }
.profile-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #F0ECFF;
  margin-bottom: 4px;
}
.profile-card-sub {
  font-size: 12px;
  color: rgba(146, 124, 255, 0.45);
}
.profile-card-tag {
  position: absolute;
  right: 12px; top: 12px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(146, 124, 255, 0.4) 0%, rgba(146, 124, 255, 0.3) 100%);
  color: #F0ECFF;
}
.profile-menu {
  position: relative;
  z-index: 1;
  margin: 0 16px;
  background: rgba(128, 111, 194, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(146, 124, 255, 0.2);
  border-radius: 18px;
  overflow: hidden;
}
.profile-menu-item {
  display: flex; align-items: center;
  padding: 14px 16px;
  font-size: 14px;
  color: rgba(146, 124, 255, 0.7);
  cursor: pointer;
  border-bottom: 0.5px solid rgba(146, 124, 255, 0.1);
  transition: background 0.2s ease;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:active { background: rgba(146, 124, 255, 0.12); }
.profile-menu-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(146, 124, 255, 0.15);
  display: flex; align-items: center; justify-content: center;
  color: #927CFF;
  margin-right: 12px;
  flex-shrink: 0;
}
.profile-menu-icon svg { width: 18px; height: 18px; }
.profile-menu-text { flex: 1; }
.profile-menu-arrow {
  color: rgba(146, 124, 255, 0.3);
  font-size: 18px;
}
.login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #262242 0%, #262242 40%, #262242 100%);
  position: relative;
  padding: 0 24px;
  padding-bottom: 40px;
}
.login-back-btn {
  position: absolute;
  top: 14px; left: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}
.login-back-btn:active { transform: scale(0.95); }
.login-back-btn svg { width: 22px; height: 22px; }
.login-title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: #927CFF;
  padding-top: 96px;
  padding-bottom: 14px;
  letter-spacing: 1.5px;
}
.login-subtitle {
  text-align: center;
  font-size: 14px;
  color: rgba(146, 124, 255, 0.45);
  padding-bottom: 48px;
  letter-spacing: 0.5px;
}
.login-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 28px;
}
.login-field {
  margin-bottom: 16px;
}
.login-field:last-of-type {
  margin-bottom: 24px;
}
.login-label {
  display: none;
}
.login-input {
  width: 100%;
  padding: 16px 18px;
  background: rgba(128, 111, 194, 0.6);
  border: 0.5px solid rgba(146, 124, 255, 0.15);
  border-radius: 14px;
  color: #F0ECFF;
  font-size: 15px;
  outline: none;
  transition: all 0.25s ease;
  box-sizing: border-box;
}
.login-input:focus {
  border-color: rgba(146, 124, 255, 0.5);
  background: rgba(128, 111, 194, 0.8);
}
.login-input::placeholder {
  color: rgba(146, 124, 255, 0.3);
}
.login-code-row {
  display: flex;
  gap: 12px;
}
.login-input-code {
  flex: 1;
}
.login-code-btn {
  flex-shrink: 0;
  padding: 0 20px;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  color: #F0ECFF;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(146, 124, 255, 0.3);
}
.login-code-btn:active { transform: scale(0.97); }
.login-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.login-submit-btn {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 16px;
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  color: #F0ECFF;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(146, 124, 255, 0.4), 0 2px 6px rgba(146, 124, 255, 0.25);
  letter-spacing: 2px;
}
.login-submit-btn:active {
  transform: scale(0.98);
  box-shadow: 0 3px 12px rgba(146, 124, 255, 0.35);
}

/* ========== 完善个人资料页 ========== */
.profile-edit-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #262242 0%, #262242 40%, #262242 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.profile-edit-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
}

.profile-edit-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #927CFF;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}
.profile-edit-back:active { background: rgba(146, 124, 255, 0.15); }
.profile-edit-back svg { width: 22px; height: 22px; }

.profile-edit-title {
  font-size: 18px;
  font-weight: 700;
  color: #F0ECFF;
  letter-spacing: 0.5px;
}

.profile-edit-placeholder { width: 36px; }

/* 头像区域 */
.profile-edit-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 30px;
}

.profile-edit-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  cursor: pointer;
}

.profile-edit-avatar-ring {
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #927CFF 0%, #927CFF 50%, #806FC2 100%);
  filter: blur(8px);
  opacity: 0.5;
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.profile-edit-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(146, 124, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #927CFF;
}
.profile-edit-avatar svg { width: 48px; height: 48px; }
.profile-edit-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-edit-avatar-text {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* 资料卡片 */
.profile-edit-card {
  margin: 0 16px;
  padding: 20px 18px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(146, 124, 255, 0.12);
  border-radius: 20px;
}

.profile-edit-field {
  margin-bottom: 20px;
}
.profile-edit-field:last-child { margin-bottom: 0; }

.profile-edit-label {
  font-size: 14px;
  color: #F0ECFF;
  font-weight: 500;
  margin-bottom: 10px;
}

.profile-edit-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(146, 124, 255, 0.1);
  border-radius: 12px;
  color: #F0ECFF;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.profile-edit-input:focus { border-color: rgba(146, 124, 255, 0.5); }
.profile-edit-input::placeholder { color: #9889C2; }

.profile-edit-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-edit-option {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(146, 124, 255, 0.1);
  border-radius: 20px;
  color: #927CFF;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.profile-edit-option:active { transform: scale(0.97); }

.profile-edit-option.active {
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border-color: transparent;
  color: #F0ECFF;
  font-weight: 500;
}

/* 底部保存按钮 */
.profile-edit-bottom {
  padding: 30px 16px 0;
}

.profile-edit-save-btn {
  width: 100%;
  padding: 15px;
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border: none;
  border-radius: 25px;
  color: #F0ECFF;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
}
.profile-edit-save-btn:active { transform: scale(0.98); opacity: 0.9; }
.profile-edit-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.login-agreement {
  text-align: center;
  font-size: 12px;
  color: rgba(146, 124, 255, 0.35);
  line-height: 1.6;
}
.login-link {
  color: rgba(146, 124, 255, 0.85);
  cursor: pointer;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #262242; color: #F0ECFF;
  max-width: 480px; margin: 0 auto;
  min-height: 100vh; position: relative;
}
.top-bar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #262242 0%, #262242 100%);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.top-bar h1 { font-size: 18px; font-weight: 600; flex: 1; }
.search-bar {
  flex: 1; display: flex; align-items: center;
  background: rgba(104,86,164,0.14);
  border-radius: 18px; padding: 8px 14px;
  font-size: 14px; color: #C7BBE8;
}
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: #F0ECFF; font-size: 14px;
}
.page { display: none; }
.page.active { display: block; min-height: 100vh; padding-bottom: 70px; }
.page.active.chat-page { display: flex !important; flex-direction: column; height: 100vh; min-height: 100vh !important; padding-bottom: 0 !important; }
.tab-bar.hidden-in-chat { display: none !important; }
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  width: 100%; max-width: 480px; margin: 0 auto;
  background: rgba(38, 34, 66, 0.75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex; justify-content: space-around; align-items: center;
  border-top: 1px solid rgba(168, 148, 234, 0.09); z-index: 100;
  height: 78px; box-sizing: border-box;
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 8px);
  padding-top: 10px;
}
.tab-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12px; color: #806FC2; cursor: pointer;
  height: 60px;
  position: relative;
  transition: all 0.25s ease;
  opacity: 0.55;
}
.tab-item.active {
  opacity: 1;
}
.tab-item.active::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 52px;
  border-radius: 16px;
  background: radial-gradient(ellipse at center, rgba(146, 124, 255, 0.18) 0%, rgba(146, 124, 255, 0.08) 60%, transparent 100%);
  z-index: -1;
  filter: blur(2px);
}
.tab-icon-wrap {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 3px;
  border-radius: 10px;
  transition: all 0.25s ease;
}
.tab-icon-svg {
  width: 26px; height: 26px;
  display: block;
}
.tab-label {
  font-size: 11px;
  line-height: 1;
  font-weight: 500;
  transition: all 0.25s ease;
}
.tab-item.active .tab-icon-svg {
  color: #927CFF;
  filter: drop-shadow(0 1px 3px rgba(146, 124, 255, 0.35));
}
.tab-item.active .tab-label {
  color: #927CFF;
  font-weight: 600;
}
.tab-item-center {
  margin-top: 0;
  height: 60px;
  opacity: 1;
}
.tab-center-btn {
  width: 54px; height: 38px;
  border-radius: 19px;
  background: linear-gradient(135deg, #927CFF 0%, #806FC2 50%, #927CFF 100%);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 3px;
  box-shadow: 0 4px 12px rgba(146, 124, 255, 0.38), 0 2px 5px rgba(146, 124, 255, 0.2);
  transition: all 0.25s ease;
  position: relative;
}
.tab-center-btn::after {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(146, 124, 255, 0.22) 0%, rgba(146, 124, 255, 0.22) 100%);
  filter: blur(6px);
  opacity: 0.7;
  z-index: -1;
}
.tab-center-icon {
  width: 22px; height: 22px;
  display: block;
}
.tab-item-center .tab-label {
  color: #927CFF;
  font-weight: 600;
}
.tab-item.active .tab-center-btn {
  transform: scale(1.05);
  box-shadow: 0 5px 14px rgba(146, 124, 255, 0.42), 0 2px 6px rgba(146, 124, 255, 0.28);
}
.banner {
  margin: 12px 16px; height: 120px; border-radius: 24px;
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; position: relative; overflow: hidden;
}
.categories {
  display: flex; flex-wrap: wrap;
  padding: 0 12px; gap: 8px; margin-bottom: 16px;
}
.cat-item {
  flex: 0 0 calc(16.66% - 7px);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px; background: rgba(104,86,164,0.16);
  border: 1px solid rgba(168,148,234,0.09); border-radius: 20px; font-size: 12px; cursor: pointer;
}
.cat-icon { font-size: 24px; margin-bottom: 4px; }
.rank-tabs {
  display: flex; padding: 0 16px; gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 12px;
}
.rank-tab {
  padding: 10px 0; font-size: 14px; color: #C7BBE8;
  cursor: pointer; position: relative;
}
.rank-tab.active { color: #F0ECFF; font-weight: 600; }
.rank-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: #927CFF; border-radius: 2px;
}
.card-list { padding: 0 16px; }
.card-item {
  display: flex; gap: 12px; padding: 12px 16px; margin-bottom: 8px;
  background: rgba(104, 86, 164, 0.16);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(168, 148, 234, 0.09); border-radius: 20px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) inset;
}
.card-cover {
  width: 80px; height: 110px; border-radius: 12px;
  background: linear-gradient(135deg, #2e2a48 0%, #2e2a48 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; flex-shrink: 0;
}
.card-info { flex: 1; min-width: 0; }
.card-title {
  font-size: 15px; font-weight: 600; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-desc {
  font-size: 12px; color: #C7BBE8; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px;
}
.card-meta { display: flex; gap: 10px; font-size: 11px; color: #C7BBE8; }
.card-tag {
  display: inline-block; padding: 2px 6px;
  background: rgba(234,152,66,0.18);
  color: #F8B058; border-radius: 6px;
  font-size: 10px; margin-right: 4px;
}
.author-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer;
}
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #806FC2, #927CFF);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.author-info { flex: 1; }
.author-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.author-stats { font-size: 12px; color: #C7BBE8; }
.follow-btn {
  padding: 6px 14px; font-size: 12px;
  background: #927CFF; border: none; border-radius: 16px;
  color: #F0ECFF; cursor: pointer;
}
.follow-btn.followed { background: rgba(255,255,255,0.1); color: #C7BBE8; }
.follow-btn.follow-back { background: #E27A8A; color: #F0ECFF; }
.detail-header {
  position: relative; height: 200px;
  background: linear-gradient(135deg, #2a2640 0%, #262242 100%);;
  display: flex; align-items: flex-end; padding: 20px 16px;
}
.back-btn {
  position: absolute; top: 12px; left: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
}
.detail-info { padding: 16px; }
.detail-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.detail-desc { font-size: 14px; color: #C7BBE8; line-height: 1.6; margin-bottom: 12px; }
.detail-creator {
  display: flex; align-items: center; gap: 10px; padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.start-btn {
  display: block; width: 100%; padding: 14px;
  background: #927CFF;
  color: #F0ECFF; border: none; border-radius: 25px;
  font-size: 16px; font-weight: 600; margin-top: 16px; cursor: pointer;
}
.fav-btn {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; border: none;
}

.chat-header {
  flex-shrink: 0;
  padding: 12px 16px; background: #262242;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative; z-index: 10;
}
.chat-header .title { flex: 1; font-size: 15px; font-weight: 600; }
.chat-messages { flex: 1 1 auto; overflow-y: auto; padding: 16px; min-height: 0; }
.msg { margin-bottom: 16px; display: flex; gap: 10px; }
.msg.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.msg.assistant .msg-avatar { background: linear-gradient(135deg, #806FC2, #927CFF); }
.msg.user .msg-avatar { background: linear-gradient(135deg, #927CFF, #806FC2);; }
.msg-bubble {
  max-width: 75%; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; word-wrap: break-word;
}
.msg.assistant .msg-bubble { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.08); border-top-left-radius: 4px; }
.msg.assistant .msg-bubble.msg-html { max-width: 100% !important; background: #fff; padding: 0; overflow: hidden; border-radius: 12px; }
.msg.assistant .msg-bubble.msg-html .ai-text { display: block; }
.msg.assistant .msg-bubble.msg-html iframe { width: 100% !important; border-radius: 0; }
.msg.html-msg { display: block !important; }
.msg.html-msg .msg-avatar { display: none !important; }
.msg.html-msg .msg-bubble { width: 100% !important; max-width: 100% !important; }
.msg.user .msg-bubble { background: linear-gradient(135deg, #927CFF, #806FC2);; border-top-right-radius: 4px; }
.chat-input-bar {
  flex-shrink: 0; padding: 10px 12px; background: #262242;
  display: flex; gap: 8px; align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.chat-input {
  flex: 1; background: rgba(255,255,255,0.1);
  border: none; border-radius: 20px;
  padding: 10px 14px; color: #F0ECFF;
  font-size: 14px; outline: none; resize: none; max-height: 100px;
  font-family: inherit;
}
.send-btn {
  padding: 10px 18px; background: #927CFF; color: #F0ECFF;
  border: none; border-radius: 20px; font-size: 14px; cursor: pointer;
}
.send-btn:disabled { opacity: 0.5; }
.card-html-render { 
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.06); 
  margin-bottom: 8px; 
  position: relative;
  overflow: hidden;
}
.card-html-render iframe {
  width: 100%;
  border: none;
  display: block;
  background: transparent;
}
.points-info { flex-shrink: 0; font-size: 11px; color: #C7BBE8; text-align: center; padding: 4px 8px; background: #262242; border-top: 1px solid rgba(255,255,255,0.04); }
.profile-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #262242 0%, #262242 40%, #262242 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 100px;
}
.profile-bg-glow {
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(146, 124, 255, 0.25) 0%, rgba(146, 124, 255, 0.08) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.profile-title {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #F0ECFF;
  padding: 16px 0 8px;
  letter-spacing: 1px;
}
.profile-user-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 20px 20px;
  cursor: pointer;
}
.profile-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
}
.profile-avatar-ring {
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #927CFF 0%, #806FC2 50%, #927CFF 100%);
  filter: blur(8px);
  opacity: 0.7;
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}
.profile-avatar {
  position: relative;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(146, 124, 255, 0.4) 0%, rgba(146, 124, 255, 0.3) 100%);
  border: 2px solid rgba(146, 124, 255, 0.5);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.profile-avatar svg { width: 48px; height: 48px; }
.profile-user-name {
  font-size: 20px;
  font-weight: 700;
  color: #F0ECFF;
  margin-bottom: 6px;
}
.profile-settings-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(128, 111, 194, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(146, 124, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}
.profile-settings-btn:active { transform: scale(0.9); }
.profile-user-bio {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.profile-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  padding: 8px 16px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(146, 124, 255, 0.12);
  border: 0.5px solid rgba(146, 124, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.profile-tab.active {
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  color: #F0ECFF;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(146, 124, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.profile-card-row {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  padding: 0 16px 16px;
}
.profile-card {
  flex: 1;
  background: rgba(146, 124, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(146, 124, 255, 0.25);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.profile-card:active { transform: scale(0.97); }
.profile-card-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(146, 124, 255, 0.4) 0%, rgba(146, 124, 255, 0.3) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #927CFF;
  margin-bottom: 12px;
}
.profile-card-icon svg { width: 22px; height: 22px; }
.profile-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #F0ECFF;
  margin-bottom: 4px;
}
.profile-card-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
.profile-card-tag {
  position: absolute;
  right: 12px; top: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(146, 124, 255, 0.5) 0%, rgba(146, 124, 255, 0.4) 100%);
  color: #F0ECFF;
}
.profile-menu {
  position: relative;
  z-index: 1;
  margin: 0 16px;
  background: rgba(146, 124, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 0.5px solid rgba(146, 124, 255, 0.2);
  border-radius: 18px;
  overflow: hidden;
}
.profile-menu-item {
  display: flex; align-items: center;
  padding: 14px 16px;
  font-size: 14px;
  color: #F0ECFF;
  cursor: pointer;
  border-bottom: 0.5px solid rgba(146, 124, 255, 0.1);
  transition: background 0.2s ease;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:active { background: rgba(146, 124, 255, 0.15); }
.profile-menu-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(146, 124, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
  color: #927CFF;
  margin-right: 12px;
  flex-shrink: 0;
}
.profile-menu-icon svg { width: 18px; height: 18px; }
.profile-menu-text { flex: 1; }
.profile-menu-arrow {
  color: rgba(255, 255, 255, 0.3);
  font-size: 18px;
}
.login-page {
  padding: 60px 24px; min-height: 100vh;
  background: linear-gradient(180deg, #262242 0%, #262242 100%);
}
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo h1 {
  font-size: 32px;
  background: linear-gradient(135deg, #927CFF, #806FC2);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.login-logo p { color: #C7BBE8; font-size: 14px; }
.form-group { margin-bottom: 16px; }
.form-input {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: #F0ECFF; font-size: 15px; outline: none;
}
.form-input:focus { border-color: #927CFF; }
.form-btn {
  width: 100%; padding: 14px;
  background: #927CFF;
  color: #F0ECFF; border: none; border-radius: 25px;
  font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.form-link { text-align: center; margin-top: 16px; font-size: 13px; color: #C7BBE8; }
.form-link span { color: #927CFF; cursor: pointer; }
.code-input-group { display: flex; gap: 8px; }
.code-input-group .form-input { flex: 1; }
.code-btn {
  padding: 0 16px; background: rgba(146,124,255,0.2);
  border: 1px solid #927CFF; color: #927CFF;
  border-radius: 10px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 1000;
  display: none; align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: rgba(104,86,164,0.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(168,148,234,0.09); border-radius: 20px;
  width: 85%; max-width: 360px; padding: 24px; position: relative;
}
.modal h3 { font-size: 18px; margin-bottom: 16px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  font-size: 24px; cursor: pointer; color: #C7BBE8;
}
.pkg-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pkg-item {
  flex: 0 0 calc(33.33% - 6px);
  padding: 14px 8px; text-align: center;
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent; border-radius: 10px; cursor: pointer;
}
.pkg-item.active { border-color: #927CFF; background: rgba(226, 122, 138,0.1); }
.pkg-points { font-size: 18px; font-weight: 700; color: #927CFF; }
.pkg-bonus { font-size: 10px; color: #F8B058; margin-bottom: 4px; }
.pkg-price { font-size: 12px; color: #C7BBE8; }
.pay-methods { display: flex; gap: 8px; margin: 16px 0; }
.pay-method {
  flex: 1; padding: 10px; text-align: center;
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent; border-radius: 8px;
  font-size: 13px; cursor: pointer;
}
.pay-method.active { border-color: #927CFF; }
.announcement-item {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer;
}
.ann-title { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.ann-tag {
  display: inline-block; padding: 1px 6px;
  background: rgba(146,124,255,0.2); color: #927CFF;
  border-radius: 4px; font-size: 10px; margin-right: 6px;
}
.ann-date { font-size: 11px; color: #C7BBE8; }
.loading {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #927CFF;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8); color: #F0ECFF;
  padding: 12px 24px; border-radius: 8px;
  font-size: 14px; z-index: 2000;
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; }
.section-title {
  padding: 0 16px; font-size: 16px; font-weight: 600;
  margin-bottom: 8px; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.more { font-size: 12px; color: #C7BBE8; font-weight: normal; }




.pagination{display:flex;flex-wrap:wrap;justify-content:center;padding:16px 16px 24px;gap:6px}
.pagination .pg-btn{min-width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px;font-size:12px;color:#C7BBE8;cursor:pointer;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.08);padding:0 4px}
.pagination .pg-btn.active{background:#E27A8A;color:#F0ECFF;border-color:#E27A8A;font-weight:600}
.pagination .pg-btn:hover{background:rgba(255,255,255,0.12)}
.author-works-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,0.05);cursor:pointer}
.author-works-item:last-child{border-bottom:none}
.aw-cover{width:56px;height:78px;border-radius:6px;background:linear-gradient(135deg,#2e2a48,#2e2a48);display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.aw-info{flex:1;min-width:0}
.aw-title{font-size:14px;font-weight:500;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aw-desc{font-size:11px;color:#C7BBE8;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:6px}
.aw-meta{display:flex;gap:8px;font-size:10px;color:#C7BBE8}
.stat-item{cursor:pointer}.stat-item:hover{opacity:0.7}
.ai-loading { display:flex; align-items:center; gap:8px; padding:8px 0; }
.ai-spinner { width:16px; height:16px; border:2px solid rgba(226, 122, 138,0.2); border-top-color:#E27A8A; border-radius:50%; animation:ai-spin 0.8s linear infinite; }
@keyframes ai-spin { to { transform:rotate(360deg); } }
.ai-loading span { color:#E27A8A; font-size:13px; }
.msg.user .msg-bubble { position: relative; padding-right: 28px; }
.msg-delete-btn {
  position: absolute; top: 6px; right: 6px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.15);
  color: #F0ECFF; font-size: 10px; cursor: pointer;
  opacity: 0.7; transition: all 0.2s; line-height: 1;
}
.msg-delete-btn:hover { opacity: 1; background: rgba(0,0,0,0.3); }
/* AI回复版本切换器 */
.version-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.version-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #F8B058;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.version-btn:hover {
  background: rgba(234, 152, 66,0.25);
}
.version-label {
  font-size: 11px;
  color: #C7BBE8;
  min-width: 30px;
  text-align: center;
}
.ai-text {
  display: block;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.7;
}
/* 渲染样式 - 只保留结构，不硬编码颜色 */
.ai-h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 10px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ai-num {
  margin: 4px 0;
  padding-left: 4px;
}
.ai-field {
  margin: 3px 0;
}
.ai-label {
  font-weight: 500;
}
.ai-fold {
  margin: 8px 0;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
}
.ai-fold-title {
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}
.ai-fold-title:hover {
  background: rgba(255,255,255,0.06);
}
.ai-fold-arrow {
  display: inline-block;
  width: 18px;
  text-align: center;
}
.ai-fold-body {
  padding: 8px 12px;
  display: none;
}
.ai-fold.open .ai-fold-body {
  display: block;
}
.ai-p {
  margin: 4px 0;
}
.msg-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06); }
.msg-action-label { font-size: 11px; color: #C7BBE8; }
.ai-regenerate-btn {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(234, 152, 66,0.15);
  color: #F8B058; font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.ai-regenerate-btn:hover { background: rgba(234, 152, 66,0.3); }
.ai-regenerate-btn.spinning { animation: ai-spin 1s linear infinite; }


/* 确保所有输入框可见 */
input, textarea, select {
  display: inline-block;
  visibility: visible;
  opacity: 1;
}
.form-input {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* ========== 新首页样式（紫蓝暗色主题） ========== */
#page-home { background: transparent; }
#page-home .top-bar {
  background: linear-gradient(180deg, rgba(38, 34, 66, 0.98) 0%, rgba(128, 111, 194, 0.95) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding: 14px 16px;
}
#page-home .search-bar {
  background: rgba(104, 86, 164, 0.14); border: 1px solid rgba(168, 148, 234, 0.09);
  border-radius: 18px; padding: 10px 16px; color: #C7BBE8; transition: all 0.3s;
}
#page-home .search-bar:focus-within {
  border-color: rgba(146, 124, 255, 0.6); box-shadow: 0 0 0 3px rgba(146, 124, 255, 0.12);
}
#page-home .search-bar input { color: #F0ECFF; }
#page-home .search-bar input::placeholder { color: #9889C2; }
#page-home .banner {
  margin: 16px; height: 140px; border-radius: 24px;
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  font-size: 20px; font-weight: 700; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
#page-home .banner::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(146, 124, 255, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 70% 70%, rgba(128, 111, 194, 0.12) 0%, transparent 40%);
  animation: bannerGlow 8s ease-in-out infinite;
}
#page-home .banner span { position: relative; z-index: 1; text-shadow: 0 2px 8px rgba(0,0,0,0.3); letter-spacing: 1px; }
@keyframes bannerGlow { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-3%,2%)} }

#page-home .section-title {
  padding: 8px 16px 12px; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
}
#page-home .section-title > span:first-child { display: flex; align-items: center; gap: 8px; }
#page-home .section-title > span:first-child::before {
  content: ''; display: inline-block; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, #927CFF 0%, #927CFF 100%);
}
#page-home .more { font-size: 12px; color: #C7BBE8; font-weight: 500; cursor: pointer; }

/* 热门榜单 */
.hot-rank-wrap { padding: 0 0 8px; margin-bottom: 8px; }
.hot-rank-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 20px 16px 16px;
  scrollbar-width: none; -ms-overflow-style: none; align-items: center;
}
.hot-rank-scroll::-webkit-scrollbar { display: none; }
.hot-rank-card {
  flex: 0 0 calc((100% - 48px) / 4);
  background: rgba(104, 86, 164, 0.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 10px 8px;
  cursor: pointer; transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94),
              box-shadow 0.4s cubic-bezier(0.25,0.46,0.45,0.94), border-color 0.4s ease;
  position: relative; overflow: hidden; transform: scale(0.95); transform-origin: center center;
}
.hot-rank-card.hot-active {
  transform: scale(1.15); border-color: rgba(146, 124, 255, 0.6);
  box-shadow: 0 0 14px rgba(146, 124, 255, 0.35), 0 8px 24px rgba(128, 111, 194, 0.3); z-index: 5;
}
.hot-rank-card .rank-badge {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #F0ECFF; z-index: 2;
}
.hot-rank-card:nth-child(-n+3) .rank-badge {
  background: linear-gradient(135deg, #F8B058 0%, #F8B058 100%);
  box-shadow: 0 0 10px rgba(234, 152, 66, 0.5), 0 0 20px rgba(234, 152, 66, 0.25);
}
.hot-rank-card:nth-child(n+4) .rank-badge {
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 0 8px rgba(146, 124, 255, 0.4), 0 0 16px rgba(146, 124, 255, 0.2);
}
.hot-rank-cover {
  width: 100%; aspect-ratio: 3 / 4; border-radius: 10px;
  background: rgba(104, 86, 164, 0.15);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  margin-bottom: 8px; position: relative; overflow: hidden;
}
.hot-rank-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.3) 100%);
}
.hot-rank-title { font-size: 12px; font-weight: 600; color: #F0ECFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.hot-rank-meta { font-size: 10px; color: #C7BBE8; display: flex; align-items: center; gap: 3px; }
.hot-rank-dots { display: flex; justify-content: center; gap: 6px; padding: 4px 0 8px; }
.hot-rank-dots .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(146, 124, 255, 0.3); transition: all 0.3s; }
.hot-rank-dots .dot.active { background: linear-gradient(135deg, #927CFF, #927CFF); width: 18px; border-radius: 3px; }

/* 分类标签栏 */
.category-tabs {
  display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  position: sticky; top: 69px; z-index: 50;
  background: rgba(38, 34, 66, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 10px 22px; height: 38px; line-height: 18px;
  border-radius: 19px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #C7BBE8; border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
}
.cat-tab.active {
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  color: #F0ECFF; font-weight: 700; border-color: rgba(146, 124, 255, 0.4);
  box-shadow: 0 0 14px rgba(146, 124, 255, 0.3);
}

/* 推荐区域标签 */
.rec-tabs { display: flex; padding: 4px 16px 12px; gap: 16px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.rec-tabs::-webkit-scrollbar { display: none; }
.rec-tab { flex-shrink: 0; padding: 6px 0; font-size: 14px; color: #C7BBE8; cursor: pointer; position: relative; font-weight: 500; transition: all 0.3s; }
.rec-tab.active { color: #F0ECFF; font-weight: 700; }
.rec-tab.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #927CFF, #E27A8A); }

/* 推荐卡 - 4列竖版 */
.rec-scroll-container {
  padding: 0 4px 8px 0;
  margin: 0 12px;
}
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px; }
.rec-card {
  position: relative;
  background: rgba(104, 86, 164, 0.16);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(168, 148, 234, 0.09); border-radius: 20px;
  overflow: hidden; cursor: pointer; transition: all 0.3s ease;
  aspect-ratio: 3 / 4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) inset;
}
.rec-card:hover { transform: translateY(-3px); border-color: rgba(146, 124, 255, 0.3); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); }
.rec-cover {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; font-size: 48px;
}
.rec-cover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 55%;
  background: linear-gradient(180deg, transparent 0%, rgba(38, 34, 66, 0.9) 100%);
  pointer-events: none;
}
.rec-card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 14px 14px;
}
.rec-card-title { font-size: 15px; font-weight: 700; color: #F0ECFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.rec-card-desc { display: none; }
.rec-card-meta { display: flex; justify-content: space-between; align-items: center; }
.rec-card-plays { font-size: 12px; color: #C7BBE8; display: flex; align-items: center; gap: 3px; }
.rec-card-tag { display: inline-block; padding: 2px 8px; background: linear-gradient(135deg, rgba(146, 124, 255,0.3), rgba(146, 124, 255,0.3)); color: #F0ECFF; border-radius: 8px; font-size: 11px; font-weight: 500; }

/* 分页 */
.pagination-wrap { padding: 20px 16px 8px; text-align: center; }
.pagination-info { font-size: 12px; color: #C7BBE8; margin-bottom: 12px; }
.pagination-info strong { color: #C7BBE8; font-weight: 600; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; }
.pg-btn {
  min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px; color: #C7BBE8; cursor: pointer;
  background: rgba(38, 34, 66, 0.8); border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 10px; font-weight: 500; transition: all 0.3s;
}
.pg-btn:hover:not(.active):not(:disabled) { border-color: rgba(146, 124, 255, 0.5); color: #F0ECFF; }
.pg-btn.active {
  background: rgba(92, 74, 150, 0.20); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  color: #F0ECFF; font-weight: 700; border-color: transparent;
  box-shadow: 0 4px 16px rgba(146, 124, 255, 0.45);
}
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-ellipsis { color: #C7BBE8; padding: 0 2px; }

/* 底部导航栏 */
.tab-bar {
  background: rgba(38, 34, 66, 0.75);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08); height: 65px;
}
.tab-item { color: #806FC2; transition: all 0.3s; }
.tab-item.active { color: #927CFF; }
.tab-item.active .tab-icon { transform: translateY(-2px); filter: drop-shadow(0 0 8px rgba(146, 124, 255, 0.6)); }
.tab-icon { transition: all 0.3s; }


/* 卡片容器内发光 - 8%白色 */
.card-item, .rec-card, .hot-rank-card, .post-item, .profile-card, .profile-stat-card, .profile-menu {
  box-shadow: inset 0 0 20px rgba(255,255,255,0.08);
}



/* 测试模式样式 */
.test-mode-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(90deg, #E27A8A, #F8B058);
  color: #F0ECFF;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.test-mode-banner .countdown {
  display: inline-block;
  background: rgba(0,0,0,0.2);
  padding: 2px 10px;
  border-radius: 10px;
  margin-left: 8px;
  font-weight: 600;
}
body.test-mode .top-bar {
  top: 36px;
}
body.test-mode .tab-bar {
  padding-bottom: calc(env(safe-area-inset-bottom, 0) + 0px);
}
/* 测试链接过期页面 */
.test-expired-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #262242;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.test-expired-page .expired-icon {
  font-size: 72px;
  margin-bottom: 20px;
}
.test-expired-page h2 {
  font-size: 22px;
  color: #F0ECFF;
  margin-bottom: 12px;
}
.test-expired-page p {
  font-size: 14px;
  color: #C7BBE8;
  line-height: 1.6;
  margin-bottom: 8px;
}
.test-expired-page .expired-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
}
.test-expired-page .expired-actions button {
  padding: 12px 28px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.test-expired-page .btn-primary {
  background: #927CFF;
  color: #F0ECFF;
}
.test-expired-page .btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #C7BBE8;
}

/* 卡片容器内发光 - 8%白色 */
.card-item, .rec-card, .hot-rank-card, .post-item, .profile-card, .profile-stat-card, .profile-menu {
  box-shadow: inset 0 0 20px rgba(255,255,255,0.08);
}

.ann-tabs {
  display: flex;
  padding: 0 16px;
  gap: 32px;
  background: transparent;
  position: sticky;
  top: 56px;
  z-index: 5;
  border-bottom: 1px solid rgba(146,124,255,0.08);
}
.ann-tab {
  position: relative;
  padding: 14px 2px;
  font-size: 15px;
  color: #8E84B0;
  cursor: pointer;
  transition: all 0.22s ease;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.ann-tab::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #E27A8A, #F5A1B8);
  border-radius: 2px;
  transition: width 0.25s ease;
  box-shadow: 0 0 8px rgba(226,122,138,0.3);
}
.ann-tab.active {
  color: #F0ECFF;
  font-weight: 600;
}
.ann-tab.active::after {
  width: 32px;
}

/* ===== 列表容器 ===== */
#annList {
  padding: 16px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ann-detail-body {
  padding: 10px 18px 50px;
}
.ann-detail-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: 0.4px;
  border: 1px solid rgba(146,124,255,0.22);
}
.ann-detail-h {
  font-size: 22px;
  font-weight: 700;
  color: #F0ECFF;
  line-height: 1.45;
  margin: 0 0 16px;
  letter-spacing: 0.2px;
}
.ann-detail-time {
  font-size: 12px;
  color: #9B8FC4;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(146,124,255,0.08);
  letter-spacing: 0.3px;
}
.ann-detail-content {
  font-size: 14.5px;
  color: #D6CCEE;
  line-height: 1.95;
  letter-spacing: 0.15px;
}


]/gi,          // <style> 标签
      /<!DOCTYPE/i,              // DOCTYPE 声明
      /<html[\s>]/gi,            // <html> 标签
      /<head[\s>]/gi,            // <head> 标签
      /<body[\s>]/gi,            // <body> 标签
    ];
    var hasStrongIndicator = false;
    for (var si = 0; si < strongIndicators.length; si++) {
      if (strongIndicators[si].test(htmlContent)) { hasStrongIndicator = true; break; }
    }

    // 3b：统计所有 HTML 标签数量（通用模式）
    var allTags = htmlContent.match(/<[a-zA-Z][a-zA-Z0-9]*[\s>\/]/g);
    var tagCount = allTags ? allTags.length : 0;

    // 3c：检测 class= 或 style= 属性（HTML 结构性指标）
    var hasClassOrStyle = /class\s*=|style\s*=/.test(htmlContent);

    // 步骤4：判定逻辑
    // - 强指标存在 → HTML
    // - 3个以上 HTML 标签 → HTML
    // - 2个以上标签 + class=/style= 属性 → HTML
    var isHtml = hasStrongIndicator || tagCount >= 3 || (tagCount >= 2 && hasClassOrStyle);
    if (!isHtml) return null;

    // 步骤5：提取 HTML 部分
    // 如果 HTML 前面有纯文本说明，分离出来
    var firstHtmlTag = htmlContent.search(/<(!DOCTYPE|html|head|body|div|style|section|article|header|main|nav|table|form|p|span|h[1-6]|button|a|ul|ol|li|img|br|hr|details|summary|fieldset|legend|input|label|select|textarea|i|b|strong|em)[\s>\/]/i);
    var prefixText = '';
    if (firstHtmlTag > 0) {
      prefixText = htmlContent.substring(0, firstHtmlTag).trim();
      htmlContent = htmlContent.substring(firstHtmlTag);
    }

    // 步骤6：如果不是完整 HTML 文档，包装一下
    if (!htmlContent.match(/<html[\s>]/i)) {
      htmlContent = '<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"></head><body>' + htmlContent + '</body></html>';
    }

    // 步骤7：添加重置样式
    // 尊重AI按照设定卡主提示词生成的CSS，不强制覆盖背景色
    // 仅在AI的HTML完全没有定义body背景色时，才使用白色作为默认值
    var resetStyle = '<style>html,body{margin:0 !important;padding:0 !important;border:0 !important;min-height:auto !important;height:auto !important;}';
    if (!htmlContent.match(/body\s*\{[^}]*background/i)) {
      resetStyle += 'body{background:#fff !important;}';
    }
    resetStyle += '