/* common.css - CAPINFO-TECH Web 版全局科技风主题 */
/* 由小程序 app.wxss 转换而来，rpx ÷ 2 → px（375px 移动端基准） */

:root {
  --bg-deep: #0a0e27;
  --bg-card: rgba(20, 30, 60, 0.6);
  --bg-card-solid: #131a3a;
  --neon-cyan: #00f0ff;
  --neon-blue: #2d6cff;
  --neon-purple: #9d6bff;
  --neon-green: #00ffa3;
  --text-main: #e8ecff;
  --text-sub: #8b9ac8;
  --border-glow: rgba(0, 240, 255, 0.35);
  --gradient-tech: linear-gradient(135deg, #00f0ff 0%, #2d6cff 50%, #9d6bff 100%);
  --gradient-danger: linear-gradient(135deg, #ff4d6d 0%, #ff8a3d 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* 全局动态网格背景 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

/* 流动光斑 */
body::after {
  content: '';
  position: fixed;
  top: -20%; left: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(45, 108, 255, 0.18) 0%, transparent 70%);
  filter: blur(40px);
  animation: blobFloat 15s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30%, 20%) scale(1.2); }
}

/* 通用容器 */
.container {
  position: relative;
  z-index: 1;
  padding: 15px;
  min-height: 100vh;
  box-sizing: border-box;
  max-width: 480px;
  margin: 0 auto;
}

/* 科技风卡片 */
.tech-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
/* 卡片顶部扫描线动效 */
.tech-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 1px;
  background: var(--gradient-tech);
  animation: scanLine 3s ease-in-out infinite;
}
@keyframes scanLine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}
/* 卡片角标装饰 */
.tech-card .corner {
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--neon-cyan);
}
.tech-card .corner.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.tech-card .corner.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.tech-card .corner.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.tech-card .corner.br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

/* 标题样式 */
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--gradient-tech);
  border-radius: 2px;
  margin-right: 8px;
  box-shadow: 0 0 6px var(--neon-cyan);
  flex-shrink: 0;
}

/* 科技风按钮 */
.tech-btn {
  background: var(--gradient-tech);
  color: #0a0e27;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 25px;
  padding: 12px 0;
  text-align: center;
  letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.4);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  display: block;
}
.tech-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 240, 255, 0.3);
}

/* 次要按钮（描边风格） */
.tech-btn-outline {
  background: transparent;
  color: var(--neon-cyan);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--neon-cyan);
  border-radius: 25px;
  padding: 11px 0;
  text-align: center;
  letter-spacing: 2px;
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.1);
  transition: all 0.3s;
  cursor: pointer;
  width: 100%;
  display: block;
}
.tech-btn-outline:active { background: rgba(0, 240, 255, 0.1); }

/* 标签 */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.tag-important { background: rgba(255, 77, 109, 0.2); color: #ff8a9d; border: 1px solid rgba(255, 77, 109, 0.4); }
.tag-normal { background: rgba(0, 255, 163, 0.15); color: var(--neon-green); border: 1px solid rgba(0, 255, 163, 0.3); }
.tag-warn { background: rgba(255, 138, 61, 0.2); color: #ffb380; border: 1px solid rgba(255, 138, 61, 0.4); }

/* 表单 */
.form-group { margin-bottom: 16px; position: relative; }
.form-label {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 6px;
  letter-spacing: 1px;
}
.form-input {
  width: 100%;
  height: 42px;
  background: rgba(10, 14, 39, 0.5);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--text-main);
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: all 0.3s;
}
.form-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

/* 网格菜单 */
.grid-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 文字辅助类 */
.text-sub { color: var(--text-sub); font-size: 12px; }
.text-main { color: var(--text-main); }
.text-cyan { color: var(--neon-cyan); }
.text-green { color: var(--neon-green); }
.text-danger { color: #ff8a9d; }

/* 渐入动画 */
.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 0;
  color: var(--text-sub);
  font-size: 14px;
}

/* 顶部导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  background: rgba(10, 14, 39, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-glow);
  max-width: 480px;
  margin: 0 auto;
}
.navbar-back {
  font-size: 28px;
  color: var(--neon-cyan);
  line-height: 1;
  padding: 0 8px;
  cursor: pointer;
  user-select: none;
}
.navbar-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 1px;
  margin-right: 36px;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(10, 14, 39, 0.95);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--border-glow);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
  max-width: 80%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.toast.success { border-color: var(--neon-green); box-shadow: 0 0 20px rgba(0, 255, 163, 0.3); }
.toast.error { border-color: #ff4d6d; box-shadow: 0 0 20px rgba(255, 77, 109, 0.3); }

/* Loading */
.loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 39, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.loading-wrap {
  background: rgba(10, 14, 39, 0.95);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.3);
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 240, 255, 0.2);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 13px;
  color: var(--text-sub);
  letter-spacing: 1px;
}

/* Modal */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}
.modal-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--neon-cyan);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.modal-body {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 18px;
  white-space: pre-line;
  word-break: break-word;
  max-height: 50vh;
  overflow-y: auto;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions .tech-btn,
.modal-actions .tech-btn-outline {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
}
