/* ========================================
   赛博霓虹风 — 公共样式
   ======================================== */

/* ---------- 全局重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- 全局容器 ---------- */
html, body {
  height: 100%;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0a0a1a;
  color: #e0e0ff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: #0a0a1a;
}

/* 容器动态渐变背景 */
.container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0, 240, 255, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 40%, rgba(179, 0, 255, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 0, 128, 0.015) 0%, transparent 50%);
  animation: bg-shift 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes bg-shift {
  0%   { transform: translateX(-50%) scale(1); opacity: 0.6; }
  100% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}

/* 页面扫描线 (极淡) */
.container::after {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 240, 255, 0.008) 3px,
    rgba(0, 240, 255, 0.008) 4px
  );
  pointer-events: none;
  z-index: 0;
  animation: page-scan 6s linear infinite;
}

@keyframes page-scan {
  0%   { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(4px); }
}

/* ---------- 毛刺文字动画 ---------- */
@keyframes glitch-text {
  0%   { transform: translate(0); }
  10%  { transform: translate(-2px, 1px) skewX(-1deg); }
  12%  { transform: translate(2px, -1px) skewX(1deg); }
  14%  { transform: translate(0); }
  100% { transform: translate(0); }
}

@keyframes glitch-slice {
  0%   { clip-path: inset(0); }
  8%   { clip-path: inset(40% 0 30% 0); }
  10%  { clip-path: inset(20% 0 60% 0); }
  12%  { clip-path: inset(0); }
  100% { clip-path: inset(0); }
}

.glitch-trigger {
  animation: glitch-text 0.3s ease-in-out, glitch-slice 0.3s ease-in-out;
  position: relative;
}

.glitch-trigger::before {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  color: #ff0080;
  opacity: 0.5;
  animation: glitch-text 0.3s ease-in-out;
  pointer-events: none;
  z-index: -1;
}

.glitch-trigger::after {
  content: attr(data-text);
  position: absolute;
  left: -2px;
  top: 0;
  color: #00f0ff;
  opacity: 0.5;
  animation: glitch-text 0.3s ease-in-out;
  pointer-events: none;
  z-index: -1;
}

/* ---------- 霓虹呼吸边框 ---------- */
@keyframes neon-breathe {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 240, 255, 0.08), 0 0 20px rgba(179, 0, 255, 0.04); }
  50%      { box-shadow: 0 0 20px rgba(0, 240, 255, 0.2), 0 0 40px rgba(179, 0, 255, 0.08); }
}

.neon-breathe {
  animation: neon-breathe 3s ease-in-out infinite;
}

/* ---------- 赛博网格 ---------- */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0%   { transform: translateX(-50%) perspective(400px) rotateX(2deg) translateY(0); }
  100% { transform: translateX(-50%) perspective(400px) rotateX(2deg) translateY(48px); }
}

/* ---------- 浮动数据粒子 ---------- */
.cyber-particle {
  position: fixed;
  width: 2px;
  height: 2px;
  background: #00f0ff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  box-shadow: 0 0 4px #00f0ff, 0 0 8px rgba(0, 240, 255, 0.3);
  animation: particle-float linear infinite;
  opacity: 0;
}

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

/* 确保内容在背景之上 */
.main-content {
  position: relative;
  z-index: 1;
}

/* ---------- 状态栏 .status-bar ---------- */
.status-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  z-index: 1000;
  font-size: 11px;
  color: #00f0ff;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.status-bar .time {
  font-weight: 600;
  letter-spacing: 1px;
}

.status-bar .icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status-bar .icons i {
  font-size: 14px;
  color: #00f0ff;
  opacity: 0.8;
  line-height: 1;
}

/* ---------- 顶部导航 .app-header ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(179, 0, 255, 0.25);
  z-index: 999;
}

.app-header .logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e0e0ff;
}
.app-header .logo img {
  height: 28px;
  width: auto;
  display: block;
}
.app-header .logo span {
  background: linear-gradient(135deg, #00f0ff, #b300ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-header .actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.app-header .actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #a0a0d0;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-header .actions button:hover,
.app-header .actions button:active {
  color: #00f0ff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
}

.app-header .actions button i {
  font-size: 22px;
  color: currentColor;
  display: inline-block;
  line-height: 1;
}

/* ---------- 主内容区 .main-content ---------- */
.main-content {
  padding-bottom: 80px; /* 底部导航高度 */
  min-height: 100vh;
}

/* 有顶部导航时内容区下移 */
header.app-header + .main-content {
  padding-top: 52px;
}

/* ---------- 底部导航 .bottom-nav ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  z-index: 1000;
  padding: 6px 0;
}

.bottom-nav .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  color: #606090;
  font-size: 10px;
  transition: all 0.3s;
  position: relative;
  min-width: 52px;
}

.bottom-nav .tab:active {
  transform: translateY(-2px);
  color: #8080c0;
}

.bottom-nav .tab i {
  font-size: 22px;
  color: currentColor;
  display: inline-block;
  line-height: 1;
  transition: all 0.3s;
}

.bottom-nav .tab span {
  font-size: 10px;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.bottom-nav .tab.active {
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.bottom-nav .tab.active i {
  color: #00f0ff;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
}

.bottom-nav .tab.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: #00f0ff;
  box-shadow: 0 0 8px #00f0ff;
  border-radius: 0 0 4px 4px;
}

/* 中心按钮凸起 */
.bottom-nav .tab.central {
  position: relative;
  top: -12px;
}

.bottom-nav .tab.central i {
  font-size: 32px;
  filter: drop-shadow(0 0 12px rgba(179, 0, 255, 0.6));
}

.bottom-nav .tab.central span {
  color: #b300ff;
}

.bottom-nav .tab.central.active i {
  color: #b300ff;
  filter: drop-shadow(0 0 16px rgba(179, 0, 255, 0.8));
}

.bottom-nav .tab.central.active span {
  color: #b300ff;
  text-shadow: 0 0 10px rgba(179, 0, 255, 0.6);
}

/* ---------- Toast 提示 ---------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(10, 10, 26, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2), inset 0 0 20px rgba(0, 240, 255, 0.05);
  padding: 14px 28px;
  border-radius: 12px;
  color: #e0e0ff;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  max-width: 320px;
  width: fit-content;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.6);
}

/* ---------- 选中样式 ---------- */
::selection {
  background: rgba(179, 0, 255, 0.4);
  color: #fff;
}

/* ---------- 协议弹窗 ---------- */
.agree-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.agree-modal {
  background: #12122a;
  border: 1px solid rgba(0,240,255,0.25);
  border-radius: 14px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 30px rgba(0,240,255,0.12);
}
.agree-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.agree-head h3 {
  margin: 0;
  font-size: 16px;
  color: #00f0ff;
}
.agree-close {
  background: none;
  border: none;
  color: #8080b0;
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
}
.agree-close:hover { color: #fff; }
.agree-body {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #c0c0e0;
}
.agree-foot {
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.agree-btn {
  background: linear-gradient(135deg,#00f0ff,#b300ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 8px 28px;
  cursor: pointer;
}

/* ---------- 安全设置弹窗表单 ---------- */
.sec-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sec-modal {
  background: #12122a;
  border: 1px solid rgba(0,240,255,0.25);
  border-radius: 14px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 0 30px rgba(0,240,255,0.12);
}
.sec-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sec-modal-head h3 {
  margin: 0;
  font-size: 16px;
  color: #00f0ff;
}
.sec-modal-close {
  background: none;
  border: none;
  color: #8080b0;
  font-size: 18px;
  cursor: pointer;
  padding: 2px;
}
.sec-modal-close:hover { color: #fff; }
.sec-modal-body {
  padding: 16px 18px;
}
.sec-modal-group {
  margin-bottom: 14px;
}
.sec-modal-group label {
  display: block;
  font-size: 12px;
  color: #8080b0;
  margin-bottom: 4px;
}
.sec-modal-input-wrap {
  display: flex;
  gap: 8px;
}
.sec-modal-input-wrap input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.sec-modal-input-wrap input:focus {
  border-color: #00f0ff;
  box-shadow: 0 0 8px rgba(0,240,255,0.15);
}
.sec-modal-send {
  background: linear-gradient(135deg, #00f0ff, #b300ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  padding: 0 12px;
  white-space: nowrap;
  cursor: pointer;
}
.sec-modal-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sec-modal-foot {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sec-modal-cancel {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #8080b0;
  font-size: 14px;
  padding: 10px;
  cursor: pointer;
}
.sec-modal-confirm {
  flex: 1;
  background: linear-gradient(135deg, #00f0ff, #b300ff);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 10px;
  cursor: pointer;
}
.sec-modal-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 加载提示 ---------- */
.loading-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 0;
  color: #606090;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.loading-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00f0ff;
  box-shadow: 0 0 8px rgba(0,240,255,0.5);
  animation: loading-pulse 1.2s ease-in-out infinite;
}
@keyframes loading-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

/* ---------- 紧急通知弹窗 ---------- */
.urgent-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ufade-in 0.3s ease;
}
.urgent-modal {
  background: #1a0a0a;
  border: 1px solid rgba(255, 0, 128, 0.3);
  border-radius: 16px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 0 40px rgba(255, 0, 128, 0.15);
}
.urgent-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.urgent-head i {
  font-size: 22px;
}
.urgent-head h3 {
  margin: 0;
  font-size: 16px;
  color: #ff0080;
}
.urgent-body {
  padding: 18px;
  font-size: 14px;
  color: #c0c0e0;
  line-height: 1.7;
}
.urgent-time {
  display: block;
  font-size: 11px;
  color: #606090;
  margin-top: 8px;
}
.urgent-foot {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.urgent-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff0080, #b300ff);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}
.urgent-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.3);
}
@keyframes ufade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
