/* 全局 CSS 设计系统 - 极致现代毛玻璃 (Glassmorphism) 暗黑美学 */

:root {
  /* 颜色定义系统 */
  --bg-main: #030712;
  --panel-bg: rgba(17, 24, 39, 0.35);
  --panel-border: rgba(255, 255, 255, 0.06);
  --panel-shadow: rgba(0, 0, 0, 0.4);
  
  --primary-glow: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
  --success-glow: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --danger-glow: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --glass-glow: rgba(255, 255, 255, 0.03);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --accent-color: #3b82f6;
  --accent-gradient: linear-gradient(90deg, #6366f1, #a855f7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   背景装饰大光圈 (Glow Balls)
   ========================================================================== */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

.bg-glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(0,0,0,0) 70%);
  top: -10%;
  left: -10%;
  animation: floatGlow 15s infinite alternate ease-in-out;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(0,0,0,0) 70%);
  bottom: -10%;
  right: -10%;
  animation: floatGlow 20s infinite alternate-reverse ease-in-out;
}

.bg-glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, rgba(0,0,0,0) 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.1); }
}

/* ==========================================================================
   页面主框架排版
   ========================================================================== */
.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* 头部 Banner */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 var(--panel-shadow);
}

.brand h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(120deg, #ffffff 30%, #a855f7 70%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.brand .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
}

/* 管理后台配置按钮 (默认设为隐藏，防止云端部署时闪现) */
.btn-config-trigger {
  display: none; 
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.btn-config-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2);
}

.btn-config-trigger svg {
  width: 18px;
  height: 18px;
  transition: transform 0.6s ease;
}

.btn-config-trigger:hover svg {
  transform: rotate(90deg);
}

/* 布局分布 */
.main-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  flex: 1;
}

@media (max-width: 968px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   侧边栏分组页签
   ========================================================================== */
.sidebar {
  position: sticky;
  top: 40px;
  height: fit-content;
}

.group-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 8px 32px 0 var(--panel-shadow);
}

/* 支持窄屏下的顶部横向滑动排版 */
@media (max-width: 968px) {
  .sidebar {
    position: relative;
    top: 0;
  }
  .group-nav {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px;
  }
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 10px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--glass-hover);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.nav-loading {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 10px 0;
}

/* ==========================================================================
   内容展示区域 & 卡片排版
   ========================================================================== */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.group-section {
  scroll-margin-top: 40px;
}

.group-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.group-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* 导航卡片 (Premium Glass Card) */
.card {
  position: relative;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 20px 0 var(--panel-shadow);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.1);
}

.card:hover::before {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(59, 130, 246, 0.3));
}

/* 卡片图标 */
.card-icon-wrapper {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.card:hover .card-icon-wrapper {
  transform: scale(1.08);
}

.card-icon-wrapper svg, .card-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 卡片文本 */
.card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Outfit', sans-serif;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 多 URL 标识点 */
.url-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 3px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}

.dot.active {
  background: #10b981;
  box-shadow: 0 0 5px #10b981;
}

/* ==========================================================================
   测速寻路过渡遮罩层 (Ping Loader)
   ========================================================================== */
.ping-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(15px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.ping-loader-card {
  width: 90%;
  max-width: 460px;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 35px 30px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ping-loader-overlay.active .ping-loader-card {
  transform: translateY(0);
}

/* 加载动画 */
.ping-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top-color: #3b82f6;
  border-bottom-color: #a855f7;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 1s infinite linear;
}

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

.ping-loader-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  margin-bottom: 24px;
  background: linear-gradient(90deg, #fff, #9ca3af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ping-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  text-align: left;
}

.ping-step-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.25s ease;
}

.ping-step-item.testing {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.ping-step-item.success {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.ping-step-item.failed {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.step-status-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.testing .step-status-tag { background: rgba(59, 130, 246, 0.2); }
.success .step-status-tag { background: rgba(16, 185, 129, 0.2); }
.failed .step-status-tag { background: rgba(239, 68, 68, 0.2); }

.ping-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.btn-cancel-ping {
  margin-top: 20px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.btn-cancel-ping:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.btn-cancel-ping:active {
  transform: translateY(0);
}

.ping-warning-banner {
  display: none; /* 默认隐藏，通过 JS 智能控制展现 */
  align-items: flex-start;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 22px;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #fcd34d;
  backdrop-filter: blur(10px);
}

.ping-warning-banner.active {
  display: flex;
}

.warning-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.warning-text strong {
  color: #fff;
  background: rgba(245, 158, 11, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ==========================================================================
   后台配置管理模态框 (Admin Modal)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-card {
  width: 92%;
  max-width: 960px;
  height: 85vh;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

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

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge {
  font-size: 0.7rem;
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* 密码验证屏 */
.auth-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 20px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.auth-tip {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.auth-form-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.auth-error-msg {
  color: #f43f5e;
  font-size: 0.85rem;
  display: none;
}

/* 后台主要配置 Tab 屏 */
.config-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 20px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 16px 20px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.25s;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: #fff;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--accent-gradient);
}

/* Tab 内容窗口 */
.modal-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* 通用表单控件 */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-group.col {
  flex: 1;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.required {
  color: #f43f5e;
}

.form-input, .form-select, textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: all 0.2s;
  outline: none;
  font-family: inherit;
}

.form-input:focus, .form-select:focus, textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
  background: rgba(0, 0, 0, 0.35);
}

.input-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 后台两栏交互样式 */
.group-editor-container, .card-editor-container {
  display: flex;
  gap: 28px;
}

@media (max-width: 768px) {
  .group-editor-container, .card-editor-container {
    flex-direction: column;
  }
}

.list-manager {
  flex: 1;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-manager h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.inline-select {
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.add-box-form {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 20px;
}

.add-box-form h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

/* 后台卡片/分组编辑列表项 */
.manage-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  transition: all 0.2s;
}

.manage-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* 拖动状态高级动效 */
.manage-item.dragging {
  opacity: 0.35;
  border: 1.5px dashed #3b82f6 !important;
  background: rgba(59, 130, 246, 0.06) !important;
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.drag-handle {
  cursor: grab;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
}

.drag-handle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

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

.item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.item-title {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-badge {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.item-actions {
  display: flex;
  gap: 6px;
}

/* 内置网格图标选择器 */
.icon-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.icon-selector-item {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  padding: 4px;
}

.icon-selector-item svg {
  width: 100%;
  height: 100%;
}

.icon-selector-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.icon-selector-item.selected {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.custom-icon-row {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 模态框底部 */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.footer-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a855f7;
}

.status-indicator.live {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse 2s infinite;
}

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

.status-text {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* 通用按钮系统 */
.btn {
  border: none;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }

.btn-secondary { background: rgba(255, 255, 255, 0.08); color: var(--text-primary); border: 1px solid rgba(255, 255, 255, 0.05); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }

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

.btn-icon {
  padding: 4px;
  border-radius: 4px;
}

.btn-large {
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
}

/* ==========================================================================
   极致奢华合规页脚备案区 (Footer beian)
   ========================================================================== */
.app-footer {
  margin-top: auto;
  padding: 40px 0 10px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.beian-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.beian-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.police-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.beian-link:hover .police-icon {
  transform: scale(1.15) rotate(5deg);
}

.copyright {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* ==========================================================================
   自定义右键科技感快捷路由菜单 (Custom Context Menu)
   ========================================================================== */
.custom-context-menu {
  position: absolute;
  display: none;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px;
  width: 320px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(168, 85, 247, 0.12);
  transform: scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

.custom-context-menu.active {
  display: block;
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.menu-header {
  padding: 6px 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c084fc; /* 紫色标题 */
  letter-spacing: 0.8px;
  font-family: 'Outfit', sans-serif;
}

.menu-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.01);
}

.menu-item-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.menu-item-label {
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.menu-item-url {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.3;
}

.menu-type-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-intranet {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-internet {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
