/* 字节引力首页样式 */

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

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --dark-bg: #0f0f1a;
  --card-bg: rgba(255, 255, 255, 0.03);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
}

body {
  font-family:
    "Noto Sans SC",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* 星空背景 */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 引力场效果 - 仅首屏显示 */
.gravity-field {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  pointer-events: none;
  z-index: 0;
}

/* 中心光晕核心 */
.gravity-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.6) 0%,
    rgba(139, 92, 246, 0.3) 40%,
    transparent 70%
  );
  border-radius: 50%;
  animation: core-pulse 3s ease-in-out infinite;
  filter: blur(20px);
}

.gravity-core::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(139, 92, 246, 0.8) 50%,
    transparent 100%
  );
  border-radius: 50%;
  animation: core-glow 2s ease-in-out infinite alternate;
}

@keyframes core-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

@keyframes core-glow {
  from {
    box-shadow:
      0 0 30px rgba(99, 102, 241, 0.8),
      0 0 60px rgba(139, 92, 246, 0.4);
  }
  to {
    box-shadow:
      0 0 50px rgba(99, 102, 241, 1),
      0 0 100px rgba(139, 92, 246, 0.6);
  }
}

/* 旋转轨道环 */
.gravity-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
}

.gravity-ring:nth-child(2) {
  width: 200px;
  height: 200px;
  border-color: rgba(139, 92, 246, 0.25);
  animation: orbit-rotate 20s linear infinite;
}
.gravity-ring:nth-child(3) {
  width: 320px;
  height: 320px;
  border-color: rgba(99, 102, 241, 0.22);
  animation: orbit-rotate 30s linear infinite reverse;
}
.gravity-ring:nth-child(4) {
  width: 460px;
  height: 460px;
  border-color: rgba(6, 182, 212, 0.2);
  animation: orbit-rotate 40s linear infinite;
}
.gravity-ring:nth-child(5) {
  width: 620px;
  height: 620px;
  border-color: rgba(99, 102, 241, 0.18);
  animation: orbit-rotate 50s linear infinite reverse;
}
.gravity-ring:nth-child(6) {
  width: 800px;
  height: 800px;
  border-color: rgba(139, 92, 246, 0.15);
  animation: orbit-rotate 60s linear infinite;
}

@keyframes orbit-rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 轨道粒子 */
.orbit-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  border-radius: 50%;
  box-shadow:
    0 0 10px rgba(99, 102, 241, 0.8),
    0 0 20px rgba(6, 182, 212, 0.4);
}

.gravity-ring:nth-child(2) .orbit-particle {
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}

.gravity-ring:nth-child(3) .orbit-particle {
  top: 50%;
  right: -3px;
  transform: translateY(-50%);
}

.gravity-ring:nth-child(4) .orbit-particle {
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
}

.gravity-ring:nth-child(5) .orbit-particle {
  top: 50%;
  left: -3px;
  transform: translateY(-50%);
}

.gravity-ring:nth-child(6) .orbit-particle {
  top: 10%;
  right: 10%;
}

/* 外层光晕 */
.gravity-field::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.08) 0%,
    rgba(139, 92, 246, 0.04) 40%,
    transparent 70%
  );
  border-radius: 50%;
  animation: outer-pulse 5s ease-in-out infinite;
}

@keyframes outer-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

/* 浮动字节粒子 */
.byte-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.byte {
  position: absolute;
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: rgba(99, 102, 241, 0.4);
  animation: float-byte 15s linear infinite;
}

@keyframes float-byte {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* 主容器 */
.main-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

/* 英雄区域 */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.hero-content {
  max-width: 900px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-text {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
  }
  to {
    filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.5));
  }
}

.logo-english {
  font-size: 1.2rem;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-btn.primary {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  color: white;
  border: none;
}

.cta-btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.cta-btn.secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

/* 滚动指示器 */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator::before {
  content: "";
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator::after {
  content: "";
  display: block;
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-dot 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

@keyframes scroll-dot {
  0%,
  100% {
    opacity: 1;
    top: 8px;
  }
  50% {
    opacity: 0.3;
    top: 20px;
  }
}

/* 产品区域 */
.products-section {
  padding: 6rem 2rem;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 2.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.product-card-inner {
  transition: transform 0.1s ease;
}

.product-icon {
  width: 180px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.product-logo {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.product-card.wwads .product-icon {
  background: none;
}

.product-card.adwork .product-icon {
  background: none;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-target {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.product-stats {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-weight: 500;
}

.product-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.8em * 3);
}

.product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.product-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.product-link::after {
  content: "→";
  transition: transform 0.3s ease;
}

.product-link:hover::after {
  transform: translateX(4px);
}

/* 关于区域 */
.about-section {
  padding: 6rem 2rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(99, 102, 241, 0.05) 50%,
    transparent 100%
  );
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 2;
  text-align: justify;
}

.highlight {
  color: var(--accent-color);
  font-weight: 500;
}

/* 数据统计 */
.stats-section {
  padding: 4rem 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 1rem;
}

/* 页脚 */
footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.copyright a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.copyright a:hover {
  color: var(--text-secondary);
}

/* 滚动动画 */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* 鼠标光晕效果 */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.cursor-glow.active {
  opacity: 1;
}

/* 响应式 */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

  .cursor-glow {
    display: none;
  }
}
