/* ==================== 华夏笔记 - 赛博朋克主题样式 ==================== */
/* 版本: 1.0 */
/* 描述: 赛博朋克未来超科技感主题 - 公共样式 */

/* ==================== CSS变量定义 ==================== */
:root {
  /* 背景色系 - 深渊层级 */
  --void-black: #050508;
  --deep-space: #0a0a12;
  --night-purple: #0d0d1a;
  --stealth-gray: #12121f;
  --mech-blue: #16162a;
  
  /* 霓虹主色系 - 能量脉冲 */
  --neon-blue: #00f0ff;
  --neon-purple: #b829ff;
  --neon-pink: #ff00aa;
  --neon-green: #00ff88;
  --neon-yellow: #ffcc00;
  
  /* 功能色系 - 语义界面 */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-disabled: rgba(255, 255, 255, 0.3);
  --divider: rgba(255, 255, 255, 0.1);
  --border-color: rgba(0, 240, 255, 0.3);
  
  /* 字体系统 */
  --font-display: 'Orbitron', 'Black Ops One', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
  
  /* 间距系统 - 8px网格 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  
  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ==================== 基础重置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--deep-space);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==================== 页面容器 ==================== */
.app-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--void-black) 0%, var(--deep-space) 100%);
  position: relative;
  overflow: hidden;
}

/* ==================== 背景动画效果 ==================== */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* ==================== 头部区域 ==================== */
.page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--void-black) 0%, rgba(10, 10, 18, 0.95) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  padding: var(--space-4) var(--space-4);
}

.header-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

/* ==================== 内容区域 ==================== */
.page-content {
  position: relative;
  z-index: 1;
  padding: var(--space-4);
  padding-bottom: 80px;
  min-height: calc(100vh - 60px);
}

/* ==================== 卡片组件 ==================== */
.card {
  background: rgba(18, 18, 31, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 
    0 8px 20px rgba(0, 240, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue), #00c8d4);
  color: var(--void-black);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5), 0 0 60px rgba(0, 240, 255, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: var(--neon-blue);
}

.btn-secondary:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--neon-blue);
}

.btn-danger {
  background: linear-gradient(135deg, var(--neon-pink), #d40088);
  color: var(--text-primary);
  box-shadow: 0 0 20px rgba(255, 0, 170, 0.3);
}

.btn-block {
  width: 100%;
}

/* ==================== 输入框组件 ==================== */
.input-group {
  margin-bottom: var(--space-4);
}

.input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin-bottom: var(--space-2);
}

.input-field {
  width: 100%;
  background: rgba(13, 13, 26, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 
    0 0 10px rgba(0, 240, 255, 0.3),
    inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.input-field::placeholder {
  color: var(--text-muted);
}

/* ==================== 底部导航 ==================== */
.bottom-tab {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(10, 10, 18, 0.9) 0%, var(--void-black) 100%);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 240, 255, 0.1);
  display: flex;
  justify-content: space-around;
  padding: var(--space-2) 0;
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  z-index: 1000;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-2);
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-muted);
}

.tab-item.active {
  color: var(--neon-blue);
}

.tab-item:hover {
  color: var(--text-secondary);
}

.tab-icon {
  font-size: 24px;
  line-height: 1;
}

.tab-label {
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ==================== 列表组件 ==================== */
.list-item {
  background: rgba(18, 18, 31, 0.8);
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.list-item:hover {
  border-color: rgba(0, 240, 255, 0.3);
  background: rgba(18, 18, 31, 0.95);
}

.item-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.item-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-3);
}

/* ==================== 浮动按钮 ==================== */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), #00c8d4);
  border: none;
  color: var(--void-black);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 
    0 4px 12px rgba(0, 240, 255, 0.4),
    0 0 20px rgba(0, 240, 255, 0.3);
  transition: all 0.3s ease;
  z-index: 100;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 
    0 6px 20px rgba(0, 240, 255, 0.5),
    0 0 40px rgba(0, 240, 255, 0.4);
}

/* ==================== 发光效果类 ==================== */
.glow-text {
  text-shadow: 
    0 0 5px rgba(0, 240, 255, 0.8),
    0 0 10px rgba(0, 240, 255, 0.5),
    0 0 20px rgba(0, 240, 255, 0.3);
}

.glow-border {
  box-shadow: 
    0 0 5px rgba(0, 240, 255, 0.5),
    0 0 20px rgba(0, 240, 255, 0.3),
    0 0 40px rgba(0, 240, 255, 0.1);
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }

.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

/* ==================== 滚动条隐藏工具类 ==================== */
/**
 * 多浏览器兼容的滚动条隐藏方案
 * 支持: Chrome/Safari/Edge/Firefox/IE
 * 使用方式: 给需要隐藏滚动条的元素添加 .hide-scrollbar 类
 */
.hide-scrollbar {
  /* Firefox */
  scrollbar-width: none;
  /* IE/Edge旧版 */
  -ms-overflow-style: none;
}

/* WebKit内核 (Chrome/Safari/Edge新版) */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* 横向滚动条隐藏 */
.hide-scrollbar-x {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar-x::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* 纵向滚动条隐藏 */
.hide-scrollbar-y {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar-y::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ==================== 加载动画 ==================== */
.loading {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-top-color: var(--neon-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== 响应式 ==================== */
@media (max-width: 480px) {
  .app-container {
    max-width: 100%;
  }
  
  .page-content {
    padding: var(--space-3);
  }
  
  .header-title {
    font-size: 20px;
  }
}
