/* ============================================
   KiberMod - 未来科技风格主题
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cyber-cyan: #00f0ff;
  --cyber-magenta: #ff00ff;
  --cyber-purple: #7b2ff7;
  --cyber-blue: #0a1a3e;
  --cyber-dark: #050510;
  --cyber-dark2: #0a0a1a;
  --cyber-card: rgba(15, 15, 40, 0.6);
  --cyber-border: rgba(0, 240, 255, 0.2);
  --text-primary: #e0e0ff;
  --text-secondary: #8888aa;
  --text-muted: #666688;
  --bg-gradient: linear-gradient(135deg, #050510 0%, #0a0a2e 50%, #050510 100%);
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.3), 0 0 60px rgba(0, 240, 255, 0.1);
  --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.3), 0 0 60px rgba(255, 0, 255, 0.1);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Rajdhani', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

::selection {
  background: rgba(0, 240, 255, 0.3);
  color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--cyber-dark);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--cyber-cyan), var(--cyber-purple));
  border-radius: 3px;
}

/* --- Particle Canvas --- */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* --- Grid Background --- */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* --- Scanlines --- */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 240, 255, 0.02) 2px,
    rgba(0, 240, 255, 0.02) 4px
  );
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(5, 5, 16, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--cyber-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo .logo-icon {
  transition: transform 0.5s ease;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
}

.nav-logo:hover .logo-icon {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5));
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  padding: 0.25rem 0;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-magenta));
  transition: var(--transition);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cyber-cyan);
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  overflow: hidden;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
}

.hero-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.4));
  animation: logoFloat 4s ease-in-out infinite, fadeInUp 0.8s ease-out both;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--cyber-border);
  border-radius: 50px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--cyber-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease-out;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyber-cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7); }
  50% { opacity: 0.5; box-shadow: 0 0 0 8px rgba(0, 240, 255, 0); }
}

.hero-title {
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 4.5rem;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 0%, #aabbff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.title-line.accent {
  font-size: 5rem;
  background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple), var(--cyber-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  position: relative;
}

.title-line.accent::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyber-cyan), var(--cyber-magenta), transparent);
}

.title-line.subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
  background: none;
  margin-top: 0.5rem;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 1s both;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple));
  color: #fff;
  border: none;
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.4), 0 0 80px rgba(123, 47, 247, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--cyber-cyan);
  border: 1px solid var(--cyber-border);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--cyber-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

/* --- Stats --- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--cyber-border);
  animation: fadeInUp 0.8s ease-out 1.2s both;
}

.stat-item {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.25rem;
}

/* --- Floating Orbs --- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 2;
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(0, 240, 255, 0.08);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 350px;
  height: 350px;
  background: rgba(123, 47, 247, 0.06);
  bottom: -5%;
  left: -5%;
  animation-delay: -3s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: rgba(255, 0, 255, 0.05);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: -6s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* --- Sections --- */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--cyber-cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  padding: 0.35rem 1rem;
  border: 1px solid var(--cyber-border);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--cyber-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-magenta));
  margin: 0 auto;
  border-radius: 2px;
}

/* --- About Cards --- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: var(--cyber-card);
  border: 1px solid var(--cyber-border);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.about-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-magenta));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.about-card:hover::before {
  transform: scaleX(1);
}

.about-card:hover {
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 240, 255, 0.1), inset 0 0 30px rgba(0, 240, 255, 0.05);
}

.card-icon {
  margin-bottom: 1.25rem;
}

.card-icon svg {
  filter: drop-shadow(0 0 10px currentColor);
}

.about-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Works Grid --- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.work-item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--cyber-card);
  border: 1px solid var(--cyber-border);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

.work-item.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.work-item:hover {
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 240, 255, 0.1);
}

.work-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/12;
}

.work-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease;
}

.work-placeholder svg {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.work-item:hover .work-placeholder {
  transform: scale(1.05);
}

.work-item:hover .work-placeholder svg {
  opacity: 1;
}

.work-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.work-overlay span {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--cyber-cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  border: 1px solid var(--cyber-cyan);
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  transform: translateY(10px);
  transition: var(--transition);
}

.work-item:hover .work-overlay {
  opacity: 1;
}

.work-item:hover .work-overlay span {
  transform: translateY(0);
}

.work-info {
  padding: 1.25rem;
}

.work-info h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.work-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.work-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.work-tags span {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--cyber-border);
  border-radius: 50px;
  color: var(--cyber-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Process Flow --- */
.process-flow {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  opacity: 0;
  transform: translateX(-30px);
}

.process-step.visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.step-number {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 60px;
  line-height: 1;
}

.step-content h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.step-line {
  position: absolute;
  left: 30px;
  top: 50px;
  bottom: -1rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyber-cyan), transparent);
}

.process-step:last-child .step-line {
  display: none;
}

/* --- Contact --- */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--cyber-card);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  transition: var(--transition);
}

.contact-item:hover {
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateX(5px);
}

.contact-item span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 1rem 1.25rem;
  background: var(--cyber-card);
  border: 1px solid var(--cyber-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form .btn {
  align-self: flex-start;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--cyber-border);
  padding: 3rem 2rem 1.5rem;
  background: rgba(5, 5, 16, 0.8);
  backdrop-filter: blur(20px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition);
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cyber-border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.beian-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.beian-link:hover {
  color: var(--cyber-cyan);
  text-decoration: underline;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(5, 5, 16, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
    border-bottom: 1px solid var(--cyber-border);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-toggle {
    display: flex;
  }

  .title-line {
    font-size: 2.5rem;
  }

  .title-line.accent {
    font-size: 3rem;
  }

  .title-line.subtitle {
    font-size: 1.1rem;
    letter-spacing: 4px;
  }

  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .stat-num {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .process-step {
    gap: 1rem;
  }

  .step-number {
    font-size: 2rem;
    min-width: 45px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .title-line {
    font-size: 1.8rem;
  }

  .title-line.accent {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}
