/* ========================================
   千亿新智 AI 科技官网 - Base Styles
   ======================================== */

/* === 基础设置 === */

html {
  font-size: 16px;
}

body {
  font-family: var(--font-chinese), var(--font-primary);
  background-color: var(--color-deep-space);
  color: var(--color-text-primary);
  overflow-x: hidden;
}

/* === 容器 === */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--content {
  max-width: var(--container-content);
}

/* === 排版 === */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  letter-spacing: var(--letter-spacing-wide);
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

h4 {
  font-size: var(--text-h4);
}

p {
  line-height: 1.8;
  color: var(--color-text-secondary);
}

a {
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover {
  color: var(--color-tech-blue);
}

/* === 渐变文字 === */

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === 章节通用 === */

.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

@media (max-width: 1024px) {
  .section {
    padding: var(--space-xl) 0;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-lg) 0;
  }
}

/* === 章节标题 === */

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-label {
  display: inline-block;
  font-size: var(--text-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-tech-blue);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  margin-bottom: var(--space-sm);
  position: relative;
}

.section-label::before,
.section-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-tech-blue));
}

.section-label::before {
  right: calc(100% + 12px);
}

.section-label::after {
  left: calc(100% + 12px);
  background: linear-gradient(90deg, var(--color-tech-blue), transparent);
}

.section-title {
  font-size: var(--text-h1);
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.section-subtitle {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* === 背景装饰 === */

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.3;
  pointer-events: none;
}

.bg-glow--blue {
  background: var(--color-tech-blue);
}

.bg-glow--purple {
  background: var(--color-neon-purple);
}

/* === 滚动条样式 === */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-deep-space);
}

::-webkit-scrollbar-thumb {
  background: var(--color-deep-space-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-tech-blue);
}

/* === 选中样式 === */

::selection {
  background: var(--color-tech-blue);
  color: var(--color-deep-space);
}

/* === Focus 样式 === */

:focus-visible {
  outline: 2px solid var(--color-tech-blue);
  outline-offset: 2px;
}

/* === 工具类 === */

.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;
}

.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

/* === 加载动画 === */

.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 255, 0.1),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* === 装饰线 === */

.divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  margin: var(--space-md) auto;
  border-radius: var(--radius-full);
}

/* === 标签 === */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-tech-blue);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.badge--purple {
  background: rgba(123, 47, 255, 0.1);
  color: var(--color-neon-purple);
  border-color: rgba(123, 47, 255, 0.2);
}

.badge--success {
  background: rgba(0, 255, 136, 0.1);
  color: var(--color-success);
  border-color: rgba(0, 255, 136, 0.2);
}
