@import './variables.css';

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Utility Classes --- */
.grid {
  display: grid;
  gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.flex-column { flex-direction: column; }
.text-center { text-align: center; }

/* Header */
.header {
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, #0055ff 0%, #00a8ff 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  position: relative;
}


.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.btn-contact {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
}

.btn-contact:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-main);
  z-index: 1001;
}

/* Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  background: radial-gradient(ellipse 80% 100% at 70% 50%, rgba(0, 85, 255, 0.12) 0%, rgba(0, 85, 255, 0.06) 40%, transparent 70%),
              radial-gradient(ellipse at 30% 60%, rgba(0, 85, 255, 0.05) 0%, transparent 50%),
              linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse 90% 120% at 50% 60%, rgba(0, 85, 255, 0.1) 0%, rgba(0, 85, 255, 0.05) 50%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  height: 40%;
  background: linear-gradient(to top, rgba(248, 250, 252, 0.8) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 64px;
  line-height: 1.15;
  margin-bottom: 28px;
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 24px;
  align-items: center;
}

.hero-btns .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.hero-btns .nav-link:hover i {
  transform: translateX(4px);
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 2;
  padding-bottom: 20px;
}

.robot-3d-wrapper {
  position: relative;
  width: 100%;
  max-width: 580px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 20px;
}

.robot-3d-wrapper::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 180px;
  background: linear-gradient(to top, 
    rgba(248, 250, 252, 1) 0%, 
    rgba(248, 250, 252, 0.95) 20%,
    rgba(248, 250, 252, 0.85) 40%,
    rgba(248, 250, 252, 0.6) 60%,
    rgba(248, 250, 252, 0.3) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 3;
  mask-image: radial-gradient(ellipse 110% 60% at center top, 
    black 0%, 
    rgba(0, 0, 0, 0.9) 30%,
    rgba(0, 0, 0, 0.6) 60%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(ellipse 110% 60% at center top, 
    black 0%, 
    rgba(0, 0, 0, 0.9) 30%,
    rgba(0, 0, 0, 0.6) 60%,
    transparent 100%
  );
  filter: blur(2px);
}

.robot-3d-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;
  mask-image: 
    linear-gradient(to bottom, 
      black 0%, 
      black 60%, 
      rgba(0, 0, 0, 0.9) 70%,
      rgba(0, 0, 0, 0.7) 80%,
      rgba(0, 0, 0, 0.4) 90%,
      transparent 100%
    ),
    linear-gradient(to right, 
      transparent 0%,
      rgba(0, 0, 0, 0.3) 5%,
      black 10%,
      black 90%,
      rgba(0, 0, 0, 0.3) 95%,
      transparent 100%
    ),
    linear-gradient(to top, 
      black 0%,
      black 85%,
      rgba(0, 0, 0, 0.8) 90%,
      rgba(0, 0, 0, 0.5) 95%,
      transparent 100%
    ),
    radial-gradient(ellipse 92% 98% at center, black 80%, rgba(0, 0, 0, 0.6) 90%, transparent 100%);
  -webkit-mask-image: 
    linear-gradient(to bottom, 
      black 0%, 
      black 60%, 
      rgba(0, 0, 0, 0.9) 70%,
      rgba(0, 0, 0, 0.7) 80%,
      rgba(0, 0, 0, 0.4) 90%,
      transparent 100%
    ),
    linear-gradient(to right, 
      transparent 0%,
      rgba(0, 0, 0, 0.3) 5%,
      black 10%,
      black 90%,
      rgba(0, 0, 0, 0.3) 95%,
      transparent 100%
    ),
    linear-gradient(to top, 
      black 0%,
      black 85%,
      rgba(0, 0, 0, 0.8) 90%,
      rgba(0, 0, 0, 0.5) 95%,
      transparent 100%
    ),
    radial-gradient(ellipse 92% 98% at center, black 80%, rgba(0, 0, 0, 0.6) 90%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  filter: drop-shadow(0 25px 60px rgba(0, 85, 255, 0.12)) 
          drop-shadow(0 10px 30px rgba(0, 0, 0, 0.08))
          blur(0.5px);
  transition: filter 0.3s ease;
}

.robot-shading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 85, 255, 0.08) 0%, transparent 65%);
  mix-blend-mode: overlay;
  z-index: 1;
  opacity: 0.6;
}

.ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150%;
  height: 150%;
  background: radial-gradient(ellipse 100% 120% at center 45%, rgba(0, 85, 255, 0.15) 0%, rgba(0, 85, 255, 0.08) 40%, transparent 80%);
  filter: blur(60px);
  z-index: 0;
  opacity: 0.9;
}

.robot-3d-wrapper::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 220px;
  background: radial-gradient(ellipse 110% 55% at center top, 
    rgba(248, 250, 252, 0.98) 0%, 
    rgba(248, 250, 252, 0.85) 25%,
    rgba(248, 250, 252, 0.6) 50%,
    rgba(248, 250, 252, 0.3) 75%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 4;
  filter: blur(3px);
  opacity: 0.9;
}

/* Sections Common */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 36px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 18px;
}

/* Solutions / Scenarios */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.scenario-card {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.scenario-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.scenario-card.active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(0,85,255,0.03) 0%, rgba(0,168,255,0.03) 100%);
  box-shadow: 0 12px 32px rgba(0, 85, 255, 0.15);
  transform: translateY(-8px);
}

.scenario-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 24px;
}

.scenario-card h3 {
  font-size: 22px;
  margin-bottom: 16px;
}

.scenario-card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Detail Scenario Section */
.scenario-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

#scenario-detail {
  border-top: 1px solid var(--border-color);
  overflow: hidden;
}

#scenario-detail .scenario-detail {
  padding: 60px 0;
  min-height: 500px;
}

.robot-mockup {
  background: linear-gradient(145deg, #f8fafc, #e2e8f0);
  border-radius: 40px;
  padding: 30px;
  position: relative;
  box-shadow: 20px 20px 60px #d1d9e6, -20px -20px 60px #ffffff;
  border: 1px solid rgba(255,255,255,0.8);
}

.robot-screen-mock {
  background-color: #0f172a;
  border-radius: 20px;
  width: 100%;
  aspect-ratio: 10 / 14;
  border: 12px solid #334155;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 10px 30px rgba(0,85,255,0.1);
}

.robot-screen-mock::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.screen-header {
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.screen-body-container {
  padding: 20px;
  color: #e2e8f0;
}

.screen-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
}

.screen-btn-primary {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,85,255,0.3);
}

.screen-btn-secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

/* Hardware Display */
.hardware-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  align-items: stretch;
}

.hardware-item {
  background-color: white;
  border-radius: 24px;
  padding: 40px 20px;
  border: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hardware-item:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 85, 255, 0.1);
  border-color: var(--primary-color);
}

.hardware-img-container {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  position: relative;
}

.hardware-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.08));
  transition: transform 0.4s ease;
}

.hardware-item:hover img {
  transform: scale(1.05);
}

.hardware-item h4 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.hardware-item p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

/* Footer */
.footer {
  background-color: var(--text-main);
  color: white;
  padding: 80px 0 40px;
}

.footer .logo-text {
  background: linear-gradient(135deg, #ffffff 0%, #60a5fa 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 24px;
}

.footer-col ul li {
  margin-bottom: 12px;
  color: #94a3b8;
}

.footer-col ul li:hover {
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid #334155;
  color: #64748b;
  font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content h1 { font-size: 48px; }
  .hero-btns { justify-content: center; }
  .hero-content p { max-width: 100%; }

  .scenarios-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  
  .scenario-detail {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 28px; }
  .section-header p { font-size: 16px; }

  /* Navigation Mobile */
  .menu-toggle { display: block; }
  
  .nav {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: white;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-md);
  }

  .nav.active { left: 0; }
  .nav-link { font-size: 18px; width: 100%; text-align: center; padding: 15px 0; }
  
  .btn-contact { display: none; } /* Header 上的隐藏，Hero 上的保留 */

  /* Hero Mobile */
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 15px; }
  
  /* Grid Resets */
  .grid-2, .grid-3, .grid-4, .scenarios-grid, .footer-grid {
    grid-template-columns: 1fr !important;
  }

  /* About Us */
  #about .grid { grid-template-columns: 1fr !important; }
  
  /* Footer */
  .footer { padding: 40px 0; }
  .footer-grid { text-align: center; }
  .footer .logo { justify-content: center; }

  /* Hero Stats */
  .hero .grid { gap: 20px !important; padding: 20px !important; }
  .hero .grid div div:first-child { font-size: 32px !important; }

  /* Contact Section */
  #contact .container > div { padding: 40px 20px !important; }
  #contact h2 { font-size: 32px !important; }
  #contact p { font-size: 16px !important; }
  #contact .grid { gap: 15px !important; }
}

@media (max-width: 480px) {
  .hero-btns { flex-direction: column; width: 100%; }
  .hero-btns a { width: 100%; text-align: center; }
  .logo-text { font-size: 20px; }
  .logo-icon { width: 32px; height: 32px; }
}

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}
