/**
 * 尘渊文化 - MUI Design System + 深色主题
 * 基于Material Design 3的深色模式
 */

/* ========== 设计令牌 - 深色主题 ========== */
:root {
  /* 主色调 */
  --md-sys-color-primary: #90caf9;
  --md-sys-color-on-primary: #003258;
  --md-sys-color-primary-container: #104a75;
  --md-sys-color-on-primary-container: #cfe5ff;
  
  /* 次要色调 */
  --md-sys-color-secondary: #bac8dc;
  --md-sys-color-on-secondary: #243140;
  --md-sys-color-secondary-container: #3b4857;
  --md-sys-color-on-secondary-container: #d6e4f7;
  
  /* 第三色调 */
  --md-sys-color-tertiary: #d6bee0;
  --md-sys-color-on-tertiary: #3b2947;
  --md-sys-color-tertiary-container: #523f5e;
  --md-sys-color-on-tertiary-container: #f2daff;
  
  /* 错误色调 */
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;
  
  /* 表面色调 - 纯黑基底 */
  --md-sys-color-surface: #0a0a0a;
  --md-sys-color-surface-dim: #0a0a0a;
  --md-sys-color-surface-bright: #2f2f2f;
  --md-sys-color-surface-variant: #1f1f1f;
  --md-sys-color-surface-container-lowest: #000000;
  --md-sys-color-surface-container-low: #0a0a0a;
  --md-sys-color-surface-container: #121212;
  --md-sys-color-surface-container-high: #1c1c1c;
  --md-sys-color-surface-container-highest: #262626;
  
  /* 文字颜色 */
  --md-sys-color-on-surface: #e4e4e4;
  --md-sys-color-on-surface-variant: #a0a0a0;
  --md-sys-color-outline: #444444;
  --md-sys-color-outline-variant: #2a2a2a;
  
  /* 反色 */
  --md-sys-color-inverse-surface: #e4e4e4;
  --md-sys-color-inverse-on-surface: #1a1a1a;
  --md-sys-color-inverse-primary: #2c5fa3;
  
  /* 阴影 */
  --md-sys-color-shadow: #000000;
  --md-sys-color-scrim: #000000;
  
  /* 传统变量映射 */
  --primary: var(--md-sys-color-primary);
  --primary-dark: #5d99c6;
  --primary-light: #c3fdff;
  --secondary: var(--md-sys-color-secondary);
  --accent: var(--md-sys-color-tertiary);
  --dark: var(--md-sys-color-surface);
  --dark-light: var(--md-sys-color-surface-container-high);
  --gray: var(--md-sys-color-on-surface-variant);
  --gray-light: #666666;
  --light: var(--md-sys-color-on-surface);
  --white: #ffffff;
  
  /* 渐变 */
  --gradient-1: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --gradient-2: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  --gradient-accent: linear-gradient(135deg, #90caf9 0%, #64b5f6 50%, #42a5f5 100%);
  
  /* 阴影 - Material Design 3 */
  --shadow-1: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-2: 0 3px 6px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.24);
  --shadow-3: 0 10px 20px rgba(0,0,0,0.4), 0 6px 6px rgba(0,0,0,0.23);
  --shadow-4: 0 14px 28px rgba(0,0,0,0.4), 0 10px 10px rgba(0,0,0,0.22);
  --shadow-5: 0 19px 38px rgba(0,0,0,0.4), 0 15px 12px rgba(0,0,0,0.22);
  
  /* 圆角 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 28px;
  --radius-full: 50%;
}

/* ========== 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== MUI AppBar 导航栏 ========== */
.mui-appbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  z-index: 1100;
  display: flex;
  align-items: center;
  padding: 0 24px;
  transition: all 0.3s ease;
}

.mui-appbar.scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: var(--shadow-2);
}

.mui-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.mui-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
}

.mui-brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--shadow-1);
}

.mui-brand-text {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.mui-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mui-nav-item {
  position: relative;
  padding: 8px 16px;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mui-nav-item:hover {
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface-container-high);
}

.mui-nav-item.active {
  color: var(--md-sys-color-primary);
  background: var(--md-sys-color-surface-container);
}

.mui-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--md-sys-color-primary);
  border-radius: 2px;
}

/* ========== MUI Button 组件 ========== */
.mui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.mui-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.mui-btn:hover::before {
  left: 100%;
}

.mui-btn-filled {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--shadow-1);
}

.mui-btn-filled:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.mui-btn-outlined {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 1px solid var(--md-sys-color-outline);
}

.mui-btn-outlined:hover {
  background: rgba(144, 202, 249, 0.08);
  border-color: var(--md-sys-color-primary);
}

.mui-btn-text {
  background: transparent;
  color: var(--md-sys-color-primary);
  padding: 10px 16px;
}

.mui-btn-text:hover {
  background: rgba(144, 202, 249, 0.08);
}

/* ========== MUI Card 组件 ========== */
.mui-card {
  background: var(--md-sys-color-surface-container);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mui-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(144, 202, 249, 0.3), transparent);
}

.mui-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-3);
  border-color: var(--md-sys-color-outline);
}

.mui-card-elevated {
  background: var(--md-sys-color-surface-container-high);
  box-shadow: var(--shadow-2);
  border: none;
}

.mui-card-outlined {
  background: transparent;
  border: 1px solid var(--md-sys-color-outline);
}

/* ========== MUI Paper 表面 ========== */
.mui-paper {
  background: var(--md-sys-color-surface-container);
  border-radius: var(--radius-md);
  padding: 16px;
}

.mui-paper-elevation-1 { box-shadow: var(--shadow-1); }
.mui-paper-elevation-2 { box-shadow: var(--shadow-2); }
.mui-paper-elevation-3 { box-shadow: var(--shadow-3); }
.mui-paper-elevation-4 { box-shadow: var(--shadow-4); }
.mui-paper-elevation-5 { box-shadow: var(--shadow-5); }

/* ========== Chip 组件 ========== */
.mui-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  border: 1px solid var(--md-sys-color-outline-variant);
  transition: all 0.2s ease;
}

.mui-chip:hover {
  background: var(--md-sys-color-surface-container-highest);
  border-color: var(--md-sys-color-outline);
}

.mui-chip-filled {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: none;
}

.mui-chip-outlined {
  background: transparent;
  border: 1px solid var(--md-sys-color-outline);
}

/* ========== Typography 排版 ========== */
.mui-typography {
  margin: 0;
  color: var(--md-sys-color-on-surface);
}

.mui-headline-large {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.mui-headline-medium {
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.3;
}

.mui-headline-small {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.4;
}

.mui-title-large {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.4;
}

.mui-title-medium {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.15px;
}

.mui-title-small {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.1px;
}

.mui-body-large {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.5px;
  color: var(--md-sys-color-on-surface-variant);
}

.mui-body-medium {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.25px;
}

.mui-label-large {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1px;
  text-transform: uppercase;
}

/* ========== Grid 布局 ========== */
.mui-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.mui-grid {
  display: grid;
  gap: 24px;
}

.mui-grid-2 { grid-template-columns: repeat(2, 1fr); }
.mui-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mui-grid-4 { grid-template-columns: repeat(4, 1fr); }
.mui-grid-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

@media (max-width: 1024px) {
  .mui-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .mui-grid-2,
  .mui-grid-3,
  .mui-grid-4 { grid-template-columns: 1fr; }
  
  .mui-appbar {
    padding: 0 16px;
    height: 56px;
  }
  
  .mui-brand-text {
    font-size: 1.25rem;
  }
  
  .mui-nav {
    display: none;
  }
}

/* ========== 分隔线 ========== */
.mui-divider {
  height: 1px;
  background: var(--md-sys-color-outline-variant);
  margin: 24px 0;
}

/* ========== 列表 ========== */
.mui-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mui-list-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  cursor: pointer;
}

.mui-list-item:hover {
  background: var(--md-sys-color-surface-container-high);
}

/* ========== 动画效果 ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

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

.mui-animate-fade {
  animation: fadeIn 0.6s ease-out forwards;
}

.mui-animate-slide {
  animation: slideIn 0.4s ease-out forwards;
}

/* ========== Section Tag ========== */
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

/* ========== 工具类 ========== */
.mui-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mui-text-center { text-align: center; }
.mui-text-left { text-align: left; }
.mui-text-right { text-align: right; }

.mui-mt-1 { margin-top: 8px; }
.mui-mt-2 { margin-top: 16px; }
.mui-mt-3 { margin-top: 24px; }
.mui-mt-4 { margin-top: 32px; }

.mui-mb-1 { margin-bottom: 8px; }
.mui-mb-2 { margin-bottom: 16px; }
.mui-mb-3 { margin-bottom: 24px; }
.mui-mb-4 { margin-bottom: 32px; }

.mui-gap-1 { gap: 8px; }
.mui-gap-2 { gap: 16px; }
.mui-gap-3 { gap: 24px; }

.mui-flex { display: flex; }
.mui-flex-col { flex-direction: column; }
.mui-items-center { align-items: center; }
.mui-justify-center { justify-content: center; }
.mui-justify-between { justify-content: space-between; }
.mui-flex-wrap { flex-wrap: wrap; }
