/**
 * 低代码平台学习中心 - 统一样式表
 * 适用于 CN 目录下所有平台学习中心页面
 * 版本: 1.0
 * 更新时间: 2026-01-03
 */

/* ==================== 基础样式 ==================== */
body {
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0a0e27;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* 科技感背景网格 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(102, 126, 234, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 126, 234, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
  pointer-events: none;
}

/* ==================== 动画效果 ==================== */
@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes float-diagonal {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(20px, -20px); }
  50% { transform: translate(0, -40px); }
  75% { transform: translate(-20px, -20px); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==================== 光晕效果 ==================== */
.tech-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: glow-pulse 8s ease-in-out infinite;
}

.tech-orb-1 {
  top: 10%;
  left: 15%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.4), transparent);
  animation-delay: 0s;
}

.tech-orb-2 {
  top: 60%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3), transparent);
  animation-delay: 2s;
}

.tech-orb-3 {
  bottom: 10%;
  left: 40%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent);
  animation-delay: 4s;
}

/* ==================== 渐变样式 ==================== */
.tech-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-gradient {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.15) 0%, 
    rgba(118, 75, 162, 0.15) 50%, 
    rgba(102, 126, 234, 0.15) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 15s ease infinite;
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ==================== 卡片样式 ==================== */
.tech-card, .card-tech {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(102, 126, 234, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.tech-card::before, .card-tech::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4facfe);
  z-index: -1;
  border-radius: 18px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.tech-card:hover::before, .card-tech:hover::before {
  opacity: 0.8;
}

.tech-card::after, .card-tech::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.4), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: 0;
}

.tech-card:hover::after, .card-tech:hover::after {
  width: 300px;
  height: 300px;
}

.tech-card:hover, .card-tech:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4),
              0 0 40px rgba(102, 126, 234, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(102, 126, 234, 0.6);
}

/* ==================== 发光文字效果 ==================== */
.glow-text {
  text-shadow: 0 0 20px rgba(102, 126, 234, 0.5),
               0 0 40px rgba(102, 126, 234, 0.3),
               0 0 60px rgba(102, 126, 234, 0.2);
}

/* ==================== 导航栏样式 ==================== */
.navbar {
  backdrop-filter: blur(20px);
  background: rgba(10, 14, 39, 0.8);
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  background: rgba(10, 14, 39, 0.95);
}

/* ==================== 按钮样式 ==================== */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.5);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  body::before {
    background-size: 30px 30px;
  }
  
  .tech-orb {
    width: 200px !important;
    height: 200px !important;
  }
  
  .tech-card, .card-tech {
    margin-bottom: 1rem;
  }
}

/* ==================== 内容区域 ==================== */
.content-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

main {
  position: relative;
  z-index: 1;
}

/* ==================== 标签样式 ==================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-primary {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ==================== 链接样式 ==================== */
a {
  transition: all 0.3s ease;
}

.text-link {
  color: #667eea;
  text-decoration: none;
}

.text-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ==================== 容器样式 ==================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 3rem;
  }
}
