:root {
  --bg-color: #030712;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --accent-primary: #6366f1;
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.2);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

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

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Header & Nav */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(3, 7, 18, 0.7);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Hero Section */
#home-warp {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Background Glows */
#home-warp::before, #home-warp::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
}

#home-warp::before {
  background: var(--accent-primary);
  top: 20%;
  left: 10%;
  animation: pulseGlow 8s ease-in-out infinite;
}

#home-warp::after {
  background: var(--accent-secondary);
  bottom: 20%;
  right: 10%;
  animation: pulseGlow 8s ease-in-out infinite 4s;
}

#home {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 80px;
}

#home-logo h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #a5b4fc, #06b6d4, #fff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 1s ease-out forwards, gradientShift 8s ease infinite;
  opacity: 0;
}

#home-logo h4 {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
  animation: fadeInUp 1s ease-out 0.2s forwards;
  opacity: 0;
}

#home-intro h6 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
  animation: fadeInUp 1s ease-out 0.4s forwards;
  opacity: 0;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.section-header-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Services Section */
#services {
  padding: 100px 0;
}

#service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.server-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.server-item:hover {
  transform: translateY(-8px);
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.5);
}

.server-item .icon svg {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-item:hover .icon svg {
  transform: scale(1.15) translateY(-3px);
  filter: drop-shadow(0 0 12px var(--accent-secondary));
}

.server-item-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

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

/* About Section */
#about {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.01);
}

#about-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 50px;
  max-width: 900px;
  margin: 0 auto;
}

#about-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

#about-content p:last-child {
  margin-bottom: 0;
}

/* Contact Section */
#contact {
  padding: 100px 0;
}

#contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.contact-info {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
}

.contact-item {
  margin-bottom: 30px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-secondary);
  margin-bottom: 5px;
}

.contact-value {
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 500;
}

#contact-img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  /* Fallback if image not found or ugly */
  background: var(--accent-gradient);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Footer */
#footer {
  padding: 50px 0;
  border-top: 1px solid var(--glass-border);
  background: rgba(3, 7, 18, 0.9);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

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

.beian-link {
  color: var(--accent-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  #home-logo h1 {
    font-size: 2.5rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

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

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

#contact-img {
  animation: float 6s ease-in-out infinite;
}
