/*
 * 文件名: common.css
 * 功能说明: GROK官网公共样式表 - 全局样式和通用组件 (2025 Vibrant Redesign)
 * 版权: grok-4.top
 */

:root {
  /* 颜色系统 - 大气科技风格 */
  --color-bg: #0f172a; /* 深蓝背景，更有质感 */
  --color-bg-alt: #1e293b; /* 稍浅的深蓝 */
  --color-text-main: #f8fafc; /* 亮白文字 */
  --color-text-muted: #94a3b8; /* 灰蓝文字 */
  
  /* 品牌色渐变 */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); /* 蓝紫渐变 */
  --gradient-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-text: linear-gradient(to right, #60a5fa, #c084fc);
  
  /* 边框和分割线 */
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-hover: rgba(255, 255, 255, 0.2);

  /* 阴影系统 - 发光效果 */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3); /* 蓝色光晕 */

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  /* 布局 */
  --container-width: 1200px;
  --header-height: 80px;
}

/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text-main);
  background-color: var(--color-bg);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 25%);
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 容器样式 */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* 顶部导航栏 - 悬浮玻璃态 */
.header {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

.logo .version {
  background: var(--gradient-primary);
  color: white;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu li a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 15px;
  position: relative;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: white;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* 导航栏 CTA 按钮 */
.nav-menu .cta-button {
  background: var(--gradient-primary);
  color: white !important;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-glow);
  border: 1px solid rgba(255,255,255,0.1);
}

.nav-menu .cta-button:hover {
  background: var(--gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
}

/* 移动端菜单 Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.mobile-menu-toggle span {
  width: 26px;
  height: 2px;
  background: white;
  transition: 0.3s;
  border-radius: 2px;
}

/* 通用按钮样式 */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: white;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
}

.primary-button:hover {
  background: var(--gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  padding: 16px 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* 页脚样式 */
.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 80px 0 40px;
  margin-top: 100px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-section h4 {
  color: white;
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 600;
}

.footer-section p {
  color: var(--color-text-muted);
  font-size: 14px;
  max-width: 300px;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: var(--color-text-muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: #60a5fa;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 32px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .nav-menu.active {
    display: flex;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--color-border);
    gap: 20px;
  }
  
  .nav-menu li {
    width: 100%;
    text-align: center;
  }
  
  .nav-menu li a {
    display: block;
    padding: 10px;
    font-size: 16px;
  }

  .nav-menu .cta-button {
    width: 100%;
    display: block;
    padding: 12px;
  }

  .mobile-menu-toggle {
    display: flex;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.mt-20 { margin-top: 20px; }

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

.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 卡片通用样式 - 玻璃态 */
.glass-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}
