@import "tailwindcss";

/* ========================================
   GoTunnel 毛玻璃设计系统
   Glassmorphism Design System
   ======================================== */

/* 深色主题（默认） - 深邃渐变背景 */
:root,
[data-theme="dark"] {
  /* 背景色 - 深色渐变基底 */
  --color-bg-primary: #0a0e17;
  --color-bg-secondary: #0d1220;
  --color-bg-tertiary: #111827;
  --color-bg-elevated: #1a2332;

  /* 玻璃态背景 - 半透明 */
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-bg-hover: rgba(26, 35, 50, 0.7);
  --glass-bg-light: rgba(255, 255, 255, 0.03);
  --glass-bg-card: rgba(17, 24, 39, 0.5);

  /* 边框 - 高光描边 */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-light: rgba(255, 255, 255, 0.05);
  --color-border-glow: rgba(99, 179, 237, 0.3);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-border-hover: 1px solid rgba(255, 255, 255, 0.15);

  /* 文字颜色 */
  --color-text-primary: #f0f4f8;
  --color-text-secondary: rgba(240, 244, 248, 0.7);
  --color-text-muted: rgba(240, 244, 248, 0.45);

  /* 强调色 - 霓虹高光 */
  --color-accent: #3b82f6;
  --color-accent-hover: #60a5fa;
  --color-accent-glow: rgba(59, 130, 246, 0.4);
  --color-success: #10b981;
  --color-success-glow: rgba(16, 185, 129, 0.4);
  --color-warning: #f59e0b;
  --color-warning-glow: rgba(245, 158, 11, 0.4);
  --color-error: #ef4444;
  --color-error-glow: rgba(239, 68, 68, 0.4);
  --color-info: #06b6d4;
  --color-info-glow: rgba(6, 182, 212, 0.4);

  /* 渐变背景 */
  --gradient-bg: linear-gradient(135deg, #0a0e17 0%, #1a1f35 50%, #0d1220 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);

  /* 模糊效果 */
  --glass-blur: blur(20px);
  --glass-blur-light: blur(12px);

  /* 阴影 - 悬浮感 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 浅色主题 - 柔和渐变背景 */
[data-theme="light"] {
  /* 背景色 - 浅色渐变基底 */
  --color-bg-primary: #f0f4f8;
  --color-bg-secondary: #e8eef4;
  --color-bg-tertiary: #ffffff;
  --color-bg-elevated: #ffffff;

  /* 玻璃态背景 - 半透明白 */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-hover: rgba(255, 255, 255, 0.85);
  --glass-bg-light: rgba(255, 255, 255, 0.5);
  --glass-bg-card: rgba(255, 255, 255, 0.6);

  /* 边框 - 柔和描边 */
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-light: rgba(0, 0, 0, 0.05);
  --color-border-glow: rgba(59, 130, 246, 0.3);
  --glass-border: 1px solid rgba(255, 255, 255, 0.8);
  --glass-border-hover: 1px solid rgba(255, 255, 255, 0.95);

  /* 文字颜色 */
  --color-text-primary: #1a202c;
  --color-text-secondary: rgba(26, 32, 44, 0.7);
  --color-text-muted: rgba(26, 32, 44, 0.5);

  /* 强调色 */
  --color-accent: #3b82f6;
  --color-accent-hover: #2563eb;
  --color-accent-glow: rgba(59, 130, 246, 0.3);
  --color-success: #10b981;
  --color-success-glow: rgba(16, 185, 129, 0.3);
  --color-warning: #f59e0b;
  --color-warning-glow: rgba(245, 158, 11, 0.3);
  --color-error: #ef4444;
  --color-error-glow: rgba(239, 68, 68, 0.3);
  --color-info: #06b6d4;
  --color-info-glow: rgba(6, 182, 212, 0.3);

  /* 渐变背景 */
  --gradient-bg: linear-gradient(135deg, #e8eef4 0%, #f0f4f8 50%, #e0e8f0 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);

  /* 模糊效果 */
  --glass-blur: blur(20px);
  --glass-blur-light: blur(12px);

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.1);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--gradient-bg);
  color: var(--color-text-primary);
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  position: relative;
}

/* ========================================
   玻璃态卡片组件
   ======================================== */

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

/* 卡片顶部高光 */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%);
  pointer-events: none;
}

.glass-card-hover:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-2px);
}

/* ========================================
   玻璃态按钮
   ======================================== */

.glass-btn {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 18px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.glass-btn:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
}

.glass-btn:active {
  transform: scale(0.98);
}

.glass-btn.primary {
  background: var(--gradient-accent);
  border: none;
  color: white;
  box-shadow: 0 4px 15px var(--color-accent-glow);
}

.glass-btn.primary:hover {
  box-shadow: 0 6px 20px var(--color-accent-glow);
  filter: brightness(1.1);
}

.glass-btn.small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* ========================================
   玻璃态输入框
   ======================================== */

.glass-input {
  background: var(--glass-bg-light);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--color-text-primary);
  font-size: 15px;
  width: 100%;
  transition: all 0.2s ease;
  outline: none;
}

.glass-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.glass-input::placeholder {
  color: var(--color-text-muted);
}

/* ========================================
   动画背景粒子
   ======================================== */

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(60px);
  animation: float 20s ease-in-out infinite;
}

.particle-1 {
  width: 400px;
  height: 400px;
  background: var(--color-accent);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.particle-2 {
  width: 300px;
  height: 300px;
  background: #8b5cf6;
  bottom: -50px;
  left: -50px;
  animation-delay: -5s;
}

.particle-3 {
  width: 250px;
  height: 250px;
  background: var(--color-info);
  top: 50%;
  left: 50%;
  animation-delay: -10s;
}

.particle-4 {
  width: 200px;
  height: 200px;
  background: var(--color-success);
  bottom: 20%;
  right: 20%;
  animation-delay: -15s;
}

.particle-5 {
  width: 350px;
  height: 350px;
  background: #ec4899;
  top: 30%;
  left: 10%;
  animation-delay: -7s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(-30px, -20px) scale(1.02);
  }
}
