/* 优化后的CSS，包含性能优化特性 */

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1419;
  color: #cde1ff;
  line-height: 1.6;
}

/* 图片性能优化 */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* 渐进式图片加载 */
.lazy-image {
  filter: blur(5px);
  transition: filter 0.3s ease;
}

.lazy-image.loaded {
  filter: blur(0);
}

/* 顶栏样式 */
.topbar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.logo-img {
  width: 40px;
  height: 40px;
}

.name {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.nav {
  display: flex;
  gap: 24px;
  flex: 2;
  justify-content: center;
}

.nav a {
  color: #cde1ff;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  padding: 8px 12px;
  border-radius: 6px;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.admin-link {
  margin-right: 16px;
}

.admin-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lang-switch {
  display: flex;
  gap: 8px;
}

.lang-switch button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #cde1ff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-switch button:hover,
.lang-switch button.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* hero区域 */
.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide:first-child {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 20, 25, 0.9) 0%, rgba(26, 31, 46, 0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 18px;
  color: #cde1ff;
  margin-bottom: 40px;
  opacity: 0.9;
}

.cta {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin: 0 8px;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.cta.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

/* 区块样式 */
.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 40px;
}

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

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
}

.card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.card strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: #4f46e5;
  margin-bottom: 16px;
}

.card p {
  color: #cde1ff;
  font-size: 14px;
  line-height: 1.6;
}

.card-icon {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4f46e5;
  font-size: 20px;
}

/* 车源展示 */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.car-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.car-image {
  height: 200px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.car-card:hover .car-image img {
  transform: scale(1.05);
}

.car-info {
  padding: 24px;
}

.car-info h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.car-specs {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.car-specs span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 12px;
  color: #cde1ff;
}

.car-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.car-features span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.car-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.car-brand-logo img {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* 响应式设计 */
@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  
  .nav {
    order: 3;
    width: 100%;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
  }
  
  .nav a {
    font-size: 12px;
    padding: 6px 10px;
  }
  
  .admin-link {
    margin-right: 8px;
  }
  
  .admin-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .hero-content h1 {
    font-size: 32px;
  }
  
  .hero-content p {
    font-size: 16px;
  }
  
  .section {
    padding: 40px 16px;
  }
  
  .cars-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 页脚 */
footer {
  text-align: center;
  padding: 40px 24px;
  background: #0f1419;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

/* 性能优化：字体显示优化 */
h1, h2, h3, h4, h5, h6 {
  font-display: swap;
}

/* 性能优化：减少重绘重排 */
.hero-slide,
.car-card,
.card {
  will-change: transform;
}

/* 性能优化：预加载关键资源 */
<link rel="preload" href="assets/img/乌鲁木齐.jpg" as="image">

/* 性能优化：DNS预解析 */
<link rel="dns-prefetch" href="//images.unsplash.com">
<link rel="dns-prefetch" href="//upload.wikimedia.org">