/* 重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 页面基础样式 */
body {
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  background: #111;
  color: #fff;
  overflow-x: hidden;
}

/* 导航栏 */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 100;
  transition: background 0.3s ease;
  background: transparent;
}
.navbar {
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
  text-align: center;
}
.navbar h1 {
  font-size: 1.5rem;
  color: gold;
}

/* 主体内容 */
.main-content {
  padding-top: 80px; /* 给固定导航留出空间 */
  text-align: center;
}
.intro {
  margin-bottom: 2rem;
}
.intro h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: gold;
}
.intro p {
  font-size: 1rem;
  color: #ccc;
}

/* 3D 旋转效果容器 */
.carousel-container {
  perspective: 1000px;
  margin: 2rem auto;
  max-width: 400px;
  height: 400px;
  position: relative;
}
.carousel {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotate 20s infinite linear;
}

/* 每个 logo 容器 */
.logo-container {
  position: absolute;
  width: 120px;
  height: 120px;
  top: 50%;
  left: 50%;
  margin: -60px;  /* 一半宽高 */
  opacity: 0; /* 初始透明，待 JS 渐入 */
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.8s ease;
}
.logo-container img {
  width: 100%;
  height: 100%;
  display: block;
  filter: brightness(0.8);
  border-radius: 10px;
}

/* 3D 定位：将 4 个 Logo 均匀分布 */
.logo-container:nth-child(1) {
  transform: rotateY(0deg) translateZ(200px);
}
.logo-container:nth-child(2) {
  transform: rotateY(90deg) translateZ(200px);
}
.logo-container:nth-child(3) {
  transform: rotateY(180deg) translateZ(200px);
}
.logo-container:nth-child(4) {
  transform: rotateY(270deg) translateZ(200px);
}

/* 鼠标悬停：放大与发光效果 */
.logo-container:hover img,
.logo-container:focus img {
  filter: brightness(1.5) drop-shadow(0 0 10px gold);
  transform: scale(1.1);
}

/* 导航栏滚动效果 */
.scrolled {
  background: rgba(0, 0, 0, 0.8);
}

/* 旋转动画 */
@keyframes rotate {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 1rem;
  background: #000;
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* 响应式：移动设备适配 */
@media (max-width: 767px) {
  .carousel-container {
    max-width: 300px;
    height: 300px;
  }
  .logo-container {
    width: 80px;
    height: 80px;
    margin: -40px;
  }
}
