@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* 基础色彩体系 / Base Colors */
  --color-bg-deep: #0D0D12;
  --color-bg-panel: rgba(20, 20, 28, 0.7);
  --color-bg-card: rgba(25, 25, 35, 0.6);
  --color-bg-hover: rgba(0, 240, 255, 0.1);
  --color-bg-active: rgba(0, 240, 255, 0.2);

  /* 主交互色 / Brand Colors */
  --color-electric-blue: #00F0FF;
  --color-cyber-purple: #BD00FF;
  --color-neon-blue: #0088FF;

  /* 状态色 / Status Colors */
  --color-success: #00E676;
  /* 翠绿 */
  --color-warning: #FFAB00;
  /* 琥珀 */
  --color-danger: #FF3D00;
  /* 深红 */
  --color-info: #00B0FF;

  /* 文字颜色 / Text Colors */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: rgba(255, 255, 255, 0.7);
  --color-text-muted: rgba(255, 255, 255, 0.45);
  --color-text-inverse: #0D0D12;

  /* 边框颜色 / Border Colors */
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-light: rgba(255, 255, 255, 0.15);
  --color-border-glow: rgba(0, 240, 255, 0.5);

  /* 发光效果 / Glow Effects */
  --glow-blue: 0 0 10px rgba(0, 240, 255, 0.4), 0 0 20px rgba(0, 240, 255, 0.2);
  --glow-purple: 0 0 10px rgba(189, 0, 255, 0.4), 0 0 20px rgba(189, 0, 255, 0.2);
  --glow-danger: 0 0 10px rgba(255, 61, 0, 0.4);
  --glow-success: 0 0 10px rgba(0, 230, 118, 0.4);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* 间距与尺寸 / Spacing & Sizing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  /* 圆角 / Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-round: 9999px;

  /* 字体排版 / Typography */
  --font-family-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-heading: 'Outfit', var(--font-family-base);

  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;

  /* 动画过渡 / Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background-color: var(--color-bg-deep);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(189, 0, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
}

a {
  color: var(--color-electric-blue);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  text-shadow: var(--glow-blue);
}

ul {
  list-style: none;
}

/* 玻璃拟态卡片 / Glassmorphism Card */
.glass-panel {
  background: var(--color-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* 带有发光边缘的卡片悬停效果 */
.glass-panel.interactive:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: var(--shadow-card), inset 0 0 20px rgba(0, 240, 255, 0.05);
  transform: translateY(-2px);
  transition: all var(--transition-normal);
}

/* 发光按钮 / Neon Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-2);
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  outline: none;
  gap: var(--space-1);
}

.btn-primary {
  background: linear-gradient(90deg, var(--color-neon-blue), var(--color-electric-blue));
  color: var(--color-bg-deep);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--color-electric-blue);
  border: 1px solid var(--color-electric-blue);
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0), 0 0 10px rgba(0, 240, 255, 0);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.2), 0 0 10px rgba(0, 240, 255, 0.2);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.btn-danger:hover {
  background: rgba(255, 61, 0, 0.1);
  box-shadow: var(--glow-danger);
}

/* 磨砂玻璃输入框 / Input Fields */
.input-control {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-primary);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-2);
  height: 36px;
  font-size: var(--font-size-sm);
  font-family: var(--font-family-base);
  transition: all var(--transition-fast);
  width: 100%;
}

.input-control:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.input-control:focus {
  outline: none;
  border-color: var(--color-electric-blue);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.2), inset 0 0 5px rgba(0, 240, 255, 0.1);
}

.input-control::placeholder {
  color: var(--color-text-muted);
}

/* 霓虹开关 / Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  transition: var(--transition-bounce);
  border-radius: var(--radius-round);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--color-text-secondary);
  transition: var(--transition-bounce);
  border-radius: 50%;
}

.toggle-input:checked+.toggle-slider {
  background-color: rgba(0, 240, 255, 0.2);
  border-color: var(--color-electric-blue);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.toggle-input:checked+.toggle-slider:before {
  transform: translateX(20px);
  background-color: var(--color-electric-blue);
  box-shadow: var(--glow-blue);
}

/* 布局原子类 / Layout Utility */
.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.flex-1 {
  flex: 1;
}

.text-gradient {
  background: linear-gradient(90deg, var(--color-electric-blue), var(--color-cyber-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-success {
  color: var(--color-success);
}

.text-danger {
  color: var(--color-danger);
}

.text-warning {
  color: var(--color-warning);
}

.text-muted {
  color: var(--color-text-muted);
}

/* 全局滚动条 / Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-electric-blue);
}

/* ==== 弹窗与抽屉系统 (Modal & Drawer) ==== */
.global-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.global-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* 右侧抽屉 / Right Drawer */
.drawer-panel {
  position: fixed;
  top: 0;
  right: -600px;
  width: 600px;
  height: 100vh;
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--color-border-subtle);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.drawer-panel.active {
  right: 0;
}

.drawer-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.drawer-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
  background: rgba(13, 13, 18, 0.8);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* 居中模态框 / Center Modal */
.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--color-bg-panel);
  backdrop-filter: blur(24px);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), 0 0 20px rgba(0, 240, 255, 0.1);
  z-index: 1002;
  width: 500px;
  max-width: 90vw;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
  display: flex;
  flex-direction: column;
}

.modal-dialog.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: var(--space-4);
}

.modal-footer {
  padding: var(--space-3);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* 常用表单结构 */
.form-field {
  margin-bottom: var(--space-3);
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-help {
  display: block;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}