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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0f0f1a;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0a2e 0%, #16213e 50%, #0f0f1a 100%);
  z-index: -2;
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, #fff, transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 230px 80px, #fff, transparent),
    radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent);
  background-size: 350px 200px;
  animation: twinkle 4s ease-in-out infinite;
  z-index: -1;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.header {
  text-align: center;
  margin-bottom: 40px;
}

.logo {
  font-size: 48px;
  font-weight: bold;
  color: #7c3aed;
  text-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
  margin-bottom: 10px;
}

.logo-icon {
  font-size: 40px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}

/* LOGO 图片：默认大小与首页标题文字一致（58px），自适应不拉伸 */
.site-logo-img {
  display: inline-block;
  max-height: 58px;
  max-width: 58px;
  height: auto;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 8px;
  flex-shrink: 0;
}

.subtitle {
  color: #a0a0b0;
  font-size: 16px;
}

.main-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tabs {
  display: flex;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  color: #a0a0b0;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
}

.tab-content {
  display: block;
}

.tab-content.hidden {
  display: none;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #d0d0e0;
  font-size: 14px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

.form-group input::placeholder {
  color: #606070;
}

/* 首页创建/加入房间：标签与输入框同一行 */
.form-group.inline-form-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.form-group.inline-form-row label {
  display: inline-block;
  flex: 0 0 auto;
  width: 170px;
  margin-bottom: 0;
  text-align: left;
  font-size: 14px;
  color: #d0d0e0;
  font-weight: 500;
  white-space: nowrap;
}

.form-group.inline-form-row input,
.form-group.inline-form-row select {
  flex: 1 1 auto;
  width: 1%; /* 在一些老浏览器里帮助 flex:1 正确生效 */
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.form-group.inline-form-row input:focus,
.form-group.inline-form-row select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

/* 强制使用默认总期限的提示文字（与 inline-form-row label 对齐） */
#force-expire-hint {
  padding-left: 185px;
}

/* 移动端：窄屏下自动切回上下布局，避免拥挤 */
@media (max-width: 520px) {
  .form-group.inline-form-row {
    display: block;
  }
  .form-group.inline-form-row label {
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 8px;
  }
  .form-group.inline-form-row input,
  .form-group.inline-form-row select {
    width: 100%;
  }
  #force-expire-hint {
    padding-left: 0;
  }
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: #22c55e;
  color: #fff;
}

.btn-success:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.btn-success:disabled {
  background: #16a34a;
  cursor: default;
  transform: none;
  opacity: 0.85;
}

.tips {
  margin-top: 20px;
  padding: 15px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 10px;
  border-left: 3px solid #7c3aed;
}

.tips p {
  color: #a0a0c0;
  font-size: 13px;
  line-height: 1.5;
}

.footer {
  margin-top: 40px;
  text-align: center;
}

.footer p {
  color: #606070;
  font-size: 13px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 26, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-overlay.hidden {
  display: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(124, 58, 237, 0.3);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0a2e 0%, #16213e 50%, #0f0f1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  width: 90%;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-title {
  font-size: 28px;
  font-weight: bold;
  color: #7c3aed;
  text-align: center;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}

.login-title #site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 24px;
}

.login-title .site-logo-img {
  max-height: 28px;
  max-width: 28px;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.login-subtitle {
  text-align: center;
  color: #a0a0b0;
  font-size: 14px;
  margin-bottom: 30px;
}

.login-subtitle span {
  color: #fff;
  font-weight: 600;
}

.login-error {
  margin-top: 15px;
  color: #ef4444;
  font-size: 13px;
  text-align: center;
  min-height: 20px;
}

.announcement-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  overflow: hidden;
  z-index: 30;
  display: none;
}

.announcement-scroll {
  display: flex;
  animation: scroll-left 25s linear infinite;
  white-space: nowrap;
}

.announcement-scroll .announcement-item {
  padding: 0 30px;
  line-height: 30px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

@keyframes scroll-left {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

.room-page {
  background: #0a0a12;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
}

.room-container {
  display: flex;
  height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.video-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000;
  position: relative;
  min-width: 0;
}

.middle-column {
  width: 320px;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 18, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.room-info-panel {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.content-area .users-list {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  min-height: 0;
}

/* 关闭在线人数区块：隐藏 users-list，聊天区自动占满整个高度 */
body.hide-online-count .content-area .users-list {
  display: none;
}
body.hide-online-count .content-area .chat-section {
  flex: 1;
  width: 100%;
}

.content-area .users-list::-webkit-scrollbar,
.video-list::-webkit-scrollbar {
  width: 6px;
}

.content-area .users-list::-webkit-scrollbar-track,
.video-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.content-area .users-list::-webkit-scrollbar-thumb,
.video-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.video-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 普通用户禁用视频进度条拖动（保留播放/暂停等其他控件） */
#video-player.lock-seek::-webkit-media-controls-timeline {
  pointer-events: none;
  opacity: 0.45;
}
#video-player.lock-seek::-moz-range-progress {
  pointer-events: none;
}
#video-player.lock-seek::-moz-range-thumb {
  pointer-events: none;
}

#artplayer-container {
  width: 100%;
  height: 100%;
}

.danmaku-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80%;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  animation: danmaku-scroll 12s linear forwards;
}

@keyframes danmaku-scroll {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

.video-controls-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.3s;
  gap: 10px;
}

.video-wrapper:hover .video-controls-overlay {
  opacity: 1;
}

/* ========== 循环播放控制栏 ========== */
.loop-control-bar {
  position: absolute;
  top: 50px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  z-index: 15;
  opacity: 1;
  transition: opacity 0.3s, transform 0.3s;
}

.loop-control-bar:hover {
  opacity: 1;
  transform: scale(1.05);
}

.loop-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-right: 4px;
  white-space: nowrap;
}

.loop-options {
  display: flex;
  gap: 3px;
}

.loop-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.loop-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.loop-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.loop-btn svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .loop-control-bar {
    top: 48px;
    right: 8px;
    padding: 6px 8px;
    gap: 4px;
  }
  
  .loop-label {
    display: none;
  }
  
  .loop-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  
  .loop-btn span {
    display: none;
  }
  
  .loop-btn svg {
    width: 14px;
    height: 14px;
  }
}

.progress-bar-container {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.progress-bar:hover {
  height: 8px;
}

.progress-bar.readonly {
  cursor: default;
}

.progress-bar.readonly:hover {
  height: 6px;
}

.progress-bar.readonly .progress-thumb {
  opacity: 0 !important;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.progress-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 0%;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.progress-bar:hover .progress-thumb,
.progress-bar.dragging .progress-thumb {
  opacity: 1;
}

.progress-bar.dragging .progress-thumb {
  transform: translate(-50%, -50%) scale(1.2);
}

.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-left,
.control-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.control-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.time-display {
  font-family: monospace;
  font-size: 14px;
  color: #fff;
}

.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 5;
}

.placeholder-icon {
  font-size: 60px;
  margin-bottom: 20px;
}
/* 视频占位 iconfont 图标保持 60px（继承 placeholder-icon 字号） */
.placeholder-icon .icon {
  width: 60px;
  height: 60px;
  fill: #4a4a5e;
}

/* ========== 图标按钮统一去背景框（仅房间页面图标按钮） ========== */
#copy-room-btn,
#refresh-video-btn,
#leave-btn,
#clear-chat-btn,
#clear-play-btn,
#destroy-btn,
#feedback-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 6px !important;
}
/* 各图标颜色（按钮无背景后由图标自身颜色区分） */
#copy-room-btn .icon { fill: #fff !important; }
#refresh-video-btn .icon { fill: #c4b5fd !important; }
#refresh-video-btn:hover .icon { fill: #fff !important; }
#leave-btn .icon { fill: #ef4444 !important; }
#leave-btn:hover .icon { fill: #fca5a5 !important; }
#clear-chat-btn .icon { fill: #a78bfa !important; }
#clear-chat-btn:hover .icon { fill: #fff !important; }
#clear-play-btn .icon { fill: #eab308 !important; }
#clear-play-btn:hover .icon { fill: #fde047 !important; }
#destroy-btn .icon { fill: #ef4444 !important; }
#destroy-btn:hover .icon { fill: #fca5a5 !important; }
#feedback-btn .icon { fill: #a78bfa !important; width: 12px; height: 12px; font-size: 12px; }
#feedback-btn:hover .icon { fill: #fff !important; }

.video-placeholder p {
  color: #606070;
  font-size: 16px;
}

/* ========== 音频播放占位层（纯音频时显示可视化效果） ========== */
.audio-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  /* 背景：上方是紫黑径向渐变做唱片舞台；底部 15% 过渡到完全透明，
     让 <video controls> 的原生控件条（进度条、播放/暂停、时间、音量）完全露出来、可点击 */
  background:
    linear-gradient(to bottom,
      rgba(15, 15, 26, 0) 0%,
      rgba(15, 15, 26, 0) 72%,
      rgba(15, 15, 26, 0) 82%,
      rgba(15, 15, 26, 0) 88%,
      rgba(0, 0, 0, 0) 100%),
    radial-gradient(ellipse at 50% 48%, #1a1a2e 0%, #0f0f1a 58%, rgba(15, 15, 26, 0.55) 78%, rgba(0, 0, 0, 0) 95%);
  z-index: 5;
  overflow: hidden;
  user-select: none;
  /* 关键：所有鼠标/触摸事件穿透到下面的 <video>，让原生控件可以点击/拖动/聚焦 */
  pointer-events: none;
}

/* 为了视觉完整性：对控件条露出的那一小块底部区域加一个非常淡的黑色蒙版，
   防止视频底部（全屏时画面下方有时会有极细的白条或者 padding）露出不自然的边界。
   纯音频场景下 <video> 本来就是纯黑，这一层是锦上添花的保险。 */
.audio-placeholder::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14%;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.18) 45%,
    rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.audio-cover {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 旋转的唱片 */
.audio-cover-disc {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #2a2a3e 0%, #2a2a3e 22%, #15151f 23%, #222230 24%, #15151f 26%, #222230 28%, #15151f 30%, #222230 32%, #15151f 34%, #222230 36%, #15151f 38%, #222230 40%, #0d0d14 100%);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(255, 255, 255, 0.06) inset,
    0 0 60px rgba(139, 92, 246, 0.25);
  animation: audio-disc-spin 14s linear infinite;
  animation-play-state: paused;
}

.audio-placeholder.is-playing .audio-cover-disc {
  animation-play-state: running;
}

.audio-cover-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
  box-shadow:
    0 0 0 3px #12121c inset,
    0 0 20px rgba(139, 92, 246, 0.6);
}

.audio-cover-center::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0a0a10;
}

@keyframes audio-disc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 波形动画 */
.audio-waves {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 120px;
  height: 60px;
  pointer-events: none;
  z-index: 2;
}

.audio-wave {
  width: 6px;
  background: linear-gradient(to top, #8b5cf6, #ec4899);
  border-radius: 3px;
  height: 10px;
  opacity: 0.9;
  animation: audio-wave-pulse 1.1s ease-in-out infinite;
  animation-play-state: paused;
}

.audio-placeholder.is-playing .audio-wave {
  animation-play-state: running;
}

.audio-wave-1 { animation-delay: 0s;    height: 14px; }
.audio-wave-2 { animation-delay: 0.12s; height: 26px; }
.audio-wave-3 { animation-delay: 0.24s; height: 40px; }
.audio-wave-4 { animation-delay: 0.36s; height: 26px; }
.audio-wave-5 { animation-delay: 0.48s; height: 14px; }

@keyframes audio-wave-pulse {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

.audio-meta {
  text-align: center;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.audio-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.18);
  color: #c4b5fd;
  font-size: 12px;
  letter-spacing: 1px;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.audio-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 12px rgba(139, 92, 246, 0.5);
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 移动端音频占位样式 */
@media (max-width: 768px) {
  .audio-placeholder {
    gap: 22px;
    /* 移动端浏览器控件条普遍比桌面端厚（安卓 Chrome ~54px、iOS Safari ~56px，
       再加全屏手势/返回栏可到 90px），这里把底部透明区再扩大 12%，确保不挡 */
    background:
      linear-gradient(to bottom,
        rgba(15, 15, 26, 0) 0%,
        rgba(15, 15, 26, 0) 60%,
        rgba(15, 15, 26, 0) 72%,
        rgba(15, 15, 26, 0) 82%,
        rgba(0, 0, 0, 0) 100%),
      radial-gradient(ellipse at 50% 44%, #1a1a2e 0%, #0f0f1a 52%, rgba(15, 15, 26, 0.45) 70%, rgba(0, 0, 0, 0) 92%);
  }
  .audio-placeholder::after {
    height: 20%;
  }
  .audio-cover {
    width: 160px;
    height: 160px;
  }
  .audio-cover-center {
    width: 42px;
    height: 42px;
  }
  .audio-waves {
    width: 90px;
    height: 46px;
  }
  .audio-title {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .audio-placeholder {
    /* 小屏进一步压缩可视区，给控件和顶部通知栏留空间 */
    background:
      linear-gradient(to bottom,
        rgba(15, 15, 26, 0) 0%,
        rgba(15, 15, 26, 0) 55%,
        rgba(15, 15, 26, 0) 70%,
        rgba(0, 0, 0, 0) 100%),
      radial-gradient(ellipse at 50% 40%, #1a1a2e 0%, #0f0f1a 48%, rgba(15, 15, 26, 0.35) 66%, rgba(0, 0, 0, 0) 90%);
  }
  .audio-placeholder::after {
    height: 26%;
  }
  .audio-cover {
    width: 130px;
    height: 130px;
  }
  .audio-cover-center {
    width: 34px;
    height: 34px;
  }
}

/* 全屏模式下：浏览器原生控件条更大（桌面 Chrome 有标题栏+控件栏，安卓端底部手势区+返回键等），
   再把底部透明区加大一档，确保进度条和播放按钮完全可见 */
.audio-placeholder:fullscreen,
:fullscreen .audio-placeholder {
  background:
    linear-gradient(to bottom,
      rgba(15, 15, 26, 0) 0%,
      rgba(15, 15, 26, 0) 62%,
      rgba(15, 15, 26, 0) 76%,
      rgba(0, 0, 0, 0) 100%),
    radial-gradient(ellipse at 50% 46%, #1a1a2e 0%, #0f0f1a 55%, rgba(15, 15, 26, 0.5) 76%, rgba(0, 0, 0, 0) 96%);
}
.audio-placeholder:fullscreen::after,
:fullscreen .audio-placeholder::after {
  height: 24%;
}

/* 嗅探结果音频条目标识 */
.sniff-item.audio-item .sniff-item-icon::before {
  content: '🎵 ';
}
.sniff-item.audio-item .sniff-item-type {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.35);
}

/* 图片显示区域：与视频播放器共享同一区域，互斥显示 */
.image-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 5;
  overflow: auto;
}

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

/* 同屏图片支持灯箱：给用户"可以点击放大"的视觉提示 */
.image-display.image-display-lightboxable {
  cursor: zoom-in;
  position: relative;
}

/* 图片滑动切换 - 左右箭头按钮 */
.image-swipe-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
  user-select: none;
  line-height: 1;
  padding-bottom: 2px;
}

.image-swipe-arrow-left {
  left: 12px;
}

.image-swipe-arrow-right {
  right: 12px;
}

.image-display:hover .image-swipe-arrow {
  opacity: 1;
}

.image-swipe-arrow:hover {
  background: rgba(124, 58, 237, 0.75);
  transform: translateY(-50%) scale(1.08);
}

.image-swipe-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* 移动端始终显示箭头（方便操作） */
@media (max-width: 768px) {
  .image-swipe-arrow {
    opacity: 0.85;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  .image-swipe-arrow-left {
    left: 8px;
  }
  .image-swipe-arrow-right {
    right: 8px;
  }
}

/* 图片滑动切换 - 索引指示器 */
.image-swipe-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 14px;
  z-index: 14;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* ========== 后台聊天图片管理 ========== */
.chat-img-group {
  margin-bottom: 20px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  overflow: hidden;
}
.chat-img-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(124, 58, 237, 0.08);
  font-size: 14px;
  font-weight: 600;
  color: #c4b5fd;
  flex-wrap: wrap;
}
.chat-img-group-header .room-id {
  font-family: monospace;
  font-size: 15px;
}
.chat-img-group-header .count-badge {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: normal;
}
.chat-img-group-header .select-all-cb {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #7c3aed;
  margin-left: auto;
}
.chat-img-group-header .btn-room-delete {
  padding: 3px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  cursor: pointer;
  white-space: nowrap;
}
.chat-img-group-header .btn-room-delete:hover {
  background: rgba(239, 68, 68, 0.25);
}
.chat-img-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 12px;
}
@media (max-width: 768px) {
  .chat-img-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.chat-img-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a2e;
  cursor: pointer;
}
.chat-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.chat-img-item:hover img {
  transform: scale(1.08);
}
.chat-img-item .img-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.chat-img-item:hover .img-delete-btn {
  opacity: 1;
}
.chat-img-item .img-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #d1d5db;
  font-size: 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 灯箱 */
.chat-img-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.chat-img-lightbox img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.chat-img-lightbox .lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  user-select: none;
}
.chat-img-empty {
  text-align: center;
  padding: 30px;
  color: #666;
  font-size: 14px;
}

/* 滑动切换动画 - 从右侧滑入（下一张） */
.image-swipe-flip-right {
  animation: imageSwipeRight 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 滑动切换动画 - 从左侧滑入（上一张） */
.image-swipe-flip-left {
  animation: imageSwipeLeft 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes imageSwipeRight {
  0% {
    transform: translateX(60px);
    opacity: 0.4;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes imageSwipeLeft {
  0% {
    transform: translateX(-60px);
    opacity: 0.4;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== 灯箱导航 ===== */
.image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 32px;
  font-weight: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2200;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
  user-select: none;
  line-height: 1;
  opacity: 0;
}

.image-lightbox:hover .image-lightbox-nav {
  opacity: 1;
}

.image-lightbox-nav:hover {
  background: rgba(124, 58, 237, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.image-lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.image-lightbox-prev {
  left: 30px;
}

.image-lightbox-next {
  right: 30px;
}

/* 灯箱计数器 */
.image-lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 16px;
  z-index: 2200;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* 移动端灯箱导航调整 */
@media (max-width: 768px) {
  .image-lightbox-nav {
    opacity: 0.85;
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
  .image-lightbox-prev {
    left: 12px;
  }
  .image-lightbox-next {
    right: 12px;
  }
  .image-lightbox-counter {
    bottom: 20px;
    font-size: 13px;
  }
}
.image-display.image-display-lightboxable img {
  cursor: zoom-in;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.image-display.image-display-lightboxable:hover img {
  opacity: 0.9;
  transform: scale(1.005);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.25);
}
/* 在图片右上角放一个小"放大镜"角标，进一步提示可放大 */
.image-display.image-display-lightboxable::before {
  content: '🔍 点击查看大图';
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 999px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.image-display.image-display-lightboxable:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.admin-panel.admin-panel-sidebar {
  position: static;
  width: 100%;
  height: 100%;
  left: auto;
  bottom: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.admin-panel-sidebar .panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 15px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-panel-sidebar .panel-content::-webkit-scrollbar {
  width: 6px;
}

.admin-panel-sidebar .panel-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.admin-panel-sidebar .panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

/* 四个按钮均分宽度，高度变低 */
.action-buttons .btn {
  flex: 1;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.2;
  width: auto;
  white-space: nowrap;
}

/* 视频URL行：label + 输入框 + 嗅探按钮 同一行 */
.form-group.url-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 15px;
}

.form-group.url-group label {
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
  flex-shrink: 0;
  display: inline;
}

.form-group.url-group input {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 8px 10px;
  font-size: 12px;
}

/* 探视/探图按钮：宽度约 2 个字，靠右贴齐源链输入框，高度与输入框一致 */
.form-group.url-group .sniff-btn {
  flex-shrink: 0;
  width: 2em;
  box-sizing: content-box;
  padding: 8px 4px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
}
/* 第一个探视按钮用 margin-left:auto 把两个按钮一起推到行末右对齐 */
.form-group.url-group .sniff-video-btn {
  margin-left: auto;
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
  color: #c4b5fd;
}
.form-group.url-group .sniff-video-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.3);
}

/* 探图按钮：绿色调 */
.form-group.url-group .sniff-image-btn {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}
.form-group.url-group .sniff-image-btn:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.3);
}
.form-group.url-group .sniff-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 探视/探图按钮加载态：转圈符，复用按钮文本颜色（currentColor） */
.sniff-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: sniff-btn-spin 0.8s linear infinite;
  vertical-align: middle;
  box-sizing: border-box;
}
@keyframes sniff-btn-spin {
  to { transform: rotate(360deg); }
}

/* 视频标题行：label + 输入框 [+ 资源搜索按钮] 同一行 */
.form-group.title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 6px;
}

.form-group.title-group label,
.form-group.url-group label {
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
  flex-shrink: 0;
  display: inline;
  width: 36px; /* 与 url-group label 对齐，保证标题输入框视觉宽度 = 源链输入框宽度 */
}

.form-group.title-group input {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 8px 10px;
  font-size: 12px;
}

/* 资源搜索按钮 hover/禁用态 复用 sniff-btn 规范 */
.form-group.title-group .resource-search-btn:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.3);
}
.form-group.title-group .resource-search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.video-list-group {
  margin-top: 15px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* 视频列表/图片列表 tab 切换 */
.playlist-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.playlist-tab-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  color: #a0a0c0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.playlist-tab-btn:hover {
  background: rgba(124, 58, 237, 0.1);
  color: #d0d0e0;
}
.playlist-tab-btn.active {
  background: rgba(124, 58, 237, 0.25);
  color: #fff;
  border-color: rgba(124, 58, 237, 0.5);
}

/* 清空列表按钮已移至 action-buttons 行，由 .action-buttons .btn 统一控制样式 */

.video-list,
.image-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.video-list-empty {
  text-align: center;
  color: #606070;
  font-size: 12px;
  padding: 20px 0;
}

.video-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.2s;
  gap: 8px;
}

.video-list-item:last-child {
  margin-bottom: 0;
}

.video-list-item:hover {
  background: rgba(124, 58, 237, 0.2);
}

.video-list-item.active {
  background: rgba(124, 58, 237, 0.35);
  border: 1px solid rgba(124, 58, 237, 0.5);
}

.video-list-item-name {
  flex: 1;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.video-list-item-seq {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  min-width: 38px;
  text-align: center;
}

.video-list-item.active .video-list-item-seq {
  color: #fff;
  background: rgba(124, 58, 237, 0.6);
}

.video-list-item-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

.video-list-item-delete:hover {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.6);
}

.admin-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 320px;
  background: rgba(15, 15, 26, 0.95);
  border-radius: 15px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 30;
  display: none;
}

.admin-panel.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-panel-sidebar .panel-header {
  padding: 12px 15px;
}

.panel-header h3 {
  font-size: 14px;
  color: #7c3aed;
}

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

.shared-control-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #a0a0c0;
  cursor: pointer;
  user-select: none;
}

.shared-control-label input[type="checkbox"] {
  cursor: pointer;
}

.close-panel {
  background: none;
  border: none;
  color: #606070;
  font-size: 18px;
  cursor: pointer;
}

.close-panel:hover {
  color: #fff;
}

.panel-content {
  padding: 15px;
}

.sniff-results {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 4px;
}

/* 嗅探结果为空时不占间距，让源链行和按钮行更紧凑 */
.sniff-results:empty {
  margin-bottom: 0;
}

/* 嗅探结果标题栏（含折叠按钮）—— 不透明背景，确保滚动时不透出底部内容 */
.sniff-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 6px;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 12px;
  color: #d0d0e0;
  position: sticky;
  top: 0;
  z-index: 2;
}
.sniff-results-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 折叠/关闭小图标按钮：方形小图标，文字居中 */
.sniff-collapse-btn,
.sniff-close-btn {
  flex-shrink: 0;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.sniff-collapse-btn:hover,
.sniff-close-btn:hover {
  background: rgba(124, 58, 237, 0.3);
}
/* 关闭按钮单独红色调，便于识别 */
.sniff-close-btn {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}
.sniff-close-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* 折叠状态：隐藏所有 sniff-item 和底部提示，只保留标题栏 */
.sniff-results.collapsed .sniff-item,
.sniff-results.collapsed > div:not(.sniff-results-header) {
  display: none;
}
/* 折叠状态：取消 max-height 限制，让容器高度自然收缩到标题栏一行高度 */
.sniff-results.collapsed {
  max-height: none;
  height: auto;
  overflow: hidden;
}
/* 折叠状态下取消标题栏 sticky 定位和底部 margin，避免空白 */
.sniff-results.collapsed .sniff-results-header {
  position: static;
  margin-bottom: 0;
}

.sniff-item {
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sniff-item:hover {
  background: rgba(124, 58, 237, 0.2);
}

/* 嗅探主体区域：URL + 类型行 + 操作按钮 */
.sniff-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sniff-item-url {
  font-size: 12px;
  color: #a0a0c0;
  word-break: break-all;
  line-height: 1.5;
}

/* 第二行：类型标签 + 操作按钮，左右分布 */
.sniff-item-row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sniff-item-type {
  font-size: 11px;
  color: #7c3aed;
  margin: 0;
  flex-shrink: 0;
}

.sniff-item-action {
  font-size: 11px;
  color: #fff;
  background: rgba(124, 58, 237, 0.3);
  border: 1px solid rgba(124, 58, 237, 0.5);
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.sniff-item-action:hover {
  background: rgba(124, 58, 237, 0.5);
}

/* 图片嗅探结果项：flex 布局（放 CSS 而非内联，以便折叠时 display:none 能覆盖） */
.sniff-item.sniff-image-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 图片嗅探结果项：缩略图样式 */
.sniff-item-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
}
.sniff-item-thumb-error {
  display: none;
}
.sniff-item-size {
  font-size: 10px;
  color: #6ee7b7;
  margin-top: 2px;
}

.playback-controls {
  display: flex;
  gap: 6px;
  margin-top: 5px;
  margin-bottom: 15px;
  align-items: center;
  flex-wrap: nowrap;
}

.playback-controls .btn-sm {
  flex: 1;
  padding: 8px 4px;
  font-size: 12px;
  white-space: nowrap;
}

.speed-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.speed-label {
  font-size: 12px;
  color: #d0d0e0;
  white-space: nowrap;
  margin: 0;
  display: inline;
}

.speed-group select {
  width: 58px;
  padding: 6px 4px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  outline: none;
  transition: all 0.3s;
}

.speed-group select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

.admin-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 10px 15px;
  background: rgba(124, 58, 237, 0.8);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  z-index: 40;
  display: none !important;
}

.chat-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  background: rgba(15, 15, 26, 0.95);
  border-left: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 0;
}

.middle-column .chat-section {
  border-left: none;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h3 {
  font-size: 14px;
  color: #fff;
  flex: 1;
}

/* 聊天区域：清空 + 反馈 按钮横排紧凑 */
.chat-header .feedback-btn-group {
  display: flex;
  gap: 4px;
  align-items: center;
}

.online-count {
  font-size: 12px;
  color: #22c55e;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  min-height: 0;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.message-item {
  margin-bottom: 15px;
}

.message-nickname {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: #7c3aed;
  margin-bottom: 4px;
}

.message-content {
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

/* 图片消息：直接显示在用户名下方，不套气泡背景（类似微信） */
.message-image-wrap {
  display: inline-block;
  max-width: 100%;
}

/* 系统提醒消息样式 */
.message-system {
  text-align: left;
  padding: 6px 0;
  display: block;
  line-height: 1.7;
}

.message-system-tag {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1a1a2e;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 6px;
  vertical-align: top;
  flex-shrink: 0;
}

.message-system .message-content {
  display: inline;
  background: none;
  border: none;
  color: #fcd34d;
  font-size: 11px;
  text-align: left;
  padding: 0;
  border-radius: 0;
  white-space: normal;
  word-break: break-word;
}

.system-msg {
  text-align: center;
  color: #606070;
  font-size: 12px;
  padding: 8px 0;
}

.chat-input-area {
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.chat-input-area input {
  flex: 1 1 auto;
  min-width: 0;
  width: 1%;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.chat-input-area input:focus {
  border-color: #7c3aed;
}

.chat-input-area input::placeholder {
  color: #606070;
}

/* 聊天输入框包裹层：让图片按钮内嵌在输入框右侧 */
.chat-input-wrapper {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
  width: 1%;
  max-width: 100%;
}

.chat-input-wrapper input {
  width: 100%;
  padding-right: 38px;
}

.send-btn {
  padding: 12px 20px;
  border-radius: 20px;
  width: auto;
  flex: 0 0 auto;
  min-width: 0;
  box-sizing: border-box;
}

.sidebar {
  width: 360px;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 18, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
  font-size: 13px;
  color: #fff;
}

.copy-btn {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.refresh-btn {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.users-list {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.users-list h4 {
  font-size: 12px;
  color: #606070;
  margin-bottom: 10px;
}

.users-list ul {
  list-style: none;
}

.user-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 5px;
  transition: all 0.3s;
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.user-status {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 10px;
}

.user-name {
  font-size: 13px;
  color: #fff;
  flex: 1;
}

.user-admin {
  font-size: 12px;
  color: #f59e0b;
}

.leave-btn {
  margin: 15px;
  border-radius: 8px;
}

.admin-panel-sidebar .panel-header .destroy-btn,
.admin-panel-sidebar .panel-header .clear-play-btn {
  margin: 0;
  width: auto;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  line-height: 1.4;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* 控制台销毁/空播按钮图标尺寸与对齐 */
.admin-panel-sidebar .panel-header .destroy-btn .icon,
.admin-panel-sidebar .panel-header .clear-play-btn .icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  fill: currentColor;
}

.btn-warn {
  background: #eab308;
  color: #1a1a2e;
  border: 1px solid rgba(234,179,8,0.4);
}

.btn-warn:hover {
  background: #facc15;
  transform: translateY(-1px);
}

.btn-warn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

/* 房间号区域的离开房间按钮：与复制按钮协调的小尺寸 */
.sidebar-header .room-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-header .leave-btn {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
  line-height: 1.4;
  height: auto;
  min-height: 28px;
  width: auto;
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.sidebar-header .copy-btn {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
/* 邀请按钮 iconfont 图标强制白色（覆盖 symbol 内嵌 fill） */
.sidebar-header .copy-btn .icon {
  fill: #fff !important;
  color: #fff;
}
/* 邀请按钮去背景框 + 图标放大 */
#copy-room-btn {
  background: transparent !important;
  border: none !important;
  padding: 2px !important;
}
#copy-room-btn .icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.sidebar-header .refresh-btn {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
/* sidebar-header 图标按钮统一图标尺寸（16px）与对齐 */
.sidebar-header .refresh-btn .icon,
.sidebar-header .leave-btn .icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
}
.sidebar-header .leave-btn .icon {
  fill: #fff !important;
}
.sidebar-header .refresh-btn .icon {
  fill: currentColor;
}

.mobile-sidebar-toggle {
  display: none;
}

@media (max-width: 1024px) {
  .sidebar {
    width: 320px;
  }

  .middle-column {
    width: 280px;
  }
}

@media (max-width: 768px) {
  .room-container {
    flex-direction: column;
  }

  .video-section {
    height: 55vh;
  }

  .middle-column {
    width: 100%;
    height: 45vh;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .chat-section {
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* 手机端：聊天输入框+发送按钮压缩，避免横向溢出 */
  .chat-input-area {
    padding: 10px;
    gap: 8px;
  }
  .chat-input-area input {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 16px;
  }
  .chat-input-area .send-btn {
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 16px;
    flex: 0 0 auto;
  }
  .content-area,
  .middle-column {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* 手机端：在线用户与聊天左右并列布局 */
  .content-area {
    flex-direction: row;
  }

  .content-area .users-list {
    width: 33.33%;
    flex: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 6px;
  }

  .content-area .users-list h4 {
    font-size: 11px;
    margin-bottom: 6px;
  }

  .content-area .users-list .user-item {
    padding: 5px 4px;
    margin-bottom: 3px;
  }

  .content-area .users-list .user-name {
    font-size: 12px;
  }

  .content-area .chat-section {
    width: 66.67%;
    flex: 1;
    border-top: none;
    border-left: none;
  }

  /* 手机端：房间号栏紧凑化 */
  .sidebar-header {
    padding: 6px 10px;
  }
  .sidebar-header h3 {
    font-size: 12px;
  }
  .sidebar-header .room-header-actions {
    gap: 5px;
  }
  .sidebar-header .copy-btn,
  .sidebar-header .refresh-btn,
  .sidebar-header .leave-btn {
    padding: 3px 8px;
    font-size: 11px;
  }

  /* 手机端：聊天头部栏紧凑化 */
  .chat-header {
    padding: 6px 10px;
  }
  .chat-header h3 {
    font-size: 12px;
  }
  .online-count {
    font-size: 11px;
  }

  /* 手机端：聊天消息内联显示，用户名带细边框，内容无边框无背景 */
  .message-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }

  .message-nickname {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1px 6px;
    border-radius: 4px;
    margin-bottom: 0;
    margin-right: 8px;
    flex-shrink: 0;
    font-size: 11px;
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .message-content {
    background: none;
    padding: 0;
    border-radius: 0;
    flex: 1;
    min-width: 0;
    font-size: 13px;
  }

  .sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100%;
    z-index: 1000;
  }

  .sidebar.active {
    display: flex;
  }

  /* +号控制台按钮：移动端显示在房间号前面 */
  .sidebar-header .mobile-sidebar-toggle {
    display: flex;
    position: static;
    width: auto;
    height: 28px;
    min-width: 0;
    border-radius: 0;
    background: transparent;
    color: #c4b5fd;
    border: none;
    font-size: 22px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
    padding: 4px 6px;
  }
  /* 手机端控制台按钮内 iconfont 图标样式 */
  .sidebar-header .mobile-sidebar-toggle .icon {
    width: 20px;
    height: 20px;
    fill: #c4b5fd !important;
  }
  .sidebar-header .mobile-sidebar-toggle:hover .icon {
    fill: #fff !important;
  }

  /* 普通用户隐藏 +号控制台按钮 */
  .sidebar-header .mobile-sidebar-toggle.hidden-for-user {
    display: none !important;
  }

  /* 去掉多余的 .send-btn 全局覆盖规则（改为仅在聊天区域生效） */
  .chat-input-area .send-btn {
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 16px;
    flex: 0 0 auto;
  }

  .admin-panel {
    width: calc(100% - 40px);
  }

  .danmaku-item {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 15px;
  }

  .main-card {
    padding: 20px;
  }

  .logo {
    font-size: 36px;
  }

  .logo-icon {
    font-size: 30px;
    margin-right: 8px;
  }

  .site-logo-img {
    max-height: 30px;
    max-width: 30px;
  }

  .video-section {
    height: 45vh;
  }

  .middle-column {
    height: 55vh;
  }

  /* 480px以下：聊天区域进一步压缩，完全避免横向溢出 */
  .chat-input-area {
    padding: 8px 6px;
    gap: 6px;
  }
  .chat-input-area input {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 14px;
  }
  .chat-input-area .send-btn {
    padding: 8px 10px;
    font-size: 11px;
    border-radius: 14px;
    flex: 0 0 auto;
    width: auto;
    max-width: 60px;
  }
}

/* ===== 拖拽把手 & 全屏阅读模式 ===== */
/* 桌面端隐藏把手和恢复栏 */
.drag-handle,
.restore-handle {
  display: none !important;
}

/* 桌面端禁用全屏阅读模式相关样式 */
@media (min-width: 769px) {
  .room-container.reading-fullscreen .video-section {
    height: '';
  }
  .room-container.reading-fullscreen .middle-column {
    display: '';
  }
}

/* 手机端显示 */
@media (max-width: 768px) {
  /* 拖拽把手：房间号行上方的细条 */
  .drag-handle {
    display: block !important;
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 6px auto 4px;
    cursor: grab;
    transition: background 0.2s;
  }

  .drag-handle:active {
    background: rgba(167, 139, 250, 0.7);
  }

  /* 房间信息面板可拖拽时的提示 */
  .room-info-panel {
    position: relative;
  }

  /* 全屏模式底部浮动把手 */
  .restore-handle {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: rgba(10, 10, 18, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 50;
    transition: background 0.2s, height 0.2s;
  }

  .restore-handle:hover {
    height: 18px;
    background: rgba(10, 10, 18, 0.9);
  }

  .restore-handle:active {
    cursor: grabbing;
  }

  .restore-handle-bar {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
  }

  .restore-handle:hover .restore-handle-bar {
    background: rgba(167, 139, 250, 0.6);
  }

  /* 全屏模式下显示底部把手 */
  .room-container.reading-fullscreen .restore-handle {
    display: flex !important;
  }

  /* 增大底部把手触摸热区：上方透明扩展区，方便手机点中后轻点恢复 */
  .room-container.reading-fullscreen .restore-handle::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
  }

  /* 全屏阅读模式：隐藏中间栏，视频/阅读区撑满 */
  .room-container.reading-fullscreen {
    flex-direction: column;
  }

  .room-container.reading-fullscreen .video-section {
    height: calc(100vh - 12px);
    flex: 1;
  }

  /* 全屏模式下小说底部留出把手空间 */
  .room-container.reading-fullscreen .novel-display .novel-footer {
    padding-bottom: 14px;
  }

  .room-container.reading-fullscreen .middle-column {
    display: none;
  }

  /* 拖拽过程中间栏跟随手指 */
  .middle-column.dragging {
    transition: none;
  }

  /* 非拖拽状态下的平滑过渡 */
  .middle-column {
    transition: transform 0.3s ease, height 0.3s ease;
  }
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card,
.change-password-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 24px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-header p {
  color: #9ca3af;
  font-size: 14px;
}

.error-message {
  color: #ef4444;
  font-size: 13px;
  margin-bottom: 15px;
  text-align: center;
}

.btn-block {
  width: 100%;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
}

.btn-link {
  background: none;
  border: none;
  color: #06b6d4;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: #22d3ee;
}

.admin-page {
  background: #1a1a2e;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ===== 顶部标题栏（全宽） ===== */
.admin-topbar {
  width: 100%;
  background: rgba(20, 20, 40, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  box-sizing: border-box;
}

.admin-topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  min-width: 0;
}

#admin-topbar-logo {
  font-size: 22px;
  -webkit-text-fill-color: initial;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

#admin-topbar-logo .site-logo-img {
  max-height: 22px;
  max-width: 22px;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.admin-name {
  color: #9ca3af;
  font-size: 14px;
}

/* ===== 顶部标签导航栏（全宽） ===== */
.admin-tabbar {
  width: 100%;
  background: rgba(30, 30, 55, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 65px;
  z-index: 99;
}

.admin-tabbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.admin-tabbar-inner::-webkit-scrollbar {
  height: 4px;
}

.admin-tabbar-inner::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 2px;
}

.tab-btn-item {
  flex: 0 0 auto;
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: #a0a0b0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: 0;
}

.tab-btn-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn-item.active {
  color: #fff;
  background: rgba(124, 58, 237, 0.15);
  border-bottom-color: #7c3aed;
}

/* ===== 内容区 ===== */
.admin-container {
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
  min-width: 0;
}

.tab-content.hidden {
  display: none;
}

.admin-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 18px;
  color: #fff;
}

.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  font-size: 14px;
  color: #e5e7eb;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* 资源接口拖拽排序 */
#resource-apis-table-body tr {
  cursor: grab;
}
#resource-apis-table-body tr.dragging {
  opacity: 0.4;
  background: rgba(124, 58, 237, 0.15) !important;
}
#resource-apis-table-body tr.drag-over {
  border-top: 2px solid #7c3aed !important;
}
.ra-drag-handle {
  cursor: grab;
  color: #6b7280;
  font-size: 18px;
  user-select: none;
  text-align: center;
  line-height: 1;
  transition: color 0.2s;
}
.ra-drag-handle:hover {
  color: #7c3aed;
}
#resource-apis-table-body tr .ra-drag-handle:active {
  cursor: grabbing;
}
#resource-apis-table-body input {
  cursor: text;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.status-badge.inactive {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* 后台管理刷新按钮缩小 */
.btn-refresh-sm {
  padding: 5px 10px;
  font-size: 12px;
  width: auto;
  min-width: 60px;
}

/* 表格操作按钮横向并排 */
.table-actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.table-actions .btn-sm {
  margin: 0;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ===== 后台管理按钮整体缩小：正常尺寸 ===== */
.admin-container .btn,
.admin-main .btn,
.admin-section .btn {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
}

.admin-container .btn.btn-refresh-sm,
.admin-main .btn.btn-refresh-sm,
.admin-section .btn.btn-refresh-sm {
  padding: 5px 10px;
  font-size: 12px;
  min-width: 56px;
}

/* ===== 聊天图片缩略图：按原图比例自适应聊天框宽度 ===== */
.chat-image-thumb {
  display: block;
  max-width: 100%;
  max-height: 200px;
  height: auto;
  width: auto;
  border-radius: 8px;
  cursor: zoom-in;
  margin: 4px 0 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
}

.chat-image-thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  border-color: rgba(124, 58, 237, 0.4);
}

/* 聊天图片按钮：内嵌在输入框右侧 */
.chat-image-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #a0a0c0;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.chat-image-btn:hover {
  color: #a78bfa;
}
.chat-image-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 消息撤回按钮 */
.message-recall-btn {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  color: #a0a0c0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  align-self: baseline;
}
.message-recall-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.chat-image-link {
  display: block;
  color: #7c3aed;
  font-size: 11px;
  word-break: break-all;
  margin-top: 2px;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chat-image-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ===== 图片灯箱（全屏查看） ===== */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  cursor: zoom-out;
  animation: lightbox-fade-in 0.2s ease-out;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.image-lightbox-img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.image-lightbox-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #a0a0b0;
  font-size: 16px;
  letter-spacing: 1px;
}

.image-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  line-height: 1;
  padding: 0;
}

.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.form-group select option {
  background: #1a1a2e;
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.1));
  border-radius: 12px;
  padding: 25px;
  text-align: center;
}

.stat-value {
  font-size: 48px;
  font-weight: bold;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 14px;
  color: #9ca3af;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay p {
  margin-top: 15px;
  color: #9ca3af;
}

@media (max-width: 768px) {
  /* 顶部标题栏响应式 */
  .admin-topbar-inner {
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .admin-topbar-title {
    font-size: 18px;
  }

  #admin-topbar-logo {
    font-size: 18px;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  /* 标签导航栏响应式 */
  .admin-tabbar {
    top: auto;
  }

  .admin-tabbar-inner {
    padding: 0 12px;
  }

  .tab-btn-item {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* 内容区响应式 */
  .admin-main {
    padding: 16px;
  }

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

  .admin-section {
    padding: 15px;
    margin-bottom: 15px;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
  }

  .section-header h2 {
    font-size: 16px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .table-actions {
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .admin-topbar-inner {
    padding: 10px 12px;
  }

  .admin-topbar-title {
    font-size: 16px;
  }

  #admin-topbar-logo {
    font-size: 16px;
  }

  #admin-topbar-logo .site-logo-img {
    max-height: 16px;
    max-width: 16px;
  }

  .admin-name {
    font-size: 12px;
  }

  .header-right .btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .admin-tabbar-inner {
    padding: 0 8px;
  }

  .tab-btn-item {
    padding: 9px 12px;
    font-size: 12px;
  }

  .admin-main {
    padding: 12px;
  }

  .admin-section {
    padding: 12px;
  }

  .section-header h2 {
    font-size: 15px;
  }

  .data-table th,
  .data-table td {
    padding: 6px 8px;
    font-size: 11px;
  }

  /* 表格操作按钮更紧凑 */
  .admin-section .btn,
  .admin-section .btn-sm {
    padding: 5px 8px;
    font-size: 11px;
  }

  .table-actions {
    flex-wrap: wrap;
  }

  /* 超管提醒面板内联容器紧凑化 */
  #broadcast-tab [style*="padding: 20px"] {
    padding: 12px !important;
  }

  #broadcast-tab [style*="min-width: 250px"],
  #broadcast-tab [style*="min-width: 200px"] {
    min-width: 100% !important;
  }

  #broadcast-message-content {
    min-height: 60px !important;
    font-size: 13px !important;
  }

  #broadcast-room-select {
    font-size: 13px !important;
  }

  /* 房间编辑面板内联表单紧凑化 */
  .room-edit-detail-row [style*="min-width: 200px"] {
    min-width: 100% !important;
  }

  .room-edit-detail-row input,
  .room-edit-detail-row select {
    font-size: 13px !important;
  }

  .room-edit-detail-row [style*="padding:15px"] {
    padding: 10px !important;
  }
}

/* ========== 房间内反馈按钮 ========== */
.feedback-btn {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
  line-height: 1.3;
}

.feedback-btn:hover {
  background: rgba(124, 58, 237, 0.35);
  color: #fff;
}
/* 清空聊天按钮图标对齐 */
#clear-chat-btn .icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
  fill: currentColor;
  vertical-align: middle;
}

/* ========== Toast 通知 ========== */
.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  background: rgba(20, 20, 35, 0.95);
  border: 1px solid rgba(124, 58, 237, 0.5);
  border-radius: 10px;
  padding: 12px 20px;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  animation: toastSlideDown 0.3s ease-out, toastFadeOut 0.3s ease-in 2.2s forwards;
  max-width: 90vw;
  text-align: center;
  line-height: 1.5;
}

.toast-item.toast-success {
  border-color: rgba(34, 197, 94, 0.5);
  color: #dcfce7;
}

.toast-item.toast-warn {
  border-color: rgba(234, 179, 8, 0.5);
  color: #fef3c7;
}

.toast-item.toast-info {
  border-color: rgba(59, 130, 246, 0.5);
  color: #dbeafe;
}

@keyframes toastSlideDown {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes toastFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.9); }
}

/* ========== Confirm 确认弹窗 ========== */
.confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s;
}

.confirm-dialog {
  background: linear-gradient(135deg, #1e1e3a, #151528);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 14px;
  padding: 28px 32px 20px;
  min-width: 320px;
  max-width: 90vw;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(124, 58, 237, 0.15);
  animation: confirmPopIn 0.25s ease-out;
}

@keyframes confirmPopIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.confirm-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  text-align: center;
}

.confirm-message {
  font-size: 14px;
  color: #c8c8e0;
  line-height: 1.7;
  margin-bottom: 24px;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions button {
  flex: 1;
  max-width: 140px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #c0c0d0;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.confirm-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.confirm-ok-btn {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
}

.confirm-ok-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.confirm-ok-btn.confirm-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.confirm-ok-btn.confirm-warn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.confirm-ok-btn.confirm-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.confirm-ok-btn:active {
  transform: translateY(0);
}

/* ========== 反馈弹窗 ========== */
.feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.feedback-modal-content {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.feedback-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-modal-header h3 {
  font-size: 16px;
  color: #fff;
  margin: 0;
}

.feedback-modal-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.feedback-modal-close:hover {
  color: #fff;
}

.feedback-modal-body {
  padding: 20px;
}

.feedback-form-group {
  margin-bottom: 15px;
}

.feedback-form-group label {
  display: block;
  font-size: 13px;
  color: #d0d0e0;
  margin-bottom: 6px;
}

.feedback-form-group textarea,
.feedback-form-group input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
  resize: vertical;
  transition: all 0.3s;
}

.feedback-form-group textarea:focus,
.feedback-form-group input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

.feedback-form-group textarea::placeholder,
.feedback-form-group input::placeholder {
  color: #606070;
}

.feedback-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-modal-footer .btn {
  width: auto;
  padding: 8px 20px;
  font-size: 13px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.feedback-modal-footer .btn-primary {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
}

.feedback-modal-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ========== 使用须知 ========== */
.agreement-row {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.agreement-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #a0a0c0;
  cursor: pointer;
  user-select: none;
}

.agreement-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #7c3aed;
  cursor: pointer;
  flex-shrink: 0;
}

.terms-link {
  color: #7c3aed;
  text-decoration: underline;
  cursor: pointer;
}

.terms-link:hover {
  color: #a78bfa;
}

/* 使用须知弹窗 */
.terms-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.terms-modal-content {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  width: 90%;
  max-width: 550px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.terms-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.terms-modal-header h3 {
  font-size: 16px;
  color: #fff;
  margin: 0;
}

.terms-modal-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.terms-modal-close:hover {
  color: #fff;
}

.terms-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.terms-intro {
  font-size: 13px;
  color: #fbbf24;
  line-height: 1.6;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(251, 191, 36, 0.1);
  border-radius: 8px;
  border-left: 3px solid #fbbf24;
}

.terms-section {
  margin-bottom: 15px;
}

.terms-section h4 {
  font-size: 14px;
  color: #a78bfa;
  margin: 0 0 6px 0;
}

.terms-section p {
  font-size: 13px;
  color: #c0c0d0;
  line-height: 1.6;
  margin: 0;
}

.terms-modal-footer {
  display: flex;
  justify-content: center;
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.terms-modal-footer .btn {
  width: auto;
  padding: 10px 30px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  transition: all 0.3s;
}

.terms-modal-footer .btn:hover {
  opacity: 0.9;
}

/* ========== 📖 小说同屏阅读 ========== */

/* 小说阅读区域：复用视频播放区同位置，绝对定位铺满 */
.novel-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #1a1333;
  z-index: 6;
  overflow: hidden;
  border-radius: 0;
}

/* 小说头部：小说标题 + 章节信息 */
.novel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(124, 58, 237, 0.25);
  flex-shrink: 0;
}

/* 标题+章节信息 组合容器：占满剩余空间 */
.novel-title-area {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.novel-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #e0d8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.novel-chapter-info {
  font-size: 12px;
  color: #a098c8;
  white-space: nowrap;
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* 章节标题行：左侧目录正方形图标 + 居中标题 */
.novel-chapter-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(124, 58, 237, 0.3);
}

/* 目录按钮容器内定位：在最左侧 */
.novel-chapter-bar .novel-toc-btn-header {
  flex-shrink: 0;
  margin-right: 12px;
}

/* 标题保持居中：通过绝对定位让标题居中不受左侧按钮影响 */
.novel-chapter-bar .novel-chapter-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  /* 左侧有32+12=44px的按钮空间，用padding-right对称补偿，使标题真正居中 */
  padding-right: 44px;
}

/* 通用目录按钮：正方形图标按钮 */
.novel-toc-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.2) !important;
  border: 1px solid rgba(124, 58, 237, 0.4) !important;
  color: #c4b5fd !important;
  cursor: pointer !important;
  padding: 0 !important;
}
.novel-toc-btn:hover {
  background: rgba(124, 58, 237, 0.35) !important;
  color: #fff !important;
}

/* 章节栏目录按钮：正方形图标 */
.novel-toc-btn-header {
  width: 32px;
  height: 32px;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 6px !important;
}

/* 底部目录按钮：正方形图标（略小） */
.novel-toc-btn-footer {
  width: 28px;
  height: 28px;
  min-width: 28px !important;
  min-height: 28px !important;
  border-radius: 6px !important;
}

/* 通用正方形图标按钮基类（与现有btn体系兼容） */
.btn.btn-icon {
  line-height: 1;
}

/* 正文阅读区（可滚动） */
.novel-reader {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
  scroll-behavior: smooth;
}

.novel-chapter-title {
  font-size: 18px;
  font-weight: 700;
  color: #e9d5ff;
  margin-bottom: 16px;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(124, 58, 237, 0.3);
}

.novel-content {
  font-size: 15px;
  line-height: 1.9;
  color: #d8d0f0;
  text-align: justify;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* 阅读区滚动条美化 */
.novel-reader::-webkit-scrollbar {
  width: 8px;
}
.novel-reader::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.novel-reader::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 4px;
}
.novel-reader::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.6);
}

/* 小说底部：左 上一章 | 中间 目录图标+进度 | 右 下一章 */
.novel-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "prev center next";
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(124, 58, 237, 0.25);
  flex-shrink: 0;
}

/* 中间组合容器：目录图标按钮 + 章节进度文字 */
.novel-footer-center {
  grid-area: center;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: center;
}

.novel-prev-btn {
  grid-area: prev;
  justify-self: start;
  flex-shrink: 0;
  padding: 5px 12px !important;
  font-size: 12px !important;
  min-width: 80px;
  margin-top: 0;
  margin-bottom: 0;
}
.novel-next-btn {
  grid-area: next;
  justify-self: end;
  flex-shrink: 0;
  padding: 5px 12px !important;
  font-size: 12px !important;
  min-width: 80px;
  margin-top: 0;
  margin-bottom: 0;
}

.novel-prev-btn:disabled,
.novel-next-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
}

.novel-progress {
  font-size: 12px;
  color: #a098c8;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 章节目录侧边抽屉 */
.novel-toc-drawer {
  position: absolute;
  top: 48px;
  right: 0;
  height: calc(100% - 48px);
  width: 300px;
  max-width: 80%;
  background: rgba(20, 14, 40, 0.98);
  backdrop-filter: blur(8px);
  border-left: 1px solid rgba(124, 58, 237, 0.4);
  z-index: 20;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.6);
}

.novel-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.3);
  font-weight: 600;
  color: #e0d8ff;
  font-size: 14px;
  flex-shrink: 0;
}

.novel-toc-close-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #c0b8e0;
  width: 36px;
  height: 36px;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.novel-toc-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.novel-toc-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.novel-toc-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #c0b8e0;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.novel-toc-item:hover {
  background: rgba(124, 58, 237, 0.2);
  color: #fff;
}
.novel-toc-item.active {
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid #a78bfa;
  padding-left: 9px;
}

/* 侧边栏小说面板（novel-list-panel 内部分块） */
.novel-list-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

/* 小说面板内滚动条 */
.novel-list-panel::-webkit-scrollbar {
  width: 6px;
}
.novel-list-panel::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.35);
  border-radius: 3px;
}

/* 阅读模式跳转按钮 */
.novel-go-read-btn {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(6, 182, 212, 0.4)) !important;
  border: 1px solid rgba(124, 58, 237, 0.6) !important;
  color: #fff !important;
  transition: all 0.2s;
}
.novel-go-read-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* 小说列表（在 novel-info-box 内部） */
#novel-info-list::-webkit-scrollbar {
  width: 5px;
}
#novel-info-list::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 3px;
}
.novel-list-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  cursor: pointer;
  transition: background 0.15s;
  gap: 8px;
}
.novel-list-item:last-child {
  border-bottom: none;
}
.novel-list-item:hover {
  background: rgba(124, 58, 237, 0.12);
}
.novel-list-item.active {
  background: rgba(124, 58, 237, 0.25);
  border-left: 3px solid #a78bfa;
}
.novel-list-item-title {
  flex: 1;
  font-size: 13px;
  color: #e8e8ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.novel-list-item-meta {
  font-size: 11px;
  color: #808098;
  flex-shrink: 0;
}
.novel-list-item-delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}
.novel-list-item-delete:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}
.novel-list-item-delete:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* 采集结果内章节链接按钮样式（批量加载用） */
.novel-sniff-chapter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: #c0b8e0;
}
.novel-sniff-chapter-row:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #fff;
}

/* 移动端小说阅读响应式 */
@media (max-width: 768px) {
  .novel-header {
    padding: 8px 10px;
    gap: 8px;
  }
  .novel-title-area {
    gap: 6px;
    flex-direction: column;
    align-items: flex-start;
  }
  .novel-title {
    font-size: 13px;
  }
  .novel-chapter-info {
    display: none;
  }
  .novel-toc-btn-header {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }
  .novel-reader {
    padding: 14px 16px;
  }
  .novel-chapter-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .novel-content {
    font-size: 14px;
    line-height: 1.8;
  }
  .novel-footer {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    padding: 8px 10px;
    gap: 6px;
  }
  .novel-footer-center {
    gap: 6px;
  }
  .novel-prev-btn,
  .novel-next-btn {
    min-width: 64px;
    font-size: 11px !important;
    padding: 5px 8px !important;
  }
  .novel-progress {
    font-size: 11px;
    max-width: 40vw;
  }
  .novel-toc-drawer {
    width: 85%;
  }
}

/* ============================================================
   首页科技风格 · Home Page Tech Theme
   ============================================================ */

/* 背景：更有层次的深空渐变 + 动态极光 */
.home-page .bg-gradient {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 10%, rgba(6, 182, 212, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a18 0%, #0d0d24 40%, #0a0a1a 100%);
  animation: auroraShift 15s ease-in-out infinite alternate;
}

@keyframes auroraShift {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  100% { background-position: 100% 100%, 100% 50%, 50% 100%, 0% 0%; }
}

/* 科技网格背景 */
.home-page .tech-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.06) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px;
  animation: gridPulse 8s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* 扫描线效果 */
.home-page .scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.4), transparent);
  z-index: -1;
  animation: scanMove 6s linear infinite;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes scanMove {
  0%   { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

/* 粒子容器（浮动光点） */
.home-page .particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* 重写星星：更细腻的科技光点 */
.home-page .stars {
  background-image:
    radial-gradient(1px 1px at 25px 35px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 55px 85px, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 120px 50px, rgba(6,182,212,0.6), transparent),
    radial-gradient(2px 2px at 200px 130px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 280px 90px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 350px 175px, rgba(124,58,237,0.7), transparent),
    radial-gradient(1px 1px at 80px 160px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 310px 40px, rgba(6,182,212,0.5), transparent);
  background-size: 400px 250px;
  animation: twinkle 5s ease-in-out infinite;
}

/* 容器：更大更大气 */
.home-page .container {
  max-width: 560px;
  padding: 60px 24px 40px;
}

/* Header：更大间距 */
.home-page .header {
  margin-bottom: 48px;
}

/* Logo 包装器：带发光环 */
.home-page .logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* Logo 发光环：围绕标题的旋转光环 */
.home-page .logo-ring {
  position: absolute;
  width: 180px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0%,
    rgba(124, 58, 237, 0.6) 20%,
    rgba(6, 182, 212, 0.5) 40%,
    transparent 60%,
    rgba(236, 72, 153, 0.4) 80%,
    transparent 100%);
  filter: blur(8px);
  animation: ringRotate 8s linear infinite;
  z-index: -1;
  opacity: 0.7;
}

@keyframes ringRotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Logo 标题：渐变文字 + 发光 */
.home-page .logo {
  font-size: 58px;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa 0%, #22d3ee 50%, #ec4899 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: gradientShift 5s ease-in-out infinite;
  letter-spacing: 2px;
  margin-bottom: 0;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.home-page .logo-icon {
  font-size: 44px;
  margin-right: 14px;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.6));
}

.home-page .logo-text {
  position: relative;
}

/* 副标题：更亮更有科技感 */
.home-page .subtitle {
  color: #c5c5d6;
  font-size: 17px;
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

/* 副标题下方装饰线 + 英文科技文字 */
.home-page .subtitle-deco {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(6, 182, 212, 0.55);
  font-family: 'Courier New', monospace;
}

.home-page .subtitle-deco span {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.6), transparent);
  position: relative;
}

.home-page .subtitle-deco span::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 8px #7c3aed;
}

/* 主卡片：玻璃拟态 + HUD 风格 */
.home-page .main-card {
  position: relative;
  background: linear-gradient(145deg, rgba(20, 20, 42, 0.75) 0%, rgba(15, 15, 30, 0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.1),
    0 0 40px rgba(124, 58, 237, 0.15),
    0 8px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* 卡片背后的呼吸光晕 */
.home-page .card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.08), transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.06), transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: cardGlow 8s ease-in-out infinite;
}

@keyframes cardGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* HUD 四角装饰 */
.home-page .hud-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(124, 58, 237, 0.6);
  pointer-events: none;
  z-index: 2;
}

.home-page .hud-tl { top: 8px; left: 8px;  border-right: none; border-bottom: none; }
.home-page .hud-tr { top: 8px; right: 8px; border-left: none;  border-bottom: none; border-color: rgba(6, 182, 212, 0.6); }
.home-page .hud-bl { bottom: 8px; left: 8px;  border-right: none; border-top: none;   border-color: rgba(6, 182, 212, 0.6); }
.home-page .hud-br { bottom: 8px; right: 8px; border-left: none;  border-top: none; }

/* Tabs 增强 */
.home-page .tabs {
  background: rgba(10, 10, 25, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 28px;
  position: relative;
}

.home-page .tab-btn {
  color: #8a8aa0;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 10px;
  font-size: 14px;
  padding: 13px;
  position: relative;
  transition: all 0.35s ease;
}

.home-page .tab-btn:hover:not(.active) {
  color: #c5c5d6;
  background: rgba(124, 58, 237, 0.08);
}

.home-page .tab-btn.active {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 表单标签：科技蓝紫色 */
.home-page .form-group.inline-form-row label {
  color: #b8b8cc;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* 表单输入框：玻璃效果 + 聚焦发光 */
.home-page .form-group.inline-form-row input,
.home-page .form-group.inline-form-row select {
  background: rgba(10, 10, 25, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  color: #fff;
  padding: 13px 16px;
  transition: all 0.3s ease;
}

.home-page .form-group.inline-form-row input::placeholder {
  color: #5a5a70;
}

.home-page .form-group.inline-form-row input:focus,
.home-page .form-group.inline-form-row select:focus {
  border-color: #7c3aed;
  background: rgba(20, 15, 40, 0.8);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.3),
    0 0 20px rgba(124, 58, 237, 0.25),
    inset 0 0 10px rgba(124, 58, 237, 0.05);
}

/* 主按钮：霓虹发光 + 脉冲 */
.home-page .btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(124, 58, 237, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.35s ease;
  animation: btnGradient 4s ease-in-out infinite;
}

@keyframes btnGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.home-page .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 30px rgba(124, 58, 237, 0.55),
    0 0 40px rgba(6, 182, 212, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.home-page .btn-primary:active {
  transform: translateY(-1px);
}

/* 按钮前置图标 */
.home-page .btn-icon {
  margin-right: 6px;
  font-size: 12px;
  opacity: 0.9;
}

/* 协议勾选框：科技风 */
.home-page .agreement-row {
  margin-top: 20px;
}

.home-page .agreement-label {
  color: #8a8aa0;
}

.home-page .agreement-checkbox {
  accent-color: #7c3aed;
}

.home-page .terms-link {
  color: #22d3ee;
  text-decoration: none;
  transition: all 0.2s;
}

.home-page .terms-link:hover {
  color: #ec4899;
  text-shadow: 0 0 8px rgba(236, 72, 153, 0.5);
}

/* 提示框：科技信息卡风格 */
.home-page .tips {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-left: 3px solid #7c3aed;
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 24px;
  position: relative;
}

.home-page .tips p {
  color: #b8b8cc;
  font-size: 13px;
  line-height: 1.7;
}

.home-page .tips a {
  color: #22d3ee;
  text-decoration: none;
  border-bottom: 1px dashed rgba(34, 211, 238, 0.5);
  transition: all 0.2s;
}

.home-page .tips a:hover {
  color: #ec4899;
  border-bottom-color: #ec4899;
}

/* 强制销毁提示文字 适配 */
.home-page #force-expire-hint {
  color: #c5a3ff;
}

/* 页脚：分割线 + 科技文字 */
.home-page .footer {
  margin-top: 44px;
  position: relative;
  text-align: center;
}

.home-page .footer .site-desc {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 14px;
  padding: 0 16px;
}

.home-page .footer-line {
  width: 60%;
  height: 1px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.5), rgba(6, 182, 212, 0.5), transparent);
  position: relative;
}

.home-page .footer-line::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c3aed;
  box-shadow: 0 0 12px #7c3aed, 0 0 24px rgba(6, 182, 212, 0.5);
}

.home-page .footer p {
  color: #5a5a70;
  font-size: 12px;
  letter-spacing: 1px;
}

.home-page .beian-info {
  margin-top: 10px;
  font-size: 12px;
  color: #4b5563;
  letter-spacing: 0.5px;
}

.home-page .beian-info a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.home-page .beian-info a:hover {
  color: #7c3aed;
  text-decoration: underline;
}

/* 粒子 JS 生成的光点（动态） */
.home-page .particles .particle-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(124, 58, 237, 0.6);
  border-radius: 50%;
  animation: floatParticle linear infinite;
  pointer-events: none;
}

@keyframes floatParticle {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* 加载遮罩层也美化 */
.home-page .loading-overlay {
  background: rgba(10, 10, 25, 0.95);
  backdrop-filter: blur(8px);
}

.home-page .loading-spinner {
  border: 3px solid rgba(124, 58, 237, 0.15);
  border-top: 3px solid #7c3aed;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

/* 移动端适配 */
@media (max-width: 520px) {
  .home-page .container {
    padding: 40px 16px 30px;
  }
  .home-page .logo {
    font-size: 44px;
  }
  .home-page .logo-ring {
    width: 140px;
    height: 64px;
  }
  .home-page .main-card {
    padding: 26px 20px;
    border-radius: 20px;
  }
  .home-page .subtitle {
    font-size: 15px;
    letter-spacing: 2px;
  }
  .home-page .subtitle-deco span {
    width: 40px;
  }
  .home-page .hud-corner {
    width: 16px;
    height: 16px;
  }
  .home-page .header {
    margin-bottom: 36px;
  }
}

/* ========== 功能发布文章页样式 ========== */
.articles-page,
.article-detail-page {
  margin: 0;
  min-height: 100vh;
  color: #e5e7f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* 背景层由 .home-page 类复用首页 .bg-gradient / .stars / .tech-grid / .scanline 样式 */
/* 文章页 header 紧凑化：复用首页 logo 但减小间距 */
.articles-page .header,
.article-detail-page .header {
  margin-bottom: 32px;
}
/* LOGO/标题点击跳转首页 */
.articles-page .logo-link,
.article-detail-page .logo-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.articles-page .logo-link:hover .logo-text,
.article-detail-page .logo-link:hover .logo-text {
  opacity: 0.85;
}
/* 文章页 logo 图片尺寸（小于首页） */
.articles-page .site-logo-img,
.article-detail-page .site-logo-img {
  max-height: 40px;
  max-width: 40px;
}
.articles-page .home-page .logo,
.article-detail-page .home-page .logo {
  font-size: 42px;
}
.articles-page .logo-icon,
.article-detail-page .logo-icon {
  font-size: 32px;
}
.articles-page .logo-ring,
.article-detail-page .logo-ring {
  width: 140px;
  height: 60px;
}
.articles-page .articles-section-title {
  margin: 20px 0 6px;
  font-size: 22px;
  color: #fff;
  letter-spacing: 1px;
}

/* ===== 文章列表页 ===== */
.articles-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
.articles-subtitle {
  color: #a0a0c0;
  font-size: 14px;
  letter-spacing: 1px;
  margin-top: 4px;
}
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.article-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px 28px;
  transition: all 0.25s;
  cursor: pointer;
}
.article-card:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}
/* 整卡可点击的覆盖层 */
.article-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
}
.article-card-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
}
.article-card-summary {
  color: #b0b0cc;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 14px;
}
/* 底部行：阅读全文左 + 分类/日期右 */
.article-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.article-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #888;
}
.article-card-meta .article-category {
  color: #a78bfa;
  padding: 2px 10px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 12px;
  font-size: 12px;
}
.article-card-readmore {
  position: relative;
  z-index: 2;
  color: #7c3aed;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.article-card-readmore:hover {
  color: #a78bfa;
}
.articles-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
  font-size: 15px;
}
/* ===== 文章详情页 ===== */
.article-detail {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  position: relative;
  z-index: 1;
}
.article-detail-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #888;
  margin: 10px 0 28px;
}
.article-detail-meta .article-category {
  color: #a78bfa;
  padding: 2px 10px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 12px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}
.article-detail-meta .article-category:hover {
  background: rgba(124, 58, 237, 0.3);
  color: #c4b5fd;
}
.article-detail-title {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin: 12px 0 0;
  letter-spacing: 0.5px;
}
.article-detail-content {
  color: #d0d0e0;
  font-size: 15px;
  line-height: 1.8;
  word-break: break-word;
}
.article-detail-content h1,
.article-detail-content h2,
.article-detail-content h3 {
  color: #fff;
  margin: 24px 0 12px;
  font-weight: 600;
  line-height: 1.4;
}
.article-detail-content h1 { font-size: 24px; }
.article-detail-content h2 { font-size: 20px; }
.article-detail-content h3 { font-size: 17px; }
.article-detail-content p {
  margin: 14px 0;
}
.article-detail-content a {
  color: #a78bfa;
  text-decoration: underline;
}
.article-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}
.article-detail-content ul,
.article-detail-content ol {
  padding-left: 24px;
  margin: 14px 0;
}
.article-detail-content li {
  margin: 6px 0;
}
.article-detail-content code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #f0abfc;
}
.article-detail-content pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.article-detail-content pre code {
  background: transparent;
  padding: 0;
  color: #e5e7f0;
}
.article-detail-content blockquote {
  border-left: 3px solid #7c3aed;
  padding: 8px 16px;
  margin: 16px 0;
  color: #b0b0cc;
  background: rgba(124, 58, 237, 0.06);
}
.article-detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.article-detail-content th,
.article-detail-content td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  text-align: left;
}
.article-detail-content th {
  background: rgba(124, 58, 237, 0.15);
  color: #fff;
}

/* 上一篇/下一篇导航 */
.article-nav {
  display: flex;
  gap: 16px;
  margin: 40px 0 0;
}
.article-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-decoration: none;
  color: #d0d0e0;
  transition: all 0.25s;
  min-width: 0;
}
.article-nav-link:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.4);
}
.article-nav-link.article-nav-next {
  text-align: right;
}
.article-nav-link.article-nav-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
.article-nav-label {
  font-size: 12px;
  color: #a78bfa;
  letter-spacing: 1px;
}
.article-nav-title {
  font-size: 14px;
  color: #e5e7f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .article-nav {
    gap: 10px;
  }
  .article-nav-link {
    padding: 12px 14px;
  }
  .article-nav-title {
    font-size: 13px;
  }
}
.article-not-found {
  text-align: center;
  padding: 80px 20px;
  max-width: 600px;
  margin: 0 auto;
}
.article-not-found h1 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 16px;
}
.article-not-found a {
  color: #a78bfa;
  text-decoration: none;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .articles-container,
  .article-detail {
    padding: 24px 14px 60px;
  }
  .articles-page .logo,
  .article-detail-page .logo {
    font-size: 32px;
  }
  .articles-page .logo-icon,
  .article-detail-page .logo-icon {
    font-size: 26px;
  }
  .article-card {
    padding: 18px 20px;
  }
  .article-card-title {
    font-size: 17px;
  }
  .article-detail-title {
    font-size: 24px;
  }
  .article-detail-content {
    font-size: 14px;
  }
}

/* ========== 后台 Quill 富文本编辑器样式 ========== */
#article-content-editor {
  min-height: 320px;
}
#article-content-editor .ql-toolbar {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: rgba(0, 0, 0, 0.3);
}
#article-content-editor .ql-toolbar.ql-snow {
  padding: 10px 12px;
}
#article-content-editor .ql-container {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0 0 8px 8px;
  min-height: 280px;
  font-size: 14px;
}
#article-content-editor .ql-editor {
  min-height: 280px;
  color: #1a1a2e;
  line-height: 1.7;
}
#article-content-editor .ql-editor.ql-blank::before {
  color: #999;
  font-style: normal;
}
#article-content-editor .ql-snow .ql-picker {
  color: #555;
}
#article-content-editor .ql-snow .ql-stroke {
  stroke: #555;
}
#article-content-editor .ql-snow .ql-fill {
  fill: #555;
}
